<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
Hi Li,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
Maybe I forget to attach it. The cover letter of that CpuLib patch set attached.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
Regards,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
Abner</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Chao Li <lichao@loongson.cn><br>
<b>Sent:</b> Wednesday, April 13, 2022 11:17 AM<br>
<b>To:</b> Chang, Abner (HPS SW/FW Technologist) <abner.chang@hpe.com><br>
<b>Cc:</b> "devel@edk2.groups.io" <devel@edk2.groups.io>; Michael D Kinney <michael.d.kinney@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>; Zhiguang Liu <zhiguang.liu@intel.com><br>
<b>Subject:</b> Re: [edk2-devel] [staging/LoongArch RESEND PATCH v1 25/33] MdePkg/BaseCpuLib: LoongArch Base CPU library implementation.</font>
<div> </div>
</div>
<div>
<div>Hi Abner,</div>
<br>
<div>You pointed out that you attached a patch to your last email, but I didn't find it, do you forgot to put it? In the current EDK II code repo, I can not find the patch which you mentioned.</div>
<br>
<div>
<p class="x_ex1" style="display:block; font-size:12px; color:#666">--<br>
Thanks,<br>
Chao<br>
------------------------</p>
<br>
<div style="display:block; font-size:0.9em; min-width:250px; max-width:300px; margin-top:4px; padding-top:4px">
<div style="display:block">
<div style="display:block"></div>
<div style="display:block"></div>
</div>
</div>
</div>
<div class="x_gmail_quote_attribution">On 4¤ë 8 2022, at 7:26 ±ß¤W, "Chang, Abner (HPS SW/FW Technologist)" <abner.chang@hpe.com> wrote:</div>
<blockquote>
<div>
<div>Recently there is a work to migrate UefiCpuLib to CpuLib (patch attached), you may want to sync up your changes with that patch set. RISC-V will do the same work later.</div>
<br>
<div>Thanks</div>
<div>Abner</div>
<br>
<div>> -----Original Message-----</div>
<div>> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Chao Li</div>
<div>> Sent: Wednesday, February 9, 2022 2:56 PM</div>
<div>> To: devel@edk2.groups.io</div>
<div>> Cc: Michael D Kinney <michael.d.kinney@intel.com>; Liming Gao</div>
<div>> <gaoliming@byosoft.com.cn>; Zhiguang Liu <zhiguang.liu@intel.com></div>
<div>> Subject: [edk2-devel] [staging/LoongArch RESEND PATCH v1 25/33]</div>
<div>> MdePkg/BaseCpuLib: LoongArch Base CPU library implementation.</div>
<div>></div>
<div>> Implement LoongArch CPU related functions in BaseCpuLib.</div>
<div>></div>
<div>> Cc: Michael D Kinney <michael.d.kinney@intel.com></div>
<div>> Cc: Liming Gao <gaoliming@byosoft.com.cn></div>
<div>> Cc: Zhiguang Liu <zhiguang.liu@intel.com></div>
<div>></div>
<div>> Signed-off-by: Chao Li <lichao@loongson.cn></div>
<div>> ---</div>
<div>> MdePkg/Library/BaseCpuLib/BaseCpuLib.inf | 7 ++++++-</div>
<div>> MdePkg/Library/BaseCpuLib/BaseCpuLib.uni | 5 +++--</div>
<div>> MdePkg/Library/BaseCpuLib/LoongArch/CpuFlushTlb.S | 15</div>
<div>> +++++++++++++++</div>
<div>> MdePkg/Library/BaseCpuLib/LoongArch/CpuSleep.S | 15</div>
<div>> +++++++++++++++</div>
<div>> 4 files changed, 39 insertions(+), 3 deletions(-)</div>
<div>> create mode 100644 MdePkg/Library/BaseCpuLib/LoongArch/CpuFlushTlb.S</div>
<div>> create mode 100644 MdePkg/Library/BaseCpuLib/LoongArch/CpuSleep.S</div>
<div>></div>
<div>> diff --git a/MdePkg/Library/BaseCpuLib/BaseCpuLib.inf</div>
<div>> b/MdePkg/Library/BaseCpuLib/BaseCpuLib.inf</div>
<div>> index 950f5229b2..3101fc656e 100644</div>
<div>> --- a/MdePkg/Library/BaseCpuLib/BaseCpuLib.inf</div>
<div>> +++ b/MdePkg/Library/BaseCpuLib/BaseCpuLib.inf</div>
<div>> @@ -8,6 +8,7 @@</div>
<div>> # Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR></div>
<div>> # Portions copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR></div>
<div>> # Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights</div>
<div>> reserved.<BR></div>
<div>> +# Portions Copyright (c) 2022, Loongson Technology Corporation Limited. All</div>
<div>> rights reserved.<BR></div>
<div>> #</div>
<div>> # SPDX-License-Identifier: BSD-2-Clause-Patent</div>
<div>> #</div>
<div>> @@ -25,7 +26,7 @@</div>
<div>></div>
<div>></div>
<div>> #</div>
<div>> -# VALID_ARCHITECTURES = IA32 X64 EBC ARM AARCH64 RISCV64</div>
<div>> +# VALID_ARCHITECTURES = IA32 X64 EBC ARM AARCH64 RISCV64</div>
<div>> LOONGARCH64</div>
<div>> #</div>
<div>></div>
<div>> [Sources.IA32]</div>
<div>> @@ -63,6 +64,10 @@</div>
<div>> [Sources.RISCV64]</div>
<div>> RiscV/Cpu.S</div>
<div>></div>
<div>> +[Sources.LOONGARCH64]</div>
<div>> + LoongArch/CpuFlushTlb.S | GCC</div>
<div>> + LoongArch/CpuSleep.S | GCC</div>
<div>> +</div>
<div>> [Packages]</div>
<div>> MdePkg/MdePkg.dec</div>
<div>></div>
<div>> diff --git a/MdePkg/Library/BaseCpuLib/BaseCpuLib.uni</div>
<div>> b/MdePkg/Library/BaseCpuLib/BaseCpuLib.uni</div>
<div>> index 80dc495786..7c5c8dfb37 100644</div>
<div>> --- a/MdePkg/Library/BaseCpuLib/BaseCpuLib.uni</div>
<div>> +++ b/MdePkg/Library/BaseCpuLib/BaseCpuLib.uni</div>
<div>> @@ -1,13 +1,14 @@</div>
<div>> // /** @file</div>
<div>> // Instance of CPU Library for various architecture.</div>
<div>> //</div>
<div>> -// CPU Library implemented using ASM functions for IA-32, X64 and RISCV64,</div>
<div>> +// CPU Library implemented using ASM functions for IA-32, X64, RISCV64</div>
<div>> and LoongArch64,</div>
<div>> // PAL CALLs for IPF, and empty functions for EBC.</div>
<div>> //</div>
<div>> // Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR></div>
<div>> // Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR></div>
<div>> // Portions copyright (c) 2011 - 2013, ARM Ltd. All rights reserved.<BR></div>
<div>> // Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights</div>
<div>> reserved.<BR></div>
<div>> +// Portions Copyright (c) 2022, Loongson Technology Corporation Limited.</div>
<div>> All rights reserved.<BR></div>
<div>> //</div>
<div>> // SPDX-License-Identifier: BSD-2-Clause-Patent</div>
<div>> //</div>
<div>> @@ -16,5 +17,5 @@</div>
<div>></div>
<div>> #string STR_MODULE_ABSTRACT #language en-US "Instance of CPU</div>
<div>> Library for various architectures"</div>
<div>></div>
<div>> -#string STR_MODULE_DESCRIPTION #language en-US "CPU Library</div>
<div>> implemented using ASM functions for IA-32, X64 and RISCV64, PAL CALLs for</div>
<div>> IPF, and empty functions for EBC."</div>
<div>> +#string STR_MODULE_DESCRIPTION #language en-US "CPU Library</div>
<div>> implemented using ASM functions for IA-32, X64, RISCV64 and LoongArch64,</div>
<div>> PAL CALLs for IPF, and empty functions for EBC."</div>
<div>></div>
<div>> diff --git a/MdePkg/Library/BaseCpuLib/LoongArch/CpuFlushTlb.S</div>
<div>> b/MdePkg/Library/BaseCpuLib/LoongArch/CpuFlushTlb.S</div>
<div>> new file mode 100644</div>
<div>> index 0000000000..8b792f0a37</div>
<div>> --- /dev/null</div>
<div>> +++ b/MdePkg/Library/BaseCpuLib/LoongArch/CpuFlushTlb.S</div>
<div>> @@ -0,0 +1,15 @@</div>
<div>> +#------------------------------------------------------------------------------</div>
<div>> +#</div>
<div>> +# CpuFlushTlb() for LoongArch64</div>
<div>> +#</div>
<div>> +# Copyright (c) 2022, Loongson Technology Corporation Limited. All rights</div>
<div>> reserved.<BR></div>
<div>> +#</div>
<div>> +# SPDX-License-Identifier: BSD-2-Clause-Patent</div>
<div>> +#</div>
<div>> +#------------------------------------------------------------------------------</div>
<div>> +ASM_GLOBAL ASM_PFX(CpuFlushTlb)</div>
<div>> +</div>
<div>> +ASM_PFX(CpuFlushTlb):</div>
<div>> + tlbflush</div>
<div>> + jirl $zero, $ra, 0</div>
<div>> + .end</div>
<div>> diff --git a/MdePkg/Library/BaseCpuLib/LoongArch/CpuSleep.S</div>
<div>> b/MdePkg/Library/BaseCpuLib/LoongArch/CpuSleep.S</div>
<div>> new file mode 100644</div>
<div>> index 0000000000..eb31b10714</div>
<div>> --- /dev/null</div>
<div>> +++ b/MdePkg/Library/BaseCpuLib/LoongArch/CpuSleep.S</div>
<div>> @@ -0,0 +1,15 @@</div>
<div>> +#------------------------------------------------------------------------------</div>
<div>> +#</div>
<div>> +# CpuSleep() for LoongArch64</div>
<div>> +#</div>
<div>> +# Copyright (c) 2022, Loongson Technology Corporation Limited. All rights</div>
<div>> reserved.<BR></div>
<div>> +#</div>
<div>> +# SPDX-License-Identifier: BSD-2-Clause-Patent</div>
<div>> +#</div>
<div>> +#------------------------------------------------------------------------------</div>
<div>> +ASM_GLOBAL ASM_PFX(CpuSleep)</div>
<div>> +</div>
<div>> +ASM_PFX(CpuSleep):</div>
<div>> + idle 0</div>
<div>> + jirl $zero, $ra, 0</div>
<div>> + .end</div>
<div>> --</div>
<div>> 2.27.0</div>
<div>></div>
<div>></div>
<div>></div>
<div>> </div>
</div>
</blockquote>
</div>
</body>
</html>


 <div width="1" style="color:white;clear:both">_._,_._,_</div> <hr>   Groups.io Links:<p>   You receive all messages sent to this group.    <p> <a target="_blank" href="https://edk2.groups.io/g/devel/message/88962">View/Reply Online (#88962)</a> |    |  <a target="_blank" href="https://groups.io/mt/89017010/1813853">Mute This Topic</a>  | <a href="https://edk2.groups.io/g/devel/post">New Topic</a><br>    <a href="https://edk2.groups.io/g/devel/editsub/1813853">Your Subscription</a> | <a href="mailto:devel+owner@edk2.groups.io">Contact Group Owner</a> |  <a href="https://edk2.groups.io/g/devel/unsub">Unsubscribe</a>  [edk2-devel-archive@redhat.com]<br> <div width="1" style="color:white;clear:both">_._,_._,_</div>