diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2016-01-12 14:22:33 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2016-01-12 14:22:33 -0500 |
commit | a48f602c2099d3bd325729fe64e5b237d1b597f8 (patch) | |
tree | b7e4688da07656fc7bbf3b79de763899fe849108 /src/fw/shadow.c | |
parent | b837e68d5a6c1a5945513f1995875445a1594c8a (diff) | |
download | seabios-a48f602c2099d3bd325729fe64e5b237d1b597f8.tar.gz |
post: Always set HaveRunPost prior to setting any other global variable
The HaveRunPost flag controls whether post or reboot handling is
entered on a reset signal. The flag needs to be set before any other
global variable because an external reboot signal could occur at any
time. (If any global variable is modified prior to setting
HaveRunPost then the code might enter post with global variables in a
dirty state.)
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/fw/shadow.c')
-rw-r--r-- | src/fw/shadow.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/fw/shadow.c b/src/fw/shadow.c index 4486884b..bdb5c5ba 100644 --- a/src/fw/shadow.c +++ b/src/fw/shadow.c @@ -123,12 +123,14 @@ make_bios_writable(void) if (vendor == PCI_VENDOR_ID_INTEL && device == PCI_DEVICE_ID_INTEL_82441) { make_bios_writable_intel(bdf, I440FX_PAM0); + code_mutable_preinit(); ShadowBDF = bdf; return; } if (vendor == PCI_VENDOR_ID_INTEL && device == PCI_DEVICE_ID_INTEL_Q35_MCH) { make_bios_writable_intel(bdf, Q35_HOST_BRIDGE_PAM0); + code_mutable_preinit(); ShadowBDF = bdf; return; } |