diff mbox series

[v2,4/5] xen/riscv: add section for device information in linker script

Message ID 5e8bec88e4839fc6fa49b6c46e697553f5ca9145.1726579819.git.oleksii.kurochko@gmail.com (mailing list archive)
State Superseded
Headers show
Series Move {acpi_}device_init() and device_get_class() to common code | expand

Commit Message

Oleksii Kurochko Sept. 17, 2024, 4:15 p.m. UTC
Introduce a new `.dev.info` section in the RISC-V linker script to
handle device-specific information. This section is required by
common code (common/device.c: device_init(), device_get_class() ).
This section is aligned to `POINTER_ALIGN`, with `_sdevice` and `_edevice`
marking the start and end of the section, respectively.

Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
---
Changes in V2:
 - reuse DT_DEV_INFO_SEC introduced earlier in this patch series.
---
 xen/arch/riscv/xen.lds.S | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/xen/arch/riscv/xen.lds.S b/xen/arch/riscv/xen.lds.S
index 070b19d915..cdc975a49d 100644
--- a/xen/arch/riscv/xen.lds.S
+++ b/xen/arch/riscv/xen.lds.S
@@ -91,6 +91,9 @@  SECTIONS
         CONSTRUCTORS
     } :text
 
+    . = ALIGN(POINTER_ALIGN);         /* Devicetree based device info */
+    DT_DEV_INFO_SEC(.dev.info, NOUSE_DECL_SECTION)
+
     . = ALIGN(PAGE_SIZE);             /* Init code and data */
     __init_begin = .;
     .init.text : {