Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/37008 )
Change subject: cpu/x86/smm: Add a helper function returning top of save state
......................................................................
cpu/x86/smm: Add a helper function returning top of save state
Some entries like smm base and smm revision have a fixed location in
the save w.r.t. the save state top.
Change-Id: I82dadcb966ee686c1652c7a1298dcb9938ae888c
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/cpu/x86/smm/smihandler.c
M src/cpu/x86/smm/smm_module_handler.c
M src/include/cpu/x86/smm.h
3 files changed, 21 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/08/37008/1
diff --git a/src/cpu/x86/smm/smihandler.c b/src/cpu/x86/smm/smihandler.c
index 20417d1..79a3936 100644
--- a/src/cpu/x86/smm/smihandler.c
+++ b/src/cpu/x86/smm/smihandler.c
@@ -132,6 +132,13 @@
return (void *)base;
}
+uint8_t *smm_get_save_state_top(int cpu)
+{
+ const uint32_t smm_base = 0xa0000;
+
+ return (uint8_t *)smm_base + SMM_ENTRY_OFFSET * 2 - (cpu * 0x400);
+}
+
/**
* @brief Interrupt handler for SMI#
*
diff --git a/src/cpu/x86/smm/smm_module_handler.c b/src/cpu/x86/smm/smm_module_handler.c
index bd4d48c..80bff9f 100644
--- a/src/cpu/x86/smm/smm_module_handler.c
+++ b/src/cpu/x86/smm/smm_module_handler.c
@@ -114,6 +114,19 @@
return base;
}
+uint8_t *smm_get_save_state_top(int cpu)
+{
+ uint8_t *base;
+
+ /* This function assumes all save states start at top of default
+ * SMRAM size space and are staggered down by save state size. */
+ base = (void *)smm_runtime->smbase;
+ base += SMM_DEFAULT_SIZE;
+ base -= cpu * smm_runtime->save_state_size;
+
+ return base;
+}
+
asmlinkage void smm_handler_start(void *arg)
{
const struct smm_module_params *p;
diff --git a/src/include/cpu/x86/smm.h b/src/include/cpu/x86/smm.h
index cf107b1..0ade970 100644
--- a/src/include/cpu/x86/smm.h
+++ b/src/include/cpu/x86/smm.h
@@ -94,6 +94,7 @@
/* Retrieve SMM save state for a given CPU. WARNING: This does not take into
* account CPUs which are configured to not save their state to RAM. */
void *smm_get_save_state(int cpu);
+uint8_t *smm_get_save_state_top(int cpu);
/* SMM Module Loading API */
--
To view, visit https://review.coreboot.org/c/coreboot/+/37008
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I82dadcb966ee686c1652c7a1298dcb9938ae888c
Gerrit-Change-Number: 37008
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-MessageType: newchange
Arthur Heymans has uploaded a new patch set (#26) to the change originally created by Rocky Phagura. ( https://review.coreboot.org/c/coreboot/+/46231 )
Change subject: soc/intel/xeon_sp: Enable SMI handler
......................................................................
soc/intel/xeon_sp: Enable SMI handler
SMI handler was not installed for Xeon_sp platforms. This enables SMM
relocation and SMI handling.
TESTED:
- SMRR are correctly set
- The save state revision is correct (0x00030101)
- SMI's are properly generated and handled
- SMM MSR save state are not supported, so relocate SMM on all cores
in series
- Verified on OCP/Deltalake mainboard.
NOTE:
- Code for accessing a CPU save state is not working for SMMLOADERV2,
so some SMM features like GSMI, SMMSTORE, updating the ACPI GNVS
pointer are not supported.
- This hooks up to some soc/intel/common like TCO and ACPI GNVS. GNVS
is broken and needs to be fixed separately. It is unknown if TCO is
supported. This might require a cleanup in the future.
Change-Id: Iabee5c72f0245ab988d477ac8df3d8d655a2a506
Signed-off-by: Rocky Phagura <rphagura(a)fb.com>
Signed-off-by: Christian Walter <christian.walter(a)9elements.com>
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/soc/intel/common/block/pmc/pmclib.c
M src/soc/intel/xeon_sp/Kconfig
M src/soc/intel/xeon_sp/Makefile.inc
M src/soc/intel/xeon_sp/cpx/Kconfig
M src/soc/intel/xeon_sp/cpx/Makefile.inc
M src/soc/intel/xeon_sp/cpx/cpu.c
M src/soc/intel/xeon_sp/include/soc/nvs.h
A src/soc/intel/xeon_sp/include/soc/smbus.h
A src/soc/intel/xeon_sp/include/soc/smmrelocate.h
M src/soc/intel/xeon_sp/skx/Kconfig
M src/soc/intel/xeon_sp/skx/Makefile.inc
M src/soc/intel/xeon_sp/skx/cpu.c
A src/soc/intel/xeon_sp/smihandler.c
A src/soc/intel/xeon_sp/smmrelocate.c
14 files changed, 226 insertions(+), 19 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/31/46231/26
--
To view, visit https://review.coreboot.org/c/coreboot/+/46231
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Iabee5c72f0245ab988d477ac8df3d8d655a2a506
Gerrit-Change-Number: 46231
Gerrit-PatchSet: 26
Gerrit-Owner: Rocky Phagura
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Christian Walter <christian.walter(a)9elements.com>
Gerrit-Reviewer: Eugene Myers <cedarhouse1(a)comcast.net>
Gerrit-Reviewer: Johnny Lin <Johnny_Lin(a)wiwynn.com>
Gerrit-Reviewer: Jonathan Zhang <jonzhang(a)fb.com>
Gerrit-Reviewer: Marc Jones <marc(a)marcjonesconsulting.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-CC: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-MessageType: newpatchset
Harshit Sharma has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/45118 )
Change subject: Documentation/releases: Add ASan to 4.13 relnotes
......................................................................
Documentation/releases: Add ASan to 4.13 relnotes
Change-Id: I2953729c69dfcfa8b34192b3e1623fdfad87ca3a
Signed-off-by: Harshit Sharma <harshitsharmajs(a)gmail.com>
---
M Documentation/releases/coreboot-4.13-relnotes.md
1 file changed, 9 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/18/45118/1
diff --git a/Documentation/releases/coreboot-4.13-relnotes.md b/Documentation/releases/coreboot-4.13-relnotes.md
index dcc8bf4..388d291 100644
--- a/Documentation/releases/coreboot-4.13-relnotes.md
+++ b/Documentation/releases/coreboot-4.13-relnotes.md
@@ -49,4 +49,13 @@
CPU threads as possible limited only by SMRAM space and not by 64K. By default
this loader version is disabled. Please see cpu/x86/Kconfig for more info.
+### Address Sanitizer
+
+coreboot now has an in-built Address Sanitizer, a runtime memory debugger
+designed to find out-of-bounds access and use-after-scope bugs. It is made
+available on all x86 platforms in ramstage and on QEMU i440fx, Intel Apollo
+Lake, and Haswell in romstage. Further, it can be enabled in romstage on other
+x86 platforms as well. Refer [ASan documentation](../technotes/asan.md) for
+more info.
+
### Add significant changes here
--
To view, visit https://review.coreboot.org/c/coreboot/+/45118
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I2953729c69dfcfa8b34192b3e1623fdfad87ca3a
Gerrit-Change-Number: 45118
Gerrit-PatchSet: 1
Gerrit-Owner: Harshit Sharma <harshitsharmajs(a)gmail.com>
Gerrit-MessageType: newchange
Arthur Heymans has uploaded a new patch set (#25) to the change originally created by Rocky Phagura. ( https://review.coreboot.org/c/coreboot/+/46231 )
Change subject: soc/intel/xeon_sp: Enable SMI handler
......................................................................
soc/intel/xeon_sp: Enable SMI handler
SMI handler was not installed for Xeon_sp platforms. This enables SMM
relocation and SMI handling.
TESTED:
- SMRR are correctly set
- The save state revision is correct (0x00030101)
- SMI's are properly generated and handled
- SMM save state MSR don't work, so relocate SMM on all cores in
series
- Verified on OCP/Deltalake mainboard.
NOTE:
- Code for accessing a CPU save state is not working for SMMLOADERV2
Change-Id: Iabee5c72f0245ab988d477ac8df3d8d655a2a506
Signed-off-by: Rocky Phagura <rphagura(a)fb.com>
Signed-off-by: Christian Walter <christian.walter(a)9elements.com>
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/soc/intel/common/block/pmc/pmclib.c
M src/soc/intel/xeon_sp/Kconfig
M src/soc/intel/xeon_sp/Makefile.inc
M src/soc/intel/xeon_sp/cpx/Kconfig
M src/soc/intel/xeon_sp/cpx/Makefile.inc
M src/soc/intel/xeon_sp/cpx/cpu.c
M src/soc/intel/xeon_sp/include/soc/nvs.h
A src/soc/intel/xeon_sp/include/soc/smbus.h
A src/soc/intel/xeon_sp/include/soc/smmrelocate.h
M src/soc/intel/xeon_sp/skx/Kconfig
M src/soc/intel/xeon_sp/skx/Makefile.inc
M src/soc/intel/xeon_sp/skx/cpu.c
A src/soc/intel/xeon_sp/smihandler.c
A src/soc/intel/xeon_sp/smmrelocate.c
14 files changed, 226 insertions(+), 19 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/31/46231/25
--
To view, visit https://review.coreboot.org/c/coreboot/+/46231
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Iabee5c72f0245ab988d477ac8df3d8d655a2a506
Gerrit-Change-Number: 46231
Gerrit-PatchSet: 25
Gerrit-Owner: Rocky Phagura
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Christian Walter <christian.walter(a)9elements.com>
Gerrit-Reviewer: Eugene Myers <cedarhouse1(a)comcast.net>
Gerrit-Reviewer: Johnny Lin <Johnny_Lin(a)wiwynn.com>
Gerrit-Reviewer: Jonathan Zhang <jonzhang(a)fb.com>
Gerrit-Reviewer: Marc Jones <marc(a)marcjonesconsulting.com>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-CC: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-MessageType: newpatchset