From 59593ef7fe279d0357e3c6d8020999c3289fd5e2 Mon Sep 17 00:00:00 2001 From: Palmer Dabbelt Date: Fri, 19 May 2023 07:51:23 -0700 Subject: [PATCH] Add E_FLAGS for the Atomic ABIs I wrote this before having coffee. Signed-off-by: Palmer Dabbelt --- riscv-elf.adoc | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/riscv-elf.adoc b/riscv-elf.adoc index 9f1d95fd..9b50e527 100644 --- a/riscv-elf.adoc +++ b/riscv-elf.adoc @@ -193,9 +193,9 @@ below. [cols="1,2,1,1,3,5"] [width=80%] |=== -| Bit 0 | Bits 1 - 2 | Bit 3 | Bit 4 | Bits 5 - 23 | Bits 24 - 31 +| Bit 0 | Bits 1 - 2 | Bit 3 | Bit 4 | Bits 5 - 6 | Bits 7 - 23 | Bits 24 - 31 -| RVC | Float ABI | RVE | TSO | *Reserved* | *Non-standard extensions* +| RVC | Float ABI | RVE | TSO | Atomic ABI | *Reserved* | *Non-standard extensions* |=== + @@ -233,7 +233,13 @@ below. EF_RISCV_TSO (0x0010)::: This bit is set when the binary requires the RVTSO memory consistency model. -Until such a time that the *Reserved* bits (0x00ffffe0) are allocated by future + EF_RISCV_ATOMIC_A6 (0x0020)::: This bit is set when the binary is compatible + with the A.6 atomic mappings. + + EF_RISCV_ATOMIC_A7 (0x0040)::: This bit is set when the binary is compatible + with the A.6 atomic mappings. + +Until such a time that the *Reserved* bits (0x00ffff70) are allocated by future versions of this specification, they shall not be set by standard software. Non-standard extensions are free to use bits 24-31 for any purpose. This may conflict with other non-standard extensions. @@ -268,6 +274,9 @@ raise an error. TSO::: Linker should report errors if object files of different value for TSO field. + Atomic ABI:::Linker should report errors if incompatible object files are + linked. + NOTE: The static linker may ignore the compatibility checks if all fields in the `e_flags` are zero and all sections in the input file are non-executable sections.