Message ID | e0d5d5505c89a81997240a4099090c96d37c1bee.1726048521.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 |
On 11.09.2024 12:04, Oleksii Kurochko wrote: > Introduce a new `.dev.info` section in the RISC-V linker script to > handle device-specific information. > 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> This (and patch 1) is okay in principle, provided the description actually also says "why", not just "what". Placing past .bss is questionable, though. Overall, however, this probably could do with abstracting by a macro in xen/xen.lds.h, then also to be used by Arm. Jan
On Thu, 2024-09-12 at 17:31 +0200, Jan Beulich wrote: > On 11.09.2024 12:04, Oleksii Kurochko wrote: > > Introduce a new `.dev.info` section in the RISC-V linker script to > > handle device-specific information. > > 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> > > This (and patch 1) is okay in principle, provided the description > actually > also says "why", not just "what". Placing past .bss is questionable, > though. > > Overall, however, this probably could do with abstracting by a macro > in > xen/xen.lds.h, then also to be used by Arm. It make sense. Thanks. I will add the macro in the next patch version. Thanks. ~ Oleksii
diff --git a/xen/arch/riscv/xen.lds.S b/xen/arch/riscv/xen.lds.S index 070b19d915..e65707ce3f 100644 --- a/xen/arch/riscv/xen.lds.S +++ b/xen/arch/riscv/xen.lds.S @@ -157,6 +157,14 @@ SECTIONS . = ALIGN(POINTER_ALIGN); __bss_end = .; } :text + + . = ALIGN(POINTER_ALIGN); + .dev.info : { + _sdevice = .; + *(.dev.info) + _edevice = .; + } :text + _end = . ; /* Section for the device tree blob (if any). */
Introduce a new `.dev.info` section in the RISC-V linker script to handle device-specific information. 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> --- xen/arch/riscv/xen.lds.S | 8 ++++++++ 1 file changed, 8 insertions(+)