diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2014-06-05 11:08:44 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2014-06-05 11:08:44 -0400 |
commit | d71d52b495995f0587ee9242674feffcd8447de5 (patch) | |
tree | 1b86246ce736b67cd72d33e2cfa778795b250782 /src | |
parent | 67fd42cf16e6b16793eef2413b03e17f387611e2 (diff) | |
download | seabios-hppa-d71d52b495995f0587ee9242674feffcd8447de5.zip seabios-hppa-d71d52b495995f0587ee9242674feffcd8447de5.tar.gz seabios-hppa-d71d52b495995f0587ee9242674feffcd8447de5.tar.bz2 |
Make sure handle_smi() and handle_smp() are compiled out if not enabled.
Add CONFIG_ checks around the handle_smi/handle_smp functions.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/fw/smm.c | 2 | ||||
-rw-r--r-- | src/fw/smp.c | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/fw/smm.c b/src/fw/smm.c index c2ce5c3..ce95285 100644 --- a/src/fw/smm.c +++ b/src/fw/smm.c @@ -51,6 +51,8 @@ struct smm_layout { void VISIBLE32FLAT handle_smi(u16 cs) { + if (!CONFIG_USE_SMM) + return; u8 cmd = inb(PORT_SMI_CMD); struct smm_layout *smm = MAKE_FLATPTR(cs, 0); dprintf(DEBUG_HDL_smi, "handle_smi cmd=%x smbase=%p\n", cmd, smm); diff --git a/src/fw/smp.c b/src/fw/smp.c index a2df9de..a466ea6 100644 --- a/src/fw/smp.c +++ b/src/fw/smp.c @@ -49,6 +49,9 @@ int apic_id_is_present(u8 apic_id) void VISIBLE32FLAT handle_smp(void) { + if (!CONFIG_QEMU) + return; + // Enable CPU caching setcr0(getcr0() & ~(CR0_CD|CR0_NW)); |