aboutsummaryrefslogtreecommitdiff
path: root/src/misc.c
AgeCommit message (Collapse)AuthorFilesLines
2010-07-28Add FUNC16() helper macro for converting a 16bit func to a segoff_s.Kevin O'Connor1-1/+1
2010-07-25Minor - introduce GDT_GRANLIMIT macro.Kevin O'Connor1-4/+4
Add macro to improve readability of GDT limit definitions.
2010-07-25Avoid code addresses >64K in big real mode.Kevin O'Connor1-2/+2
Kvm has some limitations with code addresses in big real mode, so avoid doing that.
2010-01-04Add int1589 support.Kevin O'Connor1-1/+1
Int1589 switches into protected mode for the caller. Also, consistently use BUILD_BIOS_ADDR/SIZE in GDT macros.
2010-01-03Be sure to add "void" to all function prototypes that take no args.Kevin O'Connor1-3/+3
Omitting "void" leads to a K&R style declaration which was not intended.
2009-12-13Enhance experimental option rom "threading" - enable preemption.Kevin O'Connor1-5/+0
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).
2009-09-09Rename VAR16_32 to VAR16VISIBLE.Kevin O'Connor1-7/+7
Sometimes VAR16_32 is used to export a definition to assembler, so clarify its naming.
2009-08-10Add helper macros for defining GDT descriptors.Kevin O'Connor1-6/+6
2009-08-01Add Post Memory Manager (PMM) support.Kevin O'Connor1-1/+1
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.
2009-07-25Add malloc_high/fseg() and rework bios table creation to use them.Kevin O'Connor1-2/+1
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).
2009-03-07Register int02 handler (nmi); disable NMI by default.Kevin O'Connor1-3/+3
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.
2009-02-08Minor - rename BX_PANIC to panic.Kevin O'Connor1-1/+1
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-17Reserve space for buffers in f-segment; don't allocate from freespace.Kevin O'Connor1-0/+3
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.
2009-01-17Move variables from assembler to C code.Kevin O'Connor1-0/+193
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.