lkml.org 
[lkml]   [2005]   [Sep]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH 2/3] Pnp bios gdt fix
Zachary Amsden wrote:

>PnP BIOS for x86 is part of drivers, so I missed it in the initial
>GDT page alignment patch. Kudos to Andrew for fixing that.
>Unfortunately, fixing the build introduced a kernel panic when
>trying to setup the as of yet unallocated GDTs for the APs.
>This fixes the problem by setting only the BSP's GDT, then copying
>the PnP segments back to the cpu_gdt_table template.
>
>
>

Bogus patch! I was just getting lucky and not running PnP BIOS code on
the AP's -- until now. Turns out the fix and the bug were much
simpler. Please apply this instead.


PnP BIOS for x86 is part of drivers, so I missed it in the initial
GDT page alignment patch. Kudos to Andrew for fixing that.
Unfortunately, fixing the build introduced a kernel panic when
trying to setup the as of yet unallocated GDTs for the APs.

I totally misdiagnosed this. The problem happens only
when NR_CPUS > physical CPUs. Fix is to ignore missing GDT's.

Signed-off-by: Zachary Amsden <zach@vmware.com>
Index: linux-2.6.14-rc2/drivers/pnp/pnpbios/bioscalls.c
===================================================================
--- linux-2.6.14-rc2.orig/drivers/pnp/pnpbios/bioscalls.c 2005-09-28 15:57:42.000000000 -0700
+++ linux-2.6.14-rc2/drivers/pnp/pnpbios/bioscalls.c 2005-09-28 15:59:37.000000000 -0700
@@ -537,6 +537,8 @@ void pnpbios_calls_init(union pnp_bios_i
_set_limit((char *)&bad_bios_desc, 4095 - (0x40 << 4));
for(i=0; i < NR_CPUS; i++)
{
+ if (!get_cpu_gdt_table(i))
+ continue;
Q2_SET_SEL(i, PNP_CS32, &pnp_bios_callfunc, 64 * 1024);
Q_SET_SEL(i, PNP_CS16, header->fields.pm16cseg, 64 * 1024);
Q_SET_SEL(i, PNP_DS, header->fields.pm16dseg, 64 * 1024);
\
 
 \ /
  Last update: 2005-09-29 01:12    [W:0.030 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site