]> xenbits.xensource.com Git - people/andrewcoop/xen.git/commitdiff
xen/ppc: Add .text.exceptions section for exception vectors
authorShawn Anastasio <sanastasio@raptorengineering.com>
Thu, 2 Nov 2023 09:51:31 +0000 (10:51 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 2 Nov 2023 09:51:31 +0000 (10:51 +0100)
On Power, the exception vectors must lie at a fixed address, depending
on the state of the Alternate Interrupt Location (AIL) field of the
Logical Partition Control Register (LPCR). Create a .text.exceptions
section in the linker script at an address suitable for AIL=3 plus an
accompanying assertion to pave the way for implementing exception
support.

Signed-off-by: Shawn Anastasio <sanastasio@raptorengineering.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/ppc/include/asm/config.h
xen/arch/ppc/xen.lds.S

index a11a09c570230ec52c6169931107ab54f44239b3..e012b75beb17fba48f3b65a0dbb8556609ed8975 100644 (file)
@@ -42,6 +42,9 @@
 
 #define XEN_VIRT_START _AC(0xc000000000000000, UL)
 
+/* Fixed address for start of the section containing exception vectors */
+#define EXCEPTION_VECTORS_START _AC(0xc000000000000100, UL)
+
 #define VMAP_VIRT_START (XEN_VIRT_START + GB(1))
 #define VMAP_VIRT_SIZE  GB(1)
 
index 9e46035155598f6bab0d8428f75bd11be1cc5580..3697d656f47cffb152058617276471c763a0cd10 100644 (file)
@@ -24,6 +24,10 @@ SECTIONS
         _stext = .;            /* Text section */
         *(.text.header)
 
+        . = ALIGN(256);
+        HIDDEN(_stext_exceptions = .);
+        *(.text.exceptions)
+
         *(.text.cold)
         *(.text.unlikely .text.*_unlikely .text.unlikely.*)
 
@@ -184,3 +188,6 @@ ASSERT(IS_ALIGNED(__bss_end,        POINTER_ALIGN), "__bss_end is misaligned")
 
 ASSERT(!SIZEOF(.got),      ".got non-empty")
 ASSERT(!SIZEOF(.got.plt),  ".got.plt non-empty")
+
+ASSERT(_stext_exceptions == EXCEPTION_VECTORS_START,
+       ".text.exceptions not at expected location -- .text.header too big?");