Commit Graph

45767 Commits

Author SHA1 Message Date
Werner Zeh 0099832cda soc/intel/ehl: Add Kconfig option to disable reset on TCO expiration
The TCO timer is the default watchdog of an x86 host and can reset the
system once it has expired for the second time. There are applications
where this reset is not acceptable while the TCO is used. In these
applications the TCO expire event generates an interrupt and software
takes care. There is a bit in the TCO1_CNT register on Elkhart Lake to
prevent this reset on expiration (called NO_REBOOT, see doc #636722 ).
This bit can either be strapped on hardware or set in this register to
avoid the reset on expiration. While the hardware strap cannot be
overridden in software, the pure software solution is more flexible.
Unfortunately, the location for this bit differs among the different
platforms. This is why it has to be handled on soc level rather than on
TCO common code level.

This commit adds a Kconfig option where NO_REBOOT can be enabled. This
makes it easy to reach this feature over to the mainboard where it can
be selected if needed.

Change-Id: Iaa81bfbe688edd717aa02db86f0a93fecdfcd16b
Signed-off-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61177
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2022-01-25 16:15:30 +00:00
Elyes HAOUAS 964055d74f northbridge/intel/i945: Change types to uintptr_t where appropriate
Prepares compilation for x86_64 by avoiding casts to different sizes.

Current patch fixes:
1.
src/northbridge/intel/i945/raminit.c: In function 'ram_read32':
src/northbridge/intel/i945/raminit.c:77:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   77 |         read32((void *)offset);
      |                ^

2.
src/northbridge/intel/i945/rcven.c: In function 'sample_strobes':
src/northbridge/intel/i945/rcven.c:29:24: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   29 |                 read32((void *)addr);
      |                        ^
src/northbridge/intel/i945/rcven.c:30:24: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   30 |                 read32((void *)(addr + 0x80));
      |                        ^

3.
src/northbridge/intel/i945/gma.c: In function 'intel_gma_init_lvds':
src/northbridge/intel/i945/gma.c:98:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   98 |                (void *)pgfx, mmiobase, piobase, pphysbase);
      |                ^
src/northbridge/intel/i945/gma.c:359:25: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  359 |                         (void *)pgfx, hactive * vactive * 4);
      |                         ^
src/northbridge/intel/i945/gma.c:360:24: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  360 |                 memset((void *)pgfx, 0x00, hactive * vactive * 4);
      |                        ^
src/northbridge/intel/i945/gma.c: In function 'intel_gma_init_vga':
src/northbridge/intel/i945/gma.c:384:17: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  384 |                 (u32)mmiobase, piobase, pphysbase);
      |

4.
src/northbridge/intel/i945/northbridge.c: In function 'mch_domain_read_resources':
src/northbridge/intel/i945/northbridge.c:64:23: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
   64 |         cbmem_topk = ((uint32_t)cbmem_top() / KiB);
      |                       ^

Change-Id: I5ac7a1cb5d85a346114f909047d5a7c21ddb43e9
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61117
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2022-01-25 16:14:23 +00:00
Raul E Rangel 6ec3dd2e5c lib/cbmem_console,console: Resurrect CONSOLE_CBMEM_DUMP_TO_UART
Chromebooks normally run with non-serial enabled firmware because
writing to the UART console is very slow. This unfortunately makes
debugging boot errors more difficult. We tend to rely on port 80s and/or
the vboot recovery code.

When CONSOLE_CBMEM_DUMP_TO_UART is selected it will dump the entire
cbmem console to the UART whenever `vboot_reboot()` is called. We don't
incur any boot time penalty in the happy path, but still retain the
ability to access the logs when an error occurs.

The previous implementation was using a hard coded UART index and
`get_uart_baudrate` was always returning 0 since `CONFIG_TTYS0_BAUD`
wasn't defined. This change makes it so the UART console properties are
available when CONSOLE_CBMEM_DUMP_TO_UART is set. This results in the
following .config diff:

    +CONFIG_UART_FOR_CONSOLE=0
    +CONFIG_TTYS0_BASE=0x3f8
    +CONFIG_TTYS0_LCS=3
    +CONFIG_CONSOLE_SERIAL_115200=y
    +CONFIG_TTYS0_BAUD=115200

This functionality is especially helpful on Guybrush. PSP Verstage is
run on S0i3 resume. Today, if there is an error, the cbmem console is
lost since it lives in the PSP SRAM.

BUG=b:213828947, b:215599230
TEST=Build non-serial guybrush FW and verify no serial output happens in
happy path. Inject a vboot error and perform an S0i3 suspend/resume.
Verify CBMEM console gets dumped to the correct UART.

Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: I997942204603362e51876a9ae25e493fe527437b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61305
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-01-25 16:13:39 +00:00
Subrata Banik e8feab018b drivers/intel/fsp2_0: Make FSP Notify Phase APIs optional
The FSP API is used to notify the FSP about different phases in the
boot process. The current FSP specification supports three notify
phases:
 - Post PCI enumeration
 - Ready to Boot
 - End of Firmware

This patch attempts to make calling into the FSP Notify Phase APIs
optional by using native coreboot implementations to perform the
required lock down and chipset register configuration prior boot to
payload.

BUG=b:211954778
TEST=Able to build brya without any compilation issue and coreboot
log with this code changes when SKIP_FSP_NOTIFY_PHASE_READY_TO_BOOT
and SKIP_FSP_NOTIFY_PHASE_END_OF_FIRMWARE config enabled.

coreboot skipped calling FSP notify phase: 00000040.
coreboot skipped calling FSP notify phase: 000000f0.

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: Ia95e9ec25ae797f2ac8e1c74145cf21e59867d64
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60402
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2022-01-25 16:13:04 +00:00
Subrata Banik 7f8ab005ca soc/intel/adl: Replace dt `HeciEnabled` by `HECI1 disable` config
Since Tiger Lake platform, the HECI1 device can be disabled on
Alder Lake platform using two different mechanism:
A. Using PMC IPC command 0xA9.
B. Sending SBI message under SMM.

In current scope of Alder Lake the default implementation is using
(B) sending sbi message under SMM. A follow up patch to add the
possible options and let platform to choose the applicable one.

List of changes:
1. Drop `HeciEnabled` from dt and dt chip configuration.
2. Replace all logic that disables HECI1 based on the `HeciEnabled`
chip config with `DISABLE_HECI1_AT_PRE_BOOT` config.
3. Default enable HECI1 device in `chipset.cb` to ensure the HECI1
device can undergo the PCI enumeration and later based on the
mainboard policy the HECI1 device can be disabled.

Mainboards that choose to make HECI1 enable during boot don't override
`DISABLE_HECI1_AT_PRE_BOOT` config.

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: Ie673e634fbc0bdece419c379d417b08dfb4819e2
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60731
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-01-25 16:12:33 +00:00
David Wu ff99f1246f mb/google/brya/var/volmar: Enable EC keyboard backlight
Enable EC keyboard backlight for volmar.

BUG=b:211891086
TEST=FW_NAME=volmar emerge-brya coreboot chromeos-bootimage

Signed-off-by: David Wu <david_wu@quanta.corp-partner.google.com>
Change-Id: I24ec7c8ca770cb438aabcf16b252032eef6d734d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61298
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Ren Kuo <ren.kuo@quanta.corp-partner.google.com>
2022-01-25 16:12:05 +00:00
David Wu 10b2c73875 mb/google/brya/variants/volmar: Configure GPIOs according to schematics
Update initial gpio configuration for volmar

BUG=b:211891086
TEST=FW_NAME=volmar emerge-brya coreboot

Signed-off-by: David Wu <david_wu@quanta.corp-partner.google.com>
Change-Id: I1bd3f1b3807b546d5a827ac89f0dc9bc8aaec40a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61206
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-by: Ren Kuo <ren.kuo@quanta.corp-partner.google.com>
2022-01-25 16:11:10 +00:00
Usha P 8f2df280e1 soc/intel/common: Include Alder Lake-N device IDs
Add Alder Lake-N System Agent, PCIE, UFS, IPU and CNVI device IDs.
Document: Alder Lake N Platform EDS Volume 1 (Doc# 645548)

Signed-off-by: Usha P <usha.p@intel.com>
Change-Id: I0a383816f818b794cf1211766c27937b3b8daa31
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61161
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Kangheui Won <khwon@chromium.org>
2022-01-25 16:10:46 +00:00
Lean Sheng Tan 7760fe4645 soc/intel/elkhartlake: Add PSE TSN support
Enable PSE GBE with following changes:
1. Configure PCH GBE related FSP UPD flags
2. Add PSE GBE ACPI devices
3. Refactor PCH GBE FSP-S code and merge it together
   with PSE GBE code

Signed-off-by: Lean Sheng Tan <lean.sheng.tan@intel.com>
Change-Id: If3807ff5a4578be7b2c67064525fa5099950986a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56633
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
2022-01-25 16:09:56 +00:00
Lean Sheng Tan 5cd7579ee5 soc/intel/elkhartlake: Introduce Intel PSE
The Intel® Programmable Services Engine (Intel® PSE) is a
dedicated offload engine for IoT functions powered by an ARM
Cortex-M7 microcontroller. It provides independent, low-DMIPS
computing and low-speed I/Os for IoT applications, plus
dedicated services for real-time computing and time-sensitive
synchronization.

The PSE hosts new functions, including remote out-of-band
device management, network proxy, embedded controller lite
and sensor hub.

This CL enables the user to provide the base address of the
PSE FW blob which will then be loaded by the FSP-S onto the
ARM controller. PSE FW will do the initialization work of
PSE controller and its peripherals. The loading of PSE FW
should have negligible impact on boot time unless PSE
controller could not locate the PSE FW and FSP will attempt to
redo PSE FW loading and wait for PSE handshake until it times
out. Once PSE controller locate the PSE FW, it will do
initialization concurrently by itself with coreboot booting.

It also adds PSE related FSP-S UPD settings which enable the
setup of peripheral ownership (assigned to the PSE or x86
subsystem) and interrupts. These assignments need to take
place at a given point in the boot process and cannot be
changed later.

To verify if PSE FW is loaded properly, the user could enable
PchPseShellEnabled flag and the log will be printed at PSE UART
2.

For further info please refer to doc #611825 (for HW overview)
and #614110 (for PSE EDS).

Signed-off-by: Lean Sheng Tan <lean.sheng.tan@intel.com>
Change-Id: Ifea08fb82fea18ef66bab04b3ce378e79a0afbf7
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55367
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
2022-01-25 16:09:18 +00:00
Keith Hui 36425312ee mainboard/asus/p8x7x-series: Add new variant P8Z77-M
Constructed out of a mix of autoport results, p8z77-m_pro, and
tool dumps.

Working:

- Core i7-3770K CPU
- SeaBIOS 1.13.0 boot to Linux 5.4.24 and Windows 10 1903
  (all further tests are under these versions)
- USB2 / USB3
- SATA
- Gigabit ethernet
- CPU temp sensors (memtest86+ 5.0.1)
- Hardware monitoring under Linux
- Native and MRC raminit
- PCIe GPU in both "PCIEX16" slots (16x/4x, nVidia Quadro 600)
- Integrated graphics with Intel OpROM and libgfxinit (all ports)
- Serial port
- Windows with libgfxinit framebuffer
- 2ch sound playback, Linux and Windows

Not working:

- PS/2 mouse
- 6ch analog audio out
- PCI POST card in PCI slot

Untested:

- PS/2 keyboard
- Internal USB3 ports
- Digital audio out

Change-Id: If756e791ddce747cb1706414be8e41e83f88922b
Signed-off-by: Keith Hui <buurin@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/38988
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-01-25 10:27:11 +00:00
Xi Chen f4bb77bd9e soc/mediatek: Save dramc_param header to mrc_cache
Fast-k flow may need to re-init header because mrc_cache doesn't
store header. Storing header together with dparam data is better
for data consistancy.

TEST=fast calibration pass on Corsola
BUG=b:204226005

Signed-off-by: Xi Chen <xixi.chen@mediatek.corp-partner.google.com>
Change-Id: I22982923dce06c9e770aa4f20f3dcd2f33685d84
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61294
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2022-01-25 09:42:29 +00:00
Prashant Malani 20f836bfdf ec/google/chromeec: Add checks before creating Type C device
Check for situations where a Type C device isn't useful and avoid
creating one for those scenarios.

BUG=b:215199976
TEST=Tested on brya; verified that USBC device is created.

Signed-off-by: Prashant Malani <pmalani@chromium.org>
Tested-by: Alyssa Ross <hi@alyssa.is>
Change-Id: I5e1598bd637ec9f50e7bf8dab9e3c757a30b9848
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61262
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2022-01-25 03:52:00 +00:00
Felix Held a27d1fa175 soc/amd/sabrina/include/aoac_defs: add additional UARTs
Compared to Cezanne there are 3 more UARTs controllers.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Id98767197a21cb1a61f54fc9b256b10a9506c791
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61082
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2022-01-25 03:51:33 +00:00
Felix Held 1f0eb6b0db soc/amd/sabrina/include/iomap: update MMIO device mappings
Compared to Cezanne there are 3 more UARTs with DMA controllers.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I3a3d255bb4976a55623f3a161e791e80f1d01c69
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61081
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2022-01-25 03:51:10 +00:00
Raul E Rangel 9d93b16487 soc/amd/cezanne: Increase PRERAM_CBMEM_CONSOLE_SIZE to 0x2000
Let's increase this to avoid losing any logs.

BUG=b:213828947
TEST=Boot guybrush and no longer see
   *** Pre-CBMEM romstage console overflowed, log truncated!

Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: I3258145e352af3a75893c7cc96f36eb238c99abb
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61100
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kangheui Won <khwon@chromium.org>
2022-01-25 03:26:44 +00:00
Felix Held af356d313d soc/amd/sabrina: use correct PCI IDs
Replace the Renoir/Cezanne PCI IDs with the Sabrina ones that were added
in commit 27b02c2eee (include/device/
pci_ids.h: add PCI IDs for AMD Family 17h Model A0h SoC).

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I427df6f8e8c08fb47ae8513b6cf1085d4294e28f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61080
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2022-01-25 03:19:24 +00:00
Felix Held a8d7c043f6 mb/amd/chausie: add mainboard as copy of mb/amd/majolica
To have the new AMD Sabrina SoC code tested, add the AMD Chausie
mainboard as a copy of Majolica. This patch also changes the name from
Majolica to Chausie, selects the Sabrina SoC instead of the Cezanne SoC
and comments out the APCB_SOURCES since those aren't available in the
3rdparty/blobs repository yet.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Ic7b18f7a6ae5b8365234dd1227e0b1f7f37279da
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61079
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2022-01-25 03:19:15 +00:00
Felix Held 421c7d1a99 soc/amd/common/block/include/psp_efs: update defines for sabrina
Document #55758 Rev. 1.13 says that family 17h models 30h-3Fh and later
use the spi_readmode_f17_mod_30_3f struct element for SPI_MODE_FIELD and
spi_fastspeed_f17_mod_30_3f for SPI_SPEED_FIELD, so also use this for
The AMD Sabrina SoC which is family 17h models A0h-AFh.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I336f9ea4a0defdf34e1af4b6d568cfe46488f75e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61078
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2022-01-25 03:18:58 +00:00
Felix Held 3c44c6227e soc/amd/sabrina: add new SoC as copy of soc/amd/cezanne
The Cezanne SoC code was initially started as a copy of example/min86
which only provides enough code to make the SoC code build. Then the
different parts of the real SoC support was brought in patch by patch
which also helped cleaning up and untangling the code. Since the Cezanne
SoC code is now in a rather good shape and the Sabrina SoC is similar to
the Cezanne SoC from the coreboot side, the new SoC support is started
with a copy of the Cezanne code and all the needed changes will be
applied on top of that. In order for the build not to fail due to
duplicate files, this patch does not only copy the directory, but also
replaces most instances of the Cezanne name with Sabrina. Since the
needed blobs aren't available in the 3rdparty/amd_blobs repository yet,
the Cezanne blobs are used for now so that the build will succeed. As
soon as the proper blobs will be available in that repository, the code
will be switched over to use them.

As suggested by Nico, I added a "TODO: Check if this is still correct"
comment to the beginning of every copied file and all SOC_AMD_COMMON_*
Kconfig option selects which will be removed after re-verifying that
each file and each selected common code block is still correct for the
new SoC.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I978ddbdbfd70863acac17d98732936ec2be8fe3c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61077
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2022-01-25 03:18:47 +00:00
Felix Held 6abaccf13d vc/amd/fsp/sabrina: add as a copy of vc/amd/fsp/cezanne
The AMD Sabrina SoC will be using the FSP driver to call into the
corresponding FSP binary to do its part of for the silicon
initialization, so we need an initial set of FSP headers for the AMD
Sabrina SoC code to build. Since the FSP interface for this SoC won't be
too different from the Cezanne FSP interface, we'll start with a copy of
the Cezanne FSP headers and update/replace them as soon as the proper
FSP headers for Sabrina will be available.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Ib3bf50598efe60673b81cf99da491866fb5dc121
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61076
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2022-01-25 03:16:52 +00:00
Ivy Jian dd68649fe0 mb/google/brya/var/banshee: Configure TPM I2C BUS
Add I2C bus for banshee in Kconfig

BUG=b:214871796
TEST=emerge-brya coreboot

Signed-off-by: Ivy Jian <ivy_jian@compal.corp-partner.google.com>
Change-Id: I67592051b367d5a5715f8d1253ea0c11d2deb1c1
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61312
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: YH Lin <yueherngl@google.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com>
2022-01-24 21:39:04 +00:00
Ivy Jian 48eb9aa6d2 mb/google/brya/var/banshee: update overridetree
Update override devicetree based on schematics

BUG=b:214871796
TEST=emerge-brya coreboot

Signed-off-by: Ivy Jian <ivy_jian@compal.corp-partner.google.com>
Change-Id: I05b63ebcded2f37dfb0f6c428e1fb993f476006a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61269
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com>
2022-01-24 21:38:53 +00:00
Paul Menzel bf52cdbca1 Revert "SeaBIOS: Update stable release to 1.15.0"
This reverts commit 2a8de6dafb.

SeaBIOS 1.15.0 regresses on systems with NVMe devices [1]:

> Greetings! Was this patch set tested on bare metal hardware? I'm
> seeing "GRUB loading: Read Error" when attempting to boot from NVMe on
> various Purism Librem devices (Intel Skylake thru Cometlake hardware).
> Reverting this series resolves the issue.

So, revert back to SeaBIOS 1.14.0.

[1]: https://mail.coreboot.org/hyperkitty/list/seabios@seabios.org/message/SRECAGH4NE3XPDWJ2YI526L5LPSJWENJ/

Change-Id: If2ec738d478f11b203f499eaa28197357de6630d
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61179
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-01-24 18:18:21 +00:00
Tim Wawrzynczak 672e844692 device: constify pciexp_find_extended_cap()
The object pointed to by the struct device * argument is not modified,
therefore it can be made const.

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: I300d2a59eb0513ddd08d4f1d2a3c6eb829e3f836
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61214
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-01-24 17:28:39 +00:00
Tim Wawrzynczak 1b57537530 mb/google/brya: Alphabetize BOARD_GOOGLE_* in Kconfig.name
Change-Id: I624dd67b6ce9b87a6031b5467eacb9a8d7cda1cd
Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61216
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-01-24 17:27:55 +00:00
Joey Peng 4337349883 mb/google/brya/var/{taeko, taeko4es}: Modify touchpad i2c signal
Modify i2c signal to meet touchpad vendor spec.
Please see issue tracker for more details.

BUG=b:215487482
TEST=emerge-brya coreboot and check measured waveform in spec

Signed-off-by: Joey Peng <joey.peng@lcfc.corp-partner.google.com>
Change-Id: Ib3797d4e232654ada97092d9f2742ca040d0f0e4
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61271
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-01-24 17:09:07 +00:00
Tim Crawford 83c30a9cf1 mb/system76/lemp10: Remove incorrect SPD address 0x50
The Lemur Pro, with its mixed memory topology, only has a DIMM at
address 0x52.

Change-Id: Iecea8c70c7fd40943d86f8918f8e3b384538b5c3
Fixes: 4dcee4f21d ("mb/system76/lemp10: Add System76 Lemur Pro 10")
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60779
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jeremy Soller <jeremy@system76.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2022-01-24 17:07:03 +00:00
Tim Wawrzynczak b3cd55b224 soc/intel/common/block/pcie/rtd3: Fix PMC IPC method for CPU PCIe RP
When calling get_pcie_rp_pmc_idx(), the following code checked the
return value to see if it was negative or `> CONFIG_MAX_ROOT_PORTS`.
However, the expected return value for CPU PCIe RPs is above
MAX_ROOT_PORTS. Since the static, local function is intended to return
-1 or a valid value, drop the check for `> CONFIG_MAX_ROOT_PORTS`.

Change-Id: I2039273ad246884cd8736a7f0355e621a706a526
Fixes: b6a15a7 ("soc/intel/common/block/pcie/rtd3: Update ACPI Update
ACPI methods for CPU PCIe RPs")
Tested-by: Tim Crawford <tcrawford@system76.com>
Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61280
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Tim Crawford <tcrawford@system76.com>
2022-01-24 16:28:12 +00:00
Zheng Bao 6dfa528af9 soc/amd/common: Make the function in cpu.c available in romstage
Change-Id: I909f74853a37a783582471e05071bc3d07e3dcf8
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61310
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2022-01-24 15:50:47 +00:00
Zheng Bao 0d7eaba0d6 mb/google/guybrush: Change DDI settings for guybrush variants
Like the variant function to change DXIO settings, add a similar weak
function to modify the DDI settings.

Currently we follow the old way. Later we will find out a better way
to avoid using weak function.

Change-Id: I9898d717bc3025ea1ddc3b0db41325083324ed57
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61140
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Chris Wang <chris.wang@amd.corp-partner.google.com>
2022-01-24 15:50:30 +00:00
Xi Chen 426ea9670f soc/mediatek: Extract dramc_param_header to a common header
To be shared with different SOCs, move the dramc_param_header struct
as well DRAMC_PARAM_FLAG and DRAMC_PARAM_CONFIG enums to a common
header file dramc_param_common.h.

TEST=fast calibration pass
BUG=b:204226005

Signed-off-by: Xi Chen <xixi.chen@mediatek.corp-partner.google.com>
Change-Id: I087971799803e47e34c30063b2b0bd0cfc5795ac
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61132
Reviewed-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-01-24 01:54:28 +00:00
Paul Menzel 63b53561e1 Makefile.inc: Add `-fno-pie` to `ADAFLAGS_common`
Building libgfxinit with Debian’s toolchain – latest test with *gnat-11*
11.2.0-13 from Debian sid/unstable – the build fails with the error
below.

    E: Invalid reloc type: 10
    E: Unable to create rmodule from 'build/cbfs/fallback/ramstage.debug'.

Debian’s toolchain is built without enabling PIE by default.

So, explicitly pass `-fno-pie` to `ADAFLAGS_common` to be independent
from how the toolchain was built.

TEST=*gnat* 11.2.0-13 successfully. builds
     purism/librem_cnl/variants/librem_mini with libgfxint.

     With the coreboot toolchain `make BUILD_TIMELESS=1` produces the
     same `build/coreboot.rom` for `BOARD_PURISM_LIBREM_MINI_V2=y` on
     top of commit 50251400d2 (sb/intel/common/firmware: Reword
     me_cleaner warning) with and without the change.
Change-Id: I6661937906d95c130c6099f598d61b21e958fd85
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/43759
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2022-01-23 18:55:16 +00:00
Raul E Rangel 86302a806c soc/amd/{common,cezanne,picasso}: Add PRE_X86_CBMEM_CONSOLE_SIZE
This change splits the size of the console transfer region and size of
the bootblock/romstage Pre-RAM console region. This allows having a
larger Pre-RAM console while not impacting the size of the PSP verstage
console.

Instead of directly using the PRE_X86_CBMEM_CONSOLE_SIZE symbol in
`setup_cbmem_console`, I chose to use the offsets provided in the
transfer buffer. It would be nice to eventually do this for all the
fields in the transfer buffer.

BUG=b:213828947
TEST=Boot guybrush and verify verstage logs are no longer truncated

Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: I8b8cc46600192a7db00f5c1f24c3c8304c4db31d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61189
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kangheui Won <khwon@chromium.org>
2022-01-23 16:42:48 +00:00
Raul E Rangel 1e1aa0ca4d lib/cbmem_console: Add cbmemc_copy_in function
When running in verstage before bootblock, the PSP (ARM co-processor) is
running with limited SRAM. It needs to stash the verstage console data
internally until DRAM is brought up. Once DRAM is brought up the data is
stashed in a "transfer buffer" region. In the current design, we are
using the same region for the transfer buffer and the
preram_cbmem_console region. This has the following downsides:

1) The pre-x86 buffer needs to be large enough to hold all the
   verstage, bootblock and romstage console logs.
2) On AMD platforms, the PSP verstage is signed. Changing the size of
   preram_cbmem_console after the fact will result in a mismatch of the
   transfer buffer between verstage and bootblock.

This CL adds a new method that allows SoC specific code to copy the
CBMEM console in the transfer buffer to the active CBMEM console.

BUG=b:213828947
TEST=Boot guybrush and no longer see
   *** Pre-CBMEM romstage console overflowed, log truncated!

Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: Idc0ab8090db740e0d1b3d21d8968f26471f2e930
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61099
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kangheui Won <khwon@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2022-01-23 16:42:38 +00:00
Jeremy Soller 5be92e6f33 mb/system76/lemp9: Make GPIO for touchpad interrupt level triggered
Fixes commit 6bcaf6f (mb/system76/lemp9: Configure IRQs as level
triggered for HID over I2C), which changed the interrupt configuration
in the device tree but not in the GPIO definitions. Tested on a
System76 Lemur Pro (lemp9), multi-touch I2C-HID was working.

Signed-off-by: Jeremy Soller <jeremy@system76.com>
Change-Id: I7f0559675a65453a1ad071f96049549a2dc21378
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61302
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
2022-01-22 22:27:30 +00:00
Kevin Chiu c067e4a6e5 mb/google/guybrush/var/nipperkin: turn on WLAN ASPM L1ss
BUG=b:198258604
BRANCH=guybrush
TEST=emerge-guybrush coreboot
     WLAN works properly in OS

Change-Id: Ie1f295eaa57af7c2942e1807b3a0c4dcd89cd696
Signed-off-by: Kevin Chiu <kevin.chiu.17802@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60265
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2022-01-22 18:25:44 +00:00
Usha P 36871dbdb7 mb/intel/adlrvp: Add missing CAM1 RST GPIO for ADL-N
Signed-off-by: Usha P <usha.p@intel.com>
Change-Id: I79f2206bee5403c3fb1c999918fbd2177d0d07ab
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61163
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kangheui Won <khwon@chromium.org>
2022-01-22 02:01:37 +00:00
Sridhar Siricilla 23e2cde597 soc/intel/alderlake: Implement get_soc_cpu_type helper function
The patch implements get_soc_cpu_type() helper function which
determines whether the executing CPU is a small or a big core. This is
the SoC-specific callback that must be implemented for SoCs that select
SOC_INTEL_COMMON_BLOCK_ACPI_CPU_HYBRID. It will be called from
set_cpu_type().

TEST=verified on Brya

Signed-off-by: Sridhar Siricilla <sridhar.siricilla@intel.com>
Change-Id: Icd0d7e8a42c4b20d3e1d34998bca6321509df2d8
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61075
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-01-22 02:01:04 +00:00
Bora Guvendik 1587324a0d commonlib: Add new "CSME ROM started execution" TS
BUG=b:182575295
TEST=Boot to OS, check cbmem -t

 990:CSME ROM started execution                        0
 944:CSE sent 'Boot Stall Done' to PMC                 80,408
 945:CSE started to handle ICC configuration           80,408 (0)
 946:CSE sent 'Host BIOS Prep Done' to PMC             82,408 (2,000)
 947:CSE received 'CPU Reset Done Ack sent' from PMC   242,408 (160,000)
   0:1st timestamp                                     331,797 (89,389)
  11:start of bootblock                                359,484 (27,686)
  12:end of bootblock                                  377,417 (17,932)

Signed-off-by: Bora Guvendik <bora.guvendik@intel.com>
Change-Id: I9e4ccd0b8c301e4eec1a09ee8919a577ade938ea
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61168
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-01-21 22:43:30 +00:00
Bora Guvendik e383b3dcc4 util/cbmem: Rebase to handle negative timestamps
Rebase all of the timestamps to the lowest (potentially negative) value
in the list when displaying them. Also drop the extra
`timestamp_print_*_entry` calls for time 0 and instead inserted a
"dummy" timestamp entry of time 0 into the table.

TEST=Boot to OS after adding negative timestamps, cbmem -t

Signed-off-by: Bora Guvendik <bora.guvendik@intel.com>
Change-Id: I7eb519c360e066d48dde205401e4ccd3b0b3d8a5
Reviewed-on: https://review.coreboot.org/c/coreboot/+/59555
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2022-01-21 22:43:03 +00:00
Bora Guvendik bf73c498d4 timestamp: Allow timestamp_add to accept a negative number
Change timestamp_add to accept negative values for events that took
place before coreboot started executing.

TEST=Boot to OS, check cbmem -t

Signed-off-by: Bora Guvendik <bora.guvendik@intel.com>
Change-Id: I90afc13a8e92693d86e3358f05e0a0cb7cdbca9b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/59554
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-01-21 22:42:19 +00:00
Bora Guvendik f33c9bf79a soc/intel/common/cse: Add support to get CSME timestamps
This command retrieves a set of boot performance timestamps
CSME collected during the platform's last boot flow.

BUG=b:182575295
TEST=Verify CSME timestamps after S3 and boot.

Signed-off-by: Bora Guvendik <bora.guvendik@intel.com>
Change-Id: Ic6f7962c49b38d458680d51ee1cd709805f73b66
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58993
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-01-21 22:41:57 +00:00
Raul Rangel 03b1d3ef48 Revert "lib/cbmem_console: Move copy_console_buffer up in the file"
This reverts commit 6a3bdf9aa5.

Reason for revert: Oops, I thought I abandoned this. It's been replaced by https://review.coreboot.org/c/coreboot/+/61099/3

Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: Id18e8e69481bdd78fdd70116940ea435922a9e77
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60853
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Rob Barnes <robbarnes@google.com>
2022-01-21 20:45:22 +00:00
Tim Crawford c7018cc009 mb/system76/*: Enable measured boot
Tested by checking PCR-2 data is recorded in cbmem log.

Change-Id: I70cb9a93de44e75f3a3ed24979c243fccea1213d
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/59963
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jeremy Soller <jeremy@system76.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2022-01-21 18:19:08 +00:00
Lean Sheng Tan 203e6c2ed3 mb/prodrive/atlas: Configure GPIO as per Atlas board
Update GPIO settings as per schematics v3.

Signed-off-by: Lean Sheng Tan <sheng.tan@9elements.com>
Change-Id: I685d0b7274e3a6e707fec37d051f4818860169ed
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61116
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-01-21 17:25:45 +00:00
Tim Crawford 5fe3032e06 mb/system76/gaze15: Set _UID for touchpad devices
The _UID must be unique as these devices use the same _HID. Fixes BSOD
when booting Windows 10.

Change-Id: I67fda892a496dc9e5a6fa5e133ff0b35cde8fce7
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61210
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jeremy Soller <jeremy@system76.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2022-01-21 17:25:28 +00:00
Scott Chao e24b006ee4 mb/google/brya/var/gimble{4es}: Decrease touchscreen T3 timing to 200ms
We set T3 as 300ms to meet Elan's spec, but the resume/suspend times
are greater than 500ms, which is the spec for Chromebooks.
The actual kernel timing has been measured, and given the ACPI delay
after deasserting reset in addition to the delay until the kernel
driver accesses the device, delaying only 200ms in the ACPI method is
also sufficient to meet the 300ms requirement.

BUG=b:210772498
BRANCH=none
TEST=build and test touchscreen function on DUT.
TEST=suspend, wake DUT and check touchscreen function.

Signed-off-by: Scott Chao <scott_chao@wistron.corp-partner.google.com>
Change-Id: I4bb4eda09686cb59b6e19c741aa2b78d84332d2a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60270
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
2022-01-21 16:29:13 +00:00
Subrata Banik 25387927c0 soc/intel/common/gpio: Add PCH `Pad Configuration Lock` options
This patch provides the possible options for PCH to allow `Pad
Configuration Lock`.

`SOC_INTEL_COMMON_BLOCK_GPIO_LOCK_USING_SBI` config is for Tiger Lake
Point (TGP) and Alder Lake Point (ADP) PCH.

BUG=b:211573253, b:211950520
TEST=None

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: I7cf35893ab613b154a1073060081a09e561ffe56
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60964
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Maulik V Vaghela <maulik.v.vaghela@intel.com>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
2022-01-21 16:10:46 +00:00
Subrata Banik 6a4f5739c8 soc/intel/common/gpio: Use const variable to get gpio bitmask
This patch introduces a `const bit_mask` variable to hold the gpio
PAD mask value prior to sending the lock configuration command using
the sideband interface.

Additionally, this patch fixes the PAD lock overridden issue as below:

Without this code change every consecutive PAD lock operation resets
other bits in that register as below:

After Locking pad 2 , pcr_read=0x4
After Locking pad 3 , pcr_read=0x8
After Locking pad 4 , pcr_read=0x10
After Locking pad 5 , pcr_read=0x20
After Locking pad 6 , pcr_read=0x40
After Locking pad 7 , pcr_read=0x80
After Locking pad 8 , pcr_read=0x100

With this code change all previous lock bits are getting preserved as
below:

After Locking pad 2 , pcr_read=0x4
After Locking pad 3 , pcr_read=0xc
After Locking pad 4 , pcr_read=0x1c
After Locking pad 5 , pcr_read=0x3c
After Locking pad 6 , pcr_read=0x7c
After Locking pad 7 , pcr_read=0xfc
After Locking pad 8 , pcr_read=0x1fc

BUG=b:211573253, b:211950520

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: I342a666aa2d34bcc8ba33460396d1248f0c0f89f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60999
Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-by: Maulik V Vaghela <maulik.v.vaghela@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-01-21 16:08:13 +00:00