Page 1 of 1
cobos bootloader test
Posted: Thu Feb 15, 2007 8:57 am
by os64dev
Hi all,
i have finally written a bootloader that works on both my machines without rebooting and now i am interested in how it behaves on other machines. Do not expect fancy stuff it just shows a buchs of letters. These letters is where i am interested in as well as whether the system reboots or not.
bochs gives the combination 'DRrrrAaPTL'. This letters give me some detail about how the a20 was enabled 'Aa', who many sectors were read 'Rrrr' and whether it could switch to long mode 'PTL'.
i hope you guys are willing to test this and supply me the string as is seen on the display. It should work on a usb key, floppy and harddrive(but not sure about latter). Further more i would be interested in vmware and qemu output because these i didn't install.
regards
Posted: Thu Feb 15, 2007 9:51 pm
by uglyoldbob
How are we suppose to install this onto a floppy (?) disk? Does it use GRUB, or something else?
Posted: Fri Feb 16, 2007 2:07 am
by os64dev
by either using dd in linux or cygwin like
dd if=boot.bin of=/dev/fda or using rawwritewin under windows
http://uranus.it.swin.edu.au/~jn/linux/rawwrite.htm.
Posted: Fri Feb 16, 2007 4:18 am
by Combuster
for this kind of things, the convention sortof is to supply a floppy.img (and preferrably, it should be 1.4M) which saves us from asking that sort of question (guess what people do with an floppy image?
)
Posted: Fri Feb 16, 2007 9:02 am
by uglyoldbob
Reboots/triple faults INSTANTLY after printing the last characters on my test computer. Makes it really hard to read the characters. As far as I can tell, it prints DRrrrAaPTL, but I don't really get a chance to read the last letter or two.
Posted: Fri Feb 16, 2007 11:32 am
by os64dev
ok, thanks. that clearly shows that my processor identification part doesn't work properly. I'll have to adapt the code.
Posted: Fri Feb 16, 2007 2:41 pm
by os64dev
ok i changed the bootloader, please use this version from now on also the boot.bin is 1.44 MiB now and still usable as usb, floppy or hd. let me know if it works.
Posted: Fri Feb 16, 2007 9:47 pm
by uglyoldbob
Ok it doesn't reset now. Good job.
All printed characters have a blue background.
DRrrrAabukP$
That is the output I am given. The cursor (actually a blinking underline) is flashing in the upper left corner. DOn't forget to turn off the floppy drive motor, as it doesn't do that yet (or doesn't work on my test pc).
Posted: Sat Feb 17, 2007 4:13 am
by Combuster
I get (in all sorts of colors on a blue background)
DRrrrAabukPC$
on my dual-processor P2 box. If you'd care to explain what that means
oh and, it halts afterwards.
uglyoldbob wrote:DOn't forget to turn off the floppy drive motor, as it doesn't do that yet (or doesn't work on my test pc).
That seems to be a BIOS thing, and a common one at that too. Most bioses keep the floppy running for a while after use, and we generally take over control of the timer before the bios decides to cut power on it.
Posted: Sat Feb 17, 2007 8:07 am
by os64dev
Combuster wrote:DRrrrAabukPC$ on my dual-processor P2 box. If you'd care to explain what that means
ok, i will explain what de letters and colours mean.
- green is success
- red is fail, obviously
- white means start of a new catagory.
- D = getting the bios drive parameters, this allows for a 'universal' bootloader working on floppy, harddisk and usb stick.
- R = start reading drive.
- r: one sector read.
- A = trying to enable A20
- a: bios already enabled a20.
- b: enable a20 using call $2401 of int 15
- u: using the undocumented pc trick.
- k: using the keyboard controller
- f: using the fast method via system control port a.
- P = switching to 16-bit protected mode.
- C = checking the support for cpuid
- T = checking for long mode support.
- L = running in 64-bit long mode.
- $ = locking system.
so DRrrrAabukPC$ mean that 3 sectors where read and that the A20 was enabled using keyboards controller. The system jumped to 16-bit pmode checked for cpuid. I just found an error because with you configuration you should have seen a red T meaning that longmode isn't supported and uglyoldbob should have seen a red C meaning the cpuid failed.
The halt is perfectly ok because the rest isn't implemented/mature yet.
I've fixed this error now so thanks for testing.
Posted: Sat Feb 17, 2007 4:11 pm
by uglyoldbob
According to that then (code Aabu, colors of white, red, red, red) my A20 line did not get enabled.
Posted: Sun Feb 18, 2007 3:38 am
by os64dev
you had a green k wright, which means that the A20 was enabled by the keyboard controller.
Posted: Sun Feb 18, 2007 8:55 am
by uglyoldbob
Yes it had a green k. I didn't notice what that meant.