diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-26 13:51:09 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-26 13:51:09 -0400 |
commit | 81a07d7588d376c530d006e24d7981304ce96e16 (patch) | |
tree | 1608e094c88b9702c86cf2e6f65339aab9ea3f3f /arch/x86_64/boot | |
parent | 8871e73fdbde07d0a41393f7ee30787b65387b36 (diff) | |
parent | 8501a2fbe762b21d2504ed3aca3b52be61b5e6e4 (diff) |
Merge branch 'x86-64'
* x86-64: (83 commits)
[PATCH] x86_64: x86_64 stack usage debugging
[PATCH] x86_64: (resend) x86_64 stack overflow debugging
[PATCH] x86_64: msi_apic.c build fix
[PATCH] x86_64: i386/x86-64 Add nmi watchdog support for new Intel CPUs
[PATCH] x86_64: Avoid broadcasting NMI IPIs
[PATCH] x86_64: fix apic error on bootup
[PATCH] x86_64: enlarge window for stack growth
[PATCH] x86_64: Minor string functions optimizations
[PATCH] x86_64: Move export symbols to their C functions
[PATCH] x86_64: Standardize i386/x86_64 handling of NMI_VECTOR
[PATCH] x86_64: Fix modular pc speaker
[PATCH] x86_64: remove sys32_ni_syscall()
[PATCH] x86_64: Do not use -ffunction-sections for modules
[PATCH] x86_64: Add cpu_relax to apic_wait_icr_idle
[PATCH] x86_64: adjust kstack_depth_to_print default
[PATCH] i386/x86-64: adjust /proc/interrupts column headings
[PATCH] x86_64: Fix race in cpu_local_* on preemptible kernels
[PATCH] x86_64: Fix fast check in safe_smp_processor_id
[PATCH] x86_64: x86_64 setup.c - printing cmp related boottime information
[PATCH] i386/x86-64/ia64: Move polling flag into thread_info_status
...
Manual resolve of trivial conflict in arch/i386/kernel/Makefile
Diffstat (limited to 'arch/x86_64/boot')
-rw-r--r-- | arch/x86_64/boot/Makefile | 9 | ||||
-rw-r--r-- | arch/x86_64/boot/compressed/misc.c | 46 | ||||
-rw-r--r-- | arch/x86_64/boot/tools/build.c | 6 |
3 files changed, 32 insertions, 29 deletions
diff --git a/arch/x86_64/boot/Makefile b/arch/x86_64/boot/Makefile index 43ee6c50c277..deb063e7762d 100644 --- a/arch/x86_64/boot/Makefile +++ b/arch/x86_64/boot/Makefile | |||
@@ -107,8 +107,13 @@ fdimage288: $(BOOTIMAGE) $(obj)/mtools.conf | |||
107 | isoimage: $(BOOTIMAGE) | 107 | isoimage: $(BOOTIMAGE) |
108 | -rm -rf $(obj)/isoimage | 108 | -rm -rf $(obj)/isoimage |
109 | mkdir $(obj)/isoimage | 109 | mkdir $(obj)/isoimage |
110 | cp `echo /usr/lib*/syslinux/isolinux.bin | awk '{ print $1; }'` \ | 110 | for i in lib lib64 share end ; do \ |
111 | $(obj)/isoimage | 111 | if [ -f /usr/$$i/syslinux/isolinux.bin ] ; then \ |
112 | cp /usr/$$i/syslinux/isolinux.bin $(obj)/isoimage ; \ | ||
113 | break ; \ | ||
114 | fi ; \ | ||
115 | if [ $$i = end ] ; then exit 1 ; fi ; \ | ||
116 | done | ||
112 | cp $(BOOTIMAGE) $(obj)/isoimage/linux | 117 | cp $(BOOTIMAGE) $(obj)/isoimage/linux |
113 | echo '$(image_cmdline)' > $(obj)/isoimage/isolinux.cfg | 118 | echo '$(image_cmdline)' > $(obj)/isoimage/isolinux.cfg |
114 | if [ -f '$(FDINITRD)' ] ; then \ | 119 | if [ -f '$(FDINITRD)' ] ; then \ |
diff --git a/arch/x86_64/boot/compressed/misc.c b/arch/x86_64/boot/compressed/misc.c index cf4b88c416dc..3755b2e394d0 100644 --- a/arch/x86_64/boot/compressed/misc.c +++ b/arch/x86_64/boot/compressed/misc.c | |||
@@ -77,11 +77,11 @@ static void gzip_release(void **); | |||
77 | */ | 77 | */ |
78 | static unsigned char *real_mode; /* Pointer to real-mode data */ | 78 | static unsigned char *real_mode; /* Pointer to real-mode data */ |
79 | 79 | ||
80 | #define EXT_MEM_K (*(unsigned short *)(real_mode + 0x2)) | 80 | #define RM_EXT_MEM_K (*(unsigned short *)(real_mode + 0x2)) |
81 | #ifndef STANDARD_MEMORY_BIOS_CALL | 81 | #ifndef STANDARD_MEMORY_BIOS_CALL |
82 | #define ALT_MEM_K (*(unsigned long *)(real_mode + 0x1e0)) | 82 | #define RM_ALT_MEM_K (*(unsigned long *)(real_mode + 0x1e0)) |
83 | #endif | 83 | #endif |
84 | #define SCREEN_INFO (*(struct screen_info *)(real_mode+0)) | 84 | #define RM_SCREEN_INFO (*(struct screen_info *)(real_mode+0)) |
85 | 85 | ||
86 | extern unsigned char input_data[]; | 86 | extern unsigned char input_data[]; |
87 | extern int input_len; | 87 | extern int input_len; |
@@ -92,9 +92,9 @@ static unsigned long output_ptr = 0; | |||
92 | 92 | ||
93 | static void *malloc(int size); | 93 | static void *malloc(int size); |
94 | static void free(void *where); | 94 | static void free(void *where); |
95 | 95 | ||
96 | void* memset(void* s, int c, unsigned n); | 96 | static void *memset(void *s, int c, unsigned n); |
97 | void* memcpy(void* dest, const void* src, unsigned n); | 97 | static void *memcpy(void *dest, const void *src, unsigned n); |
98 | 98 | ||
99 | static void putstr(const char *); | 99 | static void putstr(const char *); |
100 | 100 | ||
@@ -162,8 +162,8 @@ static void putstr(const char *s) | |||
162 | int x,y,pos; | 162 | int x,y,pos; |
163 | char c; | 163 | char c; |
164 | 164 | ||
165 | x = SCREEN_INFO.orig_x; | 165 | x = RM_SCREEN_INFO.orig_x; |
166 | y = SCREEN_INFO.orig_y; | 166 | y = RM_SCREEN_INFO.orig_y; |
167 | 167 | ||
168 | while ( ( c = *s++ ) != '\0' ) { | 168 | while ( ( c = *s++ ) != '\0' ) { |
169 | if ( c == '\n' ) { | 169 | if ( c == '\n' ) { |
@@ -184,8 +184,8 @@ static void putstr(const char *s) | |||
184 | } | 184 | } |
185 | } | 185 | } |
186 | 186 | ||
187 | SCREEN_INFO.orig_x = x; | 187 | RM_SCREEN_INFO.orig_x = x; |
188 | SCREEN_INFO.orig_y = y; | 188 | RM_SCREEN_INFO.orig_y = y; |
189 | 189 | ||
190 | pos = (x + cols * y) * 2; /* Update cursor position */ | 190 | pos = (x + cols * y) * 2; /* Update cursor position */ |
191 | outb_p(14, vidport); | 191 | outb_p(14, vidport); |
@@ -194,7 +194,7 @@ static void putstr(const char *s) | |||
194 | outb_p(0xff & (pos >> 1), vidport+1); | 194 | outb_p(0xff & (pos >> 1), vidport+1); |
195 | } | 195 | } |
196 | 196 | ||
197 | void* memset(void* s, int c, unsigned n) | 197 | static void* memset(void* s, int c, unsigned n) |
198 | { | 198 | { |
199 | int i; | 199 | int i; |
200 | char *ss = (char*)s; | 200 | char *ss = (char*)s; |
@@ -203,7 +203,7 @@ void* memset(void* s, int c, unsigned n) | |||
203 | return s; | 203 | return s; |
204 | } | 204 | } |
205 | 205 | ||
206 | void* memcpy(void* dest, const void* src, unsigned n) | 206 | static void* memcpy(void* dest, const void* src, unsigned n) |
207 | { | 207 | { |
208 | int i; | 208 | int i; |
209 | char *d = (char *)dest, *s = (char *)src; | 209 | char *d = (char *)dest, *s = (char *)src; |
@@ -278,15 +278,15 @@ static void error(char *x) | |||
278 | putstr(x); | 278 | putstr(x); |
279 | putstr("\n\n -- System halted"); | 279 | putstr("\n\n -- System halted"); |
280 | 280 | ||
281 | while(1); | 281 | while(1); /* Halt */ |
282 | } | 282 | } |
283 | 283 | ||
284 | void setup_normal_output_buffer(void) | 284 | static void setup_normal_output_buffer(void) |
285 | { | 285 | { |
286 | #ifdef STANDARD_MEMORY_BIOS_CALL | 286 | #ifdef STANDARD_MEMORY_BIOS_CALL |
287 | if (EXT_MEM_K < 1024) error("Less than 2MB of memory"); | 287 | if (RM_EXT_MEM_K < 1024) error("Less than 2MB of memory"); |
288 | #else | 288 | #else |
289 | if ((ALT_MEM_K > EXT_MEM_K ? ALT_MEM_K : EXT_MEM_K) < 1024) error("Less than 2MB of memory"); | 289 | if ((RM_ALT_MEM_K > RM_EXT_MEM_K ? RM_ALT_MEM_K : RM_EXT_MEM_K) < 1024) error("Less than 2MB of memory"); |
290 | #endif | 290 | #endif |
291 | output_data = (unsigned char *)__PHYSICAL_START; /* Normally Points to 1M */ | 291 | output_data = (unsigned char *)__PHYSICAL_START; /* Normally Points to 1M */ |
292 | free_mem_end_ptr = (long)real_mode; | 292 | free_mem_end_ptr = (long)real_mode; |
@@ -297,13 +297,13 @@ struct moveparams { | |||
297 | uch *high_buffer_start; int hcount; | 297 | uch *high_buffer_start; int hcount; |
298 | }; | 298 | }; |
299 | 299 | ||
300 | void setup_output_buffer_if_we_run_high(struct moveparams *mv) | 300 | static void setup_output_buffer_if_we_run_high(struct moveparams *mv) |
301 | { | 301 | { |
302 | high_buffer_start = (uch *)(((ulg)&end) + HEAP_SIZE); | 302 | high_buffer_start = (uch *)(((ulg)&end) + HEAP_SIZE); |
303 | #ifdef STANDARD_MEMORY_BIOS_CALL | 303 | #ifdef STANDARD_MEMORY_BIOS_CALL |
304 | if (EXT_MEM_K < (3*1024)) error("Less than 4MB of memory"); | 304 | if (RM_EXT_MEM_K < (3*1024)) error("Less than 4MB of memory"); |
305 | #else | 305 | #else |
306 | if ((ALT_MEM_K > EXT_MEM_K ? ALT_MEM_K : EXT_MEM_K) < (3*1024)) error("Less than 4MB of memory"); | 306 | if ((RM_ALT_MEM_K > RM_EXT_MEM_K ? RM_ALT_MEM_K : RM_EXT_MEM_K) < (3*1024)) error("Less than 4MB of memory"); |
307 | #endif | 307 | #endif |
308 | mv->low_buffer_start = output_data = (unsigned char *)LOW_BUFFER_START; | 308 | mv->low_buffer_start = output_data = (unsigned char *)LOW_BUFFER_START; |
309 | low_buffer_end = ((unsigned int)real_mode > LOW_BUFFER_MAX | 309 | low_buffer_end = ((unsigned int)real_mode > LOW_BUFFER_MAX |
@@ -319,7 +319,7 @@ void setup_output_buffer_if_we_run_high(struct moveparams *mv) | |||
319 | mv->high_buffer_start = high_buffer_start; | 319 | mv->high_buffer_start = high_buffer_start; |
320 | } | 320 | } |
321 | 321 | ||
322 | void close_output_buffer_if_we_run_high(struct moveparams *mv) | 322 | static void close_output_buffer_if_we_run_high(struct moveparams *mv) |
323 | { | 323 | { |
324 | if (bytes_out > low_buffer_size) { | 324 | if (bytes_out > low_buffer_size) { |
325 | mv->lcount = low_buffer_size; | 325 | mv->lcount = low_buffer_size; |
@@ -335,7 +335,7 @@ int decompress_kernel(struct moveparams *mv, void *rmode) | |||
335 | { | 335 | { |
336 | real_mode = rmode; | 336 | real_mode = rmode; |
337 | 337 | ||
338 | if (SCREEN_INFO.orig_video_mode == 7) { | 338 | if (RM_SCREEN_INFO.orig_video_mode == 7) { |
339 | vidmem = (char *) 0xb0000; | 339 | vidmem = (char *) 0xb0000; |
340 | vidport = 0x3b4; | 340 | vidport = 0x3b4; |
341 | } else { | 341 | } else { |
@@ -343,8 +343,8 @@ int decompress_kernel(struct moveparams *mv, void *rmode) | |||
343 | vidport = 0x3d4; | 343 | vidport = 0x3d4; |
344 | } | 344 | } |
345 | 345 | ||
346 | lines = SCREEN_INFO.orig_video_lines; | 346 | lines = RM_SCREEN_INFO.orig_video_lines; |
347 | cols = SCREEN_INFO.orig_video_cols; | 347 | cols = RM_SCREEN_INFO.orig_video_cols; |
348 | 348 | ||
349 | if (free_mem_ptr < 0x100000) setup_normal_output_buffer(); | 349 | if (free_mem_ptr < 0x100000) setup_normal_output_buffer(); |
350 | else setup_output_buffer_if_we_run_high(mv); | 350 | else setup_output_buffer_if_we_run_high(mv); |
diff --git a/arch/x86_64/boot/tools/build.c b/arch/x86_64/boot/tools/build.c index c44f5e2ec100..eae86691709a 100644 --- a/arch/x86_64/boot/tools/build.c +++ b/arch/x86_64/boot/tools/build.c | |||
@@ -149,10 +149,8 @@ int main(int argc, char ** argv) | |||
149 | sz = sb.st_size; | 149 | sz = sb.st_size; |
150 | fprintf (stderr, "System is %d kB\n", sz/1024); | 150 | fprintf (stderr, "System is %d kB\n", sz/1024); |
151 | sys_size = (sz + 15) / 16; | 151 | sys_size = (sz + 15) / 16; |
152 | /* 0x40000*16 = 4.0 MB, reasonable estimate for the current maximum */ | 152 | if (!is_big_kernel && sys_size > DEF_SYSSIZE) |
153 | if (sys_size > (is_big_kernel ? 0x40000 : DEF_SYSSIZE)) | 153 | die("System is too big. Try using bzImage or modules."); |
154 | die("System is too big. Try using %smodules.", | ||
155 | is_big_kernel ? "" : "bzImage or "); | ||
156 | while (sz > 0) { | 154 | while (sz > 0) { |
157 | int l, n; | 155 | int l, n; |
158 | 156 | ||