[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 10/23] efi: build xen.gz with EFI code
>>> On 20.07.15 at 16:29, <daniel.kiper@xxxxxxxxxx> wrote: > Build xen.gz with EFI code. We need this to support multiboot2 > protocol on EFI platforms. > > If we wish to load not ELF file using multiboot (v1) or multiboot2 then DYM "a non-ELF file"? > it must contain "linear" (or "flat") representation of code and data. Why? Please don't just put out statements, but also reasons (i.e. at least which component is unable to deal with the current [valid afaict] PE image we have). > Currently, PE file contains many sections which are not "linear" (one > after another without any holes) or even do not have representation > in a file (e.g. BSS). In theory there is a chance that we could build > proper PE file using current build system. However, it means that What is "improper" about the currently built PE file? And if there is anything improper, did you inform the binutils maintainers of the problem? > --- a/xen/arch/x86/efi/Makefile > +++ b/xen/arch/x86/efi/Makefile > @@ -1,14 +1,16 @@ > CFLAGS += -fshort-wchar > > -obj-y += stub.o > - > -create = test -e $(1) || touch -t 199901010000 $(1) > - > efi := $(filter y,$(x86_64)$(shell rm -f disabled)) > efi := $(if $(efi),$(shell $(CC) $(filter-out $(CFLAGS-y) .%.d,$(CFLAGS)) -c > check.c 2>disabled && echo y)) > efi := $(if $(efi),$(shell $(LD) -mi386pep --subsystem=10 -o check.efi > check.o 2>disabled && echo y)) > -efi := $(if $(efi),$(shell rm disabled)y,$(shell $(call create,boot.init.o); > $(call create,runtime.o))) > +efi := $(if $(efi),$(shell rm disabled)y) > > -extra-$(efi) += boot.init.o relocs-dummy.o runtime.o compat.o > +extra-y += relocs-dummy.o Why is this no longer extra-$(efi)? > -stub.o: $(extra-y) With this dependency removed (instead of perhaps replaced or extended) - what will trigger relocs-dummy.o to be (re)built? > +ifeq ($(efi),y) > +obj-y += boot.init.o > +obj-y += compat.o > +obj-y += runtime.o > +else > +obj-y += stub.o > +endif obj-y := stub.o obj-$(efi) := boot.init.o compat.o runtime.o > --- a/xen/arch/x86/mm.c > +++ b/xen/arch/x86/mm.c > @@ -344,7 +344,8 @@ void __init arch_init_memory(void) > > subarch_init_memory(); > > - efi_init_memory(); > + if ( efi_enabled(EFI_PLATFORM) ) > + efi_init_memory(); I think I'd prefer such checks to be constrained to EFI code where possible, i.e. in this case do the check inside efi_init_memory(). Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |