aboutsummaryrefslogtreecommitdiffstats
path: root/src/system.c
Commit message (Collapse)AuthorAgeFilesLines
...
* Unify memory size detection.Kevin O'Connor2008-05-171-41/+23
| | | | | | Figure out memory size once at startup and save in a variable. Change all run-time locations to use that variable instead of re-detecting memory size.
* Minor cleanups.Kevin O'Connor2008-05-061-1/+1
| | | | | Several minor comment improvements. Rearrange some definitions to make them more clear.
* Compile fixes for gcc 4.3.Kevin O'Connor2008-04-131-1/+1
| | | | | Clean up some warnings. Make sure floppy_dbt structure is aliagned to 1 byte boundary.
* Fix bug causing low memory configs to be off by 1024 in e820 maps.Kevin O'Connor2008-04-121-0/+1
|
* Port fix from bochs-bios for incorrect acpi on boxes < 16M.Kevin O'Connor2008-04-051-1/+1
|
* Minor cleanups.Kevin O'Connor2008-03-301-5/+4
| | | | | | | Rename EBDA_SEG to SEG_EBDA - it is more consistent with other defs. Introduce SEG_BDA definition and use it instead of 0x0000 wherea appropriate. Move ACPI_DATA_SIZE to CONFIG_ACPI_DATA_SIZE and move to config.h Use an alias (PORT_HD_DATA) for io port 0x03f6.
* Reduce stack usage for ISRs; minor fixes.Kevin O'Connor2008-03-111-6/+6
| | | | | | | | | | | | Don't back up all registers on isr handlers - they don't read/modify them. This saves stack space. extended_bios_data_area_s must be packed to match ebda spec. Enable irqs on int 08 - follows old bochs bios code. Fix bug in int 76 -- should clear disk_interrupt_flag not floppy_harddisk_info. Make sure we alert in disk_ret on failure case. int 18/19 entry points need to setup cld/%ds too. asm in handle_1587 clobbers flags - note that in clobber list.
* Call to int 1587 shouldn't alter regs->cx.Kevin O'Connor2008-03-091-1/+2
| | | | The asm was setting regs->cx to zero - use a temp variable to avoid that.
* Fix bug in int 1587.Kevin O'Connor2008-03-091-5/+6
| | | | | Wrap comparison must be done with 16bit values. Must use 16bit form of lgdt instruction.
* Simplify e820 map generation.Kevin O'Connor2008-03-091-43/+27
| | | | | | 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.
* Replace debug_exit calls with debug info while setting a failure.Kevin O'Connor2008-03-091-22/+20
| | | | | | 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.
* Optimize insb/outsb/insw/etc. functions.Kevin O'Connor2008-03-091-1/+0
| | | | | Use "string ops" to simplify port accesses. Always run "cld" on entry to C code.
* Minor cleanups.Kevin O'Connor2008-03-081-1/+1
| | | | | | Improve some debugging messages. Minor code clean ups. Improve apmbios entry points (still untested).
* Port rombios32 code from bochs-bios.Kevin O'Connor2008-03-081-12/+0
| | | | | | | | | | | | 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.
* Revert "This patch adds the BIOS support for SMP, ACPI, PCI, SMM, SMBIOS."Kevin O'Connor2008-03-081-1/+2
| | | | | | | | This reverts commit 3d029417164e9a6dffee491fb061de3de6d85595. Conflicts: src/post.c
* use symbols for E820 memory typesKevin O'Connor2008-03-081-6/+12
| | | | | | This patch uses symbols for E820 memory types (system.c) Signed-off-by: Nguyen Anh Quynh <aquynh@gmail.com>
* Use symbols for cmos offsets in ram_probe()Kevin O'Connor2008-03-061-10/+10
| | | | | | | | | 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>
* Rename VISIBLE macro for better control.Kevin O'Connor2008-03-051-7/+7
| | | | | VISIBLE16 is used to mark functions externally available in 16bit code. VISIBLE32 is for 32bit functions.
* This patch adds the BIOS support for SMP, ACPI, PCI, SMM, SMBIOS.Kevin O'Connor2008-03-051-2/+1
| | | | | | Signed-off-by: Nguyen Anh Quynh Several compile fixes provided by Kevin O'Connor
* Add initial support for apmbios code.Kevin O'Connor2008-03-051-7/+0
|
* Bug fixes; get mouse working.Kevin O'Connor2008-03-021-2/+2
| | | | | | | | | 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.
* Enhance included bios tables.Kevin O'Connor2008-03-021-0/+1
| | | | | | | | 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.
* Rename PORT_KBD_* to PORT_PS2_*Kevin O'Connor2008-03-021-2/+2
| | | | This change is in preparation for mouse support.
* Minor - reduce stack usage of handle_1587.Kevin O'Connor2008-03-011-9/+5
|
* Fix for int15 handlers.Kevin O'Connor2008-03-011-23/+26
| | | | | The int 1587 was long jumping to wrong segment. Minor cleanup - breakout handlers better.
* Misc updates.Kevin O'Connor2008-02-261-58/+4
| | | | | | | | 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.
* Version 0.1.2rel-0.1.2Kevin O'Connor2008-02-251-0/+17
|
* Initial checkin.rel-0.1.0Kevin O'Connor2008-02-251-0/+529