mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:57:45 +00:00
Kernel: Ignore an invalid QEMU multiboot entry
This was introduced in the QEMU commit 8504f12 and was causing the kernel to fail to boot on the q35 machine. Fixes #14952.
This commit is contained in:
parent
733a318709
commit
9665f41979
2 changed files with 12 additions and 7 deletions
|
@ -291,7 +291,18 @@ UNMAP_AFTER_INIT void MemoryManager::parse_memory_map()
|
||||||
global_data.physical_memory_ranges.append(PhysicalMemoryRange { PhysicalMemoryRangeType::Usable, start_address, length });
|
global_data.physical_memory_ranges.append(PhysicalMemoryRange { PhysicalMemoryRangeType::Usable, start_address, length });
|
||||||
break;
|
break;
|
||||||
case (MULTIBOOT_MEMORY_RESERVED):
|
case (MULTIBOOT_MEMORY_RESERVED):
|
||||||
global_data.physical_memory_ranges.append(PhysicalMemoryRange { PhysicalMemoryRangeType::Reserved, start_address, length });
|
#if ARCH(I386) || ARCH(X86_64)
|
||||||
|
// Workaround for https://gitlab.com/qemu-project/qemu/-/commit/8504f129450b909c88e199ca44facd35d38ba4de
|
||||||
|
// That commit added a reserved 12GiB entry for the benefit of virtual firmware.
|
||||||
|
// We can safely ignore this block as it isn't actually reserved on any real hardware.
|
||||||
|
// From: https://lore.kernel.org/all/20220701161014.3850-1-joao.m.martins@oracle.com/
|
||||||
|
// "Always add the HyperTransport range into e820 even when the relocation isn't
|
||||||
|
// done *and* there's >= 40 phys bit that would put max phyusical boundary to 1T
|
||||||
|
// This should allow virtual firmware to avoid the reserved range at the
|
||||||
|
// 1T boundary on VFs with big bars."
|
||||||
|
if (address != 0x000000fd00000000 || length != (0x000000ffffffffff - 0x000000fd00000000) + 1)
|
||||||
|
#endif
|
||||||
|
global_data.physical_memory_ranges.append(PhysicalMemoryRange { PhysicalMemoryRangeType::Reserved, start_address, length });
|
||||||
break;
|
break;
|
||||||
case (MULTIBOOT_MEMORY_ACPI_RECLAIMABLE):
|
case (MULTIBOOT_MEMORY_ACPI_RECLAIMABLE):
|
||||||
global_data.physical_memory_ranges.append(PhysicalMemoryRange { PhysicalMemoryRangeType::ACPI_Reclaimable, start_address, length });
|
global_data.physical_memory_ranges.append(PhysicalMemoryRange { PhysicalMemoryRangeType::ACPI_Reclaimable, start_address, length });
|
||||||
|
|
|
@ -121,11 +121,6 @@ if [ "$installed_major_version" -lt "$SERENITY_QEMU_MIN_REQ_MAJOR_VERSION" ] ||
|
||||||
die
|
die
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# https://github.com/SerenityOS/serenity/issues/14952
|
|
||||||
if [ "$installed_major_version" -ge 7 ] && [ "$installed_minor_version" -gt 0 ]; then
|
|
||||||
SERENITY_MACHINE_FORCE_VERSION_SEVEN_ZERO="-machine pc-i440fx-7.0"
|
|
||||||
fi
|
|
||||||
|
|
||||||
NATIVE_WINDOWS_QEMU="0"
|
NATIVE_WINDOWS_QEMU="0"
|
||||||
|
|
||||||
if command -v wslpath >/dev/null; then
|
if command -v wslpath >/dev/null; then
|
||||||
|
@ -267,7 +262,6 @@ if [ -z "$SERENITY_MACHINE" ]; then
|
||||||
SERENITY_MACHINE="-M raspi3b -serial stdio"
|
SERENITY_MACHINE="-M raspi3b -serial stdio"
|
||||||
else
|
else
|
||||||
SERENITY_MACHINE="
|
SERENITY_MACHINE="
|
||||||
$SERENITY_MACHINE_FORCE_VERSION_SEVEN_ZERO
|
|
||||||
-m $SERENITY_RAM_SIZE
|
-m $SERENITY_RAM_SIZE
|
||||||
-smp $SERENITY_CPUS
|
-smp $SERENITY_CPUS
|
||||||
-display $SERENITY_QEMU_DISPLAY_BACKEND
|
-display $SERENITY_QEMU_DISPLAY_BACKEND
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue