]> xenbits.xensource.com Git - people/andrewcoop/xen.git/commitdiff
xen: define ACPI and DT device info sections macros
authorOleksii Kurochko <oleksii.kurochko@gmail.com>
Tue, 15 Oct 2024 12:20:05 +0000 (14:20 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 15 Oct 2024 12:20:05 +0000 (14:20 +0200)
Introduce macros to define device information sections based on
the configuration of ACPI or device tree support. These sections
are required for common code of device initialization and getting
an information about a device.

These macros are expected to be used across different
architectures (Arm, PPC, RISC-V), so they are moved to
the common xen/xen.lds.h, based on their original definition
in Arm.

Signed-off-by: Oleksii Kurochko <oleksii.kurochko@gmail.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/include/xen/xen.lds.h

index c6178bdc423294d50b93adf1654fb26df7156f06..16a9b1ba03db4861c3a8dbfe38e73335cc90a55e 100644 (file)
 
 /* List of constructs other than *_SECTIONS in alphabetical order. */
 
+#define ACPI_DEV_INFO        \
+  . = ALIGN(POINTER_ALIGN);  \
+  DECL_SECTION(.adev.info) { \
+      _asdevice = .;         \
+      *(.adev.info)          \
+      _aedevice = .;         \
+  } :text
+
 #define BUGFRAMES                               \
     __start_bug_frames_0 = .;                   \
     *(.bug_frames.0)                            \
     *(.bug_frames.3)                            \
     __stop_bug_frames_3 = .;
 
+#define DT_DEV_INFO         \
+  . = ALIGN(POINTER_ALIGN); \
+  DECL_SECTION(.dev.info) { \
+       _sdevice = .;        \
+       *(.dev.info)         \
+       _edevice = .;        \
+  } :text
+
 #ifdef CONFIG_HYPFS
 #define HYPFS_PARAM              \
        . = ALIGN(POINTER_ALIGN); \