Arthur Heymans has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/27586 )
Change subject: cpu/intel: Configure IA32_FEATURE_CONTROL for alternative SMRR
......................................................................
Patch Set 26:
(1 comment)
https://review.coreboot.org/#/c/27586/26//COMMIT_MSG
Commit Message:
https://review.coreboot.org/#/c/27586/26//COMMIT_MSG@14
PS26, Line 14: the possibility to not lock VMX
> set_vmx_and_lock() is still called, just from somewhere else. […]
CONFIG_ENABLE_VMX is separate from CONFIG_SET_IA32_FC_LOCK_BIT.
The option to (not) lock VMX with CONFIG_SET_IA32_FC_LOCK_BIT is still there for CPU's not supporting SMRR or don't need the SMRR_ENABLE bit in IA32_FEATURE_CONTROL. It might be confusing however... Should I select CONFIG_SET_IA32_FC_LOCK_BIT in the CPU Kconfig?
--
To view, visit https://review.coreboot.org/c/coreboot/+/27586
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ia85602e75385e24ebded75e6e6dd38ccc969a76b
Gerrit-Change-Number: 27586
Gerrit-PatchSet: 26
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Mon, 14 Jan 2019 12:05:51 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-MessageType: comment
Patrick Georgi has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/26302 )
Change subject: arch/x86: Enforce CPU stack alignment
......................................................................
arch/x86: Enforce CPU stack alignment
When rmodule is loaded CPU stack alignment is only guaranteed
to 4kiB. Implementation of cpu_info() requires that each
CPU sees its stack aligned to CONFIG_STACK_SIZE.
Add one spare CPU for the stack reserve, such that alignment can
be enforced runtime.
Change-Id: Ie04956c64df0dc7bb156002d3d4f2629f92b340e
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Reviewed-on: https://review.coreboot.org/c/26302
Reviewed-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
---
M src/arch/x86/c_start.S
M src/cpu/x86/lapic/lapic_cpu_init.c
M src/cpu/x86/mp_init.c
3 files changed, 21 insertions(+), 17 deletions(-)
Approvals:
build bot (Jenkins): Verified
Stefan Reinauer: Looks good to me, approved
Aaron Durbin: Looks good to me, approved
diff --git a/src/arch/x86/c_start.S b/src/arch/x86/c_start.S
index 3fbdac1..86147ec 100644
--- a/src/arch/x86/c_start.S
+++ b/src/arch/x86/c_start.S
@@ -19,9 +19,11 @@
.global _stack
.global _estack
+/* Stack alignment is not enforced with rmodule loader, reserve one
+ * extra CPU such that alignment can be enforced on entry. */
.align CONFIG_STACK_SIZE
_stack:
-.space CONFIG_MAX_CPUS*CONFIG_STACK_SIZE
+.space (CONFIG_MAX_CPUS+1)*CONFIG_STACK_SIZE
_estack:
#if IS_ENABLED(CONFIG_COOP_MULTITASKING)
.global thread_stacks
@@ -70,8 +72,9 @@
rep
stosl
- /* set new stack */
+ /* Set new stack with enforced alignment. */
movl $_estack, %esp
+ andl $(~(CONFIG_STACK_SIZE-1)), %esp
#if IS_ENABLED(CONFIG_COOP_MULTITASKING)
/* Push the thread pointer. */
diff --git a/src/cpu/x86/lapic/lapic_cpu_init.c b/src/cpu/x86/lapic/lapic_cpu_init.c
index 4498b97..7daca0a 100644
--- a/src/cpu/x86/lapic/lapic_cpu_init.c
+++ b/src/cpu/x86/lapic/lapic_cpu_init.c
@@ -263,8 +263,8 @@
int start_cpu(struct device *cpu)
{
struct cpu_info *info;
- unsigned long stack_end;
- unsigned long stack_base;
+ uintptr_t stack_top;
+ uintptr_t stack_base;
unsigned long apicid;
unsigned int index;
unsigned long count;
@@ -278,23 +278,23 @@
/* Get an index for the new processor */
index = ++last_cpu_index;
- /* Find end of the new processor's stack */
- stack_end = ((unsigned long)_estack) - (CONFIG_STACK_SIZE*index) -
- sizeof(struct cpu_info);
-
- stack_base = ((unsigned long)_estack) - (CONFIG_STACK_SIZE*(index+1));
- printk(BIOS_SPEW, "CPU%d: stack_base %p, stack_end %p\n", index,
- (void *)stack_base, (void *)stack_end);
+ /* Find boundaries of the new processor's stack */
+ stack_top = ALIGN_DOWN((uintptr_t)_estack, CONFIG_STACK_SIZE);
+ stack_top -= (CONFIG_STACK_SIZE*index);
+ stack_base = stack_top - CONFIG_STACK_SIZE;
+ stack_top -= sizeof(struct cpu_info);
+ printk(BIOS_SPEW, "CPU%d: stack_base %p, stack_top %p\n", index,
+ (void *)stack_base, (void *)stack_top);
stacks[index] = (void *)stack_base;
/* Record the index and which CPU structure we are using */
- info = (struct cpu_info *)stack_end;
+ info = (struct cpu_info *)stack_top;
info->index = index;
info->cpu = cpu;
thread_init_cpu_info_non_bsp(info);
/* Advertise the new stack and index to start_cpu */
- secondary_stack = stack_end;
+ secondary_stack = stack_top;
secondary_cpu_index = index;
/* Until the CPU starts up report the CPU is not enabled */
diff --git a/src/cpu/x86/mp_init.c b/src/cpu/x86/mp_init.c
index 9526824..3889c7d 100644
--- a/src/cpu/x86/mp_init.c
+++ b/src/cpu/x86/mp_init.c
@@ -18,6 +18,7 @@
#include <stdint.h>
#include <rmodule.h>
#include <arch/cpu.h>
+#include <commonlib/helpers.h>
#include <cpu/cpu.h>
#include <cpu/intel/microcode.h>
#include <cpu/x86/cache.h>
@@ -229,11 +230,11 @@
static void setup_default_sipi_vector_params(struct sipi_params *sp)
{
- sp->gdt = (uint32_t)&gdt;
- sp->gdtlimit = (uint32_t)&gdt_end - (u32)&gdt - 1;
- sp->idt_ptr = (uint32_t)&idtarg;
+ sp->gdt = (uintptr_t)&gdt;
+ sp->gdtlimit = (uintptr_t)&gdt_end - (uintptr_t)&gdt - 1;
+ sp->idt_ptr = (uintptr_t)&idtarg;
sp->stack_size = CONFIG_STACK_SIZE;
- sp->stack_top = (uint32_t)&_estack;
+ sp->stack_top = ALIGN_DOWN((uintptr_t)&_estack, CONFIG_STACK_SIZE);
/* Adjust the stack top to take into account cpu_info. */
sp->stack_top -= sizeof(struct cpu_info);
}
--
To view, visit https://review.coreboot.org/c/coreboot/+/26302
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ie04956c64df0dc7bb156002d3d4f2629f92b340e
Gerrit-Change-Number: 26302
Gerrit-PatchSet: 6
Gerrit-Owner: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-Reviewer: Aaron Durbin <adurbin(a)chromium.org>
Gerrit-Reviewer: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Gerrit-Reviewer: Subrata Banik <subrata.banik(a)intel.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: merged
Hello John Zhao,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/30817
to review the following change.
Change subject: mb/google/octopus/variants: Disable xHCI compliance mode
......................................................................
mb/google/octopus/variants: Disable xHCI compliance mode
Some usb devices exhibits signal loss which causes xHCI entering
compliance mode. The resolution is to disable xHCI compliance mode.
BUG=b:115699781
CQ-DEPEND=CL:*30816
TEST=Verified usb operation successfully.
Change-Id: I41fecaa43f4b1588a0e4bbfc465d595feb54dd24
Signed-off-by: John Zhao <john.zhao(a)intel.com>
---
M src/mainboard/google/octopus/variants/bobba/overridetree.cb
1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/17/30817/1
diff --git a/src/mainboard/google/octopus/variants/bobba/overridetree.cb b/src/mainboard/google/octopus/variants/bobba/overridetree.cb
index 9706e69..04dc768 100644
--- a/src/mainboard/google/octopus/variants/bobba/overridetree.cb
+++ b/src/mainboard/google/octopus/variants/bobba/overridetree.cb
@@ -163,4 +163,7 @@
end
end # - I2C 7
end
+
+ # Disable compliance mode
+ register "DisableComplianceMode" = "1"
end
--
To view, visit https://review.coreboot.org/c/coreboot/+/30817
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I41fecaa43f4b1588a0e4bbfc465d595feb54dd24
Gerrit-Change-Number: 30817
Gerrit-PatchSet: 1
Gerrit-Owner: John Zhao <john.zhao(a)intel.corp-partner.google.com>
Gerrit-Reviewer: John Zhao <john.zhao(a)intel.com>
Gerrit-MessageType: newchange
Hello John Zhao,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/30816
to review the following change.
Change subject: soc/intel/apollolake: Add option to disable xHCI Link Compliance Mode
......................................................................
soc/intel/apollolake: Add option to disable xHCI Link Compliance Mode
Provide options to disable xHCI Link Compliance Mode. Default is FALSE
to not disable Compliance Mode. Set TRUE to disable Compliance Mode.
BUG=b:115699781
TEST=Verified booting to kernel.
Change-Id: I2a486bc4c1a8578cfd7ac3d17103e889eaa25fe4
Signed-off-by: John Zhao <john.zhao(a)intel.com>
---
M src/soc/intel/apollolake/chip.c
M src/soc/intel/apollolake/chip.h
2 files changed, 12 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/16/30816/1
diff --git a/src/soc/intel/apollolake/chip.c b/src/soc/intel/apollolake/chip.c
index 1c8f321..b38265f 100644
--- a/src/soc/intel/apollolake/chip.c
+++ b/src/soc/intel/apollolake/chip.c
@@ -571,8 +571,13 @@
* FSP provides UPD interface to execute IPC command. In order to
* improve boot performance, configure PmicPmcIpcCtrl for PMC to program
* PMIC PCH_PWROK delay.
- */
+ */
silconfig->PmicPmcIpcCtrl = cfg->PmicPmcIpcCtrl;
+
+ /*
+ * Options to disable XHCI Link Compliance Mode.
+ */
+ silconfig->DisableComplianceMode = cfg->DisableComplianceMode;
#endif
}
diff --git a/src/soc/intel/apollolake/chip.h b/src/soc/intel/apollolake/chip.h
index 202f2ac..b9c9dc5 100644
--- a/src/soc/intel/apollolake/chip.h
+++ b/src/soc/intel/apollolake/chip.h
@@ -162,6 +162,12 @@
* (31:24) + Register_Offset (23:16) + OR Value (15:8) + AND Value (7:0)
*/
uint32_t PmicPmcIpcCtrl;
+
+ /* Options to disable XHCI Link Compliance Mode. Default is FALSE to not
+ * disable Compliance Mode. Set TRUE to disable Compliance Mode.
+ * 0:FALSE(Default), 1:True.
+ */
+ uint8_t DisableComplianceMode;
};
typedef struct soc_intel_apollolake_config config_t;
--
To view, visit https://review.coreboot.org/c/coreboot/+/30816
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I2a486bc4c1a8578cfd7ac3d17103e889eaa25fe4
Gerrit-Change-Number: 30816
Gerrit-PatchSet: 1
Gerrit-Owner: John Zhao <john.zhao(a)intel.corp-partner.google.com>
Gerrit-Reviewer: John Zhao <john.zhao(a)intel.com>
Gerrit-MessageType: newchange