| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
malloc_high() cannot allocate any memory in CSM mode due to an empty
ZoneHigh. SeaBIOS cannot find any disk to boot from because device
initialization fails.
The bug was introduced in 1.16.1 (commit dc88f9b) when the meaning of
BUILD_MAX_HIGHTABLE changed but CSM code was not updated. This patch
reverts to the previous behavior by using BUILD_MIN_HIGHTABLE in CSM
methods.
Signed-off-by: José Martínez <xose@google.com>
|
|
|
|
|
|
| |
In case there is enough memory installed use a large ZoneHigh.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Use the variable highram_size instead of the BUILD_MAX_HIGHTABLE #define
for the ZoneHigh size. Initialize the new variable with the old #define,
so behavior does not change.
This allows to easily adjust the ZoneHigh size at runtime in a followup
patch.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Use a macro to define and obtain the value of a symbol introduced by
the linker scripts (scripts/layoutrom.py).
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
| |
Consistently use 'u32' for physical addresses and pointers for virtual
addresses in the malloc code. Introduce and use memremap() where a
physical address needs to be converted to a virtual address. Use
virt_to_phys() for the inverse.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Introduce helper for finding temp space to hold an "allocation detail
struct" and use it in both alloc_add() and _malloc().
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
Use the "alloc_" prefix for all the low-level allocation functions and
avoid camelCase naming.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
| |
Rename memmap.c to e820map.c as the code in that file only deals with
maintaining the e820 map. Move all the e820 definitions to new file
e820map.h and use a consistent "e820_" prefix on all exported
functions.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
| |
The E820_HOLE definition is used internally in the e820 manipulation
code to remove entries from the e820 map. Introduce the e820_remove()
function so that the E820_HOLE definition does not need to be exported
from the memmap.c code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
| |
The PMM handle argument will almost always be 0xffffffff. Use
separate code for the few rare cases where it may not be the default
value. Gcc produces better code if _malloc() only requires three
parameters.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current code does not boot on QEMU with 256K roms when code
relocation is disabled, because QEMU only maps the last 128K of the
rom to low memory. The seabios make_bios_writable() call copies the
full rom to low memory.
This patch separates out the init sections even if code relocations
are disabled. This effectively ensures that make_bios_writable() code
is in the last 128K of the rom.
This also introduces a new build symbol (final_readonly_start) which
stores the address of where the final runtime read-only memory begins.
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>
|
|
|
|
|
|
| |
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>
|