Re: [Etherboot-developers] rtl_disable and random kernel crash.
Brought to you by:
marty_connor,
stefanhajnoczi
|
From: Robb M. <ma...@ac...> - 2001-04-07 21:22:53
|
I think the source of the problems with local booting and 4.7.23 is the
PCI_PNP_HEADER patch. If you look closely at the code below the "over:"
label at line 138, the "#ifdef - #endif" labels for PCI_PNP_HEADER and
NOINT19H are mismatched (i.e., "#endif /* PCI_PNP_HEADER */" appears
_between_ the "#ifdef NOINT19H" conditional and its associated "#endif").
I think the original intention was:
1. If compiled for PCI_PNP, the system BIOS will invoke the "blockmove"
entrypoint defined in the "$PnP" structure, so there is no need to do _any_
initialization via the option ROM entry at offset 3 in the code (which jumps
to label "over:"). I'm not sure of the significance of returning 0x20 in ax
at this point, so I left it there.
2. If the ROM is not PCI_PNP, you have two options: trap INT19, or not.
2a. INT19 trapped: patch the INT19 vector, and return to the system BIOS,
which will invoke INT19 when initialization is complete and it is ready to
boot.
2b. No INT19 trap: assume no further initialization by the system BIOS is
necessary - simply grab control and don't give it back.
I submit the code below is more correct than that currently in 4.7.23.
This may (or may not) resolve some of the issues with inability to "local"
boot after the etherboot ROM is invoked.
==============================================
over:
#ifdef PCI_PNP_HEADER
movw $0x20,%ax
lret
#else /* PCI_PNP_HEADER */
#ifndef NOINT19H
pushw %ax
pushw %ds
xorw %ax,%ax
movw %ax,%ds /* access first 64kB segment */
movw SCRATCHVEC+4, %ax /* check if already installed */
cmpw $MAGIC, %ax /* check magic word */
jz installed
movw INT19VEC, %ax /* hook into INT19h */
movw %ax, SCRATCHVEC
movw INT19VEC+2, %ax
movw %ax, SCRATCHVEC+2
movw $start19h, %ax
movw %ax, INT19VEC
movw %cs,%ax
movw %ax, INT19VEC+2
movw $MAGIC, %ax /* set magic word */
movw %ax, SCRATCHVEC+4
installed:
popw %ds
popw %ax
movw $0x20,%ax
lret
start19h: /* clobber magic id, so that we will
*/
xorw %ax,%ax /* not inadvertendly end up in an */
movw %ax,%ds /* endless loop */
movw %ax, SCRATCHVEC+4
movw SCRATCHVEC+2, %ax /* restore original INT19h handler
*/
movw %ax, INT19VEC+2
movw SCRATCHVEC, %ax
movw %ax, INT19VEC
/* fall thru */
#endif /* NOINT19H */
#endif /* PCI_PNP_HEADER */
==========================================
|