Attention is currently required from: Furquan Shaikh, Tim Wawrzynczak, Subrata Banik, Patrick Rudolph.
Hello Furquan Shaikh, Tim Wawrzynczak, Subrata Banik, Patrick Rudolph,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/49295
to look at the new patch set (#2).
Change subject: soc/intel/common: Move L1_substates_control to pcie_rp.h
......................................................................
soc/intel/common: Move L1_substates_control to pcie_rp.h
L1_substates_control is common define. Move out of soc level.
Signed-off-by: Eric Lai <ericr_lai(a)compal.corp-partner.google.com>
Change-Id: I54574b606985e82d00beb1a61cce3097580366a4
---
M src/soc/intel/alderlake/chip.h
M src/soc/intel/common/block/include/intelblocks/pcie_rp.h
M src/soc/intel/elkhartlake/chip.h
M src/soc/intel/jasperlake/chip.h
M src/soc/intel/tigerlake/chip.h
5 files changed, 15 insertions(+), 24 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/95/49295/2
--
To view, visit https://review.coreboot.org/c/coreboot/+/49295
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I54574b606985e82d00beb1a61cce3097580366a4
Gerrit-Change-Number: 49295
Gerrit-PatchSet: 2
Gerrit-Owner: EricR Lai <ericr_lai(a)compal.corp-partner.google.com>
Gerrit-Reviewer: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Subrata Banik <subrata.banik(a)intel.com>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Attention: Furquan Shaikh <furquan(a)google.com>
Gerrit-Attention: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Attention: Subrata Banik <subrata.banik(a)intel.com>
Gerrit-Attention: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-MessageType: newpatchset
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/49245 )
Change subject: soc/amd/cezzane: Add a minimal chipset tree
......................................................................
soc/amd/cezzane: Add a minimal chipset tree
This change adds a minimal chipset tree with only two devices:
1. Domain
2. GNB root complex
This allows sconfig to generate the config structure for SoC root
device that is used by config_of_soc().
Change-Id: I7e08ecf4b9556dc9325bd5a6a51566a949ceb73f
Signed-off-by: Furquan Shaikh <furquan(a)google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/49245
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Nico Huber <nico.h(a)gmx.de>
Reviewed-by: Angel Pons <th3fanbus(a)gmail.com>
Reviewed-by: Jason Glenesk <jason.glenesk(a)gmail.com>
---
M src/soc/amd/cezanne/Kconfig
A src/soc/amd/cezanne/chipset.cb
2 files changed, 9 insertions(+), 0 deletions(-)
Approvals:
build bot (Jenkins): Verified
Nico Huber: Looks good to me, approved
Angel Pons: Looks good to me, approved
Jason Glenesk: Looks good to me, but someone else must approve
diff --git a/src/soc/amd/cezanne/Kconfig b/src/soc/amd/cezanne/Kconfig
index 22d0c3a..afee1ef 100644
--- a/src/soc/amd/cezanne/Kconfig
+++ b/src/soc/amd/cezanne/Kconfig
@@ -26,6 +26,10 @@
select SOC_AMD_COMMON_BLOCK_SMI
select SOC_AMD_COMMON_BLOCK_TSC_FAM17H_19H
+config CHIPSET_DEVICETREE
+ string
+ default "soc/amd/cezanne/chipset.cb"
+
config EARLY_RESERVED_DRAM_BASE
hex
default 0x2000000
diff --git a/src/soc/amd/cezanne/chipset.cb b/src/soc/amd/cezanne/chipset.cb
new file mode 100644
index 0000000..49bd0c8
--- /dev/null
+++ b/src/soc/amd/cezanne/chipset.cb
@@ -0,0 +1,5 @@
+chip soc/amd/cezanne
+ device domain 0 on
+ device pci 00.0 alias gnb on end
+ end
+end
--
To view, visit https://review.coreboot.org/c/coreboot/+/49245
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I7e08ecf4b9556dc9325bd5a6a51566a949ceb73f
Gerrit-Change-Number: 49245
Gerrit-PatchSet: 2
Gerrit-Owner: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Felix Held <felix-coreboot(a)felixheld.de>
Gerrit-Reviewer: Jason Glenesk <jason.glenesk(a)gmail.com>
Gerrit-Reviewer: Marshall Dawson <marshalldawson3rd(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: merged
Furquan Shaikh has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/49213 )
Change subject: soc/intel/common/uart: Use simple(_s_) variants of PCI functions
......................................................................
soc/intel/common/uart: Use simple(_s_) variants of PCI functions
This change updates various uart_* functions to use simple(_s_)
variants of PCI functions. This is done for a few reasons:
* __SIMPLE_DEVICE__ check can be dropped since the same data type can
be used in early stages and ramstage.
* Removes the requirement on early stage to walk the device tree to
get access to the device structure. This allows linker-based device
tree optimizations for early stages.
As part of this change, uart_get_device() is refactored and a new
function uart_console_get_devfn() is added which returns pci_devfn_t
in MMCONF format. It is then used directly by the _s_ variants of PCI
functions.
Change-Id: I344037828118572ae5eb27c82c496d5e7a508a53
Signed-off-by: Furquan Shaikh <furquan(a)google.com>
---
M src/soc/intel/common/block/uart/uart.c
1 file changed, 37 insertions(+), 43 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/13/49213/1
diff --git a/src/soc/intel/common/block/uart/uart.c b/src/soc/intel/common/block/uart/uart.c
index 1cfdb67..8a8582e 100644
--- a/src/soc/intel/common/block/uart/uart.c
+++ b/src/soc/intel/common/block/uart/uart.c
@@ -23,10 +23,10 @@
extern const struct uart_controller_config uart_ctrlr_config[];
extern const int uart_max_index;
-static void uart_lpss_init(const struct device *dev, uintptr_t baseaddr)
+static void uart_lpss_init(pci_devfn_t devfn, uintptr_t baseaddr)
{
/* Ensure controller is in D0 state */
- lpss_set_power_state(PCI_BDF(dev), STATE_D0);
+ lpss_set_power_state(devfn, STATE_D0);
/* Take UART out of reset */
lpss_reset_release(baseaddr);
@@ -58,60 +58,49 @@
return UART_CONSOLE_INVALID_INDEX;
}
-static void uart_common_init(const struct device *device, uintptr_t baseaddr)
+static pci_devfn_t uart_console_get_devfn(void)
{
-#if defined(__SIMPLE_DEVICE__)
- pci_devfn_t dev = PCI_BDF(device);
-#else
- const struct device *dev = device;
-#endif
+ int devfn;
+ int index;
- /* Set UART base address */
- pci_write_config32(dev, PCI_BASE_ADDRESS_0, baseaddr);
-
- /* Enable memory access and bus master */
- pci_write_config16(dev, PCI_COMMAND, UART_PCI_ENABLE);
-
- uart_lpss_init(device, baseaddr);
-}
-
-const struct device *uart_get_device(void)
-{
/*
* This function will get called even if INTEL_LPSS_UART_FOR_CONSOLE
* config option is not selected.
* By default return NULL in this case to avoid compilation errors.
*/
if (!CONFIG(INTEL_LPSS_UART_FOR_CONSOLE))
+ return 0;
+
+ index = uart_get_valid_index();
+ if (index == UART_CONSOLE_INVALID_INDEX)
+ return 0;
+
+ devfn = uart_ctrlr_config[index].devfn;
+ return PCI_DEV(0, PCI_SLOT(devfn), PCI_FUNC(devfn));
+}
+
+const struct device *uart_get_device(void)
+{
+ pci_devfn_t devfn = uart_console_get_devfn();
+ if (devfn == 0)
return NULL;
- int console_index = uart_get_valid_index();
-
- if (console_index != UART_CONSOLE_INVALID_INDEX)
- return pcidev_path_on_root(uart_ctrlr_config[index].devfn);
- else
- return NULL;
+ return pcidev_path_on_root(PCI_DEV2DEVFN(devfn));
}
bool uart_is_controller_initialized(void)
{
uintptr_t base;
- const struct device *dev_uart = uart_get_device();
+ pci_devfn_t devfn = uart_console_get_devfn();
- if (!dev_uart)
+ if (devfn == 0)
return false;
-#if defined(__SIMPLE_DEVICE__)
- pci_devfn_t dev = PCI_BDF(dev_uart);
-#else
- const struct device *dev = dev_uart;
-#endif
-
- base = pci_read_config32(dev, PCI_BASE_ADDRESS_0) & ~0xFFF;
+ base = pci_s_read_config32(devfn, PCI_BASE_ADDRESS_0) & ~0xFFF;
if (!base)
return false;
- if ((pci_read_config16(dev, PCI_COMMAND) & UART_PCI_ENABLE)
+ if ((pci_s_read_config16(devfn, PCI_COMMAND) & UART_PCI_ENABLE)
!= UART_PCI_ENABLE)
return false;
@@ -129,15 +118,19 @@
void uart_bootblock_init(void)
{
- const struct device *dev_uart;
+ const uint32_t baseaddr = CONFIG_CONSOLE_UART_BASE_ADDRESS;
+ pci_devfn_t devfn = uart_console_get_devfn();
- dev_uart = uart_get_device();
-
- if (!dev_uart)
+ if (devfn == 0)
return;
- /* Program UART BAR0, command, reset and clock register */
- uart_common_init(dev_uart, CONFIG_CONSOLE_UART_BASE_ADDRESS);
+ /* Set UART base address */
+ pci_s_write_config32(devfn, PCI_BASE_ADDRESS_0, baseaddr);
+
+ /* Enable memory access and bus master */
+ pci_s_write_config16(devfn, PCI_COMMAND, UART_PCI_ENABLE);
+
+ uart_lpss_init(devfn, baseaddr);
/* Configure the 2 pads per UART. */
uart_configure_gpio_pads();
@@ -221,10 +214,11 @@
if (uart_controller_needs_init(dev)) {
uintptr_t base;
+ pci_devfn_t devfn = PCI_BDF(dev);
- base = pci_read_config32(dev, PCI_BASE_ADDRESS_0) & ~0xFFF;
+ base = pci_s_read_config32(devfn, PCI_BASE_ADDRESS_0) & ~0xFFF;
if (base)
- uart_lpss_init(dev, base);
+ uart_lpss_init(devfn, base);
}
}
--
To view, visit https://review.coreboot.org/c/coreboot/+/49213
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I344037828118572ae5eb27c82c496d5e7a508a53
Gerrit-Change-Number: 49213
Gerrit-PatchSet: 1
Gerrit-Owner: Furquan Shaikh <furquan(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-MessageType: newchange
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/49104 )
Change subject: soc/intel/cnl: Allow setting PCIe subsystem IDs after FSP-S
......................................................................
soc/intel/cnl: Allow setting PCIe subsystem IDs after FSP-S
Prevent the FSP from writing its default SVID SDID values of 8086:7270
for internal devices as this locks most of the registers. Allows the
subsystemid values set in devicetree to be used.
A description of this SSID table override behavior, along with example
code, is provided in the TigerLake FSP Integration Guide, section
15.178 ("SI_CONFIG Struct Reference").
The xHCI and HDA devices have RW/L registers rather than RW/O registers.
They can be written to multiple times but cannot be modified after
being locked, which happens during FspSiliconInit. Because coreboot
populates subsystem IDs after SiliconInit, these devices specifically
must be written beforehand or will otherwise be locked with their
default values of 0:0.
Tested by checking lspci output on System76 galp3-c (WHL), oryp5 (CFL),
and oryp6 (CML).
References:
- TigerLake FSP Integration Guide
- Intel Document Number 337868-002
Change-Id: Ieaa45ef7fa8e0da4a25b9174ded1ea0c5d9c4b4e
Signed-off-by: Jeremy Soller <jeremy(a)system76.com>
Signed-off-by: Tim Crawford <tcrawford(a)system76.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/49104
Reviewed-by: Nico Huber <nico.h(a)gmx.de>
Reviewed-by: Angel Pons <th3fanbus(a)gmail.com>
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
---
M src/soc/intel/cannonlake/fsp_params.c
1 file changed, 47 insertions(+), 0 deletions(-)
Approvals:
build bot (Jenkins): Verified
Nico Huber: Looks good to me, approved
Angel Pons: Looks good to me, approved
diff --git a/src/soc/intel/cannonlake/fsp_params.c b/src/soc/intel/cannonlake/fsp_params.c
index 73b1bb5..dd9c806 100644
--- a/src/soc/intel/cannonlake/fsp_params.c
+++ b/src/soc/intel/cannonlake/fsp_params.c
@@ -524,6 +524,53 @@
params->PeiGraphicsPeimInit = 0;
params->PavpEnable = CONFIG(PAVP);
+
+ /*
+ * Prevent FSP from programming write-once subsystem IDs by providing
+ * a custom SSID table. Must have at least one entry for the FSP to
+ * use the table.
+ */
+ struct svid_ssid_init_entry {
+ union {
+ struct {
+ uint64_t reg:12; /* Register offset */
+ uint64_t function:3;
+ uint64_t device:5;
+ uint64_t bus:8;
+ uint64_t :4;
+ uint64_t segment:16;
+ uint64_t :16;
+ };
+ uint64_t segbusdevfuncregister;
+ };
+ struct {
+ uint16_t svid;
+ uint16_t ssid;
+ };
+ uint32_t reserved;
+ };
+
+ /*
+ * The xHCI and HDA devices have RW/L rather than RW/O registers for
+ * subsystem IDs and so must be written before FspSiliconInit locks
+ * them with their default values.
+ */
+ const pci_devfn_t devfn_table[] = { PCH_DEVFN_XHCI, PCH_DEVFN_HDA };
+ static struct svid_ssid_init_entry ssid_table[ARRAY_SIZE(devfn_table)];
+
+ for (i = 0; i < ARRAY_SIZE(devfn_table); i++) {
+ ssid_table[i].reg = PCI_SUBSYSTEM_VENDOR_ID;
+ ssid_table[i].device = PCI_SLOT(devfn_table[i]);
+ ssid_table[i].function = PCI_FUNC(devfn_table[i]);
+ dev = pcidev_path_on_root(devfn_table[i]);
+ if (dev) {
+ ssid_table[i].svid = dev->subsystem_vendor;
+ ssid_table[i].ssid = dev->subsystem_device;
+ }
+ }
+
+ params->SiSsidTablePtr = (uintptr_t)ssid_table;
+ params->SiNumberOfSsidTableEntry = ARRAY_SIZE(ssid_table);
}
/* Mainboard GPIO Configuration */
--
To view, visit https://review.coreboot.org/c/coreboot/+/49104
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ieaa45ef7fa8e0da4a25b9174ded1ea0c5d9c4b4e
Gerrit-Change-Number: 49104
Gerrit-PatchSet: 12
Gerrit-Owner: Tim Crawford <tcrawford(a)system76.com>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Jeremy Soller <jeremy(a)system76.com>
Gerrit-Reviewer: Michael Niewöhner <foss(a)mniewoehner.de>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
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: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-CC: Subrata Banik <subrata.banik(a)intel.com>
Gerrit-MessageType: merged