On 01.05.2025 14:23, Gerald Elder-Vass wrote:
> --- a/xen/arch/x86/Makefile
> +++ b/xen/arch/x86/Makefile
> @@ -58,6 +58,7 @@ obj-y += percpu.o
>  obj-y += physdev.o
>  obj-$(CONFIG_COMPAT) += x86_64/physdev.o
>  obj-y += psr.o
> +obj-y += sbat.o
>  obj-y += setup.o
>  obj-y += shutdown.o
>  obj-y += smp.o

This being x86-specific here without there really being anything x86-specific
about it - what about Arm?

It being EFI-specific, why put it here rather than in x86/efi/ (and/or, as
per above, in common/efi/, at least for the source file)?

> @@ -277,6 +278,9 @@ $(obj)/efi.lds: AFLAGS-y += -DEFI
>  $(obj)/xen.lds $(obj)/efi.lds: $(src)/xen.lds.S FORCE
>       $(call if_changed_dep,cpp_lds_S)
>  
> +$(obj)/sbat.o: $(src)/sbat.csv
> +     $(OBJCOPY) -I binary -O elf64-x86-64 --rename-section 
> .data=.sbat,readonly,data,contents $< $@

While it may seem unlikely now, both rule and dependencies may change going
forward. So perhaps better to use the if_changed_deps model right away?
Which of course will raise a source file naming question: We can't really
assume a .csv -> .o rule to be generically applicable. Therefore maybe the
source file extension would better be something less generic, like .sbat.

Jan

Reply via email to