aboutsummaryrefslogtreecommitdiffstats
path: root/src/sercon.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2022-08-31 08:27:33 +0200
committerGerd Hoffmann <kraxel@redhat.com>2023-08-24 10:56:21 +0200
commit90eeb0c8558a1524836ec94aee11f4cc88b10c78 (patch)
tree6ee2035cd16180a196e6e719a31babcb6cae6bd5 /src/sercon.c
parentbe84867613f791ea344d565d65a9ce85238e8533 (diff)
downloadseabios-90eeb0c8558a1524836ec94aee11f4cc88b10c78.tar.gz
detect physical address space size
Check for pae and long mode using cpuid. If present also read the physical address bits. Apply some qemu sanity checks (see below). Record results in PhysBits and LongMode variables. In case we are not sure what the address space size is leave the PhysBits variable unset. On qemu we have the problem that for historical reasons x86_64 processors advertise 40 physical address space bits by default, even in case the host supports less than that so actually using the whole address space will not work. Because of that the code applies some extra sanity checks in case we find 40 (or less) physical address space bits advertised. Only known-good values (which is 40 for amd processors and 36+39 for intel processors) will be accepted as valid. Recommendation is to use 'qemu -cpu ${name},host-phys-bits=on' to advertise valid physical address space bits to the guest. Some distro builds enable this by default, and most likely the qemu default will change in near future too. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'src/sercon.c')
0 files changed, 0 insertions, 0 deletions