diff options
author | Zachary Amsden <zach@vmware.com> | 2006-01-06 03:11:56 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-06 11:33:35 -0500 |
commit | e6a9918c9617ed21f71f2f20b45efe06822c8f00 (patch) | |
tree | 1518725e6db9a84667cc0d713a5e5c6c156a979d /drivers/pnp/pnpbios/bioscalls.c | |
parent | 5fe9fe3c6f9a1ae7aa224bb7a66eb9aad9e4abef (diff) |
[PATCH] x86: Fixed pnp bios limits
PnP BIOS data, code, and 32-bit entry segments all have fixed limits as well;
set them in the GDT rather than adding more code. It would be nice to add
these fixups to the boot GDT rather than setting the GDT for each CPU; perhaps
I can wiggle this in later, but getting it in before the subsys init looks
tricky.
Also, make some progress on deprecating the ugly Q_SET_SEL macros.
Signed-off-by: Zachary Amsden <zach@vmware.com>
Cc: "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>
Diffstat (limited to 'drivers/pnp/pnpbios/bioscalls.c')
-rw-r--r-- | drivers/pnp/pnpbios/bioscalls.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/pnp/pnpbios/bioscalls.c b/drivers/pnp/pnpbios/bioscalls.c index a72126180e97..a1f0b0ba2bfe 100644 --- a/drivers/pnp/pnpbios/bioscalls.c +++ b/drivers/pnp/pnpbios/bioscalls.c | |||
@@ -58,13 +58,6 @@ __asm__( | |||
58 | ".previous \n" | 58 | ".previous \n" |
59 | ); | 59 | ); |
60 | 60 | ||
61 | #define Q_SET_SEL(cpu, selname, address, size) \ | ||
62 | do { \ | ||
63 | struct desc_struct *gdt = get_cpu_gdt_table((cpu)); \ | ||
64 | set_base(gdt[(selname) >> 3], __va((u32)(address))); \ | ||
65 | set_limit(gdt[(selname) >> 3], size); \ | ||
66 | } while(0) | ||
67 | |||
68 | #define Q2_SET_SEL(cpu, selname, address, size) \ | 61 | #define Q2_SET_SEL(cpu, selname, address, size) \ |
69 | do { \ | 62 | do { \ |
70 | struct desc_struct *gdt = get_cpu_gdt_table((cpu)); \ | 63 | struct desc_struct *gdt = get_cpu_gdt_table((cpu)); \ |
@@ -535,8 +528,8 @@ void pnpbios_calls_init(union pnp_bios_install_struct *header) | |||
535 | struct desc_struct *gdt = get_cpu_gdt_table(i); | 528 | struct desc_struct *gdt = get_cpu_gdt_table(i); |
536 | if (!gdt) | 529 | if (!gdt) |
537 | continue; | 530 | continue; |
538 | Q2_SET_SEL(i, PNP_CS32, &pnp_bios_callfunc, 64 * 1024); | 531 | set_base(gdt[GDT_ENTRY_PNPBIOS_CS32], &pnp_bios_callfunc); |
539 | Q_SET_SEL(i, PNP_CS16, header->fields.pm16cseg, 64 * 1024); | 532 | set_base(gdt[GDT_ENTRY_PNPBIOS_CS16], __va(header->fields.pm16cseg)); |
540 | Q_SET_SEL(i, PNP_DS, header->fields.pm16dseg, 64 * 1024); | 533 | set_base(gdt[GDT_ENTRY_PNPBIOS_DS], __va(header->fields.pm16dseg)); |
541 | } | 534 | } |
542 | } | 535 | } |