Re: [Etherboot-developers] [COMMIT] 5.1.2+ boot from disk.
Brought to you by:
marty_connor,
stefanhajnoczi
|
From: <ebi...@ln...> - 2002-08-27 08:40:49
|
ebi...@ln... (Eric W. Biederman) writes: > ke...@us... (Ken Yap) writes: > > > >I got a bit further than you. I'm using a 3c509. I got my Etherboot ROM > > >to load another ROM image and that worked, the 5.1.2rc3 image started > > >executing, and prompted me for N or L. I chose N and it said Probing > > >pci, no BIOS32\n Probing isa...[3c5x9] blah blah, and then froze after > > >printing the MAC address. > > > > Oh and the 3 second timeout didn't work so the PCBIOS timer is probably > > not working. That may be the same reason for the freeze actually. > > Hmm? 3 second timeout. Eric the ASK_BOOT=3 timeout. I usually set it to 1, and forgot the default was 3. So the BIOS based currticks is running at the wrong speed, interesting. Given that you chose N I assume it was running slow? O.k. A slow timer would certain give a freeze. Sounds like I made a small bug in pcbios.S Looking at the code.... O.k. The BIOS based currticks is definitely bugging in the presence of relocation. The absolute BIOS addresses are not fixed up, so if any amount of relocation is applied the will read the wrong address. Please, Please, Please when testing the new etherboot tell me if what image you are testing. And if you can test the non relocated case. I suspect there will be a bazillion little bugs when etherboot is running relocated that is going to take a while to track down. That is the big hunt before 5.2. Anyway I believe the untested patch below should fix the timer problem. Eric /************************************************************************** CURRTICKS - Get Time Use direct memory access to BIOS variables, longword 0040:006C (ticks today) and byte 0040:0070 (midnight crossover flag) instead of calling timeofday BIOS interrupt. **************************************************************************/ .globl currticks currticks: pushl %ebp pushl %ebx pushl %esi pushl %edi #ifdef FREEBSD_PXEEMU cmpb $0, pxeemu_nbp_active jne currticks_postswitch #endif pushl $ 10f pushl $ 20f - 10f call _real_call .section ".text16" 10: .code16 ret 20: .code32 .previous #ifdef FREEBSD_PXEEMU currticks_postswitch: #endif - movl 0x46C, %eax - movb 0x470, %bl + movl virt_offset, %ebp + negl %ebp /* Physical address 0 */ + movl 0x46C(%ebp), %eax + movb 0x470(%ebp), %bl cmpb $0, %bl je notmidnite - movb $0, 0x470 /* clear the flag */ + movb $0, 0x470(%ebp) /* clear the flag */ addl $0x1800b0,days /* 0x1800b0 ticks per day */ notmidnite: addl days,%eax popl %edi popl %esi popl %ebx popl %ebp ret |