| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
Redirect int10 calls to serial console output.
Parse serial input and queue key events.
The serial console can work both as primary display
and in parallel to another vga display (splitmode).
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
|
|
| |
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
| |
Update the layoutrom.py build script so that fixed address sections
can come from the 32bit compiled C code. Update the C code so that
all VAR16FIXED variables instead use the new VARFSEGFIXED which is
defined in 32bit mode.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
There is no indication that the address 0xff00 is a BIOS standard, so
don't emit the old Bochs copyright string at that fixed address.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
| |
Modify the int 1587 handler to check if the POST phase is still
running. If it is, use bigreal mode segment limits so that the caller
remains in bigreal mode when the 1587 handler completes. This helps
with SeaVGABIOS' use of "direct" framebuffer accesses (an option rom
may attempt to display text during its option rom execution which can
cause SeaVGABIOS to make the int 1587 calls).
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Move the inb(), insb(), etc. code from ioport.h to x86.h. Move the
PORT_* definitions to their appropriate hardware files.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
| |
Also, sort the order of include files in the c files.
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>
|
|
|
|
|
|
| |
Move many C files from the src/ directory to the new src/hw/ directory.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Preface PIC functions with a pic_ to provide a more consistent
naming.
Convert the irqmask code to a more consistent
pic_irqmask_read/write/mask form.
Move code from pic.h to pic.c.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Rename remaining "build" settings in config.h that used the CONFIG_
prefix to use a BUILD_ prefix.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
| |
Calculate a LegacyRamSize directly from the e820 map for use by
handle_1588() and handle_15e801() (the only two external interfaces
that require "RamSize"). All other users of the existing RamSize (and
RamSizeOver4G) variables are specific to QEMU, so move the
declarations to paravirt.c.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
| |
Convert all users of the alternative variable exports to VARFSEG.
There isn't a significant distinction between the existing types of
exports, so it's simpler to just use one type going forward.
The new VARFSEG declaration is only emitting when in 32bit mode, so
update and move some variables as needed.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Introduce standard for performing and inspecting the run-time
detection of para-virtualized environments.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The POST phase has to invoke many initialization functions, and these
functions can have complex inter-dependencies. Try to categorize the
functions into 4 classes:
preinit - functions called very early in POST where function ordering
is very important and the code has limited access to other
interfaces.
init - functions that initialize internal interfaces and standard
external interfaces. This code is generally not dependent on
particular hardware and typically does not communicate directly
with any hardware devices.
setup - functions which access hardware or are dependent on particular
hardware or platform devices.
prepboot - functions that finalize internal interfaces and that
prepare for the boot phase.
This patch attempts to normalize the suffixes - functions that used
_init(), _setup(), _finalize(), or similar that did not follow the
above pattern were renamed. Other than function name changes, there
should be no code impact to this patch.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Remove these infrequently used macros and replace with explicit
GET_BDA/SET_BDA calls.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The winxp boot loader does something curious - it sets an int 0x1c
handler, records the stack location, and then spins in place with irqs
enabled. The 0x1c handler alters the memory just past the stack
pointer so that when the timer irq returns the code jumps to a new
location and stop spinning. The winxp code relies on the fact that a
hw irq will always place 6 bytes at a specific location and that it
can alter those bytes.
The ecdc655a patch does a full backup/restore of the register state.
Unfortunately, the restore overwrites the changes made by the winxp
0x1c handler.
This patch reverts much of ecdc655a. Hardware irqs are still handled
on the extra stack, but only the essential register state is backed up
and restored.
Also, stack_hop_back is changed to only use %sp when changing states -
this enables the entry code to store just %esp instead of both %esp
and %sp.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Jump into the extra stack for all hardware irq handlers. This reduces
the overall stack requirements of SeaBIOS.
Replace all users of call16_simpint with call16_int. Only the
hardware irq handlers used the old call, and they need to use the new
call to ensure the extra stack is properly re-entrant.
Also, pass in a 'struct bregs' to the hardware irq handlers now. It
was not done previously to save stack space. Now that the extra stack
is used, that is no longer an issue.
Note that should an old OS invoke a hardware irq in 16bit protected
mode, then this patch could break that OS. However, the chances of
this causing a regression seem small as several existing hardware irq
handlers already do not work in 16bit protected mode.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
| |
|
|
|
|
| |
Add macro to improve readability of GDT limit definitions.
|
|
|
|
|
| |
Kvm has some limitations with code addresses in big real mode, so
avoid doing that.
|
|
|
|
|
| |
Int1589 switches into protected mode for the caller.
Also, consistently use BUILD_BIOS_ADDR/SIZE in GDT macros.
|
|
|
|
| |
Omitting "void" leads to a K&R style declaration which was not intended.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
| |
Sometimes VAR16_32 is used to export a definition to assembler, so
clarify its naming.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Complete the initial implementation of PMM.
Default new PMM code to be enabled.
Move malloc code from memmap.c to pmm.c.
Define new malloc zones for PMM (ZoneTmpLow and ZoneTmpHigh).
Change default READ/WRITE_SEG macros to use 32bit pointers (the 16bit
PMM code use "big real" mode and requires 32bit accesses).
Allow pmm allocations to occur during bcv executions also.
Add low-memory clearing before boot.
Also, align the default f-seg memory.
|
|
|
|
|
|
|
|
| |
Add malloc like functions for memory management instead of open-coding
memory reservation in all callers.
Add ability for unused high ram to be returned for general purpose use.
Break up acpi table creation into multiple functions.
Also, move smbios tables into high ram (instead of f-segment).
|
|
|
|
|
|
|
| |
Rename handle_nmi to handle_02 to be more consistent with other handlers.
Actually register handle_02.
Don't panic in nmi handler - just log by default.
Set the disable nmi bit when accessing the cmos index register.
|
| |
|
|
|
|
|
|
|
|
| |
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".
|
|
|
|
|
|
|
| |
Define the e820list as a regular array.
Define a buffer for run-time built bios tables.
Reserving the space in advance should help prevent run-time errors
when space becomes tight.
|
|
Define macro VAR16FIXED for declaring a variable at a fixed location.
Introduce new file src/misc.c, and move non int15 calls from system.c
to it.
Implement all fixed location variables in C code.
Move IDT/GDT defs to misc.c. Remove unused gdt entry 1.
|