Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/36977 )
Change subject: cpu/x86/smm: Remove usused Kconfig symbol
......................................................................
cpu/x86/smm: Remove usused Kconfig symbol
These platforms now use parallel mp.
Change-Id: I73527a7feb6151d765295d6449262a2852b30177
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/cpu/x86/Kconfig
M src/cpu/x86/smm/smmhandler.S
2 files changed, 0 insertions(+), 37 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/77/36977/1
diff --git a/src/cpu/x86/Kconfig b/src/cpu/x86/Kconfig
index 85ebd83..5004cfd 100644
--- a/src/cpu/x86/Kconfig
+++ b/src/cpu/x86/Kconfig
@@ -137,13 +137,6 @@
endif
-config SMM_LAPIC_REMAP_MITIGATION
- bool
- default y if NORTHBRIDGE_INTEL_I945
- default y if NORTHBRIDGE_INTEL_GM45
- default y if NORTHBRIDGE_INTEL_NEHALEM
- default n
-
config SERIALIZED_SMM_INITIALIZATION
bool
default n
diff --git a/src/cpu/x86/smm/smmhandler.S b/src/cpu/x86/smm/smmhandler.S
index a2be7f2..6e8941e 100644
--- a/src/cpu/x86/smm/smmhandler.S
+++ b/src/cpu/x86/smm/smmhandler.S
@@ -75,36 +75,6 @@
#endif
.global smm_handler_start
smm_handler_start:
-#if CONFIG(SMM_LAPIC_REMAP_MITIGATION)
- /* Check if the LAPIC register block overlaps with SMM.
- * This block needs to work without data accesses because they
- * may be routed into the LAPIC register block.
- * Code accesses, on the other hand, are never routed to LAPIC,
- * which is what makes this work in the first place.
- */
- mov $LAPIC_BASE_MSR, %ecx
- rdmsr
- and $(~0xfff), %eax
- sub $(SMM_START), %eax
- cmp $(SMM_END - SMM_START), %eax
- ja untampered_lapic
-1:
- /* emit "Crash" on serial */
- mov $(CONFIG_TTYS0_BASE), %dx
- mov $'C', %al
- out %al, (%dx)
- mov $'r', %al
- out %al, (%dx)
- mov $'a', %al
- out %al, (%dx)
- mov $'s', %al
- out %al, (%dx)
- mov $'h', %al
- out %al, (%dx)
- /* now crash for real */
- ud2
-untampered_lapic:
-#endif
movw $(smm_gdtptr16 - smm_handler_start + SMM_HANDLER_OFFSET), %bx
lgdtl %cs:(%bx)
--
To view, visit https://review.coreboot.org/c/coreboot/+/36977
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I73527a7feb6151d765295d6449262a2852b30177
Gerrit-Change-Number: 36977
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-MessageType: newchange
Xiang Wang has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/37130 )
Change subject: arch/riscv: Add error detection for supports_extension
......................................................................
arch/riscv: Add error detection for supports_extension
Change-Id: I5df3d82b9a9b4968beea6040b86628b58fd8a45d
Signed-off-by: Xiang Wang <merle(a)hardenedlinux.org>
---
M src/arch/riscv/include/arch/cpu.h
1 file changed, 8 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/30/37130/1
diff --git a/src/arch/riscv/include/arch/cpu.h b/src/arch/riscv/include/arch/cpu.h
index 72a8a69..dd70af7 100644
--- a/src/arch/riscv/include/arch/cpu.h
+++ b/src/arch/riscv/include/arch/cpu.h
@@ -49,7 +49,7 @@
* */
int soc_supports_extension(char ext);
-static inline int supports_extension(char ext)
+static inline int supports_extension_imp(char ext)
{
uintptr_t isa = read_csr(misa);
if (isa)
@@ -58,6 +58,13 @@
return soc_supports_extension(ext);
}
+#define supports_extension(c)\
+({\
+ _Static_assert(((c >= 'A') && (c <= 'Z')),\
+ "The parameter of supports_extension must be [A-Z]");\
+ supports_extension_imp(c);\
+})
+
/* If the SOC does not implement misa, the read misa will be zero.
* Such SOC requires a non-standard mechanism to detect machine XLEN.
* If the soc does not implement misa, implement this function.
--
To view, visit https://review.coreboot.org/c/coreboot/+/37130
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I5df3d82b9a9b4968beea6040b86628b58fd8a45d
Gerrit-Change-Number: 37130
Gerrit-PatchSet: 1
Gerrit-Owner: Xiang Wang <merle(a)hardenedlinux.org>
Gerrit-MessageType: newchange