From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from loongson.cn (loongson.cn [114.242.206.163]) by mx.groups.io with SMTP id smtpd.web09.37161.1650273201053308953 for ; Mon, 18 Apr 2022 02:13:21 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: loongson.cn, ip: 114.242.206.163, mailfrom: lichao@loongson.cn) Received: from lichao-PC (unknown [10.40.24.65]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9AxGsyqK11iHqMnAA--.21742S2; Mon, 18 Apr 2022 17:13:14 +0800 (CST) Date: Mon, 18 Apr 2022 17:13:14 +0800 From: "Chao Li" To: "=?utf-8?Q?devel=40edk2.groups.io?=" , "=?utf-8?Q?abner.chang=40hpe.com?=" Cc: "=?utf-8?Q?=22=5C=22devel=40edk2.groups.io=5C=22=22?=" , Michael D Kinney , Liming Gao , Zhiguang Liu , =?utf-8?Q?=22=5C=22Baoqi_Zhang=5C=22=22?= , Dongyan Qian Message-ID: <280BA5A2-A77B-4F03-A1AE-AA2F7E4CDE35@getmailspring.com> In-Reply-To: References: Subject: Re: [edk2-devel] [staging/LoongArch RESEND PATCH v1 19/33] MdePkg: Add LoongArch LOONGARCH64 binding X-Mailer: Mailspring MIME-Version: 1.0 X-CM-TRANSID: AQAAf9AxGsyqK11iHqMnAA--.21742S2 X-Coremail-Antispam: 1UD129KBjvJXoW3JF1kXF45Kr4DCr18CFyxAFb_yoW3ury8pa nak3WxWw48Kr1xCFy7GFW5Gr1aqws3JF4UGF4Du34xZa9Fkw4kKr98tr48K3y0yr90va48 ZFnY9w1Y9a4UArJanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUHI14x267AKxVW8JVW5JwAFc2x0x2IEx4CE42xK8VAvwI8IcIk0 rVWrJVCq3wAFIxvE14AKwVWUJVWUGwA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK02 1l84ACjcxK6xIIjxv20xvE14v26F1j6w1UM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26r4U JVWxJr1l84ACjcxK6I8E87Iv67AKxVWxJr0_GcWl84ACjcxK6I8E87Iv6xkF7I0E14v26r xl6s0DM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVAYj202j2C_Jr0_Gr1l5I8CrVAa z4v26cxKscIFY7kG0wAqx4xG64xvF2IEw4CE5I8CrVC2j2Wl5I8CrVAKz4kIr2xC04v26r 4j6ryUMc02F40Ex7xS67I2xxkvbII20VAFz48EcVAYj21lYx0E2Ix0cI8IcVAFwI0_Jr0_ Jr4lYx0Ex4A2jsIE14v26r1j6r4UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvY0x0EwI xGrwACjI8F5VA0II8E6IAqYI8I648v4I1l7480Y4vEI4kI2Ix0rVAqx4xJMxkIecxEwVCm -wCF04k20xvY0x0EwIxGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r 106r1rMI8I3I0E7480Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_Jw0_GFylIxkGc2Ij 64vIr41lIxAIcVC0I7IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Jr 0_Gr1lIxAIcVCF04k26cxKx2IYs7xG6rWUJVWrZr1UMIIF0xvEx4A2jsIE14v26r1j6r4U MIIF0xvEx4A2jsIEc7CjxVAFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x0JUTv38UUU UU= X-CM-SenderInfo: xolfxt3r6o00pqjv00gofq/1tbiAQAACF3QvPMxNwABsM Content-Type: multipart/alternative; boundary="625d2baa_2030a7de_cac" --625d2baa_2030a7de_cac Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi Abner, I see, the C Coding Standards Spec tells us that "macro guard" should be li= ke "ifndef PROCESSOR_BIND_H_", but there is very little attention in the cu= rrent edk2 repo. Anyway, I will fix it in the next version. -- Thanks, Chao ------------------------ On 4=E6=9C=88 16 2022, at 10:58 =E6=99=9A=E4=B8=8A, "Abner Chang" wrote: > > HI Li, > > No, you don=E2=80=99t have to remove the tailing =E2=80=9C_=E2=80=9D. You= can check section 5.3.5. in EDK2 C Coding Standards Spec. > Regards, > Abner > > From: Chao Li > Sent: Tuesday, April 12, 2022 5:05 PM > To: Chang, Abner (HPS SW/FW Technologist) > Cc: "devel@edk2.groups.io" ; Michael D Kinney ; Liming Gao ; Zhiguang Li= u ; "Baoqi Zhang" ; Dongyan= Qian > Subject: Re: [edk2-devel] [staging/LoongArch RESEND PATCH v1 19/33] MdePk= g: Add LoongArch LOONGARCH64 binding > > > > > > Hi Abner, > > > Do I have to remove a "_" at the head and tail? All I found in MdePkg is = that *.h files have two "_" at the head and tail. If you are sure that EDK = II coding style must contain only one "_" at the head and tail, I will modi= fy it. > > > -- > Thanks, > Chao > ------------------------ > > > On 4=E6=9C=88 7 2022, at 10:15 =E6=99=9A=E4=B8=8A, "Chang, Abner (HPS SW/= FW Technologist)" wrote: > > > > > > > -----Original Message----- > > > From: devel@edk2.groups.io On Behalf Of Chao L= i > > > > > Sent: Wednesday, February 9, 2022 2:56 PM > > > > > To: devel@edk2.groups.io > > > > > Cc: Michael D Kinney ; Liming Gao > > > > > ; Zhiguang Liu ; Ba= oqi > > > > > Zhang ; Dongyan Qian > > > > > > > > > > Subject: [edk2-devel] [staging/LoongArch RESEND PATCH v1 19/33] MdePk= g: > > > > > Add LoongArch LOONGARCH64 binding > > > > > > > > > > Add LOONGARCH64 sections in MdePkg.dec and LOONGARCH64 > > > > > ProcessorBind.h > > > > > > > > > > Cc: Michael D Kinney > > > > > Cc: Liming Gao > > > > > Cc: Zhiguang Liu > > > > > > > > > > Signed-off-by: Chao Li > > > > > Co-authored-by: Baoqi Zhang > > > > > Co-authored-by: Dongyan Qian > > > > > --- > > > > > MdePkg/Include/LoongArch64/ProcessorBind.h | 121 > > > > > +++++++++++++++++++++ > > > > > MdePkg/MdePkg.dec | 4 + > > > > > MdePkg/MdePkg.dsc | 3 +- > > > > > 3 files changed, 127 insertions(+), 1 deletion(-) > > > > > create mode 100644 MdePkg/Include/LoongArch64/ProcessorBind.h > > > > > > > > > > diff --git a/MdePkg/Include/LoongArch64/ProcessorBind.h > > > > > b/MdePkg/Include/LoongArch64/ProcessorBind.h > > > > > new file mode 100644 > > > > > index 0000000000..a10481e285 > > > > > --- /dev/null > > > > > +++ b/MdePkg/Include/LoongArch64/ProcessorBind.h > > > > > @@ -0,0 +1,121 @@ > > > > > +/** @file > > > > > + Processor or Compiler specific defines and types for LoongArch > > > > > + > > > > > + Copyright (c) 2022 Loongson Technology Corporation Limited. All rig= hts > > > > > reserved.
> > > > > + > > > > > + SPDX-License-Identifier: BSD-2-Clause-Patent > > > > > + > > > > > +**/ > > > > > + > > > > > +#ifndef __PROCESSOR_BIND_H__ > > > > > +#define __PROCESSOR_BIND_H__ > > > > Please remove the leading "_" and only keep one trailing "_" to follow = the edk2 coding standard. RISC-V ProcessorBind.h has the mistake. > > > > > > > > Abner > > > + > > > > > +// > > > > > +// Define the processor type so other code can make processor based > > > > > choices > > > > > +// > > > > > +#define MDE_CPU_LOONGARCH64 > > > > > + > > > > > +#define EFIAPI > > > > > + > > > > > +// > > > > > +// Make sure we are using the correct packing rules per EFI specific= ation > > > > > +// > > > > > +#ifndef __GNUC__ > > > > > +#pragma pack() > > > > > +#endif > > > > > + > > > > > +// > > > > > +// Assume standard LoongArch 64-bit alignment. > > > > > +// Need to check portability of long long > > > > > +// > > > > > +typedef unsigned long UINT64; > > > > > +typedef long INT64; > > > > > +typedef unsigned int UINT32; > > > > > +typedef int INT32; > > > > > +typedef unsigned short UINT16; > > > > > +typedef unsigned short CHAR16; > > > > > +typedef short INT16; > > > > > +typedef unsigned char BOOLEAN; > > > > > +typedef unsigned char UINT8; > > > > > +typedef char CHAR8; > > > > > +typedef char INT8; > > > > > + > > > > > +// > > > > > +// Unsigned value of native width. (4 bytes on supported 32-bit proc= essor > > > > > instructions, > > > > > +// 8 bytes on supported 64-bit processor instructions) > > > > > +// > > > > > + > > > > > +typedef UINT64 UINTN; > > > > > + > > > > > +// > > > > > +// Signed value of native width. (4 bytes on supported 32-bit proces= sor > > > > > instructions, > > > > > +// 8 bytes on supported 64-bit processor instructions) > > > > > +// > > > > > +typedef INT64 INTN; > > > > > + > > > > > +// > > > > > +// Processor specific defines > > > > > +// > > > > > + > > > > > +// > > > > > +// A value of native width with the highest bit set. > > > > > +// > > > > > +#define MAX_BIT 0x8000000000000000ULL > > > > > +// > > > > > +// A value of native width with the two highest bits set. > > > > > +// > > > > > +#define MAX_2_BITS 0xC000000000000000ULL > > > > > + > > > > > +// > > > > > +// Maximum legal LoongArch 64-bit address > > > > > +// > > > > > +#define MAX_ADDRESS 0xFFFFFFFFFFFFFFFFULL > > > > > + > > > > > +// > > > > > +// Maximum usable address at boot time (48 bits using 4KB pages) > > > > > +// > > > > > +#define MAX_ALLOC_ADDRESS 0xFFFFFFFFFFFFULL > > > > > + > > > > > + > > > > > +// > > > > > +// Maximum legal LoongArch 64-bit INTN and UINTN values. > > > > > +// > > > > > +#define MAX_INTN ((INTN)0x7FFFFFFFFFFFFFFFULL) > > > > > +#define MAX_UINTN ((UINTN)0xFFFFFFFFFFFFFFFFULL) > > > > > + > > > > > +// > > > > > +// Page allocation granularity for LoongArch > > > > > +// > > > > > +#define DEFAULT_PAGE_ALLOCATION_GRANULARITY (0x1000) > > > > > +#define RUNTIME_PAGE_ALLOCATION_GRANULARITY (0x10000) > > > > > + > > > > > +#if defined(__GNUC__) > > > > > + // > > > > > + // For GNU assembly code, .global or .globl can declare global symb= ols. > > > > > + // Define this macro to unify the usage. > > > > > + // > > > > > + #define ASM_GLOBAL .globl > > > > > +#endif > > > > > + > > > > > +// > > > > > +// The stack alignment required for LoongArch > > > > > +// > > > > > +#define CPU_STACK_ALIGNMENT 16 > > > > > + > > > > > +/** > > > > > + Return the pointer to the first instruction of a function given a f= unction > > > > > pointer. > > > > > + On LOONGARCH CPU architectures, these two pointer values are the sa= me, > > > > > + so the implementation of this macro is very simple. > > > > > + > > > > > + @param FunctionPointer A pointer to a function. > > > > > + > > > > > + @return The pointer to the first instruction of a function given a = function > > > > > pointer. > > > > > + > > > > > +**/ > > > > > +#define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID > > > > > *)(UINTN)(FunctionPointer) > > > > > + > > > > > +#ifndef __USER_LABEL_PREFIX__ > > > > > +#define __USER_LABEL_PREFIX__ > > > > > +#endif > > > > > + > > > > > +#endif > > > > > diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec > > > > > index 59b405928b..18d42047e9 100644 > > > > > --- a/MdePkg/MdePkg.dec > > > > > +++ b/MdePkg/MdePkg.dec > > > > > @@ -7,6 +7,7 @@ > > > > > # Copyright (c) 2007 - 2021, Intel Corporation. All rights reserved.<= BR> > > > > > # Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.=
> > > > > # (C) Copyright 2016 - 2021 Hewlett Packard Enterprise Development LP=
> > > > > +# Copyright (c) 2022 Loongson Technology Corporation Limited. All ri= ghts > > > > > reserved.
> > > > > # > > > > > # SPDX-License-Identifier: BSD-2-Clause-Patent > > > > > # > > > > > @@ -43,6 +44,9 @@ > > > > > [Includes.RISCV64] > > > > > Include/RiscV64 > > > > > > > > > > +[Includes.LOONGARCH64] > > > > > + Include/LoongArch64 > > > > > + > > > > > [LibraryClasses] > > > > > ## @libraryclass Provides most usb APIs to support the Hid requests > > > > > defined in Usb Hid 1.1 spec > > > > > # and the standard requests defined in Usb 1.1 spec. > > > > > diff --git a/MdePkg/MdePkg.dsc b/MdePkg/MdePkg.dsc > > > > > index a94959169b..1c83726b86 100644 > > > > > --- a/MdePkg/MdePkg.dsc > > > > > +++ b/MdePkg/MdePkg.dsc > > > > > @@ -4,6 +4,7 @@ > > > > > # Copyright (c) 2007 - 2021, Intel Corporation. All rights reserved.<= BR> > > > > > # Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.=
> > > > > # (C) Copyright 2020 Hewlett Packard Enterprise Development LP
> > > > > +# Copyright (c) 2022 Loongson Technology Corporation Limited. All ri= ghts > > > > > reserved.
> > > > > # > > > > > # SPDX-License-Identifier: BSD-2-Clause-Patent > > > > > # > > > > > @@ -15,7 +16,7 @@ > > > > > PLATFORM_VERSION =3D 1.08 > > > > > DSC_SPECIFICATION =3D 0x00010005 > > > > > OUTPUT_DIRECTORY =3D Build/Mde > > > > > - SUPPORTED_ARCHITECTURES =3D > > > > > IA32|X64|EBC|ARM|AARCH64|RISCV64 > > > > > + SUPPORTED_ARCHITECTURES =3D > > > > > IA32|X64|EBC|ARM|AARCH64|RISCV64|LOONGARCH64 > > > > > BUILD_TARGETS =3D DEBUG|RELEASE|NOOPT > > > > > SKUID_IDENTIFIER =3D DEFAULT > > > > > > > > > > -- > > > > > 2.27.0 > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > >=20 --625d2baa_2030a7de_cac Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
Hi Abner,

I see, the C Coding Standards Spec tells us th= at "macro guard" should be like "ifndef PROCESSOR_BIND_H_", but there is ve= ry little attention in the current edk2 repo. Anyway, I will fix it in the = next version.


--
Thanks,
Chao
-----------------------= -


On 4=E6=9C=88 16 2022, at 10:58 =E6=99=9A=E4=B8=8A, "Abner Chang" <ab= ner.chang@hpe.com> wrote:
  
HI Li,

No, you don=E2=80=99t have to remove the tailing =E2=80=9C_= =E2=80=9D. You can check section 5.3.5. in EDK2 C Coding Standards Spec.
Regards,

= Abner

 

From: Chao Li <lichao@lo= ongson.cn>
Sent: Tuesday, April 12, 2022= 5:05 PM
To: Chang, Abner (HPS SW/FW Techno= logist) <abner.chang@hpe.com>
Cc: "de= vel@edk2.groups.io" <devel@edk2.groups.io>; Michael D Kinney <mich= ael.d.kinney@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>; Zh= iguang Liu <zhiguang.liu@intel.com>; "Baoqi Zhang" <zhangbaoqi@loo= ngson.cn>; Dongyan Qian <qiandongyan@loongson.cn>
Subject: Re: [edk2-devel] [staging/LoongArch RESEND PATCH v= 1 19/33] MdePkg: Add LoongArch LOONGARCH64 binding
<= div class=3D"MsoNormal"> 

Hi Ab= ner,
 

Do I have to remove a "_" at the head and tail? All I found in = MdePkg is that *.h files have two "_" at the head and tail. If you are sure= that EDK II coding style must contain only one "_" at the head and tail, I= will modify it.
 

<= div class=3D"ex1">
--
Thanks,
Chao
------------------------

 
On 4=E6=9C=88 7 2022, at = 10:15 =E6=99=9A=E4=B8=8A= , "Chang, Abner (HPS SW/FW Technologist)" <abner.chang@hpe.com> wrote= :
 

> -----Original Message-----
<= div class=3D"MsoNormal">> From: devel@edk2.groups.io <devel@edk2.grou= ps.io> On Behalf Of Chao Li
>= ; Sent: Wednesday, February 9, 2022 2:56 PM
> To: devel@edk2.groups.io
> Cc: Michael D Kinney <michael.d.kinney@intel.com>; Liming = Gao
> <gaoliming@byosoft.com= .cn>; Zhiguang Liu <zhiguang.liu@intel.com>; Baoqi
> Zhang <zhangbaoqi@loongson.cn>; Dongya= n Qian
> <qiandongyan@loongs= on.cn>
> Subject: [edk2-deve= l] [staging/LoongArch RESEND PATCH v1 19/33] MdePkg:
> Add LoongArch LOONGARCH64 binding
<= div class=3D"MsoNormal">> 
> Add LOONGARCH64 sections in MdePkg.dec and LOONGARCH64
> ProcessorBind.h
> Cc:= Michael D Kinney <michael.d.kinney@intel.com>
> Cc: Liming Gao <gaoliming@byosoft.com.cn>
> Cc: Zhiguang Liu <zhiguang.li= u@intel.com>
> Signed-off-by: Chao Li <lichao@lo= ongson.cn>
> Co-authored-by:= Baoqi Zhang <zhangbaoqi@loongson.cn>
> Co-authored-by: Dongyan Qian <qiandongyan@loongson.cn>=
> ---
> MdePkg/Include/LoongArch64/ProcessorBind.h | 121
> +++++++++++++++++++++
=
> MdePkg/MdePkg.dec | 4 +
=
> MdePkg/MdePkg.dsc | 3 +-
> 3 files changed, 127 insertions(+), 1 deletion(-)=
> create mode 100644 MdePkg/In= clude/LoongArch64/ProcessorBind.h
= > 
> diff --git a/MdePk= g/Include/LoongArch64/ProcessorBind.h
> b/MdePkg/Include/LoongArch64/ProcessorBind.h
> new file mode 100644
> index 0000000000..a10481e285
> --- /dev/null
>= ; +++ b/MdePkg/Include/LoongArch64/ProcessorBind.h
> @@ -0,0 +1,121 @@
> +/** @file
> + Proce= ssor or Compiler specific defines and types for LoongArch
<= div class=3D"MsoNormal">> +
>= ; + Copyright (c) 2022 Loongson Technology Corporation Limited. All rights<= /div>
> reserved.<BR>
> +
> + SPDX-License-Identifier: BSD-2-Clause-Patent
> +
>= +**/
> +
> +#ifndef __PROCESSOR_BIND_H__
> +#define __PROCESSOR_BIND_H__
Please remove the leading "_" and only keep one trail= ing "_" to follow the edk2 coding standard. RISC-V ProcessorBind.h has the = mistake.
 

Abner
> +
=
> +//
> +// Define the processor type so other code can make proces= sor based
> choices
=
> +//
> +#define MDE_CPU_LOONGARCH64
> +
> +#define EFIAPI
> +
> +//
> +// M= ake sure we are using the correct packing rules per EFI specification
=
> +//
> +#ifndef __GNUC__
= > +#pragma pack()
> +#endif<= /div>
> +
> +//
> +// A= ssume standard LoongArch 64-bit alignment.
> +// Need to check portability of long long
> +//
&g= t; +typedef unsigned long UINT64;
= > +typedef long INT64;
> +ty= pedef unsigned int UINT32;
> +t= ypedef int INT32;
> +typedef un= signed short UINT16;
> +typedef= unsigned short CHAR16;
> +type= def short INT16;
> +typedef uns= igned char BOOLEAN;
> +typedef = unsigned char UINT8;
> +typedef= char CHAR8;
> +typedef char IN= T8;
> +
> +//
> +/= / Unsigned value of native width. (4 bytes on supported 32-bit processor
> instructions,
<= div class=3D"MsoNormal">> +// 8 bytes on supported 64-bit processor inst= ructions)
> +//
> +
&= gt; +typedef UINT64 UINTN;
> +<= /div>
> +//
> +// Signed value of native width. (4 bytes on supporte= d 32-bit processor
> instructio= ns,
> +// 8 bytes on supported = 64-bit processor instructions)
>= ; +//
> +typedef INT64 INTN;
> +
> +//
> +// Proc= essor specific defines
> +//
> +
> +//
> +// A va= lue of native width with the highest bit set.
> +//
> +#define= MAX_BIT 0x8000000000000000ULL
>= ; +//
> +// A value of native w= idth with the two highest bits set.
> +//
> +#define MAX_2_BIT= S 0xC000000000000000ULL
> +
> +//
> +// Maximum legal LoongArch 64-bit address
<= div>
> +//
> +#define MAX_ADDRESS 0xFFFFFFFFFFFFFFFFULL
> +
> +//<= /div>
> +// Maximum usable address at= boot time (48 bits using 4KB pages)
> +//
> +#define MAX_ALLO= C_ADDRESS 0xFFFFFFFFFFFFULL
> +=
> +
> +//
> +// M= aximum legal LoongArch 64-bit INTN and UINTN values.
> +//
> += #define MAX_INTN ((INTN)0x7FFFFFFFFFFFFFFFULL)
> +#define MAX_UINTN ((UINTN)0xFFFFFFFFFFFFFFFFULL)
=
> +
> +//
> +// Page al= location granularity for LoongArch
> +//
> +#define DEFAULT_PA= GE_ALLOCATION_GRANULARITY (0x1000)
> +#define RUNTIME_PAGE_ALLOCATION_GRANULARITY (0x10000)
> +
= > +#if defined(__GNUC__)
> += //
> + // For GNU assembly cod= e, .global or .globl can declare global symbols.
> + // Define this macro to unify the usage.
<= div>
> + //
> + #define ASM_GLOBAL .globl
> +#endif
> +
> +//
> +// The stack alignment required for LoongArch
<= div class=3D"MsoNormal">> +//
&= gt; +#define CPU_STACK_ALIGNMENT 16
> +
> +/**
> + Return the pointer to the first instructio= n of a function given a function
&= gt; pointer.
> + On LOONGARCH C= PU architectures, these two pointer values are the same,
> + so the implementation of this macro is very s= imple.
> +
> + @param FunctionPointer A pointer to a function.=
> +
> + @return The pointer to the first instruction of a fun= ction given a function
> pointe= r.
> +
> +**/
> +#= define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID
> *)(UINTN)(FunctionPointer)
> +
> +#ifnde= f __USER_LABEL_PREFIX__
> +#def= ine __USER_LABEL_PREFIX__
> +#e= ndif
> +
> +#endif
&g= t; diff --git a/MdePkg/MdePkg.dec b/MdePkg/MdePkg.dec
> index 59b405928b..18d42047e9 100644
> --- a/MdePkg/MdePkg.dec
> +++ b/MdePkg/MdePkg.dec
> @@ -7,6 +7,7 @@
> # Copyright (c) 2007 - 2021, Intel Corporation. All rights reserve= d.<BR>
> # Portions copyr= ight (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
=
> # (C) Copyright 2016 - 2021 Hewlett Pack= ard Enterprise Development LP<BR>
> +# Copyright (c) 2022 Loongson Technology Corporation Limited. A= ll rights
> reserved.<BR>=
> #
> # SPDX-License-Identifier: BSD-2-Clause-Patent
> #
> @@ -43,6 +44,9 @@
> = [Includes.RISCV64]
> Include/Ri= scV64
<= div class=3D"MsoNormal">> +[Includes.LOONGARCH64]
> + Include/LoongArch64
> +
> [LibraryCl= asses]
> ## @libraryclass Provi= des most usb APIs to support the Hid requests
> defined in Usb Hid 1.1 spec
> # and the standard requests defined in Usb 1.1 spec.
<= /div>
> diff --git a/MdePkg/MdePkg.dsc b/Md= ePkg/MdePkg.dsc
> index a949591= 69b..1c83726b86 100644
> --- a/= MdePkg/MdePkg.dsc
> +++ b/MdePk= g/MdePkg.dsc
> @@ -4,6 +4,7 @@<= /div>
> # Copyright (c) 2007 - 2021, = Intel Corporation. All rights reserved.<BR>
> # Portions copyright (c) 2008 - 2009, Apple Inc. All r= ights reserved.<BR>
> # (= C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
=
> +# Copyright (c) 2022 Loongson Tec= hnology Corporation Limited. All rights
> reserved.<BR>
>= ; #
> # SPDX-License-Identifier= : BSD-2-Clause-Patent
> #
=
> @@ -15,7 +16,7 @@
=
> PLATFORM_VERSION =3D 1.08
> DSC_SPECIFICATION =3D 0x00010005
> OUTPUT_DIRECTORY =3D Build/Mde
> - SUPPORTED_ARCHITECTURES =3D
<= div>
> IA32|X64|EBC|ARM|AARCH64|RISCV64
> + SUPPORTED_ARCHITECTURES =3D
> IA32|X64|EBC|ARM|AARCH64|RISCV64|LOO= NGARCH64
> BUILD_TARGETS =3D DE= BUG|RELEASE|NOOPT
> SKUID_IDENT= IFIER =3D DEFAULT
=
> --
> 2.27.0
>

--625d2baa_2030a7de_cac--