aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/i386/kernel/head.S12
-rw-r--r--drivers/pnp/pnpbios/bioscalls.c15
2 files changed, 12 insertions, 15 deletions
diff --git a/arch/i386/kernel/head.S b/arch/i386/kernel/head.S
index 58d2746670b7..5884469f6bfe 100644
--- a/arch/i386/kernel/head.S
+++ b/arch/i386/kernel/head.S
@@ -504,10 +504,14 @@ ENTRY(cpu_gdt_table)
504 .quad 0x0000000000000000 /* 0x80 TSS descriptor */ 504 .quad 0x0000000000000000 /* 0x80 TSS descriptor */
505 .quad 0x0000000000000000 /* 0x88 LDT descriptor */ 505 .quad 0x0000000000000000 /* 0x88 LDT descriptor */
506 506
507 /* Segments used for calling PnP BIOS have byte granularity */ 507 /*
508 .quad 0x00409a0000000000 /* 0x90 32-bit code */ 508 * Segments used for calling PnP BIOS have byte granularity.
509 .quad 0x00009a0000000000 /* 0x98 16-bit code */ 509 * They code segments and data segments have fixed 64k limits,
510 .quad 0x0000920000000000 /* 0xa0 16-bit data */ 510 * the transfer segment sizes are set at run time.
511 */
512 .quad 0x00409a000000ffff /* 0x90 32-bit code */
513 .quad 0x00009a000000ffff /* 0x98 16-bit code */
514 .quad 0x000092000000ffff /* 0xa0 16-bit data */
511 .quad 0x0000920000000000 /* 0xa8 16-bit data */ 515 .quad 0x0000920000000000 /* 0xa8 16-bit data */
512 .quad 0x0000920000000000 /* 0xb0 16-bit data */ 516 .quad 0x0000920000000000 /* 0xb0 16-bit data */
513 517
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) \
62do { \
63struct desc_struct *gdt = get_cpu_gdt_table((cpu)); \
64set_base(gdt[(selname) >> 3], __va((u32)(address))); \
65set_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) \
69do { \ 62do { \
70struct desc_struct *gdt = get_cpu_gdt_table((cpu)); \ 63struct 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}