|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v3 1/5] xen: define ACPI and DT device info sections macros
On 24.09.2024 18:42, Oleksii Kurochko wrote:
> --- a/xen/include/xen/xen.lds.h
> +++ b/xen/include/xen/xen.lds.h
> @@ -114,6 +114,11 @@
>
> /* List of constructs other than *_SECTIONS in alphabetical order. */
>
> +#define ADEV_INFO \
> + _asdevice = .; \
> + *(.adev.info) \
> + _aedevice = .;
> +
> #define BUGFRAMES \
> __start_bug_frames_0 = .; \
> *(.bug_frames.0) \
> @@ -131,6 +136,11 @@
> *(.bug_frames.3) \
> __stop_bug_frames_3 = .;
>
> +#define DT_DEV_INFO \
> + _sdevice = .; \
> + *(.dev.info) \
> + _edevice = .;
I have a question more to the Arm maintainers than to you, Oleksii: Section
names as well as the names of the symbols bounding the sections are overly
unspecific. There's nothing indicating DT at all, and it's solely 'a' to
indicate ACPI. I consider this a possible problem going forward, when this
is now being generalized.
In turn I wonder about ADEV_INFO when comparing with DT_DEV_INFO. The
latter makes clear it's DT. The former doesn't make clear it's ACPI; 'A'
could stand for about anything, including "a device" (of any kind).
Finally, Oleksii, looking at Arm's present uses - why is the abstraction
limited to the inner part of the section statements in the linker script?
IOW why isn't it all (or at least quite a bit more) of
. = ALIGN(8);
.dev.info : {
_sdevice = .;
*(.dev.info)
_edevice = .;
} :text
that moves into DT_DEV_INFO? I can see that the :text may want leaving
to the architectures (yet then perhaps as a macro argument). I could
also see a remote need for the ALIGN()'s value to be arch-controlled.
(Why is it uniformly 8 anyway on Arm?)
PPC's desire to use DECL_SECTION() can certainly be covered by providing
a (trivial) DECL_SECTION() also for Arm and RISC-V. Seeing that even x86
overrides the default to the trivial form for building xen.efi, I'm
inclined to suggest we should actually have a way for an arch to indicate
to xen.lds.h that it wants just the trivial form (avoiding a later
#undef).
When to be generalized I further wonder whether the ALIGN()s are actually
well placed. I'd have expected
.dev.info ALIGN(POINTER_ALIGN) : {
_sdevice = .;
*(.dev.info)
_edevice = .;
} :text
Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |