]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
[PATCH] x86: Apm seg in gdt
authorZachary Amsden <zach@vmware.com>
Fri, 6 Jan 2006 08:11:53 +0000 (00:11 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 6 Jan 2006 16:33:35 +0000 (08:33 -0800)
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>
arch/i386/kernel/apm.c
arch/i386/kernel/head.S

index 0d2981120cd626fd36b9dcc7e4b9d1fea71b689d..45199bb6455b4fd5b0d6bbc213b93f432971ac76 100644 (file)
@@ -2325,12 +2325,6 @@ static int __init apm_init(void)
                         __va((unsigned long)apm_info.bios.cseg_16 << 4));
                set_base(gdt[APM_DS >> 3],
                         __va((unsigned long)apm_info.bios.dseg << 4));
-               /* For ASUS motherboard, Award BIOS rev 110 (and others?) */
-               _set_limit((char *)&gdt[APM_CS >> 3], 64 * 1024 - 1);
-               /* For some unknown machine. */
-               _set_limit((char *)&gdt[APM_CS_16 >> 3], 64 * 1024 - 1);
-               /* For the DEC Hinote Ultra CT475 (and others?) */
-               _set_limit((char *)&gdt[APM_DS >> 3], 64 * 1024 - 1);
        }
 
        apm_proc = create_proc_info_entry("apm", 0, NULL, apm_get_info);
index 870f20bf33c83325988b28b7343e6464aada4388..37b599fa4d18ccd973443e544a82dddcd5549822 100644 (file)
@@ -510,13 +510,14 @@ ENTRY(cpu_gdt_table)
        .quad 0x0080920000000000        /* 0xa0 16-bit data */
        .quad 0x0080920000000000        /* 0xa8 16-bit data */
        .quad 0x0080920000000000        /* 0xb0 16-bit data */
+
        /*
         * The APM segments have byte granularity and their bases
-        * and limits are set at run time.
+        * are set at run time.  All have 64k limits.
         */
-       .quad 0x00409a0000000000        /* 0xb8 APM CS    code */
-       .quad 0x00009a0000000000        /* 0xc0 APM CS 16 code (16 bit) */
-       .quad 0x0040920000000000        /* 0xc8 APM DS    data */
+       .quad 0x00409a000000ffff        /* 0xb8 APM CS    code */
+       .quad 0x00009a000000ffff        /* 0xc0 APM CS 16 code (16 bit) */
+       .quad 0x004092000000ffff        /* 0xc8 APM DS    data */
 
        .quad 0x0000920000000000        /* 0xd0 - ESPFIX 16-bit SS */
        .quad 0x0000000000000000        /* 0xd8 - unused */