aboutsummaryrefslogtreecommitdiff
path: root/src/boot.c
AgeCommit message (Collapse)AuthorFilesLines
2009-06-15Avoid -fwhole-program on broken gcc instead of stopping build.Kevin O'Connor1-4/+0
Enhance build to detect and avoid gcc with broken -fwhole-program Also, remove workaround for older gcc that mess up global exports.
2009-05-05Add support for field width argument to %x (eg, %08x).Kevin O'Connor1-1/+1
Patch from Stefan Reinauer; modified by Kevin O'Connor.
2009-04-29Add config option to set boot menu delay time.Kevin O'Connor1-1/+1
Add CONFIG_BOOTMENU_WAIT option with delay time (in milliseconds).
2009-04-18Allow booting from any device when under coreboot.Kevin O'Connor1-11/+5
Don't just try floppy/cdrom/harddrive - try any available boot method.
2009-04-13Initial support for running CBFS payloads.Kevin O'Connor1-15/+46
Add boot menu option for CBFS payloads. Rework "override" system so that it is done per BEV. Add file prefix scanning code to CBFS. Add CBFS payload launching support.
2009-02-16Enhance boot menu to allow user to select which CD drive to boot from.Kevin O'Connor1-9/+19
2009-02-15Allow ctrl+alt+delete to work when no boot device found.Kevin O'Connor1-2/+6
Don't panic (that turns off irqs), instead spin with irqs enabled.
2009-02-08Add support for selecting harddrive order in boot menu.Kevin O'Connor1-27/+167
Save ATA harddrive model name so that it can be shown from menu. Minor - use "ata0-1" not "ata0 slave". Fill fdpt info based on BIOS drive id - not the controller id. Add BCV support to IPL code. Use "BCV" system to set harddrive order (for both ata and option roms). Also, don't show floppy/cdrom in boot menu if no drives found.
2009-02-08Minor - rename BX_PANIC to panic.Kevin O'Connor1-2/+2
2009-02-08Simplify boot code.Kevin O'Connor1-159/+107
Make sure every IPL entry has a description. Remove output printing helpers - have each caller output what they want. Add strtcpy function to ensure descriptions don't go over 32 characters. Breakup code to launch each IPL entry to its own function.
2009-02-08Reorganize boot code.Kevin O'Connor1-14/+134
Simplify keyboard handling in post_menu.c, and move to util.c. Move remaining functions in post_menu.c to boot.c; remove post_menu.c. Also, remove broken check for F12 when in boot menu. Move BEV setup code from post.c to boot.c. Move option rom BEV adding code from optionroms.c to boot.c. Avoid calling BX_PANIC during boot if there is an alternative.
2009-02-07Introduce MBR struct; simplify cdrom emulation code.Kevin O'Connor1-1/+2
Define and use a struct for the master boot record. Simplify cdrom emulation chs setting code. Fix an apparent bug in harddrive chs setting - it wasn't properly masking the spt/cyl fields.
2009-01-19Implement memcpy_far and checksum_far, and replace _fl variants.Kevin O'Connor1-1/+1
The "flat" mode variants work in real mode, but will not work in protected mode. So, replace with versions that take explicit segments.
2009-01-19Rename MAKE_FARPTR (and similar) to MAKE_FLATPTR.Kevin O'Connor1-3/+3
The term "far pointer" is used in many 16bit specs, and it is different from what MAKE_FARPTR creates. So, use the term "flat pointer" in the code to distinguish between the two meanings. Also, use the suffix "_fl" consistently when working with "flat pointers".
2009-01-15Change license from GPLv3 to LGPLv3.Kevin O'Connor1-1/+1
Change license of contributions from Kevin O'Connor from GPLv3 to LGPLv3 (or later). Since the work as a whole is based on Kevin's contributions and the "bochs bios" which has a license of LGPL (v2 or later), this effectively makes the work as a whole available under LGPLv3 (or later).
2008-12-31Use new 'struct disk_op_s' to issue ata requests.Kevin O'Connor1-1/+0
Using the struct at all callers reduces the parameter assignments. Replace ata_op_s with new disk_op_s and update all users. Unify basic/extended_access methods to use new send_disk_op() func. Remove cdrom_read_emu -- integrate logic into callers. Remove ata.h -- move all defs to disk.h
2008-12-31Return CDEMU parameters to ebda segment (instead of using globals).Kevin O'Connor1-2/+3
The cdemu is setup in the boot stage after globals are made read-only. So, globals can't be used. Also, move hdcount from a global to BDA (it should be in BDA). Don't attempt to set blksize/sector count in atapi_is_ready() - it's not useful.
2008-12-29Introduce GET/SET_EBDA2() macros - they take a cached ebda seg.Kevin O'Connor1-3/+4
For those places that repeatedly read/write to the ebda, caching the ebda segment improves code generation.
2008-12-28Move IPL definitions from ebda to global variables.Kevin O'Connor1-9/+12
The boot sequence variable remains in ebda. Move boot specific definitions to a new header (boot.h)
2008-12-28Move most of ATA and CDEMU from ebda to global variables.Kevin O'Connor1-2/+2
The dpte, cdrom locks, and disk sector count remain in the ebda. Also, enhance SET_GLOBAL macro to avoid unused variable warnings.
2008-12-10Fix boot when CONFIG_CDROM_BOOT is disabled.Kevin O'Connor1-1/+1
2008-11-08Avoid casting EBDA variables ipl.description and pir_loc.Kevin O'Connor1-2/+2
Define them using their native types (pointers). Also, fix an apparent bug in mptable coreboot processing - it incorrectly overwrote the pir_loc variable.
2008-08-29Rename memcpy() to memcpy_far() and add regular memcpy() code.Kevin O'Connor1-1/+1
2008-08-17Misc minor improvements.Kevin O'Connor1-4/+4
Update TODO list. Improve comments in boot.c. Use debug port 0x0402 instead of 0x0403 (bochs prefers the latter). Fix formatting of debug messages in kbd.c. Use proper return check for kbd and mouse init.
2008-07-21Add additional config options to remove parts of code.Kevin O'Connor1-0/+3
Added options CONFIG_BOOT, CONFIG_SERIAL, CONFIG_LPT, CONFIG_KEYBOARD, CONFIG_BOOTMENU. Also extended coverage of existing options to ensure full code got removed.
2008-07-12Add workaround for older gcc's not fully supporting VISIBLE32.Kevin O'Connor1-0/+4
2008-07-06Convert bootup code (int18/int19) to 32bit mode.Kevin O'Connor1-4/+2
The boot entry points should not require 16bit mode, so use 32bit mode instead.
2008-07-06Move $PnP string from boot.c to romlayout.S.Kevin O'Connor1-5/+0
The string is special, so it's better to define it in assembler.
2008-07-04Extract 'struct bregs' out of biosvar.h; clean up header includes.Kevin O'Connor1-1/+2
2008-06-28Improve some debugging output.Kevin O'Connor1-1/+1
Replace DEBUGF calls with dprintf calls. Make ata calls consistently use 'int' return codes. Make each error return code in ata.c use a unique negative number.
2008-06-21Init serial port before using it for debug - also reinit after option rom.Kevin O'Connor1-0/+2
Apparently, some VGA option roms will enable serial irqs - this could cause problems with spurious irqs from debug messages. Also, improve debugging of option roms that fail the checksum check.
2008-06-12Support config driven debugging of each irq handler.Kevin O'Connor1-2/+2
This allows one to easily enable verbose output from handlers.
2008-05-24Improve control of debug messages.Kevin O'Connor1-2/+2
Rename BX_INFO() to dprintf() and add a "severity level" parameter. Add CONFIG_DEBUG_LEVEL compile option to control debug verbosity. Add more debug info to init steps of post.c.
2008-05-18Establish boot order in post stage.Kevin O'Connor1-17/+5
Read boot order nvram fields in post stage and store in a variable. Change boot menu to update boot order instead of using separate variables.
2008-04-05Forward port new boot menu features from bochs bios.Kevin O'Connor1-11/+39
Support boot menu during last stage of post. Improve description of option roms. Support printf of "%.s" to force printing strings on stack. Enhance memcpy so that it also works in real-mode.
2008-03-29Cleanup boot order determination.Kevin O'Connor1-20/+9
Determining which device to boot from should not depend on CONFIG_CDROM_BOOT Instead, always use the cmos 0x38/0x3d for determining boot order.
2008-03-29Merge IPL segment into EBDA segment.Kevin O'Connor1-5/+5
It does not appear that IPL info needs to be at exactly 0x9ff00. Have IPL struct be part of ebda structure - it prevents unintended overlaps. Also, ATA structs don't need to be packed.
2008-03-22Breakout cdrom emulation support into CONFIG_CDROM_EMU.Kevin O'Connor1-0/+1
This allows one to support just booting from cdroms that don't require floppy/harddisk emulation.
2008-03-12Move ata_detect call to 32bit code.Kevin O'Connor1-11/+0
It's more natural to call the detect code from post. It does require some of the ATA support code be compiled in twice (once in 32bit mode and once in 16 bit), however that only leads to a small increase in total C code (~250 bytes).
2008-03-11Don't save/restore flags and ebp on external calls - saves on stack space.Kevin O'Connor1-1/+3
It isn't necessary to save ebp - just mark it as clobbered. The only important flag to save/restore is irqs - manually fixup all callers.
2008-03-09Fix booting logic on failure.Kevin O'Connor1-4/+11
Make sure we properly try next device on failures.
2008-03-08Minor cleanups.Kevin O'Connor1-0/+3
Improve some debugging messages. Minor code clean ups. Improve apmbios entry points (still untested).
2008-03-05Rename VISIBLE macro for better control.Kevin O'Connor1-4/+4
VISIBLE16 is used to mark functions externally available in 16bit code. VISIBLE32 is for 32bit functions.
2008-03-04Get CDROM emulation working.Kevin O'Connor1-4/+19
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.
2008-03-02Bug fixes; get mouse working.Kevin O'Connor1-1/+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.
2008-03-02Enhance included bios tables.Kevin O'Connor1-0/+5
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.
2008-03-01Make disk access work.Kevin O'Connor1-1/+1
Several bug fixes. Move ata_detect from disk.c to ata.c.
2008-02-29Initial support for ATA disks.Kevin O'Connor1-0/+2
2008-02-27Merge recent changes to bochs-bios CVS head.Kevin O'Connor1-2/+4
Slightly different order to rom-scanning.
2008-02-25Version 0.1.2rel-0.1.2Kevin O'Connor1-75/+139