From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) by mx.groups.io with SMTP id smtpd.web09.7290.1649341509713763154 for ; Thu, 07 Apr 2022 07:25:09 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=davEvPle; spf=permerror, err=parse error for token &{10 18 %{ir}.%{v}.%{d}.spf.has.pphosted.com}: invalid domain name (domain: hpe.com, ip: 148.163.147.86, mailfrom: prvs=0096e05c10=abner.chang@hpe.com) Received: from pps.filterd (m0134421.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 237BWFWp025748; Thu, 7 Apr 2022 14:24:56 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=pps0720; bh=PVMN9lewGdysn50xnYRIu+48x4NZb16sb0RUsbAuPsM=; b=davEvPle/v5NEgQEl9wwVZT8RL0rQb5EvjzQKggoquUSrltDeVzKjzM9ZFjyZEX7jPRT Qvc4XH5V668FcC6bi9TzWNA0jTJ40J4HtvlPbbpIvv7KCa8dy7Z+kUw3FBOf72Y9ypjz asBxSyd7t+Ol7DFEunO8Xuoc9JMZNhnNFaTy9955uhaL9lvQlR2FoKBq2OWOmAAyh+I6 MjKsHTq/Wshf3chbH7h0p+oDneSWlf4PZ8Qzpka0RZOTVRCYq0YFx21hbNO74rE+HMtO b981oBmJyQETmKMOdrGbac4EFqLRtU2RXRz+v+mgm5uh1sSvO1NSUaqKrCe3ZeK5Kwpg fA== Received: from p1lg14878.it.hpe.com (p1lg14878.it.hpe.com [16.230.97.204]) by mx0b-002e3701.pphosted.com (PPS) with ESMTPS id 3f9dj4j846-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 07 Apr 2022 14:24:56 +0000 Received: from p1wg14924.americas.hpqcorp.net (unknown [10.119.18.113]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by p1lg14878.it.hpe.com (Postfix) with ESMTPS id 7152D131AD; Thu, 7 Apr 2022 14:24:54 +0000 (UTC) Received: from p1wg14928.americas.hpqcorp.net (10.119.18.116) by p1wg14924.americas.hpqcorp.net (10.119.18.113) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Thu, 7 Apr 2022 02:24:37 -1200 Received: from p1wg14925.americas.hpqcorp.net (10.119.18.114) by p1wg14928.americas.hpqcorp.net (10.119.18.116) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Thu, 7 Apr 2022 02:24:37 -1200 Received: from p1wg14920.americas.hpqcorp.net (16.230.19.123) by p1wg14925.americas.hpqcorp.net (10.119.18.114) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15 via Frontend Transport; Thu, 7 Apr 2022 02:24:37 -1200 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (192.58.206.38) by edge.it.hpe.com (16.230.19.123) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.15; Thu, 7 Apr 2022 02:24:17 -1200 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Cv2jO+tob2lF4feZ0HCpvZleVd3JYmpvPBEXKDRLDa7LnMZ8n5RfZ8lbjTnC/lIASNn4fDS2MX/jN/yiK6O1QSKkBdVIevYfDJIPfXGuaLDhNtg+x8yjpQDlOb6SVM95bU0Ym3/+yIN1kquABC0ZdC4p1/V8MN/JPQ8XiJ3IZpLmxO1SghJ1W+YqJ+dWg9fRvzwIfoS1M4glQpVWGCMkdjzCHfAuNzT6Zlm7Jhm2pQSQuZy4N20diszE7eDBzvKZj4PuRztMVasxMxuJ0GSz6h0PTYmoCaTuzQZ/+UcI9O0W2+CKF4N/caVx3q6yVJkgsgbLJfZjzpVrNp9IGKg5Zg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=OAq1FU+YtX3OFmbn5BcHLcGt3ppyE1JNZf4IDtmZo14=; b=lCOx+9cQZLQ0Y4pCeqRKP3eC9VXaaueVslbrM1WrzcfbCqJmyH+Cjvbpkl8kmmZH1rkrbE1NOwp5rDbFtzYuILpLWLT4IEaUe/Mnp3BmyXG1z/eODToTsRm7bfq/YaWBAd5nE8wPb7ZoBpsQYG6jh0rJtkNe3Uz45kDaKq6dsydphziH22gGN0DavhEzA5ih06prd6kVzyCtaiWZdJ3lU/oOplE2XbUW/Sostg4OYKVy3dtNLCJP0P7ZJNo48TnPzum8ly+j0YUyPaLSqMdHKCzm85Dq7NBJYFPAxPPm2QefsRTy7+nj53AzLfAoYlHV3XwATrJdgtVxlgmMzuZyhw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=hpe.com; dmarc=pass action=none header.from=hpe.com; dkim=pass header.d=hpe.com; arc=none Received: from PH7PR84MB1885.NAMPRD84.PROD.OUTLOOK.COM (2603:10b6:510:154::18) by DM4PR84MB1688.NAMPRD84.PROD.OUTLOOK.COM (2603:10b6:8:4b::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.19; Thu, 7 Apr 2022 14:23:42 +0000 Received: from PH7PR84MB1885.NAMPRD84.PROD.OUTLOOK.COM ([fe80::2053:811f:bd4a:7c21]) by PH7PR84MB1885.NAMPRD84.PROD.OUTLOOK.COM ([fe80::2053:811f:bd4a:7c21%8]) with mapi id 15.20.5144.022; Thu, 7 Apr 2022 14:23:42 +0000 From: "Abner Chang" To: "devel@edk2.groups.io" , "lichao@loongson.cn" CC: Michael D Kinney , Liming Gao , Zhiguang Liu Subject: Re: [edk2-devel] [staging/LoongArch RESEND PATCH v1 20/33] MdePkg/Include: LoongArch definitions. Thread-Topic: [edk2-devel] [staging/LoongArch RESEND PATCH v1 20/33] MdePkg/Include: LoongArch definitions. Thread-Index: AQHYHYIi3kLxl6U9i0+fSRTGOQX1Nazk2U2Q Date: Thu, 7 Apr 2022 14:23:42 +0000 Message-ID: References: <20220209065536.2986246-1-lichao@loongson.cn> In-Reply-To: <20220209065536.2986246-1-lichao@loongson.cn> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: accce312-500a-466e-6d24-08da18a237b0 x-ms-traffictypediagnostic: DM4PR84MB1688:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: R7UU+2Of8gL/JLcVEjSpLO2RPdX8sfckJyhtpB4LSeKbPLhzxEVwUa+GBZhTuG6gSgmiS1G1Iq3HK+qm6xjnkK9ZU6/Wd4cFfeINBZfEnJ40sPHnOwD2wdK7dJKvav2j36kHrRW3JyIMkeFR5hnbRouePr7MzUj7vdHrc7HwYnO2KdSXLMThiO7aavzcmUC+YV/zNE3TG/+fsNE783OMU7d8U5gGu87TRl/XiwBcrTEjSPBBraxvIxD85xsalM9TImnW8MroD7l6w1pGA+ARSmuDUwQ4MsNgZKDykMN3WiHnDY47urCIUOFm2BVisnWnylp0enqnEJqwNn4FrtOl4eNlXQqZp4AZ8yB0HSguqrZhA8YnGczk124tyzEME2owA/oWzKm6alLb05lxZw/DDPl5dmcgjfIWC7kQTHdnAXgSgLYv1jF6ryrGE463WbI51UKCy4mjzJXYkEf0e6DifUYbVk6JvcaAdDHkuIudJ70T4YPmrKOU+ef8b9SEXs3os0DYKqS0TqQ4TMDJDXdcrTQkhJGNO8jE2YM9wpYenN7R7TB19KEHkn6JsymngGIkI7Ul0cqYtDmEF6WTiWlIiXW4yBr2h1qCvzibi38JiRPjde9/EZKLr8A8cFmAlCXQD/QBY/9sS9GuV0zdVK0P3WUbNGbm8/d2HOeFZdK3JDCDWlHaIKJvPNkKV22cLRWlO2eP9sWppP+XuaP2UE7udYXr+svfnrjYpVSannzUyx1uV9R3wT8Xpi1DkDP83wjrjUtzfbH5QoOBMgPcOalAEm6Omx/c6qi2A4L3a+lN434Q12FAyVu+68UThEf4em2AnnHmrsOgOuuRmEmHgGKBDw== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH7PR84MB1885.NAMPRD84.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230001)(366004)(54906003)(82960400001)(55016003)(966005)(38070700005)(110136005)(52536014)(7696005)(38100700002)(122000001)(508600001)(6506007)(86362001)(316002)(5660300002)(53546011)(9686003)(8936002)(33656002)(83380400001)(66556008)(64756008)(4326008)(71200400001)(66946007)(2906002)(76116006)(8676002)(66476007)(186003)(26005)(66446008);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?u89eYY+eK5OqGVmSMHYwZj80KRo6N+Gc62I0t9iyPyvdLtvsXx3hbLbCyWKX?= =?us-ascii?Q?RhJ5Vo3/vIODoFTNWs0Jbu/HFNL73/YOPpcoYOkZ6sHOceduSG5yKWJRjejk?= =?us-ascii?Q?tOJn3lignGhXVSCmDX5F0oapJ6AKUUqJFxroJJN3rUlhvWefXSSQBo0yHtXz?= =?us-ascii?Q?xnf3uHL7dvLXlSRoF326Ac7OFBXs/hzIFcUJR+vA+XvsudUOnhO0ZE/XPA8V?= =?us-ascii?Q?EHlvmt6h7oUBiD3ycx75KsASR7weLvv5wdwVbQHTtkfnqo7ok1n/W6Axk5x1?= =?us-ascii?Q?jcAS7oxGnsEBuK19ydNA17P+BecqvxpS/gsaYsiEQ0VXVN/GCUqKd7IqhA5n?= =?us-ascii?Q?zVC1CpUeZybQ2kjxTg8lMsMW2ZCtaU4T4Amu3EdmldqDI/+CtwvwLHlXHPFf?= =?us-ascii?Q?u0ar6G4g9U/GjvYyoHC8vMwT8IIOXkX4C74a9VkF475r7zrjjYCokkX0h7Pr?= =?us-ascii?Q?dz9ezAnqZbGIGmiVabY6JSMOq0hj2vts7CFP1Q4Cnrb13Adq5ckqJdiLOmDv?= =?us-ascii?Q?T4jed+BI0AqH9N7e8lExHTeheofqc25TOLwHgyON1Ca9dHLodk4viNfXyXyN?= =?us-ascii?Q?xTXahKYTW07SuUXqrOWVzCe7e9j0lx4rzxBs9CoLQNIyEPwBiYcfSkWvJNv8?= =?us-ascii?Q?IJBngnAsfzZPL9bhPxwKx3O9dzkM3DmeoRN+Kz8LJc4Nx67ps//cRfvPa29o?= =?us-ascii?Q?AG9KUSNPr6m0pShks1ccEfxyoUsx22u2yddSub+BlZ53e7DGkOS499Lk0D7x?= =?us-ascii?Q?nfTzWCWxUHBaAw2W/i5pw1vp/Y9khbEv/M4kglf8tawxdO/iMfn4YaCTd+mU?= =?us-ascii?Q?sTMO5NxcbJkzLGBygwUk9SHub+0oTcM+AXvrVUNr41RRu8QorLfROQqZukq6?= =?us-ascii?Q?nZptyLHRMRM1H8Lo47lZXrhQnI0bSc1u03iRGWvPdoHQzLq5xFBj4F1k0h5Z?= =?us-ascii?Q?IfEB/GG0SQKiKxfmLa04WCuOCs+dicGhhtNL4PwhxKLl8v7JqJVNP/oZ6LlE?= =?us-ascii?Q?vU103W5r7Ja75GY2QAc8ckiP3mU0+dYzGsxCRN0BJIEe3Q0kD4N9vRDl4uZp?= =?us-ascii?Q?QLa6ccegOaEbPPtyLbmLYIxYbUbrZ0xiv06r35SIr5mNkg9IMoiWKMqidU3/?= =?us-ascii?Q?WSUWYclYqoFh0DYVexz3mELmVCdEf/D4cIXFGHrHjPEOSOYUoMt1AyrENpIN?= =?us-ascii?Q?2BXNumYLgyei5JcuPO19jgdwyakO1IycI9xTLiEU6H5mfLUIs5QU7hESaDQ+?= =?us-ascii?Q?Fg69+E5DAz6gYhFqYJFbsM2yhe0ZYy7u/Q4EGcNReJzpoYJCYicqwrA2pXfv?= =?us-ascii?Q?3WS0L/mJ1NJDT5vu4apSnrdAPEHwcrFbcPn2750y0t9GMXK8uGecBc/r0EcW?= =?us-ascii?Q?7HLpbZfLjZSy4wve77xGx2WTPqdYp/c11y9NZwk2kuo7Ir31NUyMcDJDDI23?= =?us-ascii?Q?hQpc4JiYlkRqIxPmbKJDPdavcno6isuygoeWnCYAnA+ek4ZlNtXF6Gb4+R8S?= =?us-ascii?Q?kRjTQOQTo1pPdPWu23MRljPsYgAC5YZDGXsbdLb4kWcdPEzYxJcGjF50RsUD?= =?us-ascii?Q?5nbTtUMlt3m33HNusEUbrrdbZMdB1jVycUHHGp2F9H9OYRkU7FCMDVFuB+72?= =?us-ascii?Q?HX9VoHUEkxekt0fmLMgi/fS2cSmZopKZW59A9KbKQ5rlGmJRT/D1yfYej4de?= =?us-ascii?Q?Ix4qIz3FZZmZkMmdAEq/QUNph98s9OZ4tmWReclkweC0MZ5pCG7b/rWM6CLP?= =?us-ascii?Q?BgMCeiZQgw=3D=3D?= X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH7PR84MB1885.NAMPRD84.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: accce312-500a-466e-6d24-08da18a237b0 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Apr 2022 14:23:42.3485 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 105b2061-b669-4b31-92ac-24d304d195dc X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: U/7LPlH3dWPmcLTD/eNXmsC3k3GPRTM38bWJNtYeAubk4yXKjfOkvJHqyYWGtT6KXPq2dNuJDF+rtJyrS426/Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR84MB1688 X-OriginatorOrg: hpe.com X-Proofpoint-GUID: 7ytCvofC6LKTL-n2VmUwlcxKAEp-TrT2 X-Proofpoint-ORIG-GUID: 7ytCvofC6LKTL-n2VmUwlcxKAEp-TrT2 X-Proofpoint-UnRewURL: 2 URL's were un-rewritten MIME-Version: 1.0 X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.425,FMLib:17.11.64.514 definitions=2022-04-07_03,2022-04-07_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 bulkscore=0 mlxscore=0 lowpriorityscore=0 mlxlogscore=546 suspectscore=0 spamscore=0 adultscore=0 malwarescore=0 impostorscore=0 clxscore=1015 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204070070 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Chao Li > Sent: Wednesday, February 9, 2022 2:56 PM > To: devel@edk2.groups.io > Cc: Michael D Kinney ; Liming Gao > ; Zhiguang Liu > Subject: [edk2-devel] [staging/LoongArch RESEND PATCH v1 20/33] > MdePkg/Include: LoongArch definitions. >=20 > Add LoongArch processor related definitions. >=20 > Cc: Michael D Kinney > Cc: Liming Gao > Cc: Zhiguang Liu >=20 > Signed-off-by: Chao Li > --- > MdePkg/Include/IndustryStandard/PeImage.h | 9 ++++ > MdePkg/Include/Protocol/DebugSupport.h | 65 > ++++++++++++++++++++--- > MdePkg/Include/Protocol/PxeBaseCode.h | 3 ++ > MdePkg/Include/Uefi/UefiBaseType.h | 14 +++++ > MdePkg/Include/Uefi/UefiSpec.h | 16 +++--- > 5 files changed, 94 insertions(+), 13 deletions(-) >=20 > diff --git a/MdePkg/Include/IndustryStandard/PeImage.h > b/MdePkg/Include/IndustryStandard/PeImage.h > index 3109dc20f8..3741f21719 100644 > --- a/MdePkg/Include/IndustryStandard/PeImage.h > +++ b/MdePkg/Include/IndustryStandard/PeImage.h > @@ -10,6 +10,7 @@ > Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
> Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
> Portions Copyright (c) 2016 - 2020, Hewlett Packard Enterprise Developme= nt > LP. All rights reserved.
> +Portions Copyright (c) 2022, Loongson Technology Corporation Limited. Al= l > rights reserved.
>=20 > SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > @@ -38,6 +39,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent > #define IMAGE_FILE_MACHINE_RISCV32 0x5032 > #define IMAGE_FILE_MACHINE_RISCV64 0x5064 > #define IMAGE_FILE_MACHINE_RISCV128 0x5128 > +#define IMAGE_FILE_MACHINE_LOONGARCH32 0x6232 > +#define IMAGE_FILE_MACHINE_LOONGARCH64 0x6264 Are those Loongarch machine types already defined in PeCoff spec? Could you= please point me to the spec? The rest looks good to me. Acked-by: Abner Chang >=20 > // > // EXE file formats > @@ -503,6 +506,12 @@ typedef struct { > #define EFI_IMAGE_REL_BASED_RISCV_LOW12I 7 > #define EFI_IMAGE_REL_BASED_RISCV_LOW12S 8 >=20 > +// > +// Relocation types of LoongArch processor. > +// > +#define EFI_IMAGE_REL_BASED_LOONGARCH32_MARK_LA 8 > +#define EFI_IMAGE_REL_BASED_LOONGARCH64_MARK_LA 8 > + > /// > /// Line number format. > /// > diff --git a/MdePkg/Include/Protocol/DebugSupport.h > b/MdePkg/Include/Protocol/DebugSupport.h > index ec5b92a5c5..47e3a44410 100644 > --- a/MdePkg/Include/Protocol/DebugSupport.h > +++ b/MdePkg/Include/Protocol/DebugSupport.h > @@ -654,17 +654,68 @@ typedef struct { > UINT64 X31; > } EFI_SYSTEM_CONTEXT_RISCV64; >=20 > +// > +// LoongArch processor exception types. > +// > +#define MAX_LOONGARCH_EXCEPTION 14 > + > +typedef struct { > + UINT64 R0; > + UINT64 R1; > + UINT64 R2; > + UINT64 R3; > + UINT64 R4; > + UINT64 R5; > + UINT64 R6; > + UINT64 R7; > + UINT64 R8; > + UINT64 R9; > + UINT64 R10; > + UINT64 R11; > + UINT64 R12; > + UINT64 R13; > + UINT64 R14; > + UINT64 R15; > + UINT64 R16; > + UINT64 R17; > + UINT64 R18; > + UINT64 R19; > + UINT64 R20; > + UINT64 R21; > + UINT64 R22; > + UINT64 R23; > + UINT64 R24; > + UINT64 R25; > + UINT64 R26; > + UINT64 R27; > + UINT64 R28; > + UINT64 R29; > + UINT64 R30; > + UINT64 R31; > + > + UINT64 CRMD; // CuRrent MoDe information > + UINT64 PRMD; // PRe-exception MoDe information > + UINT64 EUEN; // Extended component Unit ENable > + UINT64 MISC; // MISCellaneous controller > + UINT64 ECFG; // Exception ConFiGuration > + UINT64 ESTAT; // Exception STATus > + UINT64 ERA; // Exception Return Address > + UINT64 BADV; // BAD Virtual address > + UINT64 BADI; // BAD Instruction > +} EFI_SYSTEM_CONTEXT_LOONGARCH64; > + > /// > /// Universal EFI_SYSTEM_CONTEXT definition. > /// > typedef union { > - EFI_SYSTEM_CONTEXT_EBC *SystemContextEbc; > - EFI_SYSTEM_CONTEXT_IA32 *SystemContextIa32; > - EFI_SYSTEM_CONTEXT_X64 *SystemContextX64; > - EFI_SYSTEM_CONTEXT_IPF *SystemContextIpf; > - EFI_SYSTEM_CONTEXT_ARM *SystemContextArm; > - EFI_SYSTEM_CONTEXT_AARCH64 *SystemContextAArch64; > - EFI_SYSTEM_CONTEXT_RISCV64 *SystemContextRiscV64; > + EFI_SYSTEM_CONTEXT_EBC *SystemContextEbc; > + EFI_SYSTEM_CONTEXT_IA32 *SystemContextIa32; > + EFI_SYSTEM_CONTEXT_X64 *SystemContextX64; > + EFI_SYSTEM_CONTEXT_IPF *SystemContextIpf; > + EFI_SYSTEM_CONTEXT_ARM *SystemContextArm; > + EFI_SYSTEM_CONTEXT_AARCH64 *SystemContextAArch64; > + EFI_SYSTEM_CONTEXT_RISCV64 *SystemContextRiscV64; > + EFI_SYSTEM_CONTEXT_LOONGARCH64 *SystemContextLoongArch64; > } EFI_SYSTEM_CONTEXT; >=20 > // > diff --git a/MdePkg/Include/Protocol/PxeBaseCode.h > b/MdePkg/Include/Protocol/PxeBaseCode.h > index 11872d602d..6787941a5d 100644 > --- a/MdePkg/Include/Protocol/PxeBaseCode.h > +++ b/MdePkg/Include/Protocol/PxeBaseCode.h > @@ -4,6 +4,7 @@ >=20 > Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
> Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All right= s > reserved.
> +Copyright (c) 2022, Loongson Technology Corporation Limited. All rights > reserved.
>=20 > SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > @@ -158,6 +159,8 @@ typedef UINT16 EFI_PXE_BASE_CODE_UDP_PORT; > #define EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE 0x000B > #elif defined (MDE_CPU_RISCV64) > #define EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE 0x001B > +#elif defined (MDE_CPU_LOONGARCH64) > +#define EFI_PXE_CLIENT_SYSTEM_ARCHITECTURE 0x0027 > #endif >=20 > /// > diff --git a/MdePkg/Include/Uefi/UefiBaseType.h > b/MdePkg/Include/Uefi/UefiBaseType.h > index 4a34ce8e25..e5234fab07 100644 > --- a/MdePkg/Include/Uefi/UefiBaseType.h > +++ b/MdePkg/Include/Uefi/UefiBaseType.h > @@ -4,6 +4,7 @@ > Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.
> Portions copyright (c) 2011 - 2016, ARM Ltd. All rights reserved.
> Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All right= s > reserved.
> +Copyright (c) 2022, Loongson Technology Corporation Limited. All rights > reserved.
>=20 > SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > @@ -246,6 +247,12 @@ typedef union { > #define EFI_IMAGE_MACHINE_RISCV64 0x5064 > #define EFI_IMAGE_MACHINE_RISCV128 0x5128 >=20 > +/// > +/// PE32+ Machine type for LoongArch 32/64 images. > +/// > +#define EFI_IMAGE_MACHINE_LOONGARCH32 0x6232 > +#define EFI_IMAGE_MACHINE_LOONGARCH64 0x6264 > + > #if !defined (EFI_IMAGE_MACHINE_TYPE_VALUE) && !defined > (EFI_IMAGE_MACHINE_CROSS_TYPE_VALUE) > #if defined (MDE_CPU_IA32) >=20 > @@ -280,6 +287,13 @@ typedef union { >=20 > #define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE) >=20 > + #elif defined (MDE_CPU_LOONGARCH64) > + > +#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) \ > + ((Machine) =3D=3D EFI_IMAGE_MACHINE_LOONGARCH64) > + > +#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE) > + > #elif defined (MDE_CPU_EBC) >=20 > /// > diff --git a/MdePkg/Include/Uefi/UefiSpec.h > b/MdePkg/Include/Uefi/UefiSpec.h > index 2b38b100f6..3abebbb8d9 100644 > --- a/MdePkg/Include/Uefi/UefiSpec.h > +++ b/MdePkg/Include/Uefi/UefiSpec.h > @@ -7,6 +7,7 @@ >=20 > Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.
> Portions Copyright (c) 2020, Hewlett Packard Enterprise Development LP. = All > rights reserved.
> +Copyright (c) 2022, Loongson Technology Corporation Limited. All rights > reserved.
>=20 > SPDX-License-Identifier: BSD-2-Clause-Patent >=20 > @@ -2195,12 +2196,13 @@ typedef struct { > // > // EFI File location to boot from on removable media devices > // > -#define EFI_REMOVABLE_MEDIA_FILE_NAME_IA32 > L"\\EFI\\BOOT\\BOOTIA32.EFI" > -#define EFI_REMOVABLE_MEDIA_FILE_NAME_IA64 > L"\\EFI\\BOOT\\BOOTIA64.EFI" > -#define EFI_REMOVABLE_MEDIA_FILE_NAME_X64 > L"\\EFI\\BOOT\\BOOTX64.EFI" > -#define EFI_REMOVABLE_MEDIA_FILE_NAME_ARM > L"\\EFI\\BOOT\\BOOTARM.EFI" > -#define EFI_REMOVABLE_MEDIA_FILE_NAME_AARCH64 > L"\\EFI\\BOOT\\BOOTAA64.EFI" > -#define EFI_REMOVABLE_MEDIA_FILE_NAME_RISCV64 > L"\\EFI\\BOOT\\BOOTRISCV64.EFI" > +#define EFI_REMOVABLE_MEDIA_FILE_NAME_IA32 > L"\\EFI\\BOOT\\BOOTIA32.EFI" > +#define EFI_REMOVABLE_MEDIA_FILE_NAME_IA64 > L"\\EFI\\BOOT\\BOOTIA64.EFI" > +#define EFI_REMOVABLE_MEDIA_FILE_NAME_X64 > L"\\EFI\\BOOT\\BOOTX64.EFI" > +#define EFI_REMOVABLE_MEDIA_FILE_NAME_ARM > L"\\EFI\\BOOT\\BOOTARM.EFI" > +#define EFI_REMOVABLE_MEDIA_FILE_NAME_AARCH64 > L"\\EFI\\BOOT\\BOOTAA64.EFI" > +#define EFI_REMOVABLE_MEDIA_FILE_NAME_RISCV64 > L"\\EFI\\BOOT\\BOOTRISCV64.EFI" > +#define EFI_REMOVABLE_MEDIA_FILE_NAME_LOONGARCH64 > L"\\EFI\\BOOT\\BOOTLOONGARCH64.EFI" >=20 > #if !defined (EFI_REMOVABLE_MEDIA_FILE_NAME) > #if defined (MDE_CPU_IA32) > @@ -2214,6 +2216,8 @@ typedef struct { > #define EFI_REMOVABLE_MEDIA_FILE_NAME > EFI_REMOVABLE_MEDIA_FILE_NAME_AARCH64 > #elif defined (MDE_CPU_RISCV64) > #define EFI_REMOVABLE_MEDIA_FILE_NAME > EFI_REMOVABLE_MEDIA_FILE_NAME_RISCV64 > + #elif defined (MDE_CPU_LOONGARCH64) > +#define EFI_REMOVABLE_MEDIA_FILE_NAME > EFI_REMOVABLE_MEDIA_FILE_NAME_LOONGARCH64 > #else > #error Unknown Processor Type > #endif > -- > 2.27.0 >=20 >=20 >=20 >=20 >=20