aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-05-11 17:21:12 -0400
committerH. Peter Anvin <hpa@zytor.com>2009-05-11 17:40:50 -0400
commit77d1a4999502c260df0eb2de437d320bf8c64b36 (patch)
treed479843ccd9ffdd0e89548753c391950adb664a4
parent02a884c0fe7ec8459d00d34b7d4101af21fc4a86 (diff)
x86, boot: make symbols from the main vmlinux available
Make symbols from the main vmlinux, as opposed to just compressed/vmlinux, available to header.S. Also, export a few additional symbols. This will be used in a subsequent patch to export the total memory footprint of the kernel. [ Impact: enable future enhancement ] Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--arch/x86/boot/Makefile24
-rw-r--r--arch/x86/boot/header.S7
2 files changed, 20 insertions, 11 deletions
diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile
index 6633b6e7505a..75e0301fc69a 100644
--- a/arch/x86/boot/Makefile
+++ b/arch/x86/boot/Makefile
@@ -86,19 +86,27 @@ $(obj)/vmlinux.bin: $(obj)/compressed/vmlinux FORCE
86 86
87SETUP_OBJS = $(addprefix $(obj)/,$(setup-y)) 87SETUP_OBJS = $(addprefix $(obj)/,$(setup-y))
88 88
89sed-offsets := -e 's/^00*/0/' \ 89sed-voffset := -e 's/^\([0-9a-fA-F]*\) . \(_text\|_end\)$$/\#define VO_\2 0x\1/p'
90 -e 's/^\([0-9a-fA-F]*\) . \(input_data\|input_data_end\)$$/\#define \2 0x\1/p'
91 90
92quiet_cmd_offsets = OFFSETS $@ 91quiet_cmd_voffset = VOFFSET $@
93 cmd_offsets = $(NM) $< | sed -n $(sed-offsets) > $@ 92 cmd_voffset = $(NM) $< | sed -n $(sed-voffset) > $@
94 93
95$(obj)/offsets.h: $(obj)/compressed/vmlinux FORCE 94targets += voffset.h
96 $(call if_changed,offsets) 95$(obj)/voffset.h: vmlinux FORCE
96 $(call if_changed,voffset)
97
98sed-zoffset := -e 's/^\([0-9a-fA-F]*\) . \(input_data\|_end\|z_.*\)$$/\#define ZO_\2 0x\1/p'
99
100quiet_cmd_zoffset = ZOFFSET $@
101 cmd_zoffset = $(NM) $< | sed -n $(sed-zoffset) > $@
102
103targets += zoffset.h
104$(obj)/zoffset.h: $(obj)/compressed/vmlinux FORCE
105 $(call if_changed,zoffset)
97 106
98targets += offsets.h
99 107
100AFLAGS_header.o += -I$(obj) 108AFLAGS_header.o += -I$(obj)
101$(obj)/header.o: $(obj)/offsets.h 109$(obj)/header.o: $(obj)/voffset.h $(obj)/zoffset.h
102 110
103LDFLAGS_setup.elf := -T 111LDFLAGS_setup.elf := -T
104$(obj)/setup.elf: $(src)/setup.ld $(SETUP_OBJS) FORCE 112$(obj)/setup.elf: $(src)/setup.ld $(SETUP_OBJS) FORCE
diff --git a/arch/x86/boot/header.S b/arch/x86/boot/header.S
index 5d84d1c74e4c..27285143adeb 100644
--- a/arch/x86/boot/header.S
+++ b/arch/x86/boot/header.S
@@ -22,7 +22,8 @@
22#include <asm/page_types.h> 22#include <asm/page_types.h>
23#include <asm/setup.h> 23#include <asm/setup.h>
24#include "boot.h" 24#include "boot.h"
25#include "offsets.h" 25#include "voffset.h"
26#include "zoffset.h"
26 27
27BOOTSEG = 0x07C0 /* original address of boot-sector */ 28BOOTSEG = 0x07C0 /* original address of boot-sector */
28SYSSEG = 0x1000 /* historical load address >> 4 */ 29SYSSEG = 0x1000 /* historical load address >> 4 */
@@ -212,8 +213,8 @@ hardware_subarch: .long 0 # subarchitecture, added with 2.07
212 213
213hardware_subarch_data: .quad 0 214hardware_subarch_data: .quad 0
214 215
215payload_offset: .long input_data 216payload_offset: .long ZO_input_data
216payload_length: .long input_data_end-input_data 217payload_length: .long ZO_z_input_len
217 218
218setup_data: .quad 0 # 64-bit physical pointer to 219setup_data: .quad 0 # 64-bit physical pointer to
219 # single linked list of 220 # single linked list of