Re: FW: 2.6.38.3 and 2.6.39-rc4 hangs after "Booting the kernel"on quad Pentium Pro system

From: H. Peter Anvin
Date: Sat Apr 23 2011 - 13:52:12 EST


On 04/23/2011 06:52 AM, Thomas Meyer wrote:

so your bios seems to report the size in AX/BX. the code in
arch/x86/boot/memory.c move the return sizes from CX/DX into AX/BX, when
CX or DX is not zero.

Could you try to change the line:

} else if (oreg.ax == 15*1024) {
boot_params.alt_mem_k = (oreg.dx<< 6) + oreg.ax;

to
} else if (oreg.ax == 15*1024) {
boot_params.alt_mem_k = (oreg.bx<< 6) + oreg.ax;

That should fix your misdetection.

The assembler code in arch/i386/boot/setup.S seemed to move AX/BX into
CX/DX, when CX and(!) DX were zero. Then used CX/DX to calc the memory
size.

PS: gitk --follow arch/x86/boot/memory.c seems to react strangley...


Ah yes, this should have been bx; ax/bx and cx/dx forms pairs (unlike the normal x86 convention of DX:AX and BX:CX forming pairs), and it doesn't make sense to mix and match them.

-hpa
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/