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.web10.4538.1649416771443593942 for ; Fri, 08 Apr 2022 04:19:31 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@hpe.com header.s=pps0720 header.b=jfosrvbC; 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=0097613c5e=abner.chang@hpe.com) Received: from pps.filterd (m0134422.ppops.net [127.0.0.1]) by mx0b-002e3701.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 23832oLc001406; Fri, 8 Apr 2022 11:19:28 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=d2b3of907O30tGWqbPHXzu9V8AQ/VOHW8ZWbJpmeFMI=; b=jfosrvbCpmjk5BOICo+s5uZp5l+bOuaE16Aqo71oLuBnvreeyeiYkQDb/qA2qLWbILhz IU7OFTgcJ4/fUSsAFDFOpokGJ60lRF5+wldsYF5P1NBtWDEuopxYHH++csvgyA5ayN1U wTc6LkpDqAs528GOonD23ZabvyzX+cPRqbQNLBZ2QN+j2SvJHnSIR2WT3eT44F+LHiem 4SpIGcPiQRj1wBI/FyJe0YeWXxmmoVIbqyXDv96wfWj8t8cCZOObp0XAIE/4rE3rF/ZH wWBkOrDygTJkCvhT+C8hDYPCA2JMS1lT7RhvkzhZMNBH0oXgCvMqB3dRxBJAtmA3snAF qw== Received: from p1lg14878.it.hpe.com (p1lg14878.it.hpe.com [16.230.97.204]) by mx0b-002e3701.pphosted.com (PPS) with ESMTPS id 3fa29j81ws-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 08 Apr 2022 11:19:28 +0000 Received: from p1wg14923.americas.hpqcorp.net (unknown [10.119.18.111]) (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 E4CA6131AD; Fri, 8 Apr 2022 11:19:25 +0000 (UTC) Received: from p1wg14927.americas.hpqcorp.net (10.119.18.117) by p1wg14923.americas.hpqcorp.net (10.119.18.111) 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 23:19:16 -1200 Received: from p1wg14926.americas.hpqcorp.net (10.119.18.115) by p1wg14927.americas.hpqcorp.net (10.119.18.117) 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 23:19:16 -1200 Received: from p1wg14920.americas.hpqcorp.net (16.230.19.123) by p1wg14926.americas.hpqcorp.net (10.119.18.115) 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 23:19:16 -1200 Received: from NAM12-MW2-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 23:19:16 -1200 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AsoUAj+/ZUIhrbBl3uBdHkLICKvkjsFNKAFCoYzsogzHHIBW3Zlf8zvM/D5DQSAMzQkaqBuOTw+keyMYX/Y8r5mqxAkd4wm3F/1PMVzffKmsasFZSYFAWlBLerb6OPoW6J3XoiDd+Z9AxXWk9zcEORj49WX2AfRQE+l20rzrW5oecDoH20M0OMAA+UpIgJgsSb4gitFyCpCsAaNYda1t0CQx/h0M8fUwNiqCbKHI7mYcQJSMRaYH/eOs0vmgcD7bH3KrhjgyPaWVo5CtlzaxE+RboaUR8Qy2o1B976lGnQLjUsIMp4hp9pyxd60gn+EDezScU12VOaRisu7N4DhxfA== 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=BOu9/SN9kIL1kwQ4pbGltzKxlrf5GowswDlxQOfrkqg=; b=Thxvo0wTiiZVBhn4Ab4uM6EmBzgEEy49rLOAa36vRnGGUGkj+UckvBg8VyBLdGrq11yk3pCBD+6muhgtX/AVoNlarMm6Rm+fo6Gt5YTH8gM9ge9siah2tqWfXViYome2TlGetkStRARZO9vnL9dyF3y6wu1N82iuxsqp2gh80qqJ0WKncqH2yg1dS3fJdFQWVl6QEZzpB1asYl4ka0rWjzutsLapUpKYXE6216dC/P60vwmPgPRDK2OwzBQYcBMOmoJBfLt3ie9eUA/3xkRS0Ucl0A3qgNSLJwnVpWDGJ7ge8QxQSVzB5Yk13weiw7PyOI0oK71q6tYjOjexcDbWBw== 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 MW4PR84MB1537.NAMPRD84.PROD.OUTLOOK.COM (2603:10b6:303:1a4::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.22; Fri, 8 Apr 2022 11:19:14 +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; Fri, 8 Apr 2022 11:19:14 +0000 From: "Abner Chang" To: "devel@edk2.groups.io" , "lichao@loongson.cn" CC: Bob Feng , Liming Gao , Yuwei Chen , Baoqi Zhang Subject: Re: [edk2-devel] [staging/LoongArch RESEND PATCH v1 32/33] BaseTools: Add LoongArch64 binding. Thread-Topic: [edk2-devel] [staging/LoongArch RESEND PATCH v1 32/33] BaseTools: Add LoongArch64 binding. Thread-Index: AQHYHYt70RrAFGqoPU2OMzekzHoLXKzmOYkQ Date: Fri, 8 Apr 2022 11:19:14 +0000 Message-ID: References: <20220209080222.3087714-1-lichao@loongson.cn> In-Reply-To: <20220209080222.3087714-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: 1fcfe6d1-4442-424d-ad26-08da19519d02 x-ms-traffictypediagnostic: MW4PR84MB1537: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: anUyp98Am05VF96waiMamHmbg0fxHw+8k6i70AkjAFHAZuWvQrGo7u0XxAj+Zcv47XB9j0EaTo2BAcAV1q082Dh0Swh+RppBU/mHXVL8tg1USCYf06CK1douirybbtmZxlKrCwLNfNCJwcGQSBcY7XOpDM0lz2GNQqHn43EsuGmYvlqUnnHsmMOslr2MIFlX40XvjZoPQ0RZ68IEoDznzbAOs1XKiudfLsfAGA1UrY4ME26dSua+PEdqKtwXnXF9hLaYT7bM2irQ35mm6A7uEQiOiS453FEw991XZMxE0cKQSEs7QD5tTiv6Sgp3QuYoV1ZIAjwX8HlHV/qq71jI5voLjPpQgva6/+xPqcrTkmQo2GlZPqWFtCxRRTdwapNDY2aeHToeMtQuI1r2qbxPN5hi0AWaS4Bo63F7sn+U0XKWVdNMHF2PGOxMNCuAYoHbFU89eYHr6hzl+3B4NydhSmIdfSe8XbSgoegE/BBBUnJ3TBs7fHWdK4IJah6dgFWKucPqmXvodIS8gJfmWrFL4oNlcna0q7WZkNkMf8bx4SienRE6WZ+i13uTk350TRl9qXKrdCRjM/UD9lLN79EFyTwUhO/pIeRa9kiikZQgiJKEMeyHIaU+6KeE6RpoMGhsdc+yK144Uejs1FpXXdaCFg+zyLxdg52i6PzHJ/mZamP40vmvrUy+SPkmfOCQkz+g0tEIBBS0drK28QsmT9VBBPGQ78sKk/wAo2g7sTAWioVe7f3/RgPi/PfsBgEYxkQ60I81crBWsLwqMf5j/xRlcRmecvgJT4nq2xxml48sx/hw/+d5OW/gXuXeMbHY+LFaVpjj1+bu6aFtXaH1sDijVg== 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)(76116006)(86362001)(2906002)(33656002)(8936002)(5660300002)(966005)(186003)(110136005)(52536014)(38100700002)(82960400001)(71200400001)(8676002)(66476007)(4326008)(66446008)(64756008)(66556008)(38070700005)(55016003)(19627235002)(66946007)(316002)(122000001)(9686003)(26005)(83380400001)(7696005)(6506007)(53546011)(508600001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Vt7yr3qnfckFY1DRCwPtxIG62YFiUf5hCOHgxTfCR7KfLRHotFCr2h+dg6EM?= =?us-ascii?Q?tLKx11nzn8/Z16O+dPq3wipIgll954NjQzy/LMXAFPxpLsykrwL/5PI+cMtl?= =?us-ascii?Q?/7lRKKV7zTImiHzSCcdah5zAtnFCMdIa2mdnk7XrjGSF6sxRoGTdPvm3I13N?= =?us-ascii?Q?8KSbsLeAdDrseWhhvCa8nF0N0RgSRfzzTOQLQtmSH6+hmeBSSjeBLgDxdMFs?= =?us-ascii?Q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rDysuTMIVD4RDuh?= =?us-ascii?Q?GJqlvsIHoTeXpUkSAonFdChK1ut+HsfYHl+NtYPawwQP3jDxN7/vHDy6DxSn?= =?us-ascii?Q?DOB002y/aq8ObYXB90HSu3WYnJqCNHsn0/fXMWGyKuxa5AFdgkM5m3hBEkOq?= =?us-ascii?Q?50WqFLGf+hUDaUT5HBcSKmXUiR81HTH+9ZrjwqGXj3/uNSLaQuj1vC9uEcK5?= =?us-ascii?Q?4FMNMQcLxzfYZ0ZQrqDFUgcxjbE6+sWOPCTahGh3diUvmlBOjeB8Q98MZd4H?= =?us-ascii?Q?hpZj6E8EInsIVemHCZXUzQ5vZNwGDT8oPrVWcEW3ALrslNWijvt8VQXOZg45?= =?us-ascii?Q?bk9KtNd6SE0VJO53Z4BRAqscXJGoDjG8djPkcwdjcOXjF2yEpzRJExWTk2SK?= =?us-ascii?Q?6jY28mVzrwj5eftXmJ4QP7ebKy6nRg2Jjo0zgonB6oUKa2L3JoCrAyFJ/Rhz?= =?us-ascii?Q?TgW5DtJdvIxx2JfOx6EXmJLswlpp7HQhvRvTNXBqOWiUQdMWVfcL7C2pfLZh?= =?us-ascii?Q?8OAHl0fh4R6QCuMHXtVuzHbwFozPbgQYEzWkXoVOx9Lpnh2ivZPD34caKhP3?= =?us-ascii?Q?SbTgLEECuTxf8vAVh0Kq1uXok9q/nDXMRbojCksMVroTvEo6OB4gUSChbcbK?= =?us-ascii?Q?zxE3/8JKVw=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: 1fcfe6d1-4442-424d-ad26-08da19519d02 X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Apr 2022 11:19:14.2170 (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: p93pDCTY/U0n9PlwNn6OXtIRxN4h8WApCvbTe1Rd0LEPiHLMJxirgXQ+gaTkeu/JsvoFZZ6Uug19muFUT2ENMw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR84MB1537 X-OriginatorOrg: hpe.com X-Proofpoint-GUID: 0S1LWtxaIqlFaEVRnwalK3v_GnKenanD X-Proofpoint-ORIG-GUID: 0S1LWtxaIqlFaEVRnwalK3v_GnKenanD 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-08_04,2022-04-08_01,2022-02-23_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 clxscore=1015 adultscore=0 phishscore=0 impostorscore=0 lowpriorityscore=0 suspectscore=0 spamscore=0 malwarescore=0 priorityscore=1501 mlxscore=0 mlxlogscore=351 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2204080057 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 4:02 PM > To: devel@edk2.groups.io > Cc: Bob Feng ; Liming Gao > ; Yuwei Chen ; Baoqi > Zhang > Subject: [edk2-devel] [staging/LoongArch RESEND PATCH v1 32/33] > BaseTools: Add LoongArch64 binding. >=20 > Add LoongArch64 ProcessorBin.h and add LoongArch to Makefiles. >=20 > Cc: Bob Feng > Cc: Liming Gao > Cc: Yuwei Chen >=20 > Signed-off-by: Chao Li > Co-authored-by: Baoqi Zhang > --- > BaseTools/Source/C/GNUmakefile | 3 + > .../C/Include/LoongArch64/ProcessorBind.h | 80 +++++++++++++++++++ > 2 files changed, 83 insertions(+) > create mode 100644 > BaseTools/Source/C/Include/LoongArch64/ProcessorBind.h >=20 > diff --git a/BaseTools/Source/C/GNUmakefile > b/BaseTools/Source/C/GNUmakefile > index 8c191e0c38..5275f657ef 100644 > --- a/BaseTools/Source/C/GNUmakefile > +++ b/BaseTools/Source/C/GNUmakefile > @@ -29,6 +29,9 @@ ifndef HOST_ARCH > ifneq (,$(findstring riscv64,$(uname_m))) > HOST_ARCH=3DRISCV64 > endif > + ifneq (,$(findstring loongarch64,$(uname_m))) > + HOST_ARCH=3DLOONGARCH64 > + endif > ifndef HOST_ARCH > $(info Could not detected HOST_ARCH from uname results) > $(error HOST_ARCH is not defined!) > diff --git a/BaseTools/Source/C/Include/LoongArch64/ProcessorBind.h > b/BaseTools/Source/C/Include/LoongArch64/ProcessorBind.h > new file mode 100644 > index 0000000000..84c6b8ea7a > --- /dev/null > +++ b/BaseTools/Source/C/Include/LoongArch64/ProcessorBind.h > @@ -0,0 +1,80 @@ > +/** @file > + Processor or Compiler specific defines and types for LoongArch > + > + Copyright (c) 2022, Loongson Technology Corporation Limited. All right= s > reserved.
> + > + SPDX-License-Identifier: BSD-2-Clause-Patent > + > +**/ > +#ifndef __PROCESSOR_BIND_H__ > +#define __PROCESSOR_BIND_H__ Please remove the leading "__" and keep only one trailing "_". 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 specificatio= n > +// > +#ifndef __GNUC__ > +#pragma pack() > +#endif > + > +// > +// Use ANSI C 2000 stdint.h integer width declarations > +// > +#include > +typedef uint8_t BOOLEAN; > +typedef int8_t INT8; > +typedef uint8_t UINT8; > +typedef int16_t INT16; > +typedef uint16_t UINT16; > +typedef int32_t INT32; > +typedef uint32_t UINT32; > +typedef int64_t INT64; > +typedef uint64_t UINT64; > +typedef char CHAR8; > +typedef uint16_t CHAR16; > + > +// > +// Signed value of native width. (4 bytes on supported 32-bit processor > instructions, > +// 8 bytes on supported 64-bit processor instructions) > +// > +typedef INT64 INTN; > + > +// > +// Unsigned value of native width. (4 bytes on supported 32-bit process= or > instructions, > +// 8 bytes on supported 64-bit processor instructions) > +// > +typedef UINT64 UINTN; > + > +// > +// 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 > + > +#if defined(__GNUC__) > + // > + // For GNU assembly code, .global or .globl can declare global symbols= . > + // Define this macro to unify the usage. > + // > + #define ASM_GLOBAL .globl > +#endif > + > +// > +// The stack alignment required for LoongArch > +// > +#define CPU_STACK_ALIGNMENT 16 > + > +#endif > -- > 2.27.0 >=20 >=20 >=20 >=20 >=20