From 10d291f74607f85bdfd15e77209d4648f3fd715c Mon Sep 17 00:00:00 2001 From: Chao Li Date: Thu, 11 Nov 2021 19:09:24 +0800 Subject: [PATCH] MdePkg/BaseIoLibIntrinsic: IoLibNoIo for LoongArch architecture. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=4053 LoongArch MMIO library instance, use the IoLibNoIo. Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Signed-off-by: Chao Li Reviewed-by: Michael D Kinney --- .../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/MdePkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic.inf index 27b15d9ae2..aeb072ee95 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 instructions # for IA-32 and x64. On IPF, I/O port requests are translated into MMIO requests. # MMIO requests are forwarded directly to memory. For EBC, I/O port requests -# ASSERT(). For ARM, AARCH64 and RISCV64, this I/O library only provides non I/O -# read and write. +# ASSERT(). For ARM, AARCH64, RISCV64 and LoongArch, this I/O library only provides +# non I/O read and write. # # Copyright (c) 2007 - 2021, Intel Corporation. All rights reserved.
# Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
# Copyright (c) 2017, AMD Incorporated. All rights reserved.
# Portions Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.
+# Portions Copyright (c) 2022, Loongson Technology Corporation Limited. All rights reserved.
# # SPDX-License-Identifier: BSD-2-Clause-Patent # @@ -27,7 +28,7 @@ # -# VALID_ARCHITECTURES = IA32 X64 EBC ARM AARCH64 RISCV64 +# VALID_ARCHITECTURES = IA32 X64 EBC ARM AARCH64 RISCV64 LOONGARCH64 # [Sources] @@ -62,6 +63,9 @@ [Sources.RISCV64] IoLibNoIo.c +[Sources.LOONGARCH64] + IoLibNoIo.c + [Packages] MdePkg/MdePkg.dec 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 I/O library for non I/O read and write access (memory map I/O read and - write only) architecture, such as ARM and RISC-V processor. + write only) architecture, such as ARM, RISC-V and LoongArch processor. Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.
Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
Copyright (c) 2017, AMD Incorporated. All rights reserved.
Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.
+ Copyright (c) 2022, Loongson Technology Corporation Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent -- 2.39.5