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.web08.23457.1644389756829429800 for ; Tue, 08 Feb 2022 22:55:57 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: loongson.cn, ip: 114.242.206.163, mailfrom: lichao@loongson.cn) Received: from code-server.gen (unknown [10.2.9.245]) by mail.loongson.cn (Coremail) with SMTP id AQAAf9AxiuB6ZQNi04sIAA--.24457S2; Wed, 09 Feb 2022 14:55:54 +0800 (CST) From: "Chao Li" To: devel@edk2.groups.io Cc: Michael D Kinney , Liming Gao , Zhiguang Liu Subject: [staging/LoongArch RESEND PATCH v1 23/33] MdePkg/BaseIoLibIntrinsic: IoLibNoIo for LoongArch architecture. Date: Wed, 9 Feb 2022 14:55:54 +0800 Message-Id: <20220209065554.2989206-1-lichao@loongson.cn> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-CM-TRANSID: AQAAf9AxiuB6ZQNi04sIAA--.24457S2 X-Coremail-Antispam: 1UD129KBjvJXoWxCw4kGw1UGr1xGFy5Zr1rCrg_yoW5Aw15pF s5Krs8G3W7Xr4S9rZ8Ww48Xrs5KanrJr17G3ZYywn3ursrXwnY9F1YqF4UJr1Yyr18Zr4r WF1Yva47ua1kXr7anT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUvmb7Iv0xC_Cr1lb4IE77IF4wAFF20E14v26r1j6r4UM7CY07I2 0VC2zVCF04k26cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rw A2F7IY1VAKz4vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Ar0_tr1l84ACjcxK6xII jxv20xvEc7CjxVAFwI0_Gr1j6F4UJwA2z4x0Y4vEx4A2jsIE14v26F4UJVW0owA2z4x0Y4 vEx4A2jsIEc7CjxVAFwI0_GcCE3s1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xv F2IEw4CE5I8CrVC2j2WlYx0E2Ix0cI8IcVAFwI0_Jw0_WrylYx0Ec7CjxVAajcxG14v26r 1j6r4UMcIj6I8E87Iv67AKxVW8JVWxJwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij 64vIr41lc2xSY4AK6svPMxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r1j6r4UMI 8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CEb7AF67AK xVWUAVWUtwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26ryj6F1UMIIF0xvE2Ix0cI 8IcVCY1x0267AKxVW8Jr0_Cr1UMIIF0xvE42xK8VAvwI8IcIk0rVWUCVW8JwCI42IY6I8E 87Iv67AKxVW8JVWxJwCI42IY6I8E87Iv6xkF7I0E14v26r4UJVWxJrUvcSsGvfC2KfnxnU UI43ZEXa7IU0rMa5UUUUU== X-CM-SenderInfo: xolfxt3r6o00pqjv00gofq/1tbiAQAMCF3QvO0LrgAQss Content-Transfer-Encoding: quoted-printable LoongArch MMIO library instance, use the IoLibNoIo. Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Signed-off-by: Chao Li --- .../Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf | 10 +++++++--- MdePkg/Library/BaseIoLibIntrinsic/IoLibNoIo.c | 3 ++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf b/Mde= Pkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf index 97eeada065..f668d4f2d7 100644 --- a/MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf +++ b/MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf @@ -4,13 +4,14 @@ # I/O Library that uses compiler intrinsics to perform IN and OUT instruc= tions=0D # for IA-32 and x64. On IPF, I/O port requests are translated into MMIO = requests.=0D # MMIO requests are forwarded directly to memory. For EBC, I/O port requ= ests=0D -# ASSERT(). For ARM, AARCH64 and RISCV64, this I/O library only provides = non I/O=0D -# read and write.=0D +# ASSERT(). For ARM, AARCH64, RISCV64 and LoongArch, this I/O library onl= y provides=0D +# non I/O read and write.=0D #=0D # Copyright (c) 2007 - 2021, Intel Corporation. All rights reserved.
= =0D # Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
= =0D # Copyright (c) 2017, AMD Incorporated. All rights reserved.
=0D # Portions Copyright (c) 2020, Hewlett Packard Enterprise Development LP.= All rights reserved.
=0D +# Portions Copyright (c) 2022, Loongson Technology Corporation Limited. A= ll rights reserved.
=0D #=0D # SPDX-License-Identifier: BSD-2-Clause-Patent=0D #=0D @@ -27,7 +28,7 @@ =0D =0D #=0D -# VALID_ARCHITECTURES =3D IA32 X64 EBC ARM AARCH64 RISCV64=0D +# VALID_ARCHITECTURES =3D IA32 X64 EBC ARM AARCH64 RISCV64 LOON= GARCH64=0D #=0D =0D [Sources]=0D @@ -60,6 +61,9 @@ [Sources.RISCV64]=0D IoLibNoIo.c=0D =0D +[Sources.LOONGARCH64]=0D + IoLibNoIo.c=0D +=0D [Packages]=0D MdePkg/MdePkg.dec=0D =0D diff --git a/MdePkg/Library/BaseIoLibIntrinsic/IoLibNoIo.c b/MdePkg/Library= /BaseIoLibIntrinsic/IoLibNoIo.c index c71f45b22e..c51e5da39b 100644 --- a/MdePkg/Library/BaseIoLibIntrinsic/IoLibNoIo.c +++ b/MdePkg/Library/BaseIoLibIntrinsic/IoLibNoIo.c @@ -1,11 +1,12 @@ /** @file=0D I/O library for non I/O read and write access (memory map I/O read and=0D - write only) architecture, such as ARM and RISC-V processor.=0D + write only) architecture, such as ARM, RISC-V and LoongArch processor.=0D =0D Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.
=0D Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
= =0D Copyright (c) 2017, AMD Incorporated. All rights reserved.
=0D Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All right= s reserved.
=0D + Copyright (c) 2022, Loongson Technology Corporation Limited. All rights = reserved.
=0D =0D SPDX-License-Identifier: BSD-2-Clause-Patent=0D =0D --=20 2.27.0