Kevin O'Connor [Sun, 9 Mar 2008 16:23:42 +0000 (12:23 -0400)]
Simplify e820 map generation.
Clean up by moving code from handle_15e820 to set_e820_range.
Set ES explicilty prior to populating the map - the code was relying
on nothing changing it.
Kevin O'Connor [Sun, 9 Mar 2008 16:19:23 +0000 (12:19 -0400)]
Replace debug_exit calls with debug info while setting a failure.
Calling debug_exit at the end of a call doesn't help much - several of
the registers are already clobbered at this point. It also increases
stack usage because it prevents call tail optimization in many places.
Kevin O'Connor [Sat, 8 Mar 2008 20:43:03 +0000 (15:43 -0500)]
Port rombios32 code from bochs-bios.
This adds acpi, smbios, pci init, etc.
Changes from original rombios32.c code:
* Header file translation.
* Use common functions already in code (eg, outb, memset, bios_printf,
usleep)
* Implement trampoline for disabling bios shadowing (rombios32 code
actually runs in the 0xf0000 area).
* Copy asm code from rombios32start.S to an asm() statement in C
code.
Kevin O'Connor [Fri, 7 Mar 2008 00:16:37 +0000 (19:16 -0500)]
Use symbols for cmos offsets in ram_probe()
This patches uses symbols for cmos offsets when calculating ram size
in ram_probe()
Besides, it adds some cmos offset symbols into cmos.h, and changes
some memory cmos offset to be more meaningful.
Signed-off-by: Nguyen Anh Quynh <aquynh@gmail.com>
Kevin O'Connor [Wed, 5 Mar 2008 03:50:53 +0000 (22:50 -0500)]
Get CDROM emulation working.
Fix bug causing ata_cmd_packet to insl to wrong address.
Add new cdrom_read helper.
Join ata.hdidmap/cdidmap into one array variable.
Rename CONFIG_ELTORITO_BOOT to CONFIG_CDROM_BOOT.
Add cd emulation code.
Kevin O'Connor [Sun, 2 Mar 2008 18:58:23 +0000 (13:58 -0500)]
Bug fixes; get mouse working.
Fix bug in post causing PIC2 to not be initialized properly.
Only run ata_detect if CONFIG_ATA enabled.
Improve debugging aids - introduce debug_isr(); move DEBUGF to each file.
Enable mouse by default.
Fix bug in floppy causing extra test of PORT_FD_STATUS on recalibrate.
Always disable/enable kbd in handle_09 event.
Kevin O'Connor [Sun, 2 Mar 2008 16:24:36 +0000 (11:24 -0500)]
Enhance included bios tables.
Moved floppy parameter table to its 0xefc7 location.
Define floppy base table as a struct.
Cleaned up definitions in romlayout.S
Fixed bug in handle_15c0 - wasn't clearing cf.
Clean up some post.c usages of bios tables.
Kevin O'Connor [Wed, 27 Feb 2008 15:41:41 +0000 (10:41 -0500)]
Some cleanups based on patch by Nguyen Anh Quynh
Add include guards to header files.
Disable stack protector on gcc versions with that option.
Fix lds bug in src/rombios32.lds.S
Don't forward declare "struct bregs;" - it may be confusing gcc on some versions.
Kevin O'Connor [Wed, 27 Feb 2008 02:33:14 +0000 (21:33 -0500)]
Misc updates.
Try to fix up make dependency tracking by including a "null.c" file.
Initialize hard disk tables during post.
Move RTC handlers from system.c to clock.c
Use a macro to init stacks in romlayout.S
Add C-Code stats to buildrom step.