summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-07-21 10:50:08 +0200
committerGitHub <noreply@github.com>2021-07-21 10:50:08 +0200
commit3cfd5ddd59aa4a7c365bd86fa7755610e8ad7296 (patch)
treea907351759cd76dafadd8cbf0b25712b470f1923
parentMerge pull request #20256 from keszybz/one-alloca-too-many (diff)
parentgpt: reformat for restoring vertical alignment (diff)
downloadsystemd-3cfd5ddd59aa4a7c365bd86fa7755610e8ad7296.tar.xz
systemd-3cfd5ddd59aa4a7c365bd86fa7755610e8ad7296.zip
Merge pull request #20087 from xen0n/loongarch64-gpt
gpt: support LoongArch 64-bit
-rw-r--r--docs/DISCOVERABLE_PARTITIONS.md12
-rw-r--r--man/repart.d.xml20
-rw-r--r--man/systemd-gpt-auto-generator.xml6
-rw-r--r--src/shared/gpt.c98
-rw-r--r--src/shared/gpt.h92
5 files changed, 139 insertions, 89 deletions
diff --git a/docs/DISCOVERABLE_PARTITIONS.md b/docs/DISCOVERABLE_PARTITIONS.md
index 368cac091f..4caa086dc5 100644
--- a/docs/DISCOVERABLE_PARTITIONS.md
+++ b/docs/DISCOVERABLE_PARTITIONS.md
@@ -46,6 +46,7 @@ Interface](https://systemd.io/BOOT_LOADER_INTERFACE).
| `69dad710-2ce4-4e3c-b16c-21a1d49abed3` | _Root Partition (32-bit ARM)_ | ditto | ditto |
| `b921b045-1df0-41c3-af44-4c6f280d3fae` | _Root Partition (64-bit ARM/AArch64)_ | ditto | ditto |
| `993d8d3d-f80e-4225-855a-9daf8ed7ea97` | _Root Partition (Itanium/IA-64)_ | ditto | ditto |
+| `77055800-792c-4f94-b39a-98c91b762bb6` | _Root Partition (LoongArch 64-bit)_ | ditto | ditto |
| `60d5a7fe-8e7d-435c-b714-3dd8162144e1` | _Root Partition (RISC-V 32-bit)_ | ditto | ditto |
| `72ec70a6-cf74-40e6-bd49-4bda08e8f224` | _Root Partition (RISC-V 64-bit)_ | ditto | ditto |
| `d13c5d3b-b5d1-422a-b29f-9454fdc89d76` | _Root Verity Partition (x86)_ | A dm-verity superblock followed by hash data | On systems with matching architecture, contains dm-verity integrity hash data for the matching root partition. If this feature is used the partition UUID of the root partition should be the first 128bit of the root hash of the dm-verity hash data, and the partition UUID of this dm-verity partition should be the final 128bit of it, so that the root partition and its verity partition can be discovered easily, simply by specifying the root hash. |
@@ -53,6 +54,7 @@ Interface](https://systemd.io/BOOT_LOADER_INTERFACE).
| `7386cdf2-203c-47a9-a498-f2ecce45a2d6` | _Root Verity Partition (32-bit ARM)_ | ditto | ditto |
| `df3300ce-d69f-4c92-978c-9bfb0f38d820` | _Root Verity Partition (64-bit ARM/AArch64)_ | ditto | ditto |
| `86ed10d5-b607-45bb-8957-d350f23d0571` | _Root Verity Partition (Itanium/IA-64)_ | ditto | ditto |
+| `f3393b22-e9af-4613-a948-9d3bfbd0c535` | _Root Verity Partition (LoongArch 64-bit)_ | ditto | ditto |
| `ae0253be-1167-4007-ac68-43926c14c5de` | _Root Verity Partition (RISC-V 32-bit)_ | ditto | ditto |
| `b6ed5582-440b-4209-b8da-5ff7c419ea3d` | _Root Verity Partition (RISC-V 64-bit)_ | ditto | ditto |
| `75250d76-8cc6-458e-bd66-bd47cc81a812` | _`/usr/` Partition (x86)_ | Any native, optionally in LUKS | Similar semantics to root partition, but just the `/usr/` partition. |
@@ -60,6 +62,7 @@ Interface](https://systemd.io/BOOT_LOADER_INTERFACE).
| `7d0359a3-02b3-4f0a-865c-654403e70625` | _`/usr/` Partition (32-bit ARM)_ | ditto | ditto |
| `b0e01050-ee5f-4390-949a-9101b17104e9` | _`/usr/` Partition (64-bit ARM/AArch64)_ | ditto | ditto |
| `4301d2a6-4e3b-4b2a-bb94-9e0b2c4225ea` | _`/usr/` Partition (Itanium/IA-64)_ | ditto | ditto |
+| `e611c702-575c-4cbe-9a46-434fa0bf7e3f` | _`/usr/` Partition (LoongArch 64-bit)_ | ditto | ditto |
| `b933fb22-5c3f-4f91-af90-e2bb0fa50702` | _`/usr/` Partition (RISC-V 32-bit)_ | ditto | ditto |
| `beaec34b-8442-439b-a40b-984381ed097d` | _`/usr/` Partition (RISC-V 64-bit)_ | ditto | ditto |
| `8f461b0d-14ee-4e81-9aa9-049b6fb97abd` | _`/usr/` Verity Partition (x86)_ | A dm-verity superblock followed by hash data | Similar semantics to root Verity partition, but just for the `/usr/` partition. |
@@ -67,6 +70,7 @@ Interface](https://systemd.io/BOOT_LOADER_INTERFACE).
| `c215d751-7bcd-4649-be90-6627490a4c05` | _`/usr/` Verity Partition (32-bit ARM)_ | ditto | ditto |
| `6e11a4e7-fbca-4ded-b9e9-e1a512bb664e` | _`/usr/` Verity Partition (64-bit ARM/AArch64)_ | ditto | ditto |
| `6a491e03-3be7-4545-8e38-83320e0ea880` | _`/usr/` Verity Partition (Itanium/IA-64)_ | ditto | ditto |
+| `f46b2c26-59ae-48f0-9106-c50ed47f673d` | _`/usr/` Verity Partition (LoongArch 64-bit)_ | ditto | ditto |
| `cb1ee4e3-8cd0-4136-a0a4-aa61a32e8730` | _`/usr/` Verity Partition (RISC-V 32-bit)_ | ditto | ditto |
| `8f1056be-9b05-47c4-81d6-be53128e5b54` | _`/usr/` Verity Partition (RISC-V 64-bit)_ | ditto | ditto |
| `933ac7e1-2eb4-4f13-b844-0e14e2aef915` | _Home Partition_ | Any native, optionally in LUKS | The first partition with this type UUID on the disk containing the root partition is automatically mounted to `/home/`. If the partition is encrypted with LUKS, the device mapper file will be named `/dev/mapper/home`. |
@@ -221,13 +225,13 @@ We are not. `/etc/fstab` always overrides automatic discovery and is indeed
mentioned in the specifications. We are simply trying to make the boot and
installation processes of Linux a bit more robust and self-descriptive.
-### Why did you only define the root partition for x86, x86-64, ARM, ARM64, ia64, riscv32, riscv64?
+### Why did you only define the root partition for these listed architectures?
The automatic discovery of the root partition is defined to operate on the disk
containing the current EFI System Partition (ESP). Since EFI only exists on
-x86, x86-64, ia64, ARM and RISC-V so far, we only defined root partition UUIDs for
-these architectures. Should EFI become more common on other architectures, we
-can define additional UUIDs for them.
+x86, x86-64, ia64, ARM, LoongArch and RISC-V so far, we only defined root
+partition UUIDs for these architectures. Should EFI become more common on
+other architectures, we can define additional UUIDs for them.
### Why define distinct root partition UUIDs for the various architectures?
diff --git a/man/repart.d.xml b/man/repart.d.xml
index da1dea986f..0305e255c7 100644
--- a/man/repart.d.xml
+++ b/man/repart.d.xml
@@ -201,6 +201,16 @@
</row>
<row>
+ <entry><constant>root-loongarch64</constant></entry>
+ <entry>Root file system partition for the LoongArch 64-bit architecture</entry>
+ </row>
+
+ <row>
+ <entry><constant>root-loongarch64-verity</constant></entry>
+ <entry>Verity data for the LoongArch 64-bit root file system partition</entry>
+ </row>
+
+ <row>
<entry><constant>root-riscv32</constant></entry>
<entry>Root file system partition for the RISC-V 32-bit architecture</entry>
</row>
@@ -291,6 +301,16 @@
</row>
<row>
+ <entry><constant>usr-loongarch64</constant></entry>
+ <entry><filename>/usr/</filename> file system partition for the LoongArch 64-bit architecture</entry>
+ </row>
+
+ <row>
+ <entry><constant>usr-loongarch64-verity</constant></entry>
+ <entry>Verity data for the LoongArch 64-bit <filename>/usr/</filename> file system partition</entry>
+ </row>
+
+ <row>
<entry><constant>usr-riscv32</constant></entry>
<entry><filename>/usr/</filename> file system partition for the RISC-V 32-bit architecture</entry>
</row>
diff --git a/man/systemd-gpt-auto-generator.xml b/man/systemd-gpt-auto-generator.xml
index 4a21540c70..798faa59c8 100644
--- a/man/systemd-gpt-auto-generator.xml
+++ b/man/systemd-gpt-auto-generator.xml
@@ -110,6 +110,12 @@
<entry>On Itanium systems, the first Itanium root partition on the disk the EFI ESP is located on is mounted to the root directory <filename>/</filename>.</entry>
</row>
<row>
+ <entry>77055800-792c-4f94-b39a-98c91b762bb6</entry>
+ <entry><filename>Root Partition (LoongArch 64)</filename></entry>
+ <entry><filename>/</filename></entry>
+ <entry>On LoongArch 64-bit systems, the first LoongArch 64-bit root partition on the disk the EFI ESP is located on is mounted to the root directory <filename>/</filename>.</entry>
+ </row>
+ <row>
<entry>60d5a7fe-8e7d-435c-b714-3dd8162144e1</entry>
<entry><filename>Root Partition (RISCV-V 32)</filename></entry>
<entry><filename>/</filename></entry>
diff --git a/src/shared/gpt.c b/src/shared/gpt.c
index 882d11ca6c..edd56c1493 100644
--- a/src/shared/gpt.c
+++ b/src/shared/gpt.c
@@ -5,59 +5,63 @@
#include "utf8.h"
const GptPartitionType gpt_partition_type_table[] = {
- { GPT_ROOT_X86, "root-x86" },
- { GPT_ROOT_X86_VERITY, "root-x86-verity" },
- { GPT_ROOT_X86_64, "root-x86-64" },
- { GPT_ROOT_X86_64_VERITY, "root-x86-64-verity" },
- { GPT_ROOT_ARM, "root-arm" },
- { GPT_ROOT_ARM_VERITY, "root-arm-verity" },
- { GPT_ROOT_ARM_64, "root-arm64" },
- { GPT_ROOT_ARM_64_VERITY, "root-arm64-verity" },
- { GPT_ROOT_IA64, "root-ia64" },
- { GPT_ROOT_IA64_VERITY, "root-ia64-verity" },
- { GPT_ROOT_RISCV32, "root-riscv32" },
- { GPT_ROOT_RISCV32_VERITY, "root-riscv32-verity" },
- { GPT_ROOT_RISCV64, "root-riscv64" },
- { GPT_ROOT_RISCV64_VERITY, "root-riscv64-verity" },
+ { GPT_ROOT_X86, "root-x86" },
+ { GPT_ROOT_X86_VERITY, "root-x86-verity" },
+ { GPT_ROOT_X86_64, "root-x86-64" },
+ { GPT_ROOT_X86_64_VERITY, "root-x86-64-verity" },
+ { GPT_ROOT_ARM, "root-arm" },
+ { GPT_ROOT_ARM_VERITY, "root-arm-verity" },
+ { GPT_ROOT_ARM_64, "root-arm64" },
+ { GPT_ROOT_ARM_64_VERITY, "root-arm64-verity" },
+ { GPT_ROOT_IA64, "root-ia64" },
+ { GPT_ROOT_IA64_VERITY, "root-ia64-verity" },
+ { GPT_ROOT_LOONGARCH64, "root-loongarch64" },
+ { GPT_ROOT_LOONGARCH64_VERITY, "root-loongarch64-verity" },
+ { GPT_ROOT_RISCV32, "root-riscv32" },
+ { GPT_ROOT_RISCV32_VERITY, "root-riscv32-verity" },
+ { GPT_ROOT_RISCV64, "root-riscv64" },
+ { GPT_ROOT_RISCV64_VERITY, "root-riscv64-verity" },
#ifdef GPT_ROOT_NATIVE
- { GPT_ROOT_NATIVE, "root" },
- { GPT_ROOT_NATIVE_VERITY, "root-verity" },
+ { GPT_ROOT_NATIVE, "root" },
+ { GPT_ROOT_NATIVE_VERITY, "root-verity" },
#endif
#ifdef GPT_ROOT_SECONDARY
- { GPT_ROOT_SECONDARY, "root-secondary" },
- { GPT_ROOT_SECONDARY_VERITY, "root-secondary-verity" },
+ { GPT_ROOT_SECONDARY, "root-secondary" },
+ { GPT_ROOT_SECONDARY_VERITY, "root-secondary-verity" },
#endif
- { GPT_USR_X86, "usr-x86" },
- { GPT_USR_X86_VERITY, "usr-x86-verity" },
- { GPT_USR_X86_64, "usr-x86-64" },
- { GPT_USR_X86_64_VERITY, "usr-x86-64-verity" },
- { GPT_USR_ARM, "usr-arm" },
- { GPT_USR_ARM_VERITY, "usr-arm-verity" },
- { GPT_USR_ARM_64, "usr-arm64" },
- { GPT_USR_ARM_64_VERITY, "usr-arm64-verity" },
- { GPT_USR_IA64, "usr-ia64" },
- { GPT_USR_IA64_VERITY, "usr-ia64-verity" },
- { GPT_USR_RISCV32, "usr-riscv32" },
- { GPT_USR_RISCV32_VERITY, "usr-riscv32-verity" },
- { GPT_USR_RISCV64, "usr-riscv64" },
- { GPT_USR_RISCV64_VERITY, "usr-riscv64-verity" },
+ { GPT_USR_X86, "usr-x86" },
+ { GPT_USR_X86_VERITY, "usr-x86-verity" },
+ { GPT_USR_X86_64, "usr-x86-64" },
+ { GPT_USR_X86_64_VERITY, "usr-x86-64-verity" },
+ { GPT_USR_ARM, "usr-arm" },
+ { GPT_USR_ARM_VERITY, "usr-arm-verity" },
+ { GPT_USR_ARM_64, "usr-arm64" },
+ { GPT_USR_ARM_64_VERITY, "usr-arm64-verity" },
+ { GPT_USR_IA64, "usr-ia64" },
+ { GPT_USR_IA64_VERITY, "usr-ia64-verity" },
+ { GPT_USR_LOONGARCH64, "usr-loongarch64" },
+ { GPT_USR_LOONGARCH64_VERITY, "usr-loongarch64-verity" },
+ { GPT_USR_RISCV32, "usr-riscv32" },
+ { GPT_USR_RISCV32_VERITY, "usr-riscv32-verity" },
+ { GPT_USR_RISCV64, "usr-riscv64" },
+ { GPT_USR_RISCV64_VERITY, "usr-riscv64-verity" },
#ifdef GPT_USR_NATIVE
- { GPT_USR_NATIVE, "usr" },
- { GPT_USR_NATIVE_VERITY, "usr-verity" },
+ { GPT_USR_NATIVE, "usr" },
+ { GPT_USR_NATIVE_VERITY, "usr-verity" },
#endif
#ifdef GPT_USR_SECONDARY
- { GPT_USR_SECONDARY, "usr-secondary" },
- { GPT_USR_SECONDARY_VERITY, "usr-secondary-verity" },
+ { GPT_USR_SECONDARY, "usr-secondary" },
+ { GPT_USR_SECONDARY_VERITY, "usr-secondary-verity" },
#endif
- { GPT_ESP, "esp" },
- { GPT_XBOOTLDR, "xbootldr" },
- { GPT_SWAP, "swap" },
- { GPT_HOME, "home" },
- { GPT_SRV, "srv" },
- { GPT_VAR, "var" },
- { GPT_TMP, "tmp" },
- { GPT_USER_HOME, "user-home" },
- { GPT_LINUX_GENERIC, "linux-generic" },
+ { GPT_ESP, "esp" },
+ { GPT_XBOOTLDR, "xbootldr" },
+ { GPT_SWAP, "swap" },
+ { GPT_HOME, "home" },
+ { GPT_SRV, "srv" },
+ { GPT_VAR, "var" },
+ { GPT_TMP, "tmp" },
+ { GPT_USER_HOME, "user-home" },
+ { GPT_LINUX_GENERIC, "linux-generic" },
{}
};
@@ -114,6 +118,7 @@ bool gpt_partition_type_is_root(sd_id128_t id) {
GPT_ROOT_ARM,
GPT_ROOT_ARM_64,
GPT_ROOT_IA64,
+ GPT_ROOT_LOONGARCH64,
GPT_ROOT_RISCV32,
GPT_ROOT_RISCV64);
}
@@ -125,6 +130,7 @@ bool gpt_partition_type_is_root_verity(sd_id128_t id) {
GPT_ROOT_ARM_VERITY,
GPT_ROOT_ARM_64_VERITY,
GPT_ROOT_IA64_VERITY,
+ GPT_ROOT_LOONGARCH64_VERITY,
GPT_ROOT_RISCV32_VERITY,
GPT_ROOT_RISCV64_VERITY);
}
@@ -136,6 +142,7 @@ bool gpt_partition_type_is_usr(sd_id128_t id) {
GPT_USR_ARM,
GPT_USR_ARM_64,
GPT_USR_IA64,
+ GPT_USR_LOONGARCH64,
GPT_USR_RISCV32,
GPT_USR_RISCV64);
}
@@ -147,6 +154,7 @@ bool gpt_partition_type_is_usr_verity(sd_id128_t id) {
GPT_USR_ARM_VERITY,
GPT_USR_ARM_64_VERITY,
GPT_USR_IA64_VERITY,
+ GPT_USR_LOONGARCH64_VERITY,
GPT_USR_RISCV32_VERITY,
GPT_USR_RISCV64_VERITY);
}
diff --git a/src/shared/gpt.h b/src/shared/gpt.h
index dc530ef1b0..a5fc9534e1 100644
--- a/src/shared/gpt.h
+++ b/src/shared/gpt.h
@@ -7,49 +7,54 @@
#include "id128-util.h"
-/* We only support root disk discovery for x86, x86-64, Itanium and ARM for now, since EFI for anything else
- * doesn't really exist, and we only care for root partitions on the same disk as the EFI ESP. */
-
-#define GPT_ROOT_X86 SD_ID128_MAKE(44,47,95,40,f2,97,41,b2,9a,f7,d1,31,d5,f0,45,8a)
-#define GPT_ROOT_X86_64 SD_ID128_MAKE(4f,68,bc,e3,e8,cd,4d,b1,96,e7,fb,ca,f9,84,b7,09)
-#define GPT_ROOT_ARM SD_ID128_MAKE(69,da,d7,10,2c,e4,4e,3c,b1,6c,21,a1,d4,9a,be,d3)
-#define GPT_ROOT_ARM_64 SD_ID128_MAKE(b9,21,b0,45,1d,f0,41,c3,af,44,4c,6f,28,0d,3f,ae)
-#define GPT_ROOT_IA64 SD_ID128_MAKE(99,3d,8d,3d,f8,0e,42,25,85,5a,9d,af,8e,d7,ea,97)
-#define GPT_ROOT_RISCV32 SD_ID128_MAKE(60,d5,a7,fe,8e,7d,43,5c,b7,14,3d,d8,16,21,44,e1)
-#define GPT_ROOT_RISCV64 SD_ID128_MAKE(72,ec,70,a6,cf,74,40,e6,bd,49,4b,da,08,e8,f2,24)
-#define GPT_USR_X86 SD_ID128_MAKE(75,25,0d,76,8c,c6,45,8e,bd,66,bd,47,cc,81,a8,12)
-#define GPT_USR_X86_64 SD_ID128_MAKE(84,84,68,0c,95,21,48,c6,9c,11,b0,72,06,56,f6,9e)
-#define GPT_USR_ARM SD_ID128_MAKE(7d,03,59,a3,02,b3,4f,0a,86,5c,65,44,03,e7,06,25)
-#define GPT_USR_ARM_64 SD_ID128_MAKE(b0,e0,10,50,ee,5f,43,90,94,9a,91,01,b1,71,04,e9)
-#define GPT_USR_IA64 SD_ID128_MAKE(43,01,d2,a6,4e,3b,4b,2a,bb,94,9e,0b,2c,42,25,ea)
-#define GPT_USR_RISCV32 SD_ID128_MAKE(b9,33,fb,22,5c,3f,4f,91,af,90,e2,bb,0f,a5,07,02)
-#define GPT_USR_RISCV64 SD_ID128_MAKE(be,ae,c3,4b,84,42,43,9b,a4,0b,98,43,81,ed,09,7d)
-#define GPT_ESP SD_ID128_MAKE(c1,2a,73,28,f8,1f,11,d2,ba,4b,00,a0,c9,3e,c9,3b)
-#define GPT_XBOOTLDR SD_ID128_MAKE(bc,13,c2,ff,59,e6,42,62,a3,52,b2,75,fd,6f,71,72)
-#define GPT_SWAP SD_ID128_MAKE(06,57,fd,6d,a4,ab,43,c4,84,e5,09,33,c8,4b,4f,4f)
-#define GPT_HOME SD_ID128_MAKE(93,3a,c7,e1,2e,b4,4f,13,b8,44,0e,14,e2,ae,f9,15)
-#define GPT_SRV SD_ID128_MAKE(3b,8f,84,25,20,e0,4f,3b,90,7f,1a,25,a7,6f,98,e8)
-#define GPT_VAR SD_ID128_MAKE(4d,21,b0,16,b5,34,45,c2,a9,fb,5c,16,e0,91,fd,2d)
-#define GPT_TMP SD_ID128_MAKE(7e,c6,f5,57,3b,c5,4a,ca,b2,93,16,ef,5d,f6,39,d1)
-#define GPT_USER_HOME SD_ID128_MAKE(77,3f,91,ef,66,d4,49,b5,bd,83,d6,83,bf,40,ad,16)
-#define GPT_LINUX_GENERIC SD_ID128_MAKE(0f,c6,3d,af,84,83,47,72,8e,79,3d,69,d8,47,7d,e4)
+/* We only support root disk discovery for x86, x86-64, Itanium, ARM and LoongArch for now,
+ * since EFI for anything else doesn't really exist, and we only care for root partitions
+ * on the same disk as the EFI ESP. */
+
+#define GPT_ROOT_X86 SD_ID128_MAKE(44,47,95,40,f2,97,41,b2,9a,f7,d1,31,d5,f0,45,8a)
+#define GPT_ROOT_X86_64 SD_ID128_MAKE(4f,68,bc,e3,e8,cd,4d,b1,96,e7,fb,ca,f9,84,b7,09)
+#define GPT_ROOT_ARM SD_ID128_MAKE(69,da,d7,10,2c,e4,4e,3c,b1,6c,21,a1,d4,9a,be,d3)
+#define GPT_ROOT_ARM_64 SD_ID128_MAKE(b9,21,b0,45,1d,f0,41,c3,af,44,4c,6f,28,0d,3f,ae)
+#define GPT_ROOT_IA64 SD_ID128_MAKE(99,3d,8d,3d,f8,0e,42,25,85,5a,9d,af,8e,d7,ea,97)
+#define GPT_ROOT_LOONGARCH64 SD_ID128_MAKE(77,05,58,00,79,2c,4f,94,b3,9a,99,c9,1b,76,2b,b6)
+#define GPT_ROOT_RISCV32 SD_ID128_MAKE(60,d5,a7,fe,8e,7d,43,5c,b7,14,3d,d8,16,21,44,e1)
+#define GPT_ROOT_RISCV64 SD_ID128_MAKE(72,ec,70,a6,cf,74,40,e6,bd,49,4b,da,08,e8,f2,24)
+#define GPT_USR_X86 SD_ID128_MAKE(75,25,0d,76,8c,c6,45,8e,bd,66,bd,47,cc,81,a8,12)
+#define GPT_USR_X86_64 SD_ID128_MAKE(84,84,68,0c,95,21,48,c6,9c,11,b0,72,06,56,f6,9e)
+#define GPT_USR_ARM SD_ID128_MAKE(7d,03,59,a3,02,b3,4f,0a,86,5c,65,44,03,e7,06,25)
+#define GPT_USR_ARM_64 SD_ID128_MAKE(b0,e0,10,50,ee,5f,43,90,94,9a,91,01,b1,71,04,e9)
+#define GPT_USR_IA64 SD_ID128_MAKE(43,01,d2,a6,4e,3b,4b,2a,bb,94,9e,0b,2c,42,25,ea)
+#define GPT_USR_LOONGARCH64 SD_ID128_MAKE(e6,11,c7,02,57,5c,4c,be,9a,46,43,4f,a0,bf,7e,3f)
+#define GPT_USR_RISCV32 SD_ID128_MAKE(b9,33,fb,22,5c,3f,4f,91,af,90,e2,bb,0f,a5,07,02)
+#define GPT_USR_RISCV64 SD_ID128_MAKE(be,ae,c3,4b,84,42,43,9b,a4,0b,98,43,81,ed,09,7d)
+#define GPT_ESP SD_ID128_MAKE(c1,2a,73,28,f8,1f,11,d2,ba,4b,00,a0,c9,3e,c9,3b)
+#define GPT_XBOOTLDR SD_ID128_MAKE(bc,13,c2,ff,59,e6,42,62,a3,52,b2,75,fd,6f,71,72)
+#define GPT_SWAP SD_ID128_MAKE(06,57,fd,6d,a4,ab,43,c4,84,e5,09,33,c8,4b,4f,4f)
+#define GPT_HOME SD_ID128_MAKE(93,3a,c7,e1,2e,b4,4f,13,b8,44,0e,14,e2,ae,f9,15)
+#define GPT_SRV SD_ID128_MAKE(3b,8f,84,25,20,e0,4f,3b,90,7f,1a,25,a7,6f,98,e8)
+#define GPT_VAR SD_ID128_MAKE(4d,21,b0,16,b5,34,45,c2,a9,fb,5c,16,e0,91,fd,2d)
+#define GPT_TMP SD_ID128_MAKE(7e,c6,f5,57,3b,c5,4a,ca,b2,93,16,ef,5d,f6,39,d1)
+#define GPT_USER_HOME SD_ID128_MAKE(77,3f,91,ef,66,d4,49,b5,bd,83,d6,83,bf,40,ad,16)
+#define GPT_LINUX_GENERIC SD_ID128_MAKE(0f,c6,3d,af,84,83,47,72,8e,79,3d,69,d8,47,7d,e4)
/* Verity partitions for the root partitions above (we only define them for the root and /usr partitions,
* because only they are commonly read-only and hence suitable for verity). */
-#define GPT_ROOT_X86_VERITY SD_ID128_MAKE(d1,3c,5d,3b,b5,d1,42,2a,b2,9f,94,54,fd,c8,9d,76)
-#define GPT_ROOT_X86_64_VERITY SD_ID128_MAKE(2c,73,57,ed,eb,d2,46,d9,ae,c1,23,d4,37,ec,2b,f5)
-#define GPT_ROOT_ARM_VERITY SD_ID128_MAKE(73,86,cd,f2,20,3c,47,a9,a4,98,f2,ec,ce,45,a2,d6)
-#define GPT_ROOT_ARM_64_VERITY SD_ID128_MAKE(df,33,00,ce,d6,9f,4c,92,97,8c,9b,fb,0f,38,d8,20)
-#define GPT_ROOT_IA64_VERITY SD_ID128_MAKE(86,ed,10,d5,b6,07,45,bb,89,57,d3,50,f2,3d,05,71)
-#define GPT_ROOT_RISCV32_VERITY SD_ID128_MAKE(ae,02,53,be,11,67,40,07,ac,68,43,92,6c,14,c5,de)
-#define GPT_ROOT_RISCV64_VERITY SD_ID128_MAKE(b6,ed,55,82,44,0b,42,09,b8,da,5f,f7,c4,19,ea,3d)
-#define GPT_USR_X86_VERITY SD_ID128_MAKE(8f,46,1b,0d,14,ee,4e,81,9a,a9,04,9b,6f,b9,7a,bd)
-#define GPT_USR_X86_64_VERITY SD_ID128_MAKE(77,ff,5f,63,e7,b6,46,33,ac,f4,15,65,b8,64,c0,e6)
-#define GPT_USR_ARM_VERITY SD_ID128_MAKE(c2,15,d7,51,7b,cd,46,49,be,90,66,27,49,0a,4c,05)
-#define GPT_USR_ARM_64_VERITY SD_ID128_MAKE(6e,11,a4,e7,fb,ca,4d,ed,b9,e9,e1,a5,12,bb,66,4e)
-#define GPT_USR_IA64_VERITY SD_ID128_MAKE(6a,49,1e,03,3b,e7,45,45,8e,38,83,32,0e,0e,a8,80)
-#define GPT_USR_RISCV32_VERITY SD_ID128_MAKE(cb,1e,e4,e3,8c,d0,41,36,a0,a4,aa,61,a3,2e,87,30)
-#define GPT_USR_RISCV64_VERITY SD_ID128_MAKE(8f,10,56,be,9b,05,47,c4,81,d6,be,53,12,8e,5b,54)
+#define GPT_ROOT_X86_VERITY SD_ID128_MAKE(d1,3c,5d,3b,b5,d1,42,2a,b2,9f,94,54,fd,c8,9d,76)
+#define GPT_ROOT_X86_64_VERITY SD_ID128_MAKE(2c,73,57,ed,eb,d2,46,d9,ae,c1,23,d4,37,ec,2b,f5)
+#define GPT_ROOT_ARM_VERITY SD_ID128_MAKE(73,86,cd,f2,20,3c,47,a9,a4,98,f2,ec,ce,45,a2,d6)
+#define GPT_ROOT_ARM_64_VERITY SD_ID128_MAKE(df,33,00,ce,d6,9f,4c,92,97,8c,9b,fb,0f,38,d8,20)
+#define GPT_ROOT_IA64_VERITY SD_ID128_MAKE(86,ed,10,d5,b6,07,45,bb,89,57,d3,50,f2,3d,05,71)
+#define GPT_ROOT_LOONGARCH64_VERITY SD_ID128_MAKE(f3,39,3b,22,e9,af,46,13,a9,48,9d,3b,fb,d0,c5,35)
+#define GPT_ROOT_RISCV32_VERITY SD_ID128_MAKE(ae,02,53,be,11,67,40,07,ac,68,43,92,6c,14,c5,de)
+#define GPT_ROOT_RISCV64_VERITY SD_ID128_MAKE(b6,ed,55,82,44,0b,42,09,b8,da,5f,f7,c4,19,ea,3d)
+#define GPT_USR_X86_VERITY SD_ID128_MAKE(8f,46,1b,0d,14,ee,4e,81,9a,a9,04,9b,6f,b9,7a,bd)
+#define GPT_USR_X86_64_VERITY SD_ID128_MAKE(77,ff,5f,63,e7,b6,46,33,ac,f4,15,65,b8,64,c0,e6)
+#define GPT_USR_ARM_VERITY SD_ID128_MAKE(c2,15,d7,51,7b,cd,46,49,be,90,66,27,49,0a,4c,05)
+#define GPT_USR_ARM_64_VERITY SD_ID128_MAKE(6e,11,a4,e7,fb,ca,4d,ed,b9,e9,e1,a5,12,bb,66,4e)
+#define GPT_USR_IA64_VERITY SD_ID128_MAKE(6a,49,1e,03,3b,e7,45,45,8e,38,83,32,0e,0e,a8,80)
+#define GPT_USR_LOONGARCH64_VERITY SD_ID128_MAKE(f4,6b,2c,26,59,ae,48,f0,91,06,c5,0e,d4,7f,67,3d)
+#define GPT_USR_RISCV32_VERITY SD_ID128_MAKE(cb,1e,e4,e3,8c,d0,41,36,a0,a4,aa,61,a3,2e,87,30)
+#define GPT_USR_RISCV64_VERITY SD_ID128_MAKE(8f,10,56,be,9b,05,47,c4,81,d6,be,53,12,8e,5b,54)
#if defined(__x86_64__)
# define GPT_ROOT_NATIVE GPT_ROOT_X86_64
@@ -90,6 +95,13 @@
# define GPT_USR_NATIVE_VERITY GPT_USR_ARM_VERITY
#endif
+#if defined(__loongarch64)
+# define GPT_ROOT_NATIVE GPT_ROOT_LOONGARCH64
+# define GPT_ROOT_NATIVE_VERITY GPT_ROOT_LOONGARCH64_VERITY
+# define GPT_USR_NATIVE GPT_USR_LOONGARCH64
+# define GPT_USR_NATIVE_VERITY GPT_USR_LOONGARCH64_VERITY
+#endif
+
#if defined(__riscv)
#if (__riscv_xlen == 32)
# define GPT_ROOT_NATIVE GPT_ROOT_RISCV32