diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2015-08-03 10:16:39 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2015-08-04 10:05:27 -0400 |
commit | 9ee2e26255661a191b0ff9fa276d545ce59845c2 (patch) | |
tree | 8564d77212df28afda37beec4616d7807f923400 /src/config.h | |
parent | 4c6de9ef3f67020d28d57822bb824312e67a31c4 (diff) | |
download | seabios-9ee2e26255661a191b0ff9fa276d545ce59845c2.tar.gz |
mptable: Don't create mptable if it is very large
Very large mptable structures can fill up the space in the f-segment
and cause other important f-segment allocations to fail. Limit the
maximum size of the mptable to prevent this.
On QEMU, with the current maximum size of 600 bytes, the mptable will
not be created in configurations of ~20 cpus or more. The mptable is
rarely used in modern OSes so this should not be a problem.
Reported-by: Huaitong Han <huaitong.han@intel.com>
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/config.h')
-rw-r--r-- | src/config.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/config.h b/src/config.h index 4bfebe83..6c47f161 100644 --- a/src/config.h +++ b/src/config.h @@ -22,6 +22,8 @@ #define BUILD_MAX_EXTDRIVE 16 // Number of bytes the smbios may be and still live in the f-segment #define BUILD_MAX_SMBIOS_FSEG 600 +// Maximum number of bytes the mptable may be and still be copied to f-segment +#define BUILD_MAX_MPTABLE_FSEG 600 #define BUILD_MODEL_ID 0xFC #define BUILD_SUBMODEL_ID 0x00 |