diff options
author | Zachary Amsden <zach@vmware.com> | 2006-01-06 03:11:53 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-06 11:33:35 -0500 |
commit | 99022c4695d3f45fcf7f3827aa46dd2d9e53e365 (patch) | |
tree | da02b2dc37e33a2fbaf8eb752d9f5b2f70222d96 | |
parent | 3012d2d209580c78b5927d55c60a10891be8befd (diff) |
[PATCH] x86: Apm seg in gdt
Since APM BIOS segment limits are now fixed, set them in head.S GDT and don't
use the complicated _set_limit() macro expansion.
Signed-off-by: Zachary Amsden <zach@vmware.com>
Acked-by: "Seth, Rohit" <rohit.seth@intel.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | arch/i386/kernel/apm.c | 6 | ||||
-rw-r--r-- | arch/i386/kernel/head.S | 9 |
2 files changed, 5 insertions, 10 deletions
diff --git a/arch/i386/kernel/apm.c b/arch/i386/kernel/apm.c index 0d2981120cd6..45199bb6455b 100644 --- a/arch/i386/kernel/apm.c +++ b/arch/i386/kernel/apm.c | |||
@@ -2325,12 +2325,6 @@ static int __init apm_init(void) | |||
2325 | __va((unsigned long)apm_info.bios.cseg_16 << 4)); | 2325 | __va((unsigned long)apm_info.bios.cseg_16 << 4)); |
2326 | set_base(gdt[APM_DS >> 3], | 2326 | set_base(gdt[APM_DS >> 3], |
2327 | __va((unsigned long)apm_info.bios.dseg << 4)); | 2327 | __va((unsigned long)apm_info.bios.dseg << 4)); |
2328 | /* For ASUS motherboard, Award BIOS rev 110 (and others?) */ | ||
2329 | _set_limit((char *)&gdt[APM_CS >> 3], 64 * 1024 - 1); | ||
2330 | /* For some unknown machine. */ | ||
2331 | _set_limit((char *)&gdt[APM_CS_16 >> 3], 64 * 1024 - 1); | ||
2332 | /* For the DEC Hinote Ultra CT475 (and others?) */ | ||
2333 | _set_limit((char *)&gdt[APM_DS >> 3], 64 * 1024 - 1); | ||
2334 | } | 2328 | } |
2335 | 2329 | ||
2336 | apm_proc = create_proc_info_entry("apm", 0, NULL, apm_get_info); | 2330 | apm_proc = create_proc_info_entry("apm", 0, NULL, apm_get_info); |
diff --git a/arch/i386/kernel/head.S b/arch/i386/kernel/head.S index 870f20bf33c8..37b599fa4d18 100644 --- a/arch/i386/kernel/head.S +++ b/arch/i386/kernel/head.S | |||
@@ -510,13 +510,14 @@ ENTRY(cpu_gdt_table) | |||
510 | .quad 0x0080920000000000 /* 0xa0 16-bit data */ | 510 | .quad 0x0080920000000000 /* 0xa0 16-bit data */ |
511 | .quad 0x0080920000000000 /* 0xa8 16-bit data */ | 511 | .quad 0x0080920000000000 /* 0xa8 16-bit data */ |
512 | .quad 0x0080920000000000 /* 0xb0 16-bit data */ | 512 | .quad 0x0080920000000000 /* 0xb0 16-bit data */ |
513 | |||
513 | /* | 514 | /* |
514 | * The APM segments have byte granularity and their bases | 515 | * The APM segments have byte granularity and their bases |
515 | * and limits are set at run time. | 516 | * are set at run time. All have 64k limits. |
516 | */ | 517 | */ |
517 | .quad 0x00409a0000000000 /* 0xb8 APM CS code */ | 518 | .quad 0x00409a000000ffff /* 0xb8 APM CS code */ |
518 | .quad 0x00009a0000000000 /* 0xc0 APM CS 16 code (16 bit) */ | 519 | .quad 0x00009a000000ffff /* 0xc0 APM CS 16 code (16 bit) */ |
519 | .quad 0x0040920000000000 /* 0xc8 APM DS data */ | 520 | .quad 0x004092000000ffff /* 0xc8 APM DS data */ |
520 | 521 | ||
521 | .quad 0x0000920000000000 /* 0xd0 - ESPFIX 16-bit SS */ | 522 | .quad 0x0000920000000000 /* 0xd0 - ESPFIX 16-bit SS */ |
522 | .quad 0x0000000000000000 /* 0xd8 - unused */ | 523 | .quad 0x0000000000000000 /* 0xd8 - unused */ |