Martin Roth has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/32414
Change subject: arch/x86: Add option for running Romstage out of RAM
......................................................................
arch/x86: Add option for running Romstage out of RAM
AMD's Picasso SOC brings up memory before releasing the X86 processor,
and jumps directly to Romstage. Add a global config option to handle
that.
TEST=None
BUG=b:130804851
Signed-off-by: Martin Roth <martinroth(a)chromium.org>
Change-Id: I678b1f74546ea30abcc655a0daed795d6cfa0034
---
M src/Kconfig
M src/arch/x86/assembly_entry.S
M src/arch/x86/memlayout.ld
3 files changed, 25 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/14/32414/1
diff --git a/src/Kconfig b/src/Kconfig
index 62b3818..bfa0b51 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -146,6 +146,16 @@
time spent decompressing. Doesn't work for XIP stages (assume all
ARCH_X86 for now) for obvious reasons.
+config ROMSTAGE_IN_RAM
+ bool
+ depends on ARCH_X86
+ help
+ Some newer x86 processors come alive with memory enabled, and the
+ reset vector's physical address falling within DRAM. Select this
+ item to build romstage to execute in DRAM instead of XIP. Because
+ this is not a standard, the soc/ or cpu/ code must handle the reset
+ natively before jumping into the standard romstage code.
+
config COMPRESS_BOOTBLOCK
bool
help
diff --git a/src/arch/x86/assembly_entry.S b/src/arch/x86/assembly_entry.S
index 4ead9ea..01c0865 100644
--- a/src/arch/x86/assembly_entry.S
+++ b/src/arch/x86/assembly_entry.S
@@ -26,6 +26,16 @@
* variables that are stage specific.
*/
.section ".text._start", "ax", @progbits
+#if ENV_ROMSTAGE && IS_ENABLED(CONFIG_ROMSTAGE_IN_RAM)
+/*
+ * Systems that run romstage in DRAM, i.e. where romstage is the first
+ * executed code, are responsible for getting the processor into protected
+ * mode, setting the stack pointer, and jumping to this location.
+ */
+.global _romstage_in_ram_continue
+_romstage_in_ram_continue:
+
+#else
.global _start
_start:
@@ -34,6 +44,7 @@
/* reset stack pointer to CAR stack */
mov $_car_stack_end, %esp
+#endif
/* clear CAR_GLOBAL area as it is not shared */
cld
diff --git a/src/arch/x86/memlayout.ld b/src/arch/x86/memlayout.ld
index cc72552..da63b05 100644
--- a/src/arch/x86/memlayout.ld
+++ b/src/arch/x86/memlayout.ld
@@ -57,6 +57,10 @@
#endif
}
+#if ENV_ROMSTAGE && CONFIG(ROMSTAGE_IN_RAM)
+#include <soc/romstage.ld>
+#endif
+
#if ENV_BOOTBLOCK
/* Bootblock specific scripts which provide more SECTION directives. */
#include <cpu/x86/16bit/entry16.ld>
--
To view, visit https://review.coreboot.org/c/coreboot/+/32414
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I678b1f74546ea30abcc655a0daed795d6cfa0034
Gerrit-Change-Number: 32414
Gerrit-PatchSet: 1
Gerrit-Owner: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-MessageType: newchange
Hello Mike Banon,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/31450
to review the following change.
Change subject: lenovo/g505s: Add the discrete VGA support for AMD Lenovo G505S laptop
......................................................................
lenovo/g505s: Add the discrete VGA support for AMD Lenovo G505S laptop
Make it possible to enable CONFIG_MULTIPLE_VGA_ADAPTERS option for G505S
which is currently not used by any of coreboot-supported boards. Also
enable the discrete graphics PCI bus leading to HD 8570M (1002,6663)
or R5 M230 (1002,6665) discrete VGA and add the G505S-specific workaround
for PCI resource allocation problems to AMD AGESA vendorcode.
Based on the original patches by Hans Jürgen Kitter <eforname(a)freemail.hu>.
Signed-off-by: Mike Banon <mikebdp2(a)gmail.com>
Signed-off-by: Hans Jürgen Kitter <eforname(a)freemail.hu>
Change-Id: I98793fa3b1ad8ee7d0b7962a328f7d5c1b0c2f88
---
M src/device/Kconfig
M src/mainboard/lenovo/g505s/devicetree.cb
M src/vendorcode/amd/agesa/f15tn/Proc/Mem/NB/TN/mntn.c
3 files changed, 17 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/50/31450/1
diff --git a/src/device/Kconfig b/src/device/Kconfig
index 33c1e5b3..5d2087e 100644
--- a/src/device/Kconfig
+++ b/src/device/Kconfig
@@ -247,8 +247,15 @@
Enable this option for a good compromise between security and speed.
config MULTIPLE_VGA_ADAPTERS
+ prompt "Multiple VGA Adapters"
bool
+ depends on BOARD_LENOVO_G505S
default n
+ help
+ Some motherboards may have more than one VGA adapter - for example,
+ there are versions of Lenovo G505S that have a discrete VGA adapter
+ in addition to its' integrated VGA adapter which is a part of APU.
+ Enable this option to try to initialize this discrete VGA adapter.
menu "Display"
depends on HAVE_VGA_TEXT_FRAMEBUFFER || HAVE_LINEAR_FRAMEBUFFER
diff --git a/src/mainboard/lenovo/g505s/devicetree.cb b/src/mainboard/lenovo/g505s/devicetree.cb
index 99f42d6..1f33c27 100644
--- a/src/mainboard/lenovo/g505s/devicetree.cb
+++ b/src/mainboard/lenovo/g505s/devicetree.cb
@@ -27,7 +27,7 @@
device pci 0.2 on end # IOMMU
device pci 1.0 on end # Internal Graphics P2P bridge 0x99XX
device pci 1.1 on end # Internal Multimedia
- device pci 2.0 off end
+ device pci 2.0 on end # Discrete Graphics PCI bus 0x666X
device pci 3.0 off end
device pci 4.0 on end # PCIE MINI0
device pci 5.0 on end # PCIE MINI1
diff --git a/src/vendorcode/amd/agesa/f15tn/Proc/Mem/NB/TN/mntn.c b/src/vendorcode/amd/agesa/f15tn/Proc/Mem/NB/TN/mntn.c
index c566061..ee6d2c2 100644
--- a/src/vendorcode/amd/agesa/f15tn/Proc/Mem/NB/TN/mntn.c
+++ b/src/vendorcode/amd/agesa/f15tn/Proc/Mem/NB/TN/mntn.c
@@ -437,8 +437,15 @@
RefPtr = MemPtr->ParameterListPtr;
// Memory Map/Mgt.
- // Mask Bottom IO with 0xF8 to force hole size to have granularity of 128MB
- RefPtr->BottomIo = 0xE0;
+ if ((IS_ENABLED(CONFIG_BOARD_LENOVO_G505S)) &&
+ (IS_ENABLED(CONFIG_MULTIPLE_VGA_ADAPTERS))) {
+ // Set to 0xD0 instead of 0xE0 to avoid the PCI resource allocation problems
+ RefPtr->BottomIo = 0xD0;
+ }
+ else {
+ // Mask Bottom IO with 0xF8 to force hole size to have granularity of 128MB
+ RefPtr->BottomIo = 0xE0;
+ }
RefPtr->UmaMode = UserOptions.CfgUmaMode;
RefPtr->UmaSize = UserOptions.CfgUmaSize;
RefPtr->MemHoleRemapping = TRUE;
--
To view, visit https://review.coreboot.org/c/coreboot/+/31450
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I98793fa3b1ad8ee7d0b7962a328f7d5c1b0c2f88
Gerrit-Change-Number: 31450
Gerrit-PatchSet: 1
Gerrit-Owner: mikeb mikeb <mikebdp2(a)gmail.com>
Gerrit-Reviewer: Mike Banon <mikebdp2(a)gmail.com>
Gerrit-MessageType: newchange
Kyösti Mälkki has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/30856
Change subject: arch/x86: Drop Kconfig SIPI_VECTOR_IN_ROM
......................................................................
arch/x86: Drop Kconfig SIPI_VECTOR_IN_ROM
This was used to enforce 4kiB alignment of _start16bit in
romcc bootblock. Platforms requiring this moved away to
C_ENVIRONMENT_BOOTBLOCK that globally forces the alignment.
Change-Id: I8ca453bbc56ab2aeb127f3e081c69e1b38bb8396
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
---
M src/arch/x86/Kconfig
M src/arch/x86/failover.ld
M src/cpu/intel/car/p4-netburst/cache_as_ram.S
M src/cpu/intel/model_106cx/Kconfig
M src/cpu/intel/socket_LGA775/Kconfig
M src/cpu/intel/socket_mPGA604/Kconfig
M src/cpu/x86/16bit/entry16.inc
7 files changed, 5 insertions(+), 26 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/56/30856/1
diff --git a/src/arch/x86/Kconfig b/src/arch/x86/Kconfig
index 242a7cf..c2fc914 100644
--- a/src/arch/x86/Kconfig
+++ b/src/arch/x86/Kconfig
@@ -81,13 +81,6 @@
default n
depends on ARCH_X86 && SMP
-# Aligns 16bit entry code in bootblock so that hyper-threading CPUs
-# can boot AP CPUs to enable their shared caches.
-config SIPI_VECTOR_IN_ROM
- bool
- default n
- depends on ARCH_X86
-
# Set the rambase for systems that still need it, only 5 chipsets as of
# Sep 2018. This value was 0x100000, chosen to match the entry point
# of Linux 2.2 in 1999. The new value, 14 MiB, makes a lot more sense
diff --git a/src/arch/x86/failover.ld b/src/arch/x86/failover.ld
index b32aa29..eabc9f7 100644
--- a/src/arch/x86/failover.ld
+++ b/src/arch/x86/failover.ld
@@ -23,12 +23,11 @@
TARGET(binary)
SECTIONS
{
- /* Symbol ap_sipi_vector must be aligned to 4kB to start AP CPUs
- * with Startup IPI message without RAM. Align .rom to next 4 byte
- * boundary anyway, so no pad byte appears between _rom and _start.
+ /* Align .rom to 4 byte boundary so no pad byte appears
+ * between _rom and _start.
*/
.bogus ROMLOC_MIN : {
- . = CONFIG_SIPI_VECTOR_IN_ROM ? ALIGN(4096) : ALIGN(4);
+ . = ALIGN(4);
ROMLOC = .;
} >rom = 0xff
@@ -49,12 +48,7 @@
* may cause the total size of a section to change when the start
* address gets applied.
*/
- ROMLOC_MIN = 0xffffff00 - (_erom - _rom + 16) -
- (CONFIG_SIPI_VECTOR_IN_ROM ? 4096 : 0);
-
- /* Post-check proper SIPI vector. */
- _bogus = ASSERT(!CONFIG_SIPI_VECTOR_IN_ROM || (ap_sipi_vector_in_rom == 0xff),
- "Address mismatch on AP_SIPI_VECTOR");
+ ROMLOC_MIN = 0xffffff00 - (_erom - _rom + 16);
/DISCARD/ : {
*(.comment)
diff --git a/src/cpu/intel/car/p4-netburst/cache_as_ram.S b/src/cpu/intel/car/p4-netburst/cache_as_ram.S
index fda572d..5c579a1 100644
--- a/src/cpu/intel/car/p4-netburst/cache_as_ram.S
+++ b/src/cpu/intel/car/p4-netburst/cache_as_ram.S
@@ -23,10 +23,6 @@
/* Macro to access Local APIC registers at default base. */
#define LAPIC(x) $(LAPIC_DEFAULT_BASE | LAPIC_ ## x)
-#if !IS_ENABLED(CONFIG_C_ENVIRONMENT_BOOTBLOCK)
-/* Fixed location, ASSERTED in failover.ld if it changes. */
-.set ap_sipi_vector_in_rom, 0xff
-#endif
#define CACHE_AS_RAM_SIZE CONFIG_DCACHE_RAM_SIZE
#define CACHE_AS_RAM_BASE CONFIG_DCACHE_RAM_BASE
diff --git a/src/cpu/intel/model_106cx/Kconfig b/src/cpu/intel/model_106cx/Kconfig
index f365cf1..2a324fb 100644
--- a/src/cpu/intel/model_106cx/Kconfig
+++ b/src/cpu/intel/model_106cx/Kconfig
@@ -7,7 +7,6 @@
select SMP
select SSE2
select UDELAY_LAPIC
- select SIPI_VECTOR_IN_ROM
select AP_IN_SIPI_WAIT
select TSC_SYNC_MFENCE
select SUPPORT_CPU_UCODE_IN_CBFS
diff --git a/src/cpu/intel/socket_LGA775/Kconfig b/src/cpu/intel/socket_LGA775/Kconfig
index 8b227bd..6c3d837 100644
--- a/src/cpu/intel/socket_LGA775/Kconfig
+++ b/src/cpu/intel/socket_LGA775/Kconfig
@@ -13,7 +13,6 @@
select CPU_INTEL_MODEL_1067X
select MMX
select SSE
- select SIPI_VECTOR_IN_ROM
config DCACHE_RAM_SIZE
hex
diff --git a/src/cpu/intel/socket_mPGA604/Kconfig b/src/cpu/intel/socket_mPGA604/Kconfig
index ca2f7b3..e860ded 100644
--- a/src/cpu/intel/socket_mPGA604/Kconfig
+++ b/src/cpu/intel/socket_mPGA604/Kconfig
@@ -9,7 +9,6 @@
select MMX
select SSE
select UDELAY_TSC
- select SIPI_VECTOR_IN_ROM
select C_ENVIRONMENT_BOOTBLOCK
# mPGA604 are usually Intel Netburst CPUs which should have SSE2
diff --git a/src/cpu/x86/16bit/entry16.inc b/src/cpu/x86/16bit/entry16.inc
index 2a9f8c5..f110980 100644
--- a/src/cpu/x86/16bit/entry16.inc
+++ b/src/cpu/x86/16bit/entry16.inc
@@ -29,8 +29,7 @@
#include <arch/rom_segs.h>
-#if IS_ENABLED(CONFIG_C_ENVIRONMENT_BOOTBLOCK) || \
- IS_ENABLED(CONFIG_SIPI_VECTOR_IN_ROM)
+#if IS_ENABLED(CONFIG_C_ENVIRONMENT_BOOTBLOCK)
/* Symbol _start16bit must be aligned to 4kB to start AP CPUs with
* Startup IPI message without RAM.
*/
--
To view, visit https://review.coreboot.org/c/coreboot/+/30856
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I8ca453bbc56ab2aeb127f3e081c69e1b38bb8396
Gerrit-Change-Number: 30856
Gerrit-PatchSet: 1
Gerrit-Owner: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
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