| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The existing malloc implementation effectively uses a stack - all new
allocations come from the top of the stack. When allocating memory
with a large alignment, the pad used to align the new memory is
unavailable to other users. Also, memory released by calling free()
is only available to other users when all memory allocated after it is
also freed.
This new malloc scheme uses a first fit approach to finding available
memory. It makes it possible to use alignment padding and freed space
for new allocations.
This helps reduce the required memory in the permanent memory zones
(ZoneHigh and ZoneLow) where users have the need to allocate
structures with high alignment (eg, virtio and usb).
|
|
|
|
|
| |
There is no need for custom warnings for many common failures.
Introduce a common warning which is consistent and more visible.
|
|
|
|
| |
Omitting "void" leads to a K&R style declaration which was not intended.
|
|
|
|
|
|
| |
Add new "ramdisk" type for disk accesses.
Extract out high-mem finding code from pmm into find_high_area().
Fix bug in GDB_BASE and GDT_LIMIT macros (wrong bit shifts).
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
Delay coreboot bios table scan after memory scan and malloc setup is
complete.
Also, fix sign underflow in malloc memory available check.
Add check to ensure high bios area is big enough for zone.
Add more debug info to malloc setup/finalize.
|
| |
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
| |
Patch from Stefan Reinauer; modified by Kevin O'Connor.
|
| |
|
|
|
|
|
|
| |
Make code a little simpler.
This also fixes a corner-case where a hole could be incorrectly added
to the map.
|
|
|
|
| |
This makes sure ctrl-alt-delete doesn't leave left over settings.
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enhance layoutrom.py script to find and locate sections into fixed area.
Have layoutrom.py create output file instead of using redirect from make.
Don't use freespace2 for bios tables in f segment - freespace in fixed
area is now automatically filled.
Change checkrom script to test final_code16_end instead of _start -
this improves catching of alignment errors.
Don't align gdt to 8 bytes - it causes whole section to be aligned,
which causes entry point to be misaligned.
Explicitly reserve space for variables in fixed area so that the space
for them is not auto-filled.
|
|
|
|
|
|
|
|
| |
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).
|
| |
|
|
|
|
|
| |
Since .data isn't reset on a reboot, it's confusing to reset .bss.
Fixup all places that assumed .bss variables were reset.
|
|
|
|
|
|
|
| |
Allocate the e820 map space in the 0xf0000 segment and do all updates
in place. This reduces the need to access external memory during
post.
Also, move e820 pointer and count from ebda to variables in 0xf0000.
|
| |
|
|
|
|
|
|
| |
It's possible to build the final rom with a little LD magic - so use
that instead of the buildrom.py / defsyms.py method.
Also, rename all occurances of ".globl" to the more clear ".global".
|
|
|
|
|
| |
The rom16.o object will now have absolute (32bit applicable) addresses.
Replace several 0xf0000 and 0x10000 uses with CONFIG_BIOS_ADDR/SIZE macros.
|
| |
|
| |
|
|
|
|
|
|
| |
Declaring memory between 0xa0000 - 0x10000 confuses windows, so don't
do that.
Add capability to remove mappings in the memory mapping code.
|
|
|
|
|
| |
Two bordering e820 maps with the same memory type should merge into
one mapping of the type.
|
|
|