|
|
|
|
|
|
|
|
|
|
xen-devel
[Xen-devel] Problem about rombios initializing network card's PnP option
HI: I try to let guest os to DHA(directly hardware acceess) physical network card, and also want to let rombios (which is not DHA) to initialize networks card's pnp option Rom(the pnp option rom is DHA). however , I find the init program(offset by 3 from 55aa header signature) within option rom can not run properly ---- it cause stact underflow . and when retf form option rom ,system crash because stack corruption.
I think maybe rombios has faultiness or some other bug, I am very confused :(
Who can give me a hand , please telling me why rombios can not init my network card's pnp option rom ,
PS : I trace the initialization by opening the debug 1 exception flag ( eflage.TF=1),and step by step run untill find a instruction (add sp, 0xeh) ,which cause stack underflow! I modify the trap function in vm86.c and insert a breakpoint in scan_rom function in rombios.c
trap(int trapno, int errno, struct regs
*regs) { /* emulate device interrupts */ if (trapno >= NR_EXCEPTION_HANDLER) { int irq = trapno - NR_EXCEPTION_HANDLER; if (irq < 8) interrupt(regs, irq + 8); else interrupt(regs, 0x70 + (irq - 8)); return; }
switch (trapno) { case 0: regs->eflags|=eflags.TF
regs->eip++; case 1: /* Debug */ if (regs->eflags & EFLAGS_VM) { /* emulate any 8086 instructions */ if (mode != VM86_REAL_TO_PROTECTED) panic("not in real-to-protected mode"); emulate(regs); regs->eflags|=eflags.TF; return; } goto invalid;
case 13: /* GPF
*/ if (regs->eflags & EFLAGS_VM) { /* emulate any 8086 instructions */ if (mode == VM86_PROTECTED) panic("unexpected protected mode"); emulate(regs); return; } goto invalid;
default: invalid: printf("Trap (0x%x) while in %s mode\n", trapno, regs->eflags & EFLAGS_VM ? "real" :
"protected"); if (trapno == 14) printf("Page fault address 0x%x\n", get_cr2()); dump_regs(regs); halt(); } }
Mp3疯狂搜-新歌热歌高速下
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-devel] Problem about rombios initializing network card's PnP option ROM,
hua kang <=
|
|
|
|
|