Commit Graph

55529 Commits

Author SHA1 Message Date
Felix Held 78113d4897 sb/amd/pi/hudson: select HAVE_CONFIGURABLE_APMC_SMI_PORT
Select HAVE_CONFIGURABLE_APMC_SMI_PORT and implement the
pm_acpi_smi_cmd_port helper function.

TEST=APU2 still compiles with HAVE_SMI_HANDLER selected and NO_SMM
select removed.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I8f79d8c1d59aa1b6c1145dd0b1cbc9010a1c57e7
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79849
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
2024-01-10 14:48:57 +00:00
Felix Held 74beb5de84 sb/amd/pi/hudson/smhandler: use common APM_CNT_ACPI_* defines
The Hudson southbridge code for the AMD binaryPI SoCs had its own ACPI
enable and disable APMC command numbers that didn't match the common
defines in coreboot, so use the common define here to be consistent with
the command numbers in the corresponding FADT fields. Since the only SoC
that still would use this code doesn't select HAVE_SMI_HANDLER, this
won't fix any observable bug, but better fix this before anyone possibly
runs into this.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I5e596071e1b5269b616b7a93151648cb86ae77bc
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79848
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
2024-01-10 14:47:23 +00:00
Felix Held 3fc1f0667f sb/amd/pi/hudson: drop unused ACPI_SMI_CMD_* defines
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Idf02d8bee70fd654b3e71d1ead6dc0414fb6de40
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79847
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-01-10 14:46:59 +00:00
Felix Held 2768e36f07 sb/amd/pi/hudson: fix gpio.h and smi.h include location
This fixes the following compile error when trying to build the APU2
board with HAVE_SMI_HANDLER selected and the NO_SMM select removed:

In file included from src/soc/amd/common/block/gpio/gpio.c:8:
src/include/gpio.h:6:10: fatal error: soc/gpio.h: No such file or directory
    6 | #include <soc/gpio.h> /* IWYU pragma: export */
      |          ^~~~~~~~~~~~

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Ie06044b12f5cbcc55a2706ec566afd2eb294c62b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79846
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-01-10 14:45:11 +00:00
Felix Held 141955ac74 soc/amd: use apm_get_apmc() in APMC SMI handler
Instead of open-coding this functionality, call the apm_get_apmc()
helper function.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Iac6b614d900e51d91a0c155116a5edc29775ea99
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79836
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
2024-01-10 14:44:51 +00:00
Felix Held 21710ea3cd cpu/x86/smi_trigger: use enum cb_err as apm_control return type
Even though the return value from apm_control isn't checked at any of
its call sites, using the cb_err enum instead of an integer as return
type makes it clearer what the returned value means.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I07ced74cae915df52a9d439835b84237d51fdd11
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79835
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
2024-01-10 14:40:25 +00:00
Yidi Lin c4e14c2929 mb/google/cherry: Use common mtk_display_init()
TEST=check FW screen on dojo

Change-Id: Ie870899226588ac2a2e80f77e434455f4913d387
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79778
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2024-01-10 14:21:20 +00:00
Yidi Lin cb7c4fdbd6 mb/google/corsola: Use common mtk_display_init()
TEST=check FW screen on Steelix, Tentacruel and Starmie

Change-Id: I429218d59389a6ab86b522dd597c07fa5b8ea821
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79777
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-01-10 14:20:56 +00:00
Yidi Lin ba604b558e soc/mediatek: Add common implementation to configure display
The sequences of configure_display() are similar on MediaTek platforms.

The sequences usually involve following steps:
1. Setup mtcmos for display hardware block.
  - mtcmos_display_power_on()
  - mtcmos_protect_display_bus()
2. Configure backlight pins
3. Power on the panel
   - It also powers on the bridge in MIPI DSI to eDP case.
4. General initialization for DDP(display data path)
5. Initialize eDP/MIPI DSI accordingly,
   - For eDP path, it calls mtk_edp_init() to get edid from the panel
     and initializes eDP driver.
   - For MIPI DSI path, the edid is retrieved either from the bridge or
     from CBFS (the serializable data), and then initializes DSI driver.
6. Set framebuffer bits per pixel
7. Setup DDP mode
8. Setup panel orientation

This patch extracts geralt/display.c to mediatek/common/display.c and
refactors `struct panel_description` to generalize the display init
sequences. configure_display() is also renamed to mtk_display_init().

TEST=check FW screen on geralt.

Change-Id: I403bba8a826de5f3fb2ea96a5403725ff194164f
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79776
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-01-10 14:20:25 +00:00
Anand Vaikar 7224999497 soc/amd/glinda: Increase maximum CPU threads to 24
glinda SOC has 24 maximum CPU threads as per PPR documentation(#57254).

TEST=Boot logs print the CPU initialization happens for 24 
threads.

Change-Id: Id48a5c62d6156c046daffd2648aeebeee380bd88
Signed-off-by: Anand Vaikar <a.vaikar2021@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79509
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2024-01-10 14:19:37 +00:00
Deepti Deshatty 315251d5cc mb/intel/mtlrvp: define a new config for Chrome EC
Introduce new config MTL_CHROME_EC_SHARED_SPI, tailored for
Chrome ECs utilizing an external shared SPI flash.

BUG=b:289783489
TEST=emerge-rex coreboot chromeos-bootimage is successful

Cq-Depend: chrome-internal:6691498
Cq-Depend: chrome-internal:6741356
Change-Id: I462c34c5adaefa37c652de293152243c58bad7c5
Signed-off-by: Deepti Deshatty <deepti.deshatty@intel.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79824
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-01-10 14:18:32 +00:00
Deepti Deshatty 264f86526d mb/intel/mtlrvp: streamline Chrome EC configs
Chrome EC configuration options that are common among
various boards have been consolidated under the
"BOARD_EXT_EC_SPECIFIC_OPTIONS" config.

BUG=b:289783489
TEST=emerge-rex coreboot chromeos-bootimage is successful

Change-Id: I0b85cc48d5cefadb52edbb27bf6cf370b27c395f
Signed-off-by: Deepti Deshatty <deepti.deshatty@intel.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79211
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-01-10 14:18:07 +00:00
Elyes Haouas 3d883ba606 Makefile.inc: Enable Wold-style-declaration command option
Warn for obsolescent usages, according to the C Standard, in a
declaration. For example, warn if storage-class specifiers like static
are not the first things in a declaration.

Change-Id: Ida3fa59edb07e4105ef3cfb6a20cb29680699586
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/71892
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-01-09 23:23:34 +00:00
Felix Singer d74ee60f71 soc/nvidia: Put static keyword at the beginning of declarations
In order to comply with the more recent style of declarations, put the
static keyword at the beginning.

Fixes following GCC error when the related flag is set:

  error: 'static' is not at beginning of declaration [-Werror=old-style-declaration]

Change-Id: Ida683319f7a0c428a9e4808821075abdd9fcb504
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79856
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2024-01-09 23:23:24 +00:00
Felix Singer a4a65b2025 3rdparty/vboot: Update submodule to upstream main
Updating from commit id 7c3b60bb:
2023-12-21 20:34:49 +0000 - (firmware/2lib: Use SSE2 to speed-up Montgomery multiplication)

to commit id 32402941:
2024-01-08 19:53:43 +0000 - (treewide: Put the static keyword at the beginning of declarations)

This brings in 4 new commits:
32402941 treewide: Put the static keyword at the beginning of declarations
242d198b crossystem: Use external tool the clear the TPM
c8a0802f tests: Remove unnecessary vb2_verify_fw.c from TEST20_NAMES list
706088b8 tests: Test HW crypto RSA signature verification

Change-Id: I667376dfc3021fa6d213e3d89917ee228fd14a28
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79853
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2024-01-09 22:27:25 +00:00
Patrick Rudolph c23336ed77 mb/ibm/sbp1: Set FSP loglevel
Change-Id: Ia97dbda30f657f0b1568364d712eaea8d134b3b0
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79791
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-01-09 14:45:04 +00:00
Shelley Chen 3738e7408d mb/google/brox: Fix error in DDR DQS config
The DQS mapping for DIMM idx 6 was discovered to be incorrect to what
was in the schematics.  Correcting the mistake in this CL.

BUG=b:311450057,b:300690448
BRANCH=None
TEST=tested on device and it passed memory training

Change-Id: I21f50e2f5b4fae09725c1c7532636ed1cc1a9043
Signed-off-by: Shelley Chen <shchen@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79843
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Ivy Jian <ivy.jian@quanta.corp-partner.google.com>
2024-01-09 07:50:33 +00:00
Subrata Banik 0acae97863 soc/intel/mtl: Override the `SOC_PHYSICAL_ADDRESS_WIDTH` as integer
This patch enforces consistent override handling for integer
`SOC_PHYSICAL_ADDRESS_WIDTH` config

Change-Id: Ib5bdfdb8c2689803c9d3c2bfd353609edae91ab3
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79842
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jakub Czapiga <czapiga@google.com>
2024-01-09 06:56:15 +00:00
Ruihai Zhou 520137fab0 drivers/mipi: Add support for IVO_T109NW41 panel
Add IVO_T109NW41 serializable data to CBFS.
Datasheet: T109NW41 R0 Tentative Product Specification.docx

BUG=b:319025360
TEST=build and check the CBFS include the panel
BRANCH=None

Change-Id: Id740e3a21f72bbcd6e5c2b56b31ac90f4990d475
Signed-off-by: Ruihai Zhou <zhouruihai@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79844
Reviewed-by: Yidi Lin <yidilin@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: cong yang <yangcong5@huaqin.corp-partner.google.com>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2024-01-09 06:43:01 +00:00
Ruihai Zhou 611ee33209 util/lint: Remove the extra `\` in lint-stable-003-whitespace
A following error occurred when I commit, it seems that the extra `\`
after `\.md$` is unnecessary.

File Binary file src/mainboard/google/guybrush/data.apcb matches has
lines ending with whitespace.
File Binary file src/mainboard/google/skyrim/data.apcb matches has
lines ending with whitespace.
File Binary file src/mainboard/google/zork/data.apcb matches has
lines ending with whitespace.
test failed

Signed-off-by: Ruihai Zhou <zhouruihai@huaqin.corp-partner.google.com>
Change-Id: I315a37ccc3c6ebb67f7a250402549761c699dd1b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79782
Reviewed-by: cong yang <yangcong5@huaqin.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Yidi Lin <yidilin@google.com>
2024-01-08 19:45:23 +00:00
Patrick Rudolph 3d93cd78d8 src/arch/x86/exit_car: Add proper x86_64 code
Don't truncate upper bits in assembly code and thus allow loading
of postcar stage above 4GiB.

Tested on qemu with cbmem_top set to TOUUD.

Change-Id: I42d1086f1220e44076ccf613244fc3c6d804805b
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Signed-off-by: Benjamin Doron <benjamin.doron@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79162
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2024-01-08 19:40:21 +00:00
Felix Held c4fbc9146d cpu/x86/smi_trigger: call pm_acpi_smi_cmd_port to get APMC SMI IO port
Instead of hard-coding the APMC SMI command IO port in the FADT, call
pm_acpi_smi_cmd_port() to get the APMC SMI command IO port. Also update
the comment in apm_get_apmc to match what it's doing.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I0f36b8a0e93a82b8c6d23c5c5d8fbebb1bc6b0bc
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79567
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
2024-01-08 13:10:12 +00:00
Felix Held 8fdf183175 arch/x86/acpi: call pm_acpi_smi_cmd_port to get APMC SMI IO port
Instead of hard-coding the APMC SMI command IO port in the FADT, call
pm_acpi_smi_cmd_port() to get the APMC SMI command IO port.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I731c780bc6db7e7fd59688340bab1da86fc93c11
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79565
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-01-08 13:09:56 +00:00
Felix Held 6759ad39ad arch/x86: introduce HAVE_CONFIGURABLE_APMC_SMI_PORT
Introduce the HAVE_CONFIGURABLE_APMC_SMI_PORT Kconfig option that when
not selected will result in a default implementation of
pm_acpi_smi_cmd_port to be included in the build that returns APM_CNT.
SoCs that provide their own pm_acpi_smi_cmd_port implementation, need to
select this Kconfig option.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Iaceb61b0f2a630d7afe2e0780b6a2a9806ea62f9
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79566
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
2024-01-08 13:09:36 +00:00
rex_chou 3526b9fcaf mb/google/nissa/var/craaskov: Implement touchscreen power sequencing
For brya variants with a touchscreen, drive the enable GPIO high
starting in romstage while holding in reset, then disable the reset
GPIO in ramstage (done in the baseboard).

BUG=b:317746281
TEST=emerge-nissa coreboot chromeos-bootimage

Change-Id: I3ca2e2d12a86eaae9e37870a2541c0287e354690
Signed-off-by: Rex Chou <rex_chou@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79764
Reviewed-by: Dtrain Hsu <dtrain_hsu@compal.corp-partner.google.com>
Reviewed-by: Ian Feng <ian_feng@compal.corp-partner.google.com>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-01-08 13:05:23 +00:00
Reka Norman afed45dbaa util/ifdtool: Add support for extended region read/write access
Platforms from CNL onwards support up to 16 flash regions, not 12. The
permissions for regions [15:12] are stored in extended region
read/write access fields in the FLMSTR registers. Currently ifdtool
treats these fields as reserved, so they're not modified when locking or
unlocking.

Add support for extended regions so that they are locked/unlocked by the
--lock/--unlock options. This will make the locked/unlocked descriptors
generated by ifdtool match those generated by mFIT.

BUG=b:270275115
TEST=Without this change:

`ifdtool -lr -p adl` on unlocked image:
Before:
00000080  ff ff ff ff ff ff ff ff  ff ff ff ff 00 00 00 00
00000090  ff ff ff ff
After:
00000080  ff 07 20 00 ff 05 40 00  ff 00 00 00 00 00 00 00
00000090  ff 00 00 00

`ifdtool -u -p adl` on locked image:
Before:
00000080  00 07 20 00 00 05 40 00  00 00 00 00 00 00 00 00
00000090  00 00 00 00
After:
00000080  00 ff ff ff 00 ff ff ff  00 ff ff ff 00 00 00 00
00000090  00 ff ff ff

With this change:

`ifdtool -lr -p adl` on unlocked image:
Before:
00000080  ff ff ff ff ff ff ff ff  ff ff ff ff 00 00 00 00
00000090  ff ff ff ff
After:
00000080  00 07 20 00 00 05 40 00  00 00 00 00 00 00 00 00
00000090  00 00 00 00

`ifdtool -u -p adl` on locked image:
Before:
00000080  00 07 20 00 00 05 40 00  00 00 00 00 00 00 00 00
00000090  00 00 00 00
After:
00000080  ff ff ff ff ff ff ff ff  ff ff ff ff 00 00 00 00
00000090  ff ff ff ff

Change-Id: Iaa43524d91c399a996ade56f2f613b4110a44aad
Signed-off-by: Reka Norman <rekanorman@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79790
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-01-08 13:05:04 +00:00
Elyes Haouas 0509009f79 nb/intel/gm45/raminit: Use read32p()
Built roda/rk9 with BUILD_TIMELESS=1 and the resulting coreboot.rom
remains identical.

Change-Id: Ib1e7144eebf8148c4eb5cc0e7bc03ae3d7281092
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/77971
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-01-08 13:03:45 +00:00
Ruihai Zhou 0d50536a50 drivers/mipi: Add support for BOE_NV110WUM_L60 panel
Add BOE_NV110WUM_L60 serializable data to CBFS.
Datasheet: B5NV110WUM-L60 V5.0Product SpecificationRev.P0

BUG=b:308968270
TEST=build and check the CBFS include the panel
BRANCH=None

Change-Id: I830a41555131cfc51ef6976ac5428bf9bc03c097
Signed-off-by: Ruihai Zhou <zhouruihai@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78956
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: cong yang <yangcong5@huaqin.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-01-08 02:28:58 +00:00
Kulkarni, Srinivas 8b89f89ecb vc/intel/fsp/mtl: Update header files from 3424_88 to 3471.85
Update header files for FSP for Meteor Lake platform to version 3471_85,
previous version being 3424_88.

FSPM:
1. Add 'DisplayGpioPinMux' UPDs
2. Address offset changes

BUG=b:318772151
TEST=Able to build and boot google/rex to ChromeOS.

Change-Id: I11c39fc2e3099d93a488e71d571ac1af02345fbd
Signed-off-by: Kulkarni, Srinivas <srinivas.kulkarni@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79829
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-01-07 05:35:33 +00:00
Martin Roth 2d6b4c84a4 Documentation/getting_started: Add a FAQ document
Signed-off-by: Martin Roth <gaumless@gmail.com>
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Change-Id: Ia324e4800bf9dfc7ad86f4f99272c87ac566304e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79441
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-01-06 22:07:18 +00:00
Elyes Haouas 4b6d368d12 soc/rockchip/rk3399/mipi: Remove space before semicolon
Change-Id: I7e02173c296689ef3143a1079658006ec91c4dc2
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/77156
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-01-06 20:58:04 +00:00
Riku Viitanen c7932e267d mb/hp/z220_series: Rename to snb_ivb_desktops
In preparation for adding other similar boards under it as variants.
Tested that z220_cmt still builds.

Change-Id: I96dec173e0d97d8564bad14778333b8231684ef8
Signed-off-by: Riku Viitanen <riku.viitanen@protonmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79434
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-01-05 20:54:04 +00:00
Felix Held e9a5e82176 soc/amd/picasso/Kconfig: select SOC_AMD_COMMON_BLOCK_EMMC_SKIP_POWEROFF
Commit 850b6c6254 ("soc/amd/picasso: add eMMC MMIO device to
devicetree") broke both S3 resume on Morphius SKUs that use an NVMe SSD
instead of an eMMC and boot on the currently out-of-tree ASRock X370
Killer SLI board. In the latter case, commenting out the
power_off_aoac_device call inside the emmc_enable function fixed things.

TEST=This fixes S3 resume on Morphius with NVMe SSD and an equivalent
change discussed in the patch mentioned above that caused the regression
also fixed boot on the ASRock board.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Change-Id: Id976734c64efe7e0c3d8b073c8009849be291241
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79826
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
2024-01-05 16:58:59 +00:00
Felix Held 03c858fb23 soc/amd/common/emmc: add Kconfig option to skip powering off eMMC
Add a Kconfig option to skip powering off the eMMC controller via the
AOAC block in the case where the eMMC controller is disabled in the
devicetree.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I0dbe819222972d9bf0789671b031ad83648e8917
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79825
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-01-05 16:51:49 +00:00
Patrick Rudolph ddc19b3341 arch/x86/include/mode_switch: Add more wrapper functions
Add a protected mode wrapper function that takes three arguments.
This is already supported by the called assembly code.

Change-Id: Ia8c91eebae17e4ca27e391454c2d130a71c4c9f3
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79756
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2024-01-05 14:36:14 +00:00
Patrick Rudolph 1d718def05 northbridge/intel/sandybridge: Enable x86_64 for mrc.bin
Enable x86_64 support for MRC.bin:
- Add a wrapper function for console printing that calls into
  long mode to call native do_putchar
- Remove Kconfig guard for x86_64 when MRC is being used

Tested: Booted Lenovo X220 using mrc.bin under x86_64 and
        MRC is able to print to the console.

Change-Id: I21ffcb5f5d4bf155593e8111531bdf0ed7071dfc
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79754
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2024-01-05 14:34:29 +00:00
Patrick Rudolph 3052e9e642 cpu/x86/64bit/mode_switch2: The reverse function to mode_switch
Add another mode_switch assembly function to call x86_64 code from
x86_32 code. This is particullary useful for BLOBs like mrc.bin or
FSP that calls back into coreboot.

The user must first wrap all functions that are to be called from
x86_32 using the macro prot2lm_wrapper. Instead of using the original
function the wrapped functions must be passed to the x86_32 BLOBs.

The assembly code assume that 0-3 32bit arguments are passed to
the wrapped function.

Tested:
- Called x86_64 code from x86_32 code in qemu.
- Booted Lenovo X220 using x86_32 MRC using x86_64 console.

Change-Id: Ib625233e5f673eae9f3dcb2d03004c06bb07b149
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79753
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2024-01-05 14:33:22 +00:00
Subrata Banik 8e7251c625 vendorcode/google/chromeos: Use unsigned int for "factory_config"
This patch ensures `chromeos_get_factory_config()` returns an
unsigned integer value because factory config represents
bit-fields to determine the Chromebook Plus branding.

Additionally, introduced safety measures to catch future
"factory_config" bit-field exhaustion.

BUG=b:317880956
TEST=Able to verify that google/screebo is branded as
Chromebook Plus.

Change-Id: I3021b8646de4750b4c8e2a2981f42500894fa2d0
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79769
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2024-01-05 09:24:01 +00:00
Reka Norman c64be928de util/ifdtool: Add support for disabling GPR0
On ChromeOS devices with updateable CSE firmware, the GPR0 (Global
Protected Range) register is used to ensure the CSE RO is write
protected even when the FLMSTR-based protection is temporarily disabled
by coreboot to allow updating the CSE RW. For more details see
Documentation/soc/intel/cse_fw_update/cse_fw_update.md

Therefore to allow modifying the CSE firmware from the CPU, the
descriptor must have both the FLMSTR-based protection disabled (which
can be done using ifdtool --unlock), and GPR0 disabled.

Add an ifdtool option for disabling GPR0. For now I've added support for
all platforms for which I have the SPI programming guide. Support for
more platforms can be added in the future if needed.

BUG=b:270275115
TEST=Run `ifdtool -p adl -g image.bin -O image-unlocked.bin` on a locked
craask image, check the GPR0 field is set to 0.

Change-Id: Iee13ce0b702b3c7a443501cb4fc282580869d03a
Signed-off-by: Reka Norman <rekanorman@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79788
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-01-05 05:12:23 +00:00
Yi Chou 0f910e7db9 vboot: Add firmware PCR support
To verify the boot chain, we will need to extend the PCR with the
firmware version. And the server will be able to attest the firmware
version of devices.

The "firmware version" here is the RW firmware anti-rollback version,
determined by the ChromeOS's signing infra, and will be verified in
vb2api_fw_phase3, by comparing it with the version stored in the TPM.
This version will be increased when there is critical vulnerability
in the RW firmware.

According to [1], PCRs 8-15 usage is defined by Static OS. Therefore
PCR_FW_VER is chosen to be within that range. Ideally the existing
PCR_BOOT_MODE and PCR_HWID should also be allocated in the same range,
but unfortunately it's too late to fix them. Because PCRs 11 and 13
have been used for other purposes in ChromeOS, here PCR_FW_VER is set
to 10.

[1] https://trustedcomputinggroup.org/wp-content/uploads/TCG_PCClient_PFP_r1p05_05_3feb20.pdf

BUG=b:248610274
TEST=Boot the device, and check the PCR 10
BRANCH=none

Signed-off-by: Yi Chou <yich@google.com>
Change-Id: I601ad31e8c893a8e9ae1a9cdd27193edce10ec61
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79437
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-01-04 14:30:33 +00:00
Jon Murphy 2a13a04686 Documentation: Update internal URL's
Update URL's to point to head rather than the deprecated
refs/heads/master.

Change-Id: I16f0c087762ff049115b67de3ac0b881aa4e4b40
Signed-off-by: Jon Murphy <jpmurphy@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79785
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
2024-01-04 14:22:51 +00:00
Simon Yang 59b383e21c driver/wifi: DDR RFIM _DSM method function 3 report incorrect value
The DDR RFIM _DSM method function 3 need to return:

- 0: Enable DDR RFIM feature.
- 1: Disable DDR RFIM feature.

BUG=b:302084312
TEST=Build, dump SSDT to check _DSM function 3 return value

Change-Id: I642c56a9c3160cdb41b254dc75e126cacf905b14
Signed-off-by: Simon Yang <simon1.yang@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79740
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Rex Chou <rex_chou@compal.corp-partner.google.com>
2024-01-04 14:22:24 +00:00
Patrick Rudolph 68642ca981 nb/intel/sandybridge/raminit: Honor SPD's dll_off_mode
In DDR3 DLL-Off mode is an optional feature advertised by SPD.
Honor the SPD and only use DLL-Off mode when all DIMMs on the
same channel indicate support for it.
The same is done on MRC.bin.

Tested on Lenovo X220: Still boots fine.

Change-Id: Ief4bfb9e045cad7ff9953f6fda248586ea951a52
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79758
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-01-04 14:20:06 +00:00
Felix Held 41a5954a67 soc/amd/picasso/acpi: move SoC-common code from dsdt.asl to soc.asl
To avoid code duplication and to also bring the mainboards using the
Picasso SoC more in line with Cezanne and newer, factor out the SoC-
specific code from the mainboard's dsdt.asl files to the SoC's soc.asl.

TEST=Timeless builds result in identical images for Bilby, Mandolin, and
Zork/Morphius

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Id4ed3a3d3cb55c8b3b474c66a7c1700e24fe908e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79653
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
2024-01-04 14:16:48 +00:00
Deepti Deshatty 3329e8893e mb/intel/mtlrvp: add 512KB SI_EC FMAP region
This patch introduces the 512KB SI_EC FMAP region for storing the EC
firmware, a necessary addition to support EC chips without internal
flash memory.

As a testing platform, the MTLRVP Chrome SKU is utilized in conjunction
with the Microchip EC1723, and the changes are verified.

Cq-Depend: chrome-internal:6691498
Cq-Depend: chrome-internal:6741356
BUG=b:289783489
TEST=build "emerge-rex coreboot chromeos-bootimage" is successful.
changes are verified.
EC Log:
23-11-06 17:46:49.564 --- UART initialized after reboot ---
23-11-06 17:46:49.564 [Image: RO, mtlrvpp_m1723_v3.5.142816-ec:6596a3,
os:f660f7,cmsis:42cf18,picolibc:6669e4]
23-11-06 17:46:54.609 D: Power state: S5 --> S5S4
23-11-06 17:46:54.620 D: Power state: S5S4 --> S4
23-11-06 17:46:54.620 D: Power state: S4 --> S4S3
23-11-06 17:46:54.642 I: power state 10 = S3S0, in 0x0087
23-11-06 17:46:54.642 ec:~>: Power state: S3S0 --> S0

Change-Id: I788dbeaad05e5d6904fb2c7c681a0bf653dc7d84
Signed-off-by: Deepti Deshatty <deepti.deshatty@intel.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79209
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-01-03 10:34:44 +00:00
Jason Chen 27069e61b0 mb/google/rex/var/screebo: Prevent camera LED blinking during boot
Configure _DSC to ACPI_DEVICE_SLEEP_D3_COLD so that driver skips
initial probe during kernel boot, preventing privacy LED blink.

BUG=b:317434358
TEST=none

Change-Id: I43044e64c2c3a645ec0cad2ac903cc19ac89c9af
Signed-off-by: Jason Chen <jason.z.chen@intel.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79803
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Wentao Qin <qinwentao@huaqin.corp-partner.google.com>
2024-01-03 08:32:27 +00:00
Patrick Rudolph b4283a4fbb cpu/x86/64bit/mode_switch: Simplify assembly code
Drop the first argument specifying the number of arguments pushed
to the stack. Instead always push the 3 arguments to stack and use
the first one as function pointer to call while in protected mode.

While on it add more comments and simplify register restore code.

Tested:
- On qemu can call x86_32 function and pass argument and return
  value.
- Booted Lenovo X220 in x86_64 mode using x86_32 MRC.

Change-Id: I30809453a1800ba3c0df60acd7eca778841c520f
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79752
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-01-03 00:38:27 +00:00
Patrick Rudolph b14b96d29a northbridge/intel/sandybridge/raminit: Prepare MRC path for x86_64
- Remove pointers in argument list passed to MRC to make sure the struct
  has the same size on x86_64 as on x86_32.
- Add assembly wrapper to call the MRC with argument in EAX.
- Wrap calling MRC in protected_mode_call_2arg, which is a stub on x86_32

Tested: Boots on Lenovo X220 using MRC in x86_32 and x86_64 mode.

Change-Id: Id755e7381c5a94360e3511c53432d68b7687df67
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79751
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2024-01-03 00:38:05 +00:00
Felix Singer a611634de8 mb/google/fizz: Make use of chipset devicetree
Use the references from the chipset devicetree as this makes the
comments superfluous and remove devices which are turned off.

Built all variants with BUILD_TIMELESS=1 and the resulting binaries
remain the same.

Change-Id: I7752819091e2a75c8d818f7d0cf90eabc11c4759
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Signed-off-by: Marvin Evers <marvin.evers@stud.hs-bochum.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79327
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-01-02 11:56:27 +00:00
Felix Singer 3d98710515 mb/razer: Make use of chipset devicetree
Use the references from the chipset devicetree as this makes the
comments superfluous and remove devices which are turned off.

Built razer/blade_stealth_kbl with BUILD_TIMELESS=1 and the resulting
binary remains the same.

Change-Id: I0ffda6ee37e146e894a271c553e998a269c19294
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Signed-off-by: Marvin Evers <marvin.evers@stud.hs-bochum.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79326
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-01-02 11:39:32 +00:00