Skip to content

Commit 00dd2b2

Browse files
mstsirkinmdroth
authored andcommitted
pc: leave more space for BIOS allocations
Since QEMU 2.1, we are allocating more space for ACPI tables, so no space is left after initrd for the BIOS to allocate memory. Besides ACPI tables, there are a few other uses of high memory in SeaBIOS: SMBIOS tables and USB drivers use it in particular. These uses allocate a very small amount of memory. Malloc metadata also lives there. So we need _some_ extra padding there to avoid initrd breakage, but not much. John Snow found a case where RHEL5 was broken by the recent change to ACPI_TABLE_SIZE; in his case 4KB of extra padding are fine, but just to be safe I am adding 32KB, which is roughly the same amount of padding that was left by QEMU 2.0 and earlier. Move initrd to leave some space for the BIOS. Cc: [email protected] Signed-off-by: Paolo Bonzini <[email protected]> Reported-by: John Snow <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]> (cherry picked from commit 438f92e) Signed-off-by: Michael Roth <[email protected]>
1 parent 80f4d02 commit 00dd2b2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

hw/i386/pc.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,10 @@
7272
#define DPRINTF(fmt, ...)
7373
#endif
7474

75-
/* Leave a chunk of memory at the top of RAM for the BIOS ACPI tables. */
76-
unsigned acpi_data_size = 0x20000;
75+
/* Leave a chunk of memory at the top of RAM for the BIOS ACPI tables
76+
* (128K) and other BIOS datastructures (less than 4K reported to be used at
77+
* the moment, 32K should be enough for a while). */
78+
unsigned acpi_data_size = 0x20000 + 0x8000;
7779
void pc_set_legacy_acpi_data_size(void)
7880
{
7981
acpi_data_size = 0x10000;

0 commit comments

Comments
 (0)