[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 3/7] arm: link a device tree blob into the xen image
From: David Vrabel <david.vrabel@xxxxxxxxxx> Link a device tree blob (DTB) into the xen image. This is loaded to start of RAM + 0x100 and xen_start() is called with the correct address in atag_paddr. Signed-off-by: David Vrabel <david.vrabel@xxxxxxxxxx> --- xen/arch/arm/Makefile | 7 +++++-- xen/arch/arm/dtb.S | 2 ++ xen/arch/arm/head.S | 5 +++++ xen/arch/arm/xen.lds.S | 6 ++++++ 4 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 xen/arch/arm/dtb.S diff --git a/xen/arch/arm/Makefile b/xen/arch/arm/Makefile index 9bc2fc8..ac346a5 100644 --- a/xen/arch/arm/Makefile +++ b/xen/arch/arm/Makefile @@ -1,5 +1,6 @@ subdir-y += lib +obj-y += dtb.o obj-y += dummy.o obj-y += entry.o obj-y += domain.o @@ -27,7 +28,7 @@ ALL_OBJS := head.o $(ALL_OBJS) $(TARGET): $(TARGET)-syms # XXX: VE model loads by VMA so instead of # making a proper ELF we link with LMA == VMA and adjust crudely - $(OBJCOPY) --change-addresses +0x7fe00000 $< $@ + $(OBJCOPY) --change-addresses +0x80000000 $< $@ # XXX strip it #$(TARGET): $(TARGET)-syms $(efi-y) boot/mkelf32 @@ -50,7 +51,7 @@ endif $(BASEDIR)/common/symbols-dummy.o: $(MAKE) -f $(BASEDIR)/Rules.mk -C $(BASEDIR)/common symbols-dummy.o -$(TARGET)-syms: prelink.o xen.lds $(BASEDIR)/common/symbols-dummy.o +$(TARGET)-syms: prelink.o xen.lds $(BASEDIR)/common/symbols-dummy.o dtb.o $(LD) $(LDFLAGS) -T xen.lds -N prelink.o \ $(BASEDIR)/common/symbols-dummy.o -o $(@D)/.$(@F).0 $(NM) -n $(@D)/.$(@F).0 | $(BASEDIR)/tools/symbols >$(@D)/.$(@F).0.S @@ -71,6 +72,8 @@ xen.lds: xen.lds.S sed -e 's/xen\.lds\.o:/xen\.lds:/g' <.xen.lds.d >.xen.lds.d.new mv -f .xen.lds.d.new .xen.lds.d +dtb.o: platform.dtb + .PHONY: clean clean:: rm -f asm-offsets.s xen.lds diff --git a/xen/arch/arm/dtb.S b/xen/arch/arm/dtb.S new file mode 100644 index 0000000..0728c04 --- /dev/null +++ b/xen/arch/arm/dtb.S @@ -0,0 +1,2 @@ + .section .dtb,#alloc + .incbin "platform.dtb" diff --git a/xen/arch/arm/head.S b/xen/arch/arm/head.S index b98c921..9951f37 100644 --- a/xen/arch/arm/head.S +++ b/xen/arch/arm/head.S @@ -55,6 +55,11 @@ start: adr r9, start /* r9 := paddr (start) */ sub r10, r9, r0 /* r10 := phys-offset */ + /* FIXME: using the DTB in the .dtb section. */ + mov r7, #0 + ldr r8, =_sdtb + add r8, r10 + #ifdef EARLY_UART_ADDRESS /* Say hello */ ldr r11, =EARLY_UART_ADDRESS /* r11 := UART base address */ diff --git a/xen/arch/arm/xen.lds.S b/xen/arch/arm/xen.lds.S index 5a62e2c..4bcca57 100644 --- a/xen/arch/arm/xen.lds.S +++ b/xen/arch/arm/xen.lds.S @@ -122,6 +122,12 @@ SECTIONS } :text _end = . ; + /* FIXME: don't yet have a bootloader to provide the DTB, link it + into Xen in its own section. */ + . = 0x100; + _sdtb = .; + .dtb : { dtb.o(.dtb) } + /* Sections to be discarded */ /DISCARD/ : { *(.exit.text) -- 1.7.2.5 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |