Hi,
nooooooooos wrote:Is your BIOS freeware and is there a possiblity to download it from anywhere?
I think first I don't use AML... My priority is to make my OS comfortable to develop on itself and so I don't have to use en Emulator...
My BIOS is LGPL, but there isn't anywhere reliable to download it from. Gmail complains about binary email attachments (potential security problem) and it's too large to transfer via. the forums.
For now I've put my web server online, and will leave it online for a day or 2. Unfortunately this is on a server at my house with slow speed outgoing traffic (and faster incoming traffic), so as soon as the web search engines find out it's online I get huge amounts of lag (no free bandwidth for outgoing traffic, including my web browser's HTTP requests, online games, etc). This is why I leave the web server offline most of the time...
Anyway the link for the BIOS (464 KB "tar.gz", source and binaries) is
http://bcos.hopto.org/bios2/latest.tar.gz.
Some notes....
There\'s actually 2 binaries - one that autodetects the chipset, and another one for "ISA only". For the normal version of the BIOS you'd need to change one line in your "bochsrc.txt" to something like:
Code: Select all
romimage: file=<somewhere>/bios.bin, address=0xfffe0000
For the "ISA only" version you'd want:
Code: Select all
romimage: file=<somewhere>isa_bios.bin, address=0x000e0000
I'm also not sure which version of Bochs you're using, but you might need to modify Bochs a little and recompile it to avoid stupid error messages. If you're trying to emulate a multi-CPU computer and you get a "WARNING: HLT instruction with IF=0!" error message, then find the file "bochs/cpu/proc_ctrl.cc" and comment the warning out. Also, if it complains about HLT during BIOS code you'd need to comment that out too. For example (around line 95 in the file "bochs/cpu/proc_ctrl.cc") you may need to change it to something like:
Code: Select all
void BX_CPU_C::HLT(bxInstruction_c *i)
{
/*
// hack to panic if HLT comes from BIOS
if (BX_CPU_THIS_PTR sregs[BX_SEG_REG_CS].selector.value == 0xf000)
BX_PANIC(("HALT instruction encountered in the BIOS ROM"));
*/
if (!real_mode() && CPL!=0) {
BX_ERROR(("HLT: %s priveledge check failed, CPL=%d, generate #GP(0)",
cpu_mode_string(BX_CPU_THIS_PTR cpu_mode), CPL));
exception(BX_GP_EXCEPTION, 0, 0);
return;
}
/*
if (! BX_CPU_THIS_PTR get_IF()) {
BX_INFO(("WARNING: HLT instruction with IF=0!"));
}
*/
Newer versions of Bochs don't have the "HALT instruction encountered in the BIOS ROM" hack, and might handle "HLT instruction with IF=0" correctly.
The "Press DEL to enter setup" is a hassle unless you've got the timing setup correctly in Bochs (e.g. the "ips=11000000" part) - it can be too quick or annoyingly slow.
Also, the BIOS stores it's setup in the CMOS. If you don't save and reload CMOS contents then it loses it's settings (including where to boot from and floppy drive setup). To fix this create an empty file (e.g. "cmos.img") that is either 64 bytes or 128 bytes long, and then add something like this to your "bochsrc.txt":
Code: Select all
cmosimage: cmos.img, rtc_init=time0
The first time you boot, the BIOS will find that the CMOS checksum is wrong and will restore some defaults. Then you'll need to enter setup and tell it that a floppy drive is connected and to boot from floppy. If Bochs is setup to save CMOS and reload it then you only need to do this once (otherwise you'll need to use the BIOS setup every time you boot).
Lastly, if you're testing NUMA you might get some strange results (e.g. where a multi-core chip is split across different NUMA domains). This is caused by bugs in the CPUID instruction emulation code in Bochs. I wrote my own version of the CPUID emulation code to fix this (and make other improvements).
I don't think I've forgotten anything - let me know if (when?) you have trouble getting it to work...
Cheers,
Brendan