| 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).
|
| |
|
|
|
|
|
| |
Moving the ebda while an optionrom is running could confuse it. So,
avoid doing that.
|
|
|
|
| |
Omitting "void" leads to a K&R style declaration which was not intended.
|
|
|
|
|
|
|
|
|
| |
Create a new code blob (code32seg) with support for 32bit functions
that need to utilize explicit segment accesses.
This code blob uses global variables relative to %gs and with a
dynamic code offset (determined by get_global_offset()).
Add BIOS32 structure and code.
Add code for 32bit PCI BIOS code.
|
|
|
|
| |
Extract out addr32 to a parameter to the READx/WRITEx_SEG macros.
|
|
|
|
|
| |
Prepare for support of segmented 32bit code.
Add new MODESEGMENT definition, and clarify existing 32bit mode defs.
|
|
|
|
|
|
| |
On coreboot, the unused parts of the f-segment could contain leftover
bios tables which may confuse an OS. So clear unused parts of
f-segment.
|
|
|
|
|
| |
The pmm based allocations are used for internal allocations now, so be
sure to do a full reset even if external PMM not configured.
|
|
|
|
|
|
| |
Using pmm_malloc permits free() to be used on internal allocations.
Rework low zone expanding so that it doesn't cause gcc v4.3 error.
Allow pmm_malloc to use ZoneTmpLow if ZoneTmpHigh isn't available.
|
|
|
|
|
|
| |
For some unknown reason, the 16bit version of low memory expansion is
confusing gcc4.3. For now, just disable it as it isn't used in
practice.
|
|
|
|
|
| |
Support pmm style permanent low-memory allocations.
When used, relocate ebda and store permanent memory at top of 640K.
|
|
|
|
|
|
| |
Fix bug where zones over 2gig may fail to allocate.
Add memalign_high() and use for acpi facs allocation.
Misc code cleanups.
|
|
|
|
|
| |
Support PCIv3 PMM requests for permanent memory.
Only support permanent high memory requests for now.
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
|
|
| |
Make sure not to divide by zero when calculating usage percent in
debug messages.
Make sure high memory zones are aligned; make sure zone is big enough
even after loss due to alignment.
Be sure to reset ZoneTmpHigh and PMMAllocs on failure paths.
Fix corner case in pmm_free() where an allocation might not get freed
due to ordering of pmmalloc_s structs.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 initial code for Post Memory Manager - it's just the stubs for now.
Also, fix PnP entry point not clearing irqs and direction flags.
|