Hello Angel Pons, Arthur Heymans, Matt DeVillier,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/libgfxinit/+/36443
to review the following change.
Change subject: gma config: Add Comet Lake PCI IDs
......................................................................
gma config: Add Comet Lake PCI IDs
Comet Lake is still treated like Kaby Lake :)
Change-Id: I543f1a50c204d963de80111aa0afd724e4093c4a
Signed-off-by: Nico Huber <nico.h(a)gmx.de>
---
M common/hw-gfx-gma-config.ads.template
1 file changed, 15 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/libgfxinit refs/changes/43/36443/1
diff --git a/common/hw-gfx-gma-config.ads.template b/common/hw-gfx-gma-config.ads.template
index 0e49943..7347341 100644
--- a/common/hw-gfx-gma-config.ads.template
+++ b/common/hw-gfx-gma-config.ads.template
@@ -428,6 +428,17 @@
function Is_Coffee_Lake (Device_Id : Word16) return Boolean is
((Device_Id and 16#fff0#) = 16#3e90#);
+ function Is_Comet_Lake_U (Device_Id : Word16) return Boolean is
+ ((Device_Id and 16#ff9f#) = 16#9b01# or
+ (Device_Id and 16#ff9f#) = 16#9b8a# or
+ (Device_Id and 16#ff9f#) = 16#9b8c#);
+ function Is_Comet_Lake (Device_Id : Word16) return Boolean is
+ ((Device_Id and 16#ff8f#) = 16#9b82# or
+ (Device_Id and 16#ff8f#) = 16#9b84# or
+ (Device_Id and 16#ff8f#) = 16#9b85# or
+ (Device_Id and 16#ff8f#) = 16#9b86# or
+ (Device_Id and 16#ff8f#) = 16#9b88#);
+
function Is_GPU (Device_Id : Word16; CPU : CPU_Type; CPU_Var : CPU_Variant)
return Boolean is
(case CPU is
@@ -452,10 +463,12 @@
when Kabylake => (case CPU_Var is
when Normal =>
Is_Kaby_Lake (Device_Id) or
- Is_Coffee_Lake (Device_Id),
+ Is_Coffee_Lake (Device_Id) or
+ Is_Comet_Lake (Device_Id),
when ULT =>
Is_Kaby_Lake_U (Device_Id) or
- Is_Coffee_Lake_U (Device_Id),
+ Is_Coffee_Lake_U (Device_Id) or
+ Is_Comet_Lake_U (Device_Id),
when ULX =>
Is_Kaby_Lake_Y (Device_Id) or
Is_Kaby_Lake_Y_AML (Device_Id) or
--
To view, visit https://review.coreboot.org/c/libgfxinit/+/36443
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: libgfxinit
Gerrit-Branch: master
Gerrit-Change-Id: I543f1a50c204d963de80111aa0afd724e4093c4a
Gerrit-Change-Number: 36443
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Matt DeVillier <matt.devillier(a)gmail.com>
Gerrit-MessageType: newchange
Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/37288 )
Change subject: cpu/x86/smm: Add smm_size to relocatable smmstub
......................................................................
cpu/x86/smm: Add smm_size to relocatable smmstub
To mitigate against sinkhole in software which is required on
pre-sandybridge hardware, the smm entry point needs to check if the
LAPIC base is between smbase and smbase + smmsize. The size needs to
be available early so add them to the relocatable module parameters.
When the smmstub is used to relocate SMM the default SMM size 0x10000
is provided. On the permanent handler the size provided by
get_smm_info() is used.
Change-Id: I0df6e51bcba284350f1c849ef3d012860757544b
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/cpu/x86/smm/smm_module_loader.c
M src/cpu/x86/smm/smm_stub.S
M src/include/cpu/x86/smm.h
3 files changed, 10 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/88/37288/1
diff --git a/src/cpu/x86/smm/smm_module_loader.c b/src/cpu/x86/smm/smm_module_loader.c
index c6c6b38..4431a44 100644
--- a/src/cpu/x86/smm/smm_module_loader.c
+++ b/src/cpu/x86/smm/smm_module_loader.c
@@ -173,8 +173,9 @@
* concurrent areas requested. The save state always lives at the top of SMRAM
* space, and the entry point is at offset 0x8000.
*/
-static int smm_module_setup_stub(void *smbase, struct smm_loader_params *params,
- void *fxsave_area)
+static int smm_module_setup_stub(void *smbase, size_t smm_size,
+ struct smm_loader_params *params,
+ void *fxsave_area)
{
size_t total_save_state_size;
size_t smm_stub_size;
@@ -266,6 +267,7 @@
stub_params->fxsave_area = (uintptr_t)fxsave_area;
stub_params->fxsave_area_size = FXSAVE_SIZE;
stub_params->runtime.smbase = (uintptr_t)smbase;
+ stub_params->runtime.smm_size = smm_size;
stub_params->runtime.save_state_size = params->per_cpu_save_state_size;
/* Initialize the APIC id to CPU number table to be 1:1 */
@@ -305,7 +307,8 @@
if (params->num_concurrent_stacks == 0)
params->num_concurrent_stacks = CONFIG_MAX_CPUS;
- return smm_module_setup_stub(smram, params, fxsave_area_relocation);
+ return smm_module_setup_stub(smram, SMM_DEFAULT_SIZE,
+ params, fxsave_area_relocation);
}
/* The SMM module is placed within the provided region in the following
@@ -391,5 +394,5 @@
params->handler = rmodule_entry(&smm_mod);
params->handler_arg = rmodule_parameters(&smm_mod);
- return smm_module_setup_stub(smram, params, fxsave_area);
+ return smm_module_setup_stub(smram, size, params, fxsave_area);
}
diff --git a/src/cpu/x86/smm/smm_stub.S b/src/cpu/x86/smm/smm_stub.S
index f0e55f9..304ea4b 100644
--- a/src/cpu/x86/smm/smm_stub.S
+++ b/src/cpu/x86/smm/smm_stub.S
@@ -42,6 +42,8 @@
smm_runtime:
smbase:
.long 0
+smm_size:
+.long 0
save_state_size:
.long 0
/* apic_to_cpu_num is a table mapping the default APIC id to CPU num. If the
diff --git a/src/include/cpu/x86/smm.h b/src/include/cpu/x86/smm.h
index cf107b1..2e3c639 100644
--- a/src/include/cpu/x86/smm.h
+++ b/src/include/cpu/x86/smm.h
@@ -63,6 +63,7 @@
struct smm_runtime {
u32 smbase;
+ u32 smm_size;
u32 save_state_size;
/* 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
--
To view, visit https://review.coreboot.org/c/coreboot/+/37288
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I0df6e51bcba284350f1c849ef3d012860757544b
Gerrit-Change-Number: 37288
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-MessageType: newchange
Marshall Dawson has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/36418 )
Change subject: [NOT FOR MERGE]: Demo adding near_reset_vector symbol
......................................................................
[NOT FOR MERGE]: Demo adding near_reset_vector symbol
In https://review.coreboot.org/c/coreboot/+/35035/8/src/arch/x86/early_dram.ld
we had a discussion about whether an approach like for RESET_VECTOR_IN_RAM
could potentially be used for a bootblock that needed to grow >64KB (to keep
the first 16-bit jmp within reach).
This is a mockup of the test I ran to verify that would be practical. Using
this code I built a google/grunt and recorded the following with readelf.
Section Headers:
[Nr] Name Type Addr Off Size ES Flg Lk Inf Al
[ 0] NULL 00000000 000000 000000 00 0 0 0
[ 1] .text PROGBITS ffff0000 000060 0059d0 00 AX 0 0 32
[ 2] .rel.text REL 00000000 01335c 001378 08 I 10 1 4
[ 3] .car.data NOBITS 00030000 000000 005860 00 WA 0 0 4
[ 4] .near_reset_vecto PROGBITS fffffe00 00fe60 0000bb 00 AX 0 0 4
[ 5] .rel.near_reset_v REL 00000000 0146d4 000040 08 I 10 4 4
[ 6] .reset PROGBITS fffffff0 010050 000010 00 AX 0 0 1
[ 7] .rel.reset REL 00000000 014714 000008 08 I 10 6 4
[ 8] .id PROGBITS ffffff4a 00ffaa 000036 00 A 0 0 1
[ 9] .gnu_debuglink PROGBITS 00000000 010060 000014 00 0 0 4
[10] .symtab SYMTAB 00000000 010074 001a80 10 11 243 4
[11] .strtab STRTAB 00000000 011af4 001868 00 0 0 1
[12] .shstrtab STRTAB 00000000 01471c 000064 00 0 0 1
Note, however, that I did not grow the bootblock.elf file; only inserted the
section and relocated the _start16bit code.
fffffe00 <_start16bit>:
fffffe00: fa cli
fffffe01: 66 89 c5 mov %ax,%bp
fffffe04: b0 01 mov $0x1,%al
fffffe06: e6 80 out %al,$0x80
fffffe08: 66 31 c0 xor %ax,%ax
fffffe0b: 0f 22 d8 mov %eax,%cr3
fffffe0e: 8c c8 mov %cs,%eax
fffffe10: c1 e0 04 shl $0x4,%eax
fffffe13: bb 4c fe 29 c3 mov $0xc329fe4c,%ebx
fffffe18: 2e 0f 01 1f lidtl %cs:(%edi)
fffffe1c: bb 44 fe 29 c3 mov $0xc329fe44,%ebx
fffffe21: 2e 66 0f 01 17 lgdtw %cs:(%edi)
fffffe26: 0f 20 c0 mov %cr0,%eax
fffffe29: 66 25 d1 ff and $0xffd1,%ax
fffffe2d: fa cli
fffffe2e: 7f 66 jg fffffe96 <__protected_start+0xb>
fffffe30: 0d 01 00 00 60 or $0x60000001,%eax
fffffe35: 0f 22 c0 mov %eax,%cr0
fffffe38: 66 89 e8 mov %bp,%ax
fffffe3b: 66 ea 8b fe ff ff ljmpw $0xffff,$0xfe8b
fffffe41: 08 00 or %al,(%eax)
fffffe43: 90 nop
Growing the elf should be reasonably straightforward. Right now reset16.ld
has a built-in assumption of 64KB. For RESET_VECTOR_IN_RAM I've added a
size symbol to Kconfig (yet to land still) for locating the reset vector
and near_reset_vector at the very top, and so that the calculations are
expected to match the instructions given to the PSP.
Change-Id: I6e7888c778e1d1cc426e4160543f4a4662ebf834
Signed-off-by: Marshall Dawson <marshalldawson3rd(a)gmail.com>
---
M src/cpu/x86/16bit/entry16.inc
M src/cpu/x86/16bit/reset16.ld
2 files changed, 11 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/18/36418/1
diff --git a/src/cpu/x86/16bit/entry16.inc b/src/cpu/x86/16bit/entry16.inc
index 9e00c55..6062abd 100644
--- a/src/cpu/x86/16bit/entry16.inc
+++ b/src/cpu/x86/16bit/entry16.inc
@@ -37,6 +37,9 @@
.align 4096
#endif
.code16
+
+.section ".near_reset_vector", "ax", %progbits
+
.globl _start16bit
.type _start16bit, @function
diff --git a/src/cpu/x86/16bit/reset16.ld b/src/cpu/x86/16bit/reset16.ld
index c57cc96..31716e0 100644
--- a/src/cpu/x86/16bit/reset16.ld
+++ b/src/cpu/x86/16bit/reset16.ld
@@ -17,6 +17,14 @@
*/
SECTIONS {
+ _ROMTOP = 0xfffffff0;
+ _NEAR_RESET_VECTOR = _ROMTOP + 0x10 - 0x200;
+
+ . = _NEAR_RESET_VECTOR;
+ .near_reset_vector . : {
+ *(.near_reset_vector);
+ }
+
/* Trigger an error if I have an unuseable start address */
_bogus = ASSERT(_start16bit >= 0xffff0000, "_start16bit too low. Please report.");
_ROMTOP = 0xfffffff0;
--
To view, visit https://review.coreboot.org/c/coreboot/+/36418
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I6e7888c778e1d1cc426e4160543f4a4662ebf834
Gerrit-Change-Number: 36418
Gerrit-PatchSet: 1
Gerrit-Owner: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Gerrit-MessageType: newchange
Prasun Gera has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/35431 )
Change subject: src/mainboard/lenovo/t530/Kconfig: Fix PCI device id for the iGPU
......................................................................
src/mainboard/lenovo/t530/Kconfig: Fix PCI device id for the iGPU
Both T530 and W530 share the same PCI device id of 0166 for the iGPU.
Change-Id: Idce809e3820a653144db424aff1c55b70c4c693a
Signed-off-by: Prasun Gera <prasun.gera(a)gmail.com>
---
M src/mainboard/lenovo/t530/Kconfig
1 file changed, 5 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/31/35431/1
diff --git a/src/mainboard/lenovo/t530/Kconfig b/src/mainboard/lenovo/t530/Kconfig
index f63a120..4fcbcb5 100644
--- a/src/mainboard/lenovo/t530/Kconfig
+++ b/src/mainboard/lenovo/t530/Kconfig
@@ -60,7 +60,10 @@
config VGA_BIOS_FILE
string
- default "pci8086,0106.rom" if BOARD_LENOVO_T530
- default "pci8086,0166.rom" if BOARD_LENOVO_W530
+ default "pci8086,0166.rom"
+
+config VGA_BIOS_ID
+ string
+ default "8086,0166"
endif
--
To view, visit https://review.coreboot.org/c/coreboot/+/35431
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Idce809e3820a653144db424aff1c55b70c4c693a
Gerrit-Change-Number: 35431
Gerrit-PatchSet: 1
Gerrit-Owner: Prasun Gera
Gerrit-MessageType: newchange
awokd(a)danwin1210.me has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/37194 )
Change subject: vc/amd/agesa: Fix uninitialized scalar variable
......................................................................
vc/amd/agesa: Fix uninitialized scalar variable
AllocParams.Persist is used uninitialized when calling HeapAllocateBuffer.
This could lead to unpredictable or unintended results. The f15tn and
f16 versions of AmdS3Save.c have already addressed this by initializing
AllocParams.Persist=0 in the same location in the code, so adding to
f14 only.
Change-Id: I2cbfbc4ad14a861e0cd92f130209b3b0f5b76a17
Signed-off-by: Joe Moore <awokd(a)danwin1210.me>
Found-by: Coverity CID 1241806
---
M src/vendorcode/amd/agesa/f14/Proc/Common/AmdS3Save.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/94/37194/1
diff --git a/src/vendorcode/amd/agesa/f14/Proc/Common/AmdS3Save.c b/src/vendorcode/amd/agesa/f14/Proc/Common/AmdS3Save.c
index eeab385..bc5102b 100644
--- a/src/vendorcode/amd/agesa/f14/Proc/Common/AmdS3Save.c
+++ b/src/vendorcode/amd/agesa/f14/Proc/Common/AmdS3Save.c
@@ -202,7 +202,7 @@
//
AllocParams.RequestedBufferSize = EarlyBufferSize + LateBufferSize;
AllocParams.BufferHandle = AMD_S3_INFO_BUFFER_HANDLE;
-
+ AllocParams.Persist = 0;
AGESA_TESTPOINT (TpIfBeforeAllocateS3SaveBuffer, &AmdS3SaveParams->StdHeader);
if (HeapAllocateBuffer (&AllocParams, &AmdS3SaveParams->StdHeader) != AGESA_SUCCESS) {
if (AGESA_ERROR > ReturnStatus) {
--
To view, visit https://review.coreboot.org/c/coreboot/+/37194
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I2cbfbc4ad14a861e0cd92f130209b3b0f5b76a17
Gerrit-Change-Number: 37194
Gerrit-PatchSet: 1
Gerrit-Owner: awokd(a)danwin1210.me
Gerrit-MessageType: newchange
Meera Ravindranath has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/36067 )
Change subject: mainboard/hatch/Kconfig: Add support for boot with tianocore payload
......................................................................
mainboard/hatch/Kconfig: Add support for boot with tianocore payload
Add new config and set the required GBB flags to support boot with
tianocore payload.
BUG=none
TEST=Allows boot to tianocore on pressing Ctrl+L in depthcharge.
Change-Id: I42fcf23523889d47f0490fbd662ca6b7587ab548
Signed-off-by: Meera Ravindranath <meera.ravindranath(a)intel.com>
---
M src/mainboard/google/hatch/Kconfig
1 file changed, 8 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/67/36067/1
diff --git a/src/mainboard/google/hatch/Kconfig b/src/mainboard/google/hatch/Kconfig
index 004cc28..246e258 100644
--- a/src/mainboard/google/hatch/Kconfig
+++ b/src/mainboard/google/hatch/Kconfig
@@ -33,10 +33,18 @@
select GBB_FLAG_FORCE_DEV_BOOT_USB
select GBB_FLAG_FORCE_DEV_BOOT_LEGACY
select GBB_FLAG_FORCE_MANUAL_RECOVERY
+ select GBB_FLAG_DISABLE_EC_SOFTWARE_SYNC if BOARD_USES_TIANOCORE
+ select GBB_FLAG_ENABLE_ALTERNATE_OS if BOARD_USES_TIANOCORE
select HAS_RECOVERY_MRC_CACHE
select MRC_CLEAR_NORMAL_CACHE_ON_RECOVERY_RETRAIN
select VBOOT_LID_SWITCH
+config BOARD_USES_TIANOCORE
+ bool
+ default n
+ select USE_LEGACY_8254_TIMER
+ select USE_ACPI_PM_TIMER
+
config CHROMEOS_WIFI_SAR
bool "Enable SAR options for Chrome OS build"
depends on CHROMEOS
--
To view, visit https://review.coreboot.org/c/coreboot/+/36067
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I42fcf23523889d47f0490fbd662ca6b7587ab548
Gerrit-Change-Number: 36067
Gerrit-PatchSet: 1
Gerrit-Owner: Meera Ravindranath <meera.ravindranath(a)intel.com>
Gerrit-MessageType: newchange