diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-31 18:51:37 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-31 18:51:37 -0400 |
commit | 8ddf83fed6c283dd941ca76ae715eb268ee8c04e (patch) | |
tree | 309628fccc4ec213afd8ebd28181703050bb046a /arch/i386 | |
parent | 0d6caa1795090bd22ede96b84daa4600b63eee37 (diff) | |
parent | ff659d13ed91dd0b237064aba91a5259f827aeb3 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-x86setup
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-x86setup:
[x86 setup] EDD: Fix the computation of the MBR sector buffer
[x86 setup] Newline after setup signature failure message
x86 boot code comments typos
Diffstat (limited to 'arch/i386')
-rw-r--r-- | arch/i386/boot/code16gcc.h | 2 | ||||
-rw-r--r-- | arch/i386/boot/edd.c | 5 | ||||
-rw-r--r-- | arch/i386/boot/header.S | 4 | ||||
-rw-r--r-- | arch/i386/boot/pm.c | 2 | ||||
-rw-r--r-- | arch/i386/boot/video-bios.c | 2 |
5 files changed, 8 insertions, 7 deletions
diff --git a/arch/i386/boot/code16gcc.h b/arch/i386/boot/code16gcc.h index 3bd848093b9d..d93e48010b61 100644 --- a/arch/i386/boot/code16gcc.h +++ b/arch/i386/boot/code16gcc.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * code16gcc.h | 2 | * code16gcc.h |
3 | * | 3 | * |
4 | * This file is -include'd when compiling 16-bit C code. | 4 | * This file is -include'd when compiling 16-bit C code. |
5 | * Note: this asm() needs to be emitted before gcc omits any code. | 5 | * Note: this asm() needs to be emitted before gcc emits any code. |
6 | * Depending on gcc version, this requires -fno-unit-at-a-time or | 6 | * Depending on gcc version, this requires -fno-unit-at-a-time or |
7 | * -fno-toplevel-reorder. | 7 | * -fno-toplevel-reorder. |
8 | * | 8 | * |
diff --git a/arch/i386/boot/edd.c b/arch/i386/boot/edd.c index 25a282494f4c..77d92daf7923 100644 --- a/arch/i386/boot/edd.c +++ b/arch/i386/boot/edd.c | |||
@@ -72,17 +72,18 @@ static u32 read_mbr_sig(u8 devno, struct edd_info *ei) | |||
72 | u32 mbrsig; | 72 | u32 mbrsig; |
73 | u32 buf_base, mbr_base; | 73 | u32 buf_base, mbr_base; |
74 | extern char _end[]; | 74 | extern char _end[]; |
75 | static char mbr_buf[1024]; | ||
76 | 75 | ||
77 | sector_size = ei->params.bytes_per_sector; | 76 | sector_size = ei->params.bytes_per_sector; |
78 | if (!sector_size) | 77 | if (!sector_size) |
79 | sector_size = 512; /* Best available guess */ | 78 | sector_size = 512; /* Best available guess */ |
80 | 79 | ||
80 | /* Produce a naturally aligned buffer on the heap */ | ||
81 | buf_base = (ds() << 4) + (u32)&_end; | 81 | buf_base = (ds() << 4) + (u32)&_end; |
82 | mbr_base = (buf_base+sector_size-1) & ~(sector_size-1); | 82 | mbr_base = (buf_base+sector_size-1) & ~(sector_size-1); |
83 | mbrbuf_ptr = mbr_buf + (mbr_base-buf_base); | 83 | mbrbuf_ptr = _end + (mbr_base-buf_base); |
84 | mbrbuf_end = mbrbuf_ptr + sector_size; | 84 | mbrbuf_end = mbrbuf_ptr + sector_size; |
85 | 85 | ||
86 | /* Make sure we actually have space on the heap... */ | ||
86 | if (!(boot_params.hdr.loadflags & CAN_USE_HEAP)) | 87 | if (!(boot_params.hdr.loadflags & CAN_USE_HEAP)) |
87 | return 0; | 88 | return 0; |
88 | if (mbrbuf_end > (char *)(size_t)boot_params.hdr.heap_end_ptr) | 89 | if (mbrbuf_end > (char *)(size_t)boot_params.hdr.heap_end_ptr) |
diff --git a/arch/i386/boot/header.S b/arch/i386/boot/header.S index 6b9923fb6eae..7f4a2c53bd76 100644 --- a/arch/i386/boot/header.S +++ b/arch/i386/boot/header.S | |||
@@ -225,7 +225,7 @@ start_of_setup: | |||
225 | int $0x13 | 225 | int $0x13 |
226 | #endif | 226 | #endif |
227 | 227 | ||
228 | # We will have entired with %cs = %ds+0x20, normalize %cs so | 228 | # We will have entered with %cs = %ds+0x20, normalize %cs so |
229 | # it is on par with the other segments. | 229 | # it is on par with the other segments. |
230 | pushw %ds | 230 | pushw %ds |
231 | pushw $setup2 | 231 | pushw $setup2 |
@@ -280,4 +280,4 @@ die: | |||
280 | .section ".initdata", "a" | 280 | .section ".initdata", "a" |
281 | setup_corrupt: | 281 | setup_corrupt: |
282 | .byte 7 | 282 | .byte 7 |
283 | .string "No setup signature found..." | 283 | .string "No setup signature found...\n" |
diff --git a/arch/i386/boot/pm.c b/arch/i386/boot/pm.c index 1df025c73261..6be9ca811d17 100644 --- a/arch/i386/boot/pm.c +++ b/arch/i386/boot/pm.c | |||
@@ -80,7 +80,7 @@ static void move_kernel_around(void) | |||
80 | */ | 80 | */ |
81 | static void mask_all_interrupts(void) | 81 | static void mask_all_interrupts(void) |
82 | { | 82 | { |
83 | outb(0xff, 0xa1); /* Mask all interrupts on the seconday PIC */ | 83 | outb(0xff, 0xa1); /* Mask all interrupts on the secondary PIC */ |
84 | io_delay(); | 84 | io_delay(); |
85 | outb(0xfb, 0x21); /* Mask all but cascade on the primary PIC */ | 85 | outb(0xfb, 0x21); /* Mask all but cascade on the primary PIC */ |
86 | io_delay(); | 86 | io_delay(); |
diff --git a/arch/i386/boot/video-bios.c b/arch/i386/boot/video-bios.c index afea46c500cc..68e65d95cdfd 100644 --- a/arch/i386/boot/video-bios.c +++ b/arch/i386/boot/video-bios.c | |||
@@ -44,7 +44,7 @@ static int set_bios_mode(u8 mode) | |||
44 | : "+a" (ax) | 44 | : "+a" (ax) |
45 | : : "ebx", "ecx", "edx", "esi", "edi"); | 45 | : : "ebx", "ecx", "edx", "esi", "edi"); |
46 | 46 | ||
47 | do_restore = 1; /* Assume video contents was lost */ | 47 | do_restore = 1; /* Assume video contents were lost */ |
48 | new_mode = ax & 0x7f; /* Not all BIOSes are clean with the top bit */ | 48 | new_mode = ax & 0x7f; /* Not all BIOSes are clean with the top bit */ |
49 | 49 | ||
50 | if (new_mode == mode) | 50 | if (new_mode == mode) |