Name of user not set #1002358 has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33236
Change subject: src/cpu/x86 STM Support
......................................................................
src/cpu/x86 STM Support
STM initialization
Change-Id: I3a0adcefc0f6e22a9da5fe53952481a77737e5eb
---
M src/cpu/x86/mp_init.c
1 file changed, 25 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/36/33236/1
diff --git a/src/cpu/x86/mp_init.c b/src/cpu/x86/mp_init.c
index 3889c7d..881d8a2 100644
--- a/src/cpu/x86/mp_init.c
+++ b/src/cpu/x86/mp_init.c
@@ -37,8 +37,12 @@
#include <symbols.h>
#include <thread.h>
+#include <security/intel/stm/StmApi.h>
+
#define MAX_APIC_IDS 256
+extern int LoadStmImage(uint32_t mseg);
+
struct mp_callback {
void (*func)(void *);
void *arg;
@@ -823,6 +827,10 @@
{
size_t smm_save_state_size = mp_state.smm_save_state_size;
+#ifdef CONFIG_STM
+ uint32_t mseg;
+#endif
+
/* Do nothing if SMM is disabled.*/
if (!is_smm_enabled())
return;
@@ -839,6 +847,14 @@
printk(BIOS_ERR, "Unable to install SMM permanent handler.\n");
smm_disable();
}
+#ifdef CONFIG_STM
+
+ /* Calculate mseg location*/
+ mseg = mp_state.perm_smbase + (mp_state.perm_smsize - CONFIG_MSEG_SIZE);
+
+ /* Load the STM into the MSEG */
+ LoadStmImage(mseg);
+#endif
/* Ensure the SMM handlers hit DRAM before performing first SMI. */
wbinvd();
@@ -1023,6 +1039,15 @@
if (ops->get_smm_info != NULL)
ops->get_smm_info(&state->perm_smbase, &state->perm_smsize,
&state->smm_save_state_size);
+#ifdef CONFIG_STM
+
+ /* Currently, the CPU SMM save state size is based on a simplistic
+ * algorithm. (set it to 1K)
+ * note: In the future, this will need to handle newer x86 processors
+ * that require 32k alignment of the save state on 32K boundries.*/
+ state->smm_save_state_size += (sizeof(TXT_PROCESSOR_SMM_DESCRIPTOR) + 0x1000) & 0xfffff000;
+
+#endif /* CONFIG_STM */
/*
* Default to smm_initiate_relocation() if trigger callback isn't
--
To view, visit https://review.coreboot.org/c/coreboot/+/33236
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I3a0adcefc0f6e22a9da5fe53952481a77737e5eb
Gerrit-Change-Number: 33236
Gerrit-PatchSet: 1
Gerrit-Owner: Name of user not set #1002358
Gerrit-MessageType: newchange
Name of user not set #1002358 has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33235
Change subject: cpu/x86/smm/ STM Support
......................................................................
cpu/x86/smm/ STM Support
SMI Handler modifications needed to setup the STM data structures
Change-Id: I935cd5a8bc0bf293240324c2e3a04a655d44c69f
---
M src/cpu/x86/smm/smm_module_handler.c
M src/cpu/x86/smm/smm_module_loader.c
M src/cpu/x86/smm/smm_stub.S
M src/include/cpu/x86/smm.h
4 files changed, 92 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/35/33235/1
diff --git a/src/cpu/x86/smm/smm_module_handler.c b/src/cpu/x86/smm/smm_module_handler.c
index f9af965..26ddd66 100644
--- a/src/cpu/x86/smm/smm_module_handler.c
+++ b/src/cpu/x86/smm/smm_module_handler.c
@@ -18,6 +18,15 @@
#include <cpu/x86/smm.h>
#include <rmodule.h>
+#include <cpu/x86/msr.h>
+#include <cpu/x86/cache.h>
+
+#include <security/intel/stm/StmApi.h>
+#include <security/intel/stm/StmPlatformResource.h>
+#include <arch/acpi.h>
+#include <lib.h>
+#include <security/intel/stm/SmmStm.h>
+
#if IS_ENABLED(CONFIG_SPI_FLASH_SMM)
#include <spi-generic.h>
#endif
@@ -116,6 +125,10 @@
return base;
}
+#ifdef CONFIG_STM
+ static uint32_t MsegInit = 0; // used for STM/mseg initialization
+#endif
+
asmlinkage void smm_handler_start(void *arg)
{
const struct smm_module_params *p;
@@ -123,7 +136,16 @@
int cpu;
uintptr_t actual_canary;
uintptr_t expected_canary;
+#ifdef CONFIG_STM
+ int MsegInit2 = 1; // assume that the STM has been set
+ /* this initialzation strategy works on the assumption that all
+ * processors will enter SMM at generally the same time.
+ * If a single processor lags then a locking/counting scheme will
+ * need to be implemented. */
+ if (MsegInit == 0)
+ MsegInit2 = 0;
+#endif
p = arg;
runtime = p->runtime;
cpu = p->cpu;
@@ -140,9 +162,33 @@
"Invalid CPU number assigned in SMM stub: %d\n", cpu);
return;
}
+#ifdef CONFIG_STM
+ if (MsegInit == 0) {
+
+ /* Initialize the MSEG base address for each logical processor
+ * and indicate that there is an STM present */
+ msr_t InitMseg;
+ msr_t MsegChk;
+
+ InitMseg.lo = smm_runtime->mseg | IA32_SMM_MONITOR_VALID;
+ InitMseg.hi = 0;
+
+ wrmsr(IA32_SMM_MONITOR_CTL_MSR_INDEX, InitMseg);
+
+ MsegChk = rdmsr(IA32_SMM_MONITOR_CTL_MSR_INDEX);
+ console_init();
+
+ printk(BIOS_DEBUG, "MSEG Initialized (%d) 0x%08x 0x%08x\n",
+ cpu, MsegChk.hi, MsegChk.lo);
+ }
+
+#endif
/* Are we ok to execute the handler? */
if (!smi_obtain_lock()) {
+#ifdef CONFIG_STM
+ void *smbase = (void *) smm_runtime->smbase;
+#endif
/* For security reasons we don't release the other CPUs
* until the CPU with the lock is actually done */
while (smi_handler_status == SMI_LOCKED) {
@@ -150,13 +196,35 @@
".byte 0xf3, 0x90\n" /* PAUSE */
);
}
+#ifdef CONFIG_STM
+ if (MsegInit2 == 0) {
+
+ /* Setup an SMM Descriptor for this logical processor */
+ SetupSmmDescriptor(smbase, smm_runtime->save_state_size, cpu, smm_runtime->start32_offset);
+ MsegInit2 = 1;
+ }
+#endif
+ wbinvd();
return;
}
+#ifdef CONFIG_STM
+
+ if (MsegInit == 0) {
+ void *smbase = (void *) smm_runtime->smbase;
+
+ AddResourcesCmd();
+
+ /* Setup an SMM Descriptor for this logical processor */
+
+ SetupSmmDescriptor(smbase, smm_runtime->save_state_size, cpu,
+ smm_runtime->start32_offset);
+ MsegInit = 1; // flag that we are done
+ wbinvd(); // force the tables to memory
+ }
+#endif
smi_backup_pci_address();
-
console_init();
-
printk(BIOS_SPEW, "\nSMI# #%d\n", cpu);
/* Allow drivers to initialize variables in SMM context. */
diff --git a/src/cpu/x86/smm/smm_module_loader.c b/src/cpu/x86/smm/smm_module_loader.c
index 6c16645..4f15fdd 100644
--- a/src/cpu/x86/smm/smm_module_loader.c
+++ b/src/cpu/x86/smm/smm_module_loader.c
@@ -18,6 +18,7 @@
#include <cpu/x86/smm.h>
#include <cpu/x86/cache.h>
#include <console/console.h>
+#include <security/intel/stm/SmmStm.h>
#define FXSAVE_SIZE 512
@@ -268,6 +269,9 @@
stub_params->fxsave_area_size = FXSAVE_SIZE;
stub_params->runtime.smbase = (uintptr_t)smbase;
stub_params->runtime.save_state_size = params->per_cpu_save_state_size;
+
+ /* mseg is after the smi handler */
+ stub_params->runtime.mseg = (uint32_t) params->stack_top;
/* Initialize the APIC id to CPU number table to be 1:1 */
for (i = 0; i < params->num_concurrent_stacks; i++)
@@ -354,7 +358,13 @@
/* Stacks start at the top of the region. */
base = smram;
+
+#ifdef CONFIG_STM
+ base += size - CONFIG_MSEG_SIZE; // take out the mseg
+#else
base += size;
+#endif
+
params->stack_top = base;
/* SMM module starts at offset SMM_DEFAULT_SIZE with the load alignment
diff --git a/src/cpu/x86/smm/smm_stub.S b/src/cpu/x86/smm/smm_stub.S
index 59eb27c..3817424 100644
--- a/src/cpu/x86/smm/smm_stub.S
+++ b/src/cpu/x86/smm/smm_stub.S
@@ -46,6 +46,11 @@
.long 0
save_state_size:
.long 0
+mseg:
+.long 0
+/* allows the STM to bring up SMM in 32-bit mode*/
+start32_offset:
+.long smm_trampoline32 - _start
/* apic_to_cpu_num is a table mapping the default APIC id to CPU num. If the
* APIC id is found at the given index, the contiguous CPU number is index
* into the table. */
@@ -92,6 +97,10 @@
/* gdt selector 0x10, flat data segment */
.word 0xffff, 0x0000
.byte 0x00, 0x93, 0xcf, 0x00
+
+ /* gdt selector 0x18 tr segment */
+ .word 0xffff, 0x0000
+ .byte 0x00, 0x8b, 0x80, 0x00
smm_relocate_gdt_end:
.align 4
diff --git a/src/include/cpu/x86/smm.h b/src/include/cpu/x86/smm.h
index 576449d..b2d7445 100644
--- a/src/include/cpu/x86/smm.h
+++ b/src/include/cpu/x86/smm.h
@@ -512,6 +512,9 @@
struct smm_runtime {
u32 smbase;
u32 save_state_size;
+ u32 mseg;
+ /* used so that the STM can start the SMI handler in 32bit mode */
+ u32 start32_offset;
/* The apic_id_to_cpu provides a mapping from APIC id to CPU number.
* The CPU number is indicated by the index into the array by matching
* the default APIC id and value at the index. The stub loader
--
To view, visit https://review.coreboot.org/c/coreboot/+/33235
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I935cd5a8bc0bf293240324c2e3a04a655d44c69f
Gerrit-Change-Number: 33235
Gerrit-PatchSet: 1
Gerrit-Owner: Name of user not set #1002358
Gerrit-MessageType: newchange
Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/37335 )
Change subject: arch/x86: Drop romcc bootblock
......................................................................
arch/x86: Drop romcc bootblock
Change-Id: I79accbe1d5a554fea75fbd866995f385f718421a
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/arch/x86/Makefile.inc
D src/arch/x86/bootblock.ld
D src/arch/x86/bootblock_normal.c
D src/arch/x86/bootblock_romcc.S
D src/arch/x86/bootblock_simple.c
M src/arch/x86/car.ld
M src/arch/x86/memlayout.ld
M src/lib/Makefile.inc
8 files changed, 0 insertions(+), 242 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/35/37335/1
diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc
index 423c351..f553159 100644
--- a/src/arch/x86/Makefile.inc
+++ b/src/arch/x86/Makefile.inc
@@ -116,8 +116,6 @@
bootblock-y += id.S
$(call src-to-obj,bootblock,$(dir)/id.S): $(obj)/build.h
-ifneq ($(CONFIG_ROMCC_BOOTBLOCK),y)
-
bootblock-y += bootblock_crt0.S
ifeq ($(CONFIG_ARCH_BOOTBLOCK_X86_32),y)
@@ -128,59 +126,6 @@
bootblock-$(CONFIG_ARCH_BOOTBLOCK_X86_32) += walkcbfs.S
-else # ROMCC_BOOTBLOCK
-
-# x86-specific linker flags
-ifeq ($(CONFIG_ARCH_BOOTBLOCK_X86_32),y)
-LDFLAGS_bootblock += -m elf_i386 --oformat elf32-i386
-else
-LDFLAGS_bootblock += -m elf_x86_64 --oformat elf64-x86-64
-endif
-
-# Add the assembly file that pulls in the rest of the dependencies in
-# the right order. Make sure the auto generated bootblock.inc is a proper
-# dependency. Make the same true for the linker sript.
-bootblock-y += bootblock_romcc.S
-bootblock-y += walkcbfs.S
-$(call src-to-obj,bootblock,$(dir)/bootblock_romcc.S): $(objgenerated)/bootblock.inc
-
-bootblock-y += bootblock.ld
-$(call src-to-obj,bootblock,$(dir)/bootblock.ld): $(objgenerated)/bootblock.ld
-
-bootblock_romccflags := -mcpu=i386 -O2 -D__BOOTBLOCK__
-ifeq ($(CONFIG_SSE),y)
-bootblock_romccflags := -mcpu=k7 -mno-mmx -msse -O2 -D__BOOTBLOCK__
-endif
-
-# This is a hack in case there are no per chipset linker files.
-$(objgenerated)/empty: build-dirs
- touch $@
-
-$(objgenerated)/bootblock.ld: $$(filter-out $(call src-to-obj,bootblock,src/arch/x86/bootblock.ld), $$(filter %.ld,$$(bootblock-objs))) $(objgenerated)/empty
- @printf " GEN $(subst $(obj)/,,$(@))\n"
- cat $^ >> $@.tmp
- mv $@.tmp $@
-
--include $(objgenerated)/bootblock.inc.d
-$(objgenerated)/bootblock.inc: $(src)/arch/x86/$(subst ",,$(CONFIG_BOOTBLOCK_SOURCE)) $(objutil)/romcc/romcc $(OPTION_TABLE_H) $(KCONFIG_AUTOHEADER)
-# The open quote in the subst messes with syntax highlighting. Fix it - ")
- @printf " ROMCC $(subst $(obj)/,,$(@))\n"
- $(CC_bootblock) -D__ROMCC__ -D__BOOTBLOCK__ $(CPPFLAGS_bootblock) -MM -MT$(objgenerated)/bootblock.inc \
- $< > $(objgenerated)/bootblock.inc.d
- $(CC_bootblock) -D__ROMCC__ -D__BOOTBLOCK__ $(CPPFLAGS_bootblock) -E \
- $< -o $(objgenerated)/bootblock_romcc.c
- $(ROMCC) -c -S $(bootblock_romccflags) -I. $(CPPFLAGS_bootblock) $< -o $@
-
-# bootblock.ld is part of $(bootblock-objs)
-$(objcbfs)/bootblock.debug: $$(bootblock-objs)
- @printf " LINK $(subst $(obj)/,,$(@))\n"
- $(LD_bootblock) $(LDFLAGS_bootblock) -o $@ -L$(obj) \
- $(filter-out %.ld,$(bootblock-objs)) \
- -T $(call src-to-obj,bootblock,src/arch/x86/bootblock.ld)
-
-endif # ROMCC_BOOTBLOCK
-
-
endif # CONFIG_ARCH_BOOTBLOCK_X86_32 / CONFIG_ARCH_BOOTBLOCK_X86_64
###############################################################################
@@ -223,9 +168,7 @@
romstage-$(CONFIG_HAVE_ACPI_RESUME) += acpi_s3.c
# gdt_init.S is included by entry32.inc when romstage is the first C
# environment.
-ifneq ($(CONFIG_ROMCC_BOOTBLOCK),y)
romstage-y += gdt_init.S
-endif
romstage-y += cbmem.c
romstage-$(CONFIG_IDT_IN_EVERY_STAGE) += exception.c
romstage-$(CONFIG_IDT_IN_EVERY_STAGE) += idt.S
diff --git a/src/arch/x86/bootblock.ld b/src/arch/x86/bootblock.ld
deleted file mode 100644
index 10cd700..0000000
--- a/src/arch/x86/bootblock.ld
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-
-#include <arch/x86/failover.ld>
-#include <cpu/x86/16bit/entry16.ld>
-#include <cpu/x86/16bit/reset16.ld>
-#include <arch/x86/id.ld>
-#if CONFIG(CPU_INTEL_FIRMWARE_INTERFACE_TABLE)
-#include <cpu/intel/fit/fit.ld>
-#endif
-
-/* Include generated .ld files. */
-#include <generated/bootblock.ld>
diff --git a/src/arch/x86/bootblock_normal.c b/src/arch/x86/bootblock_normal.c
deleted file mode 100644
index 905ecb2..0000000
--- a/src/arch/x86/bootblock_normal.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-
-#include <smp/node.h>
-#include <arch/bootblock_romcc.h>
-#include <pc80/mc146818rtc.h>
-#include <halt.h>
-
-static const char *get_fallback(const char *stagelist)
-{
- while (*stagelist)
- stagelist++;
- return ++stagelist;
-}
-
-static void main(unsigned long bist)
-{
- u8 boot_mode;
- const char *default_filenames =
- "normal/romstage\0fallback/romstage";
-
- if (boot_cpu()) {
- bootblock_mainboard_init();
-
- sanitize_cmos();
-
- boot_mode = do_normal_boot();
- } else {
-
- /* Questionable single byte read from CMOS.
- * Do not add any other CMOS access in the
- * bootblock for AP CPUs.
- */
- boot_mode = boot_use_normal(cmos_read(RTC_BOOT_BYTE));
- }
-
- char *normal_candidate = (char *)walkcbfs("coreboot-stages");
-
- if (!normal_candidate)
- normal_candidate = default_filenames;
-
- unsigned long entry;
-
- if (boot_mode) {
- entry = findstage(normal_candidate);
- if (entry)
- call(entry, bist);
- }
-
- entry = findstage(get_fallback(normal_candidate));
- if (entry)
- call(entry, bist);
-
- /* duh. we're stuck */
- halt();
-}
diff --git a/src/arch/x86/bootblock_romcc.S b/src/arch/x86/bootblock_romcc.S
deleted file mode 100644
index 7d6f42f..0000000
--- a/src/arch/x86/bootblock_romcc.S
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-
-/*
- * This is the original bootblock used by coreboot on x86 systems. It contains
- * a monolithic code flow, assembled from the following stages:
- * - reset16.inc: the reset vector
- * - entry16.inc: protected mode setup
- * - entry32.inc: segment descriptor setup
- * - timestamp.inc: store TSC in MMX registers
- * - generated/bootblock.inc: ROMCC part of the bootblock
- *
- * This is used on platforms which select ROMCC_BOOTBLOCK, and it
- * tries to do the absolute minimum before walking CBFS and jumping to romstage.
- *
- * This file assembles the bootblock program by the order of the includes. Thus,
- * it's extremely important that one pays very careful attention to the order
- * of the includes.
- */
-
-#include <arch/x86/prologue.inc>
-#include <cpu/x86/16bit/entry16.inc>
-#include <cpu/x86/16bit/reset16.inc>
-#include <cpu/x86/32bit/entry32.inc>
-
-#include <arch/x86/timestamp.inc>
-
-#if CONFIG(SSE)
-#include <cpu/x86/sse_enable.inc>
-#endif
-
-/*
- * This bootblock.inc file is generated by ROMCC. The above program flow
- * falls through to this point. ROMCC assumes the last function it parsed
- * is the main function and it places its instructions at the beginning of
- * the generated file. Moreover, any library/common code needed in bootblock
- * needs to come after bootblock.inc.
- */
-#include <generated/bootblock.inc>
diff --git a/src/arch/x86/bootblock_simple.c b/src/arch/x86/bootblock_simple.c
deleted file mode 100644
index d161435..0000000
--- a/src/arch/x86/bootblock_simple.c
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- */
-
-#include <smp/node.h>
-#include <arch/bootblock_romcc.h>
-#include <pc80/mc146818rtc.h>
-#include <halt.h>
-
-static void main(unsigned long bist)
-{
- if (boot_cpu()) {
- bootblock_mainboard_init();
-
- sanitize_cmos();
-#if CONFIG(CMOS_POST)
- cmos_post_init();
-#endif
- }
-
- const char *target1 = "fallback/romstage";
- unsigned long entry;
- entry = findstage(target1);
- if (entry)
- call(entry, bist);
- halt();
-}
diff --git a/src/arch/x86/car.ld b/src/arch/x86/car.ld
index 483a908..05ab57f 100644
--- a/src/arch/x86/car.ld
+++ b/src/arch/x86/car.ld
@@ -36,11 +36,9 @@
/* Stack for CAR stages. Since it persists across all stages that
* use CAR it can be reused. The chipset/SoC is expected to provide
* the stack size. */
-#if !CONFIG(ROMCC_BOOTBLOCK)
_car_stack = .;
. += CONFIG_DCACHE_BSP_STACK_SIZE;
_ecar_stack = .;
-#endif
/* The pre-ram cbmem console as well as the timestamp region are fixed
* in size. Therefore place them above the car global section so that
* multiple stages (romstage and verstage) have a consistent
@@ -90,10 +88,6 @@
_ebss = .;
_car_unallocated_start = .;
-#if CONFIG(ROMCC_BOOTBLOCK)
- _car_stack = .;
- _ecar_stack = _car_region_end;
-#endif
_car_region_end = . + CONFIG_DCACHE_RAM_SIZE - (. - _car_region_start);
}
@@ -121,6 +115,4 @@
#if CONFIG(PAGING_IN_CACHE_AS_RAM)
_bogus2 = ASSERT(_pagetables == ALIGN(_pagetables, 4096), "_pagetables aren't 4KiB aligned");
#endif
-#if !CONFIG(ROMCC_BOOTBLOCK)
_bogus3 = ASSERT(CONFIG_DCACHE_BSP_STACK_SIZE > 0x0, "BSP stack size not configured");
-#endif
diff --git a/src/arch/x86/memlayout.ld b/src/arch/x86/memlayout.ld
index f8ae9f3..1e401a5 100644
--- a/src/arch/x86/memlayout.ld
+++ b/src/arch/x86/memlayout.ld
@@ -49,7 +49,6 @@
#include EARLY_MEMLAYOUT
#elif ENV_BOOTBLOCK
- /* arch/x86/bootblock.ld contains the logic for the ROMCC_BOOTBLOCK linking. */
BOOTBLOCK(0xffffffff - CONFIG_C_ENV_BOOTBLOCK_SIZE + 1,
CONFIG_C_ENV_BOOTBLOCK_SIZE)
diff --git a/src/lib/Makefile.inc b/src/lib/Makefile.inc
index b444ea3..748f55a 100644
--- a/src/lib/Makefile.inc
+++ b/src/lib/Makefile.inc
@@ -268,9 +268,7 @@
postcar-$(CONFIG_GENERIC_UDELAY) += timer.c
# Use program.ld for all the platforms which use C fo the bootblock.
-ifneq ($(CONFIG_ROMCC_BOOTBLOCK),y)
bootblock-y += program.ld
-endif
decompressor-y += program.ld
postcar-y += program.ld
--
To view, visit https://review.coreboot.org/c/coreboot/+/37335
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I79accbe1d5a554fea75fbd866995f385f718421a
Gerrit-Change-Number: 37335
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-MessageType: newchange
Kyösti Mälkki has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/31076
Change subject: [WIP] Move AGESA and apufw higher in CBFS
......................................................................
[WIP] Move AGESA and apufw higher in CBFS
Increases continuous free space in CBFS
from 5.8 MiB to 7.1 MiB.
Will not work with released binaryPI build
from 3rdparty/blobs.
Change-Id: I3c166102b8774499a0b21f212b5e8a66fe6c52eb
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
---
M src/southbridge/amd/pi/hudson/Makefile.inc
M src/vendorcode/amd/pi/Kconfig
2 files changed, 2 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/76/31076/1
diff --git a/src/southbridge/amd/pi/hudson/Makefile.inc b/src/southbridge/amd/pi/hudson/Makefile.inc
index 81fe7ff..57bad38 100644
--- a/src/southbridge/amd/pi/hudson/Makefile.inc
+++ b/src/southbridge/amd/pi/hudson/Makefile.inc
@@ -75,7 +75,7 @@
ifeq ($(CONFIG_AMDFW_OUTSIDE_CBFS),y)
HUDSON_FWM_POSITION=$(call int-add, $(call int-subtract, 0xffffffff $(CONFIG_ROM_SIZE)) 0x20000 1)
else
-HUDSON_FWM_POSITION=0xfff20000
+HUDSON_FWM_POSITION=0xfffa0000
endif
ifeq ($(CONFIG_HUDSON_PSP), y)
diff --git a/src/vendorcode/amd/pi/Kconfig b/src/vendorcode/amd/pi/Kconfig
index f463b7d..3dc7052 100644
--- a/src/vendorcode/amd/pi/Kconfig
+++ b/src/vendorcode/amd/pi/Kconfig
@@ -96,7 +96,7 @@
config AGESA_BINARY_PI_LOCATION
hex "AGESA PI binary address in ROM"
- default 0xFFE00000
+ default 0xFFF00000
depends on !AGESA_BINARY_PI_AS_STAGE
help
Specify the ROM address at which to store the binary Platform
--
To view, visit https://review.coreboot.org/c/coreboot/+/31076
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I3c166102b8774499a0b21f212b5e8a66fe6c52eb
Gerrit-Change-Number: 31076
Gerrit-PatchSet: 1
Gerrit-Owner: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-MessageType: newchange
Name of user not set #1002358 has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33985
Change subject: include/cpu/x86: Add STM Support
......................................................................
include/cpu/x86: Add STM Support
Addtions to cpu/x86 include for STM support.
Change-Id: I2b8e68b2928aefc7996b6a9560c52f71c7c0e1d0
---
M src/include/cpu/x86/msr.h
M src/include/cpu/x86/smm.h
2 files changed, 2 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/85/33985/1
diff --git a/src/include/cpu/x86/msr.h b/src/include/cpu/x86/msr.h
index d1e9169..c9d92a7 100644
--- a/src/include/cpu/x86/msr.h
+++ b/src/include/cpu/x86/msr.h
@@ -30,6 +30,7 @@
#define IA32_BIOS_SIGN_ID 0x8b
#define IA32_MPERF 0xe7
#define IA32_APERF 0xe8
+/* STM */
#define IA32_SMM_MONITOR_CTL_MSR 0x9B
#define IA32_SMM_MONITOR_VALID (1<<0)
#define IA32_MCG_CAP 0x179
diff --git a/src/include/cpu/x86/smm.h b/src/include/cpu/x86/smm.h
index b2d7445..3bd6e41 100644
--- a/src/include/cpu/x86/smm.h
+++ b/src/include/cpu/x86/smm.h
@@ -512,6 +512,7 @@
struct smm_runtime {
u32 smbase;
u32 save_state_size;
+ /* useg to get the mseg address into smm for setup */
u32 mseg;
/* used so that the STM can start the SMI handler in 32bit mode */
u32 start32_offset;
--
To view, visit https://review.coreboot.org/c/coreboot/+/33985
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I2b8e68b2928aefc7996b6a9560c52f71c7c0e1d0
Gerrit-Change-Number: 33985
Gerrit-PatchSet: 1
Gerrit-Owner: Name of user not set #1002358
Gerrit-MessageType: newchange
HAOUAS Elyes has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/36318 )
Change subject: {northbridge,soc,southbridge}: Get rid of wrong _ADR objects
......................................................................
{northbridge,soc,southbridge}: Get rid of wrong _ADR objects
ACPI Version 6.3 Section 6.1: "A device object must contain either an _HID
object or an _ADR object, but should not contain both."
Change-Id: Ifb777c09aeef09a6a4cbee254b081519f5b6c457
Signed-off-by: Elyes HAOUAS <ehaouas(a)noos.fr>
---
M src/northbridge/amd/agesa/family14/acpi/northbridge.asl
M src/soc/amd/stoneyridge/acpi/northbridge.asl
M src/soc/intel/broadwell/acpi/serialio.asl
M src/soc/intel/fsp_broadwell_de/acpi/uncore.asl
M src/southbridge/intel/lynxpoint/acpi/serialio.asl
5 files changed, 0 insertions(+), 19 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/18/36318/1
diff --git a/src/northbridge/amd/agesa/family14/acpi/northbridge.asl b/src/northbridge/amd/agesa/family14/acpi/northbridge.asl
index e95c95a..5a54874 100644
--- a/src/northbridge/amd/agesa/family14/acpi/northbridge.asl
+++ b/src/northbridge/amd/agesa/family14/acpi/northbridge.asl
@@ -18,7 +18,6 @@
External (TOM2)
Name(_HID, EISAID("PNP0A08")) /* PCI Express Root Bridge */
Name(_CID, EISAID("PNP0A03")) /* PCI Root Bridge */
-Name(_ADR, 0x00180000) /* Dev# = BSP Dev#, Func# = 0 */
/* Describe the Northbridge devices */
Device(AMRT) {
diff --git a/src/soc/amd/stoneyridge/acpi/northbridge.asl b/src/soc/amd/stoneyridge/acpi/northbridge.asl
index fe78534..208ea26 100644
--- a/src/soc/amd/stoneyridge/acpi/northbridge.asl
+++ b/src/soc/amd/stoneyridge/acpi/northbridge.asl
@@ -19,7 +19,6 @@
External (TOM2)
Name(_HID, EISAID("PNP0A08")) /* PCI Express Root Bridge */
Name(_CID, EISAID("PNP0A03")) /* PCI Root Bridge */
-Name(_ADR, 0x00180000) /* Dev# = BSP Dev#, Func# = 0 */
/* Describe the Northbridge devices */
diff --git a/src/soc/intel/broadwell/acpi/serialio.asl b/src/soc/intel/broadwell/acpi/serialio.asl
index 1b44e95..1968502 100644
--- a/src/soc/intel/broadwell/acpi/serialio.asl
+++ b/src/soc/intel/broadwell/acpi/serialio.asl
@@ -159,7 +159,6 @@
// Serial IO DMA Controller
Name (_HID, "INTL9C60")
Name (_UID, 1)
- Name (_ADR, 0x00150000)
// BAR0 is assigned during PCI enumeration and saved into NVS
Name (RBUF, ResourceTemplate ()
@@ -205,7 +204,6 @@
Return ("INT33C2")
}
Name (_UID, 1)
- Name (_ADR, 0x00150001)
Name (SSCN, Package () { 432, 507, 30 })
Name (FMCN, Package () { 72, 160, 30 })
@@ -276,7 +274,6 @@
Return ("INT33C3")
}
Name (_UID, 1)
- Name (_ADR, 0x00150002)
Name (SSCN, Package () { 432, 507, 30 })
Name (FMCN, Package () { 72, 160, 30 })
@@ -347,7 +344,6 @@
Return ("INT33C0")
}
Name (_UID, 1)
- Name (_ADR, 0x00150003)
// BAR0 is assigned during PCI enumeration and saved into NVS
Name (RBUF, ResourceTemplate ()
@@ -403,7 +399,6 @@
Return ("INT33C1")
}
Name (_UID, 1)
- Name (_ADR, 0x00150004)
// BAR0 is assigned during PCI enumeration and saved into NVS
Name (RBUF, ResourceTemplate ()
@@ -471,7 +466,6 @@
Return ("INT33C4")
}
Name (_UID, 1)
- Name (_ADR, 0x00150005)
// BAR0 is assigned during PCI enumeration and saved into NVS
Name (RBUF, ResourceTemplate ()
@@ -539,7 +533,6 @@
Return ("INT33C5")
}
Name (_UID, 1)
- Name (_ADR, 0x00150006)
// BAR0 is assigned during PCI enumeration and saved into NVS
Name (RBUF, ResourceTemplate ()
@@ -596,7 +589,6 @@
}
Name (_CID, "PNP0D40")
Name (_UID, 1)
- Name (_ADR, 0x00170000)
// BAR0 is assigned during PCI enumeration and saved into NVS
Name (RBUF, ResourceTemplate ()
diff --git a/src/soc/intel/fsp_broadwell_de/acpi/uncore.asl b/src/soc/intel/fsp_broadwell_de/acpi/uncore.asl
index 86b1410..aded1db 100644
--- a/src/soc/intel/fsp_broadwell_de/acpi/uncore.asl
+++ b/src/soc/intel/fsp_broadwell_de/acpi/uncore.asl
@@ -238,7 +238,6 @@
Return (0xff)
}
- Name (_ADR, 0x00)
Method (_STA, 0, NotSerialized)
{
Return (0xf)
diff --git a/src/southbridge/intel/lynxpoint/acpi/serialio.asl b/src/southbridge/intel/lynxpoint/acpi/serialio.asl
index 9323b91..88138a1 100644
--- a/src/southbridge/intel/lynxpoint/acpi/serialio.asl
+++ b/src/southbridge/intel/lynxpoint/acpi/serialio.asl
@@ -125,7 +125,6 @@
// Serial IO DMA Controller
Name (_HID, "INTL9C60")
Name (_UID, 1)
- Name (_ADR, 0x00150000)
// BAR0 is assigned during PCI enumeration and saved into NVS
Name (RBUF, ResourceTemplate ()
@@ -163,7 +162,6 @@
Name (_HID, "INT33C2")
Name (_CID, "INT33C2")
Name (_UID, 1)
- Name (_ADR, 0x00150001)
Name (SSCN, Package () { 432, 507, 30 })
Name (FMCN, Package () { 72, 160, 30 })
@@ -245,7 +243,6 @@
Name (_HID, "INT33C3")
Name (_CID, "INT33C3")
Name (_UID, 1)
- Name (_ADR, 0x00150002)
Name (SSCN, Package () { 432, 507, 30 })
Name (FMCN, Package () { 72, 160, 30 })
@@ -327,7 +324,6 @@
Name (_HID, "INT33C0")
Name (_CID, "INT33C0")
Name (_UID, 1)
- Name (_ADR, 0x00150003)
// BAR0 is assigned during PCI enumeration and saved into NVS
Name (RBUF, ResourceTemplate ()
@@ -365,7 +361,6 @@
Name (_HID, "INT33C1")
Name (_CID, "INT33C1")
Name (_UID, 1)
- Name (_ADR, 0x00150004)
// BAR0 is assigned during PCI enumeration and saved into NVS
Name (RBUF, ResourceTemplate ()
@@ -416,7 +411,6 @@
Name (_HID, "INT33C4")
Name (_CID, "INT33C4")
Name (_UID, 1)
- Name (_ADR, 0x00150005)
// BAR0 is assigned during PCI enumeration and saved into NVS
Name (RBUF, ResourceTemplate ()
@@ -467,7 +461,6 @@
Name (_HID, "INT33C5")
Name (_CID, "INT33C5")
Name (_UID, 1)
- Name (_ADR, 0x00150006)
// BAR0 is assigned during PCI enumeration and saved into NVS
Name (RBUF, ResourceTemplate ()
@@ -505,7 +498,6 @@
Name (_HID, "INT33C6")
Name (_CID, "PNP0D40")
Name (_UID, 1)
- Name (_ADR, 0x00170000)
// BAR0 is assigned during PCI enumeration and saved into NVS
Name (RBUF, ResourceTemplate ()
--
To view, visit https://review.coreboot.org/c/coreboot/+/36318
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ifb777c09aeef09a6a4cbee254b081519f5b6c457
Gerrit-Change-Number: 36318
Gerrit-PatchSet: 1
Gerrit-Owner: HAOUAS Elyes <ehaouas(a)noos.fr>
Gerrit-MessageType: newchange