Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Rename functions to be more consistent and so they are not confused
with the normal timer functions.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Set the ZF flag to make sure the keyboard interrupt is actively
clearing it on a key event. This fixes a hang when CONFIG_BOOTMENU is
on and CONFIG_KEYBOARD is off.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
No code changes - just code movement.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Enable SeaBIOS to work on 386/486 machines that don't have CPUID
instruction.
Based on patch by Rudolf Marek.
Signed-off-by: Rudolf Marek <r.marek@assembler.cz>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Introduce function nullTrailingSpace() that nulls blank characters
from the end of a string. Use this function in the ATA, USB MSC, and
bootorder code.
|
|
|
|
|
|
This fixes a bug causing truncation of uncompressed files in
cbfs_copyfile().
|
|
|
|
It appears real machines sometimes have a flaky RTC, so avoid using
the RTC irq during boot. Instead, use a delay based on the standard
timer irq.
This also optimizes CONFIG_THREAD_OPTIONROMS users as it is no longer
necessary to use preemption - the wait_irq() call handles task
switching natively.
|
|
If wait_irq() is called from 32bit code, then jump to 16bit mode for
the wait.
Have wait_irq check for threads, and have it use yield if threads are
pending. This ensures threads aren't delayed if anything calls
wait_irq.
Use wait_irq() in 32bit mode during a failed boot.
|
|
When optionrom threading is enabled, allow hardware init to run in
parallel with boot menu key press delay and with the smp detection.
Also, run qemu_cfg_port_probe() before ram_probe().
|
|
The strtcpy function could overrun its output buffer.
|
|
Omitting "void" leads to a K&R style declaration which was not intended.
|
|
Prepare for support of segmented 32bit code.
Add new MODESEGMENT definition, and clarify existing 32bit mode defs.
|
|
When experimental support for parallelizing option roms and hardware
init (default disabled) is selected, add support for checking on
hardware init progress from the RTC irq handler.
Enable ability for RTC to be turned on for additional users.
Allow regular option roms (not just vga option roms) to run in
parallel with hardware init.
Don't use stack in transition32 / transition16 until new mode is
entered.
Also, cleanup leaking of data handlers in usb code.
Also, decrease frequency of iomemcpy checks (every 2K instead of 1K).
|
|
Move the threading and stack_hop code to a new file.
|
|
Fix potential issue of threads being incorrect if ctrl+alt+del is
pressed during POST.
|
|
Reading from IO memory (pci rom or flash) is very slow, so add
iomemcpy() which will yield during copy. Use a 4 byte copy to
optimize accesses.
Also, decompress cbfs data files from a temp memory buffer so that
ulzma doesn't read from slow IO memory.
|
|
Show the "thread id" on each debug message sent from a thread.
Also, cleanup translation dprintf() so it looks nicer withe thread output.
|
|
Enable system for running hardware initialization in parallel.
The yield() call can now round-robin between "threads".
Rework ata controller init to use a thread per controller.
Make sure internal drives are registered in a defined order.
Run keyboard initialization in a thread.
Rework usb init to use a thread per controller.
|
|
Add new function yield() which will permit irqs to trigger.
The yield() call enables irqs to occur in 32bit mode.
Add [num]sleep calls that yield instead of just spinning.
Rename existing int 1586 usleep call to biosusleep.
Convert many calls to mdelay to msleep.
|
|
Set most code paths to have interrupts on when calling 16bit code.
This fixes at least one optionrom that needed irqs on.
|
|
Introduce 'struct segoff_s' to more places.
|
|
Make sure %es is set before doing a "rep movs" call.
|
|
Add ASSERT16/ASSERT32 macros to farptr.h.
Use those macros in place of open-coded checks.
Add "noreturn" attribute to functions to reduce compiler warnings.
Add ASSERT32 to smp_probe() to eliminate 16bit assembler warnings.
|
|
Suppress __attribute__((externally_visible)) when no -fwhole-program
Add switch hack for compilers without -fno-jump-tables
Define memcpy() function (for compilers without -minline-all-stringops).
Define call16_simpint as a macro (a param needs to be inlined).
Make sure s3_resume is only defined in 32bit mode.
|
|
Use consistent types in mtrr.c.
Remove extra ';' from lds files.
Report found serial and lpt ports.
Remove extra newlines from inline asm.
Add memset_far and memset16_far functions.
|
|
Different gcc versions handle __builtin_memcpy differently.
Add -minline-all-string to force inlining of memcpy on old gcc.
Always use __builtin_memcpy for all memcpy calls.
Use memcpy4() for the option rom case where 4-byte accesses is important.
|
|
Use __builtin_memcpy on small strings (gcc can inline these well).
Use 4-byte copies when applicable - this is important when copying
option roms from slow PCI space.
|
|
The standard functions are better known and not harder to implement.
|
|
This moves the irq clear into transition32.
Also, disable nmi before loading gdt - this prevents a race with an nmi.
|
|
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.
|
|
Add code to search for roms in the "coreboot file system".
Change hardcode option rom detection to use vendor/deviceid instead of
bus/device/fn.
Move streq() function to generic place so cbfs functions can use it.
|
|
Always disable irqs at start of each entry point.
Be consistent with clearing direction flag after disabling interrupts.
|
|
The Ubuntu gcc compiler apparently miscompiles code when %ebp is in an
assembler clobber list.
Also, don't clobber %eax in transition32 - a minor cleanup.
|
|
This reduces the casts in calling code.
|
|
Don't panic (that turns off irqs), instead spin with irqs enabled.
|
|
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.
|
|
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.
|
|
Should be slightly more compatible with protected mode accesses.
|
|
The "flat" mode variants work in real mode, but will not work in
protected mode. So, replace with versions that take explicit
segments.
|
|
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".
|
|
Setting %ss/%esp in sequence is guaranteed to be atomic. So, always
set them in this order to ensure irqs and nmis see a consistent
stack.
|