Page 1 of 2

Something wrong with my bootloader ...

Posted: Thu Apr 21, 2005 8:25 am
by Pype.Clicker
oh, well ... Yes, even Pype-the-long-ears can have trouble with a bootloader. ::)

Fact is, on most systems, it works fine and well, but on AMD K6-II systems, it take ages to load (though it doesn't report errors, afaik)

You may find 'loadsector' code in my CVS

It gets used as

Code: Select all

;----> datas loading <--------------------      
        xor ecx,ecx
        inc bx
.loadloop:
        mov cx,512
        cmp edi,ecx
        jb .loadlast
        sub edi,ecx

        read2buffer bx    ;; call readSector for sector #bx into a sectorbuffer
        buffer2mem 512,0,dx  ;; moves the data to proper place (rep movsb)
        inc bx
        
        jc .error
        add bp,0x20
        mov ds,bp
        jmp short .loadloop
.loadlast:
        mov cx,di
        jcxz .wipeready
        read2buffer bx
        buffer2mem cx,0,dx

If anyone sees anything odd in that stuff ...

Re:Something wrong with my bootloader ...

Posted: Thu Apr 21, 2005 9:21 am
by Pype.Clicker
hmm ... weirder and weirder.

I tried a collection of modifications, one of the most substantial being the address of the "load buffer". I'm now using 0x90000 (while i initially tried 0x7c00 since i knew that was free -- it's a bootloader, not a bootsector) and everything seems to be fine...

Even weirdest: using 0xb8000 does *not* clear the modify the screen as it ought to be ...

Re:Something wrong with my bootloader ...

Posted: Thu Apr 21, 2005 9:32 am
by srg
Do you get the same troubles on a K6, K6-III or K7? or is it just he K6-II? Or have you managed to fix it now?

srg

P.S If only you could do jtag like bebugging on a normal PC, as your trouble isn't replicatible on bochs.

Re:Something wrong with my bootloader ...

Posted: Thu Apr 21, 2005 9:46 am
by Pype.Clicker
i unfortunately have no K6, K6-III or K7 around to do the test. I suspect it is more a bios/motherboard/chipset issue than actually a processor issue (that'd make no sense).

Re:Something wrong with my bootloader ...

Posted: Thu Apr 21, 2005 10:19 am
by srg
Pype.Clicker wrote: i unfortunately have no K6, K6-III or K7 around to do the test. I suspect it is more a bios/motherboard/chipset issue than actually a processor issue (that'd make no sense).
I see, what motherbaord and chipset are you using?

srg

Re:Something wrong with my bootloader ...

Posted: Thu Apr 21, 2005 11:24 am
by Curufir
Obvious I know, but could it just be a damaged drive/controller on the K6-II test machine?

Re:Something wrong with my bootloader ...

Posted: Thu Apr 21, 2005 12:02 pm
by bubach
Ehm...

Code: Select all

BiosClearSreen:
   pusha
   mov ax,0x0600   ; clear the "window"
   mov cx,0x0000   ; from (0,0)
   mov dx,0x184f   ; to (24,79)
   mov bh,0x07   ; keep light grey display
   int 0x10
   popa
   ret
could be:

Code: Select all

mov ax, 0x0003   ;set mode 3, which clears the screen
int 0x10
;)

Re:Something wrong with my bootloader ...

Posted: Fri Apr 22, 2005 2:20 am
by Candy
If you request more test machines, have a k6-2 laptop plus a k7 (duron morgan) desktop for testing. Gimme a signal and I'll boot 'em up. The k7 doesn't have a floppy drive though, could probably put one in.

Re:Something wrong with my bootloader ...

Posted: Fri Apr 22, 2005 2:24 am
by srg
Candy wrote: If you request more test machines, have a k6-2 laptop plus a k7 (duron morgan) desktop for testing. Gimme a signal and I'll boot 'em up. The k7 doesn't have a floppy drive though, could probably put one in.
I also have a machine that will take a k6, k6-II or a k6-III (I have the chips). It has an MVP3 chipset is that matters.

srg

Re:Something wrong with my bootloader ...

Posted: Fri Apr 22, 2005 5:23 am
by Pype.Clicker
The system that used to have trouble:

Award Modular BIOS v4.51PG
AMD K6/2 300Mhz, with a VIA motherboard iirc.
VIA Tech V82C597 CPU to PCI
VIA Tech power management 82c586b

that's all i can gather about it atm.

I had reports from a friend of mine who had another K6-II system, and iirc, this mobo/cpu had the same trouble while in another tower (can't tell for sure if i kept the floppy or not when rebuilding the machine from scratches) so i'd dare to say it's not a dead floppy controller.

I'd be indeed pleased if one who has K*-based AMDs could test one of my disk images (the bootloader is left unchanged since a couple of years, so whatever image should make it. If you got a blue banner and some green "done" displayed, the boot has been successful. If you have the message "SOS v2.0 Loading Kernel..." still displayed after 2 mins, then clearly your system showed the bug).

All avl. clicker disk images

Re:Something wrong with my bootloader ...

Posted: Fri Apr 22, 2005 6:10 am
by distantvoices
just a dumb question: could it be that this depends on the data transfer rate set for the data transfer from floppy to main memory?

Re:Something wrong with my bootloader ...

Posted: Fri Apr 22, 2005 6:18 am
by Pype.Clicker
beyond infinity wrote: just a dumb question: could it be that this depends on the data transfer rate set for the data transfer from floppy to main memory?
uh. i wasn't aware there was a way to set such transfer rate. I just used BIOS interrupts, doing nothing 'funny', afaik. ::)

Re:Something wrong with my bootloader ...

Posted: Fri Apr 22, 2005 6:23 am
by distantvoices
Ah, bios interrupts ... I only know of setting the transfer rate in a pmode floppy driver so this might be pretty irrelevant.

What do books like Messmers "Indispensable Hardware Book" reveal?

Gonna check at home ...

Re:Something wrong with my bootloader ...

Posted: Fri Apr 22, 2005 9:48 am
by srg
beyond infinity wrote: just a dumb question: could it be that this depends on the data transfer rate set for the data transfer from floppy to main memory?
I thought that the data transfer rate for a particular type of floppy disk was set.

srg

Re:Something wrong with my bootloader ...

Posted: Fri Apr 22, 2005 10:56 am
by srg
Right, just tested on system:

Award Modular BIOS 4.51PG
TMC AI5VG+ mobo
VIA VT82C598MVP Nothbridge
VIA VT82C586B Southbridge
Winbond W83877F Super IO

AMD K6-III 450MHz - about 15 seconds
K6-II 500MHz - about 16 secs, this is not very scientific BTW.
K6 166MHz, same about 16 secs

srg

BTW Are you sure the disk your testing it on and the drive are ok, on your machine it could be struggling to read and reread the disk.