smmhandler: on i945..nehalem, crash if LAPIC overlaps with ASEG

This mitigates the Memory Sinkhole issue (described on by checking for the issue and
crashing the system explicitly if LAPIC overlaps ASEG.
This needs to happen without a data access (only code fetches) because
data accesses could be tampered with.

Don't try to recover because, if somebody tried to do shenanigans like
these, we have to expect more.
Sandybridge is safe because it does the same test in hardware, and
crashes. Newer chipsets presumably do the same.

This needs to be extended to deal with overlapping TSEG as well.

Change-Id: I508c0b10ab88779da81d18a94b08dcfeca6f5a6f
Signed-off-by: Patrick Georgi <>
Reviewed-by: Aaron Durbin <>
Tested-by: build bot (Jenkins)
2 files changed