[PATCH] lib: Enable checks and compilation on LoongArch
Miao Wang via B4 Relay
devnull+shankerwangmiao.gmail.com at kernel.org
Tue Jul 15 08:54:38 UTC 2025
From: Miao Wang <shankerwangmiao at gmail.com>
LoogArch64 has been included in UEFI spec. This patch enables checks for
LoongArch.
Signed-off-by: Miao Wang <shankerwangmiao at gmail.com>
---
debian/control | 12 ++++++------
src/lib/include/fwts.h | 7 +++++++
2 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/debian/control b/debian/control
index c3a2e607d8a2529fc10a313b9d4e3fdff713d2ac..4edfbd0c4ed11051aee8aa492a6f7b08fbd6cc47 100644
--- a/debian/control
+++ b/debian/control
@@ -19,7 +19,7 @@ Build-Depends: debhelper-compat (= 13),
libbsd-dev
Package: fwts
-Architecture: i386 amd64 armel armhf arm64 ppc64 ppc64el s390x riscv64
+Architecture: i386 amd64 armel armhf arm64 ppc64 ppc64el s390x riscv64 loong64
Depends: libfwtsiasl1 (= ${binary:Version}),
libfwtsacpica1 (= ${binary:Version}),
libfwts1 (= ${binary:Version}),
@@ -37,7 +37,7 @@ Description: FirmWare Test Suite
be a Linux-centric firmware troubleshooting tool.
Package: libfwtsiasl1
-Architecture: i386 amd64 armel armhf arm64 ppc64 ppc64el s390x riscv64
+Architecture: i386 amd64 armel armhf arm64 ppc64 ppc64el s390x riscv64 loong64
Depends: ${shlibs:Depends},
${misc:Depends}
Description: FirmWare Test Suite ACPICA core built for iasl functionality
@@ -48,7 +48,7 @@ Description: FirmWare Test Suite ACPICA core built for iasl functionality
interface with fwts.
Package: libfwtsacpica1
-Architecture: i386 amd64 armel armhf arm64 ppc64 ppc64el s390x riscv64
+Architecture: i386 amd64 armel armhf arm64 ppc64 ppc64el s390x riscv64 loong64
Depends: ${shlibs:Depends},
${misc:Depends}
Description: FirmWare Test Suite ACPICA core built for acpiexec functionality
@@ -58,7 +58,7 @@ Description: FirmWare Test Suite ACPICA core built for acpiexec functionality
contains this code with a thin fwts specific API to interface with fwts.
Package: libfwts1
-Architecture: i386 amd64 armel armhf arm64 ppc64 ppc64el s390x riscv64
+Architecture: i386 amd64 armel armhf arm64 ppc64 ppc64el s390x riscv64 loong64
Depends: ${shlibs:Depends},
${misc:Depends}
Description: FirmWare Test Suite core support library
@@ -67,7 +67,7 @@ Description: FirmWare Test Suite core support library
various fwts tests.
Package: fwts-frontend
-Architecture: i386 amd64 armel armhf arm64 ppc64 ppc64el s390x riscv64
+Architecture: i386 amd64 armel armhf arm64 ppc64 ppc64el s390x riscv64 loong64
Priority: optional
Depends: ${misc:Depends},
dialog,
@@ -78,7 +78,7 @@ Description: Firmware Test Suite frontend interface
interface within Firmware Test Suite live images.
Package: fwts-efi-runtime-dkms
-Architecture: i386 amd64 armel armhf arm64 ppc64 ppc64el
+Architecture: i386 amd64 armel armhf arm64 ppc64 ppc64el loong64
Priority: optional
Depends: ${misc:Depends},
dkms
diff --git a/src/lib/include/fwts.h b/src/lib/include/fwts.h
index 70d185bd95b8048cfacb3f156910e998c46f1acd..0fd1c37ba082d71759ac63517d37c93be9dd92e8 100644
--- a/src/lib/include/fwts.h
+++ b/src/lib/include/fwts.h
@@ -127,6 +127,13 @@
#define FWTS_USE_DEVMEM 1
#endif
+#if defined(__loongarch__)
+#define FWTS_ARCH_LOONGARCH 1
+#define FWTS_HAS_ACPI 1
+#define FWTS_HAS_UEFI 1
+#define FWTS_USE_DEVMEM 1
+#endif
+
/* version 3-tuple into integer */
#define _VER_(major, minor, patchlevel) \
((major * 10000) + (minor * 100) + patchlevel)
---
base-commit: 72a8243073204858c79d809903f1a6926c736911
change-id: 20250715-add-loongarch-83306e42e38f
Best regards,
--
Miao Wang <shankerwangmiao at gmail.com>
More information about the fwts-devel
mailing list