Commit Graph

52317 Commits

Author SHA1 Message Date
Karthikeyan Ramasubramanian 8d88561235 util/amdfwtool: Support not passing recovery/backup APCB
If Recovery/Backup APCB is not passed, then AMD_BIOS_APCB_BK entry is
not populated. But PSP expects that bios directory entry to be
populated. Also on mainboards where both APCB and recovery APCB are same
(eg. Skyrim), 2 copies of the same APCB are added to amdfw*.rom. Update
amdfwtool to support not passing recovery/backup APCB. If the recovery
APCB is not passed, then populate AMD_BIOS_APCB_BK entry and make it
point to the same offset as AMD_BIOS_APCB entry.

BUG=b:240696002
TEST=Build and boot to OS in Skyrim. Ensure that the device can enter
recovery mode. Perform multiple suspend/resume cycles.

Change-Id: I031ba817573cd35160f5e219b1b373ddce69aa6b
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73661
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-03-15 17:30:15 +00:00
Karthikeyan Ramasubramanian 225b4b3279 amdfwtool: Remove the initial alignment on newer SoCs
On newer SoCs the initial alignment is not required. So skip initial
alignment. This saves 64 KiB flash space on each firmware slots. This
also saves ~5 ms while loading amdfw.rom

BUG=b:240696002
TEST=Build and boot to OS in Skyrim.

Change-Id: I27cbfde2d7d58b62a4c0039c60babc3fb3bd95fa
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73654
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
2023-03-15 17:30:12 +00:00
Lean Sheng Tan 742b65bdf6 soc/intel/tigerlake: Select `X86_CLFLUSH_CAR` config
This patch selects `X86_CLFLUSH_CAR` config for running `clflush`
to invalidate the cache region based on commit 3134a81 for boot
performance improvement.

Signed-off-by: Lean Sheng Tan <sheng.tan@9elements.com>
Change-Id: I97c8c07db9b44aa89b433e7962ec77c8501ecaa9
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73688
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2023-03-15 14:44:24 +00:00
Lean Sheng Tan 41546a5240 soc/intel/elkhartlake: Select `X86_CLFLUSH_CAR` config
This patch selects `X86_CLFLUSH_CAR` config for running `clflush`
to invalidate the cache region based on commit 3134a81 for boot
performance improvement.

Signed-off-by: Lean Sheng Tan <sheng.tan@9elements.com>
Change-Id: I8f8a0bfeaea508d3b4ad1b3fe2e68742cbab5570
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73687
Reviewed-by: Mario Scheithauer <mario.scheithauer@siemens.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-03-15 14:44:02 +00:00
Lean Sheng Tan 4c5b3f1ce7 soc/intel/coffeelake: Select `X86_CLFLUSH_CAR` config
This patch selects `X86_CLFLUSH_CAR` config for running `clflush`
to invalidate the cache region based on commit 3134a81 for boot
performance improvement.

Signed-off-by: Lean Sheng Tan <sheng.tan@9elements.com>
Change-Id: Icd3d16ab2cb34dc81fc12ec139c52ecaa170528d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73686
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-03-15 14:25:21 +00:00
Lean Sheng Tan 8615245349 soc/intel/alderlake: Select `X86_CLFLUSH_CAR` config
This patch selects `X86_CLFLUSH_CAR` config for running `clflush`
to invalidate the cache region based on commit 3134a81 for boot
performance improvement.

Signed-off-by: Lean Sheng Tan <sheng.tan@9elements.com>
Change-Id: I1fe6072a3c23a02c9a691406f179bfc8f0f18a93
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73685
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2023-03-15 14:25:12 +00:00
Sen Chu 0e5f51e186 soc/mediatek/mt8186: Shut down PMIC on power key long press
Currently on power key long press, PMIC will be reset. It would cause
an unwanted reset pulse in the power-off sequence. To match expected
sequence, change PMIC behavior to "force shutdown".

BUG=b:271771606
TEST=long-pressing power key doesn't trigger PMIC_AP_RST_L pulse
BRANCH=corsola

Change-Id: I9ab35d82e57f43bac99fa8bd7bb69fcf52250311
Signed-off-by: Sen Chu <sen.chu@mediatek.corp-partner.google.com>
Signed-off-by: jason-ch chen <jason-ch.chen@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73705
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Yidi Lin <yidilin@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
2023-03-15 10:30:17 +00:00
Sen Chu 527dd21e00 soc/mediatek/mt8188: Shut down PMIC on power key long press
Currently on power key long press, PMIC will be reset. It would cause
an unwanted reset pulse in the power-off sequence. To match expected
sequence, change PMIC behavior to "force shutdown".

BUG=b:271771606
TEST=long-pressing power key doesn't trigger PMIC_AP_RST_L pulse

Change-Id: I1626892fd582dfab8fe1c1ede1da00549bc97142
Signed-off-by: Sen Chu <sen.chu@mediatek.corp-partner.google.com>
Signed-off-by: jason-ch chen <jason-ch.chen@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73704
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
2023-03-15 10:30:05 +00:00
Dtrain Hsu 964d99ef88 mb/google/brya/var/omnigul: Correct mux_conn for USB C1
Modify USB C1 mux_conn to 1. It should match ec settings.

BUG=b:272394875, b:272667290
BRANCH=firmware-brya-14505.B
TEST=Plug USB-C hub in USB C1 and could recognize USB drive and hdmi.

Change-Id: I61b77405d1790b044174cef954e5bf910141f424
Signed-off-by: Dtrain Hsu <dtrain_hsu@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73679
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Derek Huang <derekhuang@google.com>
Reviewed-by: Ian Feng <ian_feng@compal.corp-partner.google.com>
Reviewed-by: Frank Wu <frank_wu@compal.corp-partner.google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2023-03-15 10:11:49 +00:00
Jamie Chen d2aacc8cd1 mb/google/brya/var/omnigul:Fixed can't detect 3.5mm headphone jack
1. Modify irq_gpio GPP_H0 -> GPP_A23

BUG=b:272218750
TEST=FW_NAME=omnigul emerge-brya coreboot

Change-Id: I8e178b149015ed8027b547e4c2109b3aef8a7484
Signed-off-by: Jamie Chen <jamie_chen@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73610
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Derek Huang <derekhuang@google.com>
Reviewed-by: Ian Feng <ian_feng@compal.corp-partner.google.com>
Reviewed-by: Dtrain Hsu <dtrain_hsu@compal.corp-partner.google.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
2023-03-15 02:24:23 +00:00
Jamie Chen 18d7f9dc53 mb/google/brya/var/omnigul:Fixed Touch screen has no action
1. Add generic.stop_gpio = GPP_C6
2. Add c.stop_off_delay_ms = 2

BUG=b:271966059
TEST=FW_NAME=omnigul emerge-brya coreboot

Change-Id: I33857443d8a68e7b50ac5f8f08afc017fe4f5a59
Signed-off-by: Jamie Chen <jamie_chen@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73569
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Derek Huang <derekhuang@google.com>
Reviewed-by: Ian Feng <ian_feng@compal.corp-partner.google.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
2023-03-15 02:24:05 +00:00
Frank Wu 23c77ef0c3 mb/google/skyrim/var/frostflow: Update the STT settings
According to file thermal_table_0310, adjust the STT settings.

BRANCH=none
BUG=b:257149501
TEST=emerge-skyrim coreboot chromeos-bootimage
Then the thermal team has verified.

Change-Id: If4500c85dcea051aca15602f1fb4b5ec80b73e67
Signed-off-by: Frank Wu <frank_wu@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73698
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Chao Gui <chaogui@google.com>
2023-03-14 01:42:37 +00:00
Amanda Huang 48286abfc1 mb/google/dedede/var/dibbi: Configure I2C times for audio
Configure the I2C bus high and low time for audio.

BUG=b:271804915
BRANCH=dedede
TEST=Build and confirm I2C clock for audio is between 380 kHz and 400
kHz

Change-Id: I2987a39abc5527844424edfa1cf70d5c5cea5357
Signed-off-by: Amanda Huang <amanda_hwang@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73701
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Reka Norman <rekanorman@chromium.org>
2023-03-14 01:23:06 +00:00
van_chen e5fa3b1680 mb/google/brya: Create uldren variant
Create the uldren variant of the nissa reference board by copying
the template files to a new directory named for the variant.

(Auto-Generated by create_coreboot_variant.sh version 4.5.0).

BUG=b:271513530
BRANCH=None
TEST=util/abuild/abuild -p none -t google/brya -x -a
make sure the build includes GOOGLE_ULDREN

Change-Id: Ibbcd34fb4ef1f7464f0c94d2fcf75280c3eed6be
Signed-off-by: van_chen <van_chen@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73680
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Dtrain Hsu <dtrain_hsu@compal.corp-partner.google.com>
Reviewed-by: Shou-Chieh Hsu <shouchieh@google.com>
Reviewed-by: Derek Huang <derekhuang@google.com>
Reviewed-by: Frank Wu <frank_wu@compal.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-03-14 01:22:57 +00:00
Subrata Banik 01209524f4 soc/intel/meteorlake: Enable early caching of TOM region
Intel Meteor Lake decides to enable early caching of the TOM region to
optimize the boot time by selecting `SOC_INTEL_COMMON_BASECODE_TOM`
config.

TEST=Able to build and boot google/rex to ChromeOS and reduce the boot
time by 77 ms.

Without this patch:
  950:calling FspMemoryInit               936,811 (19,941)
  951:returning from FspMemoryInit        1,041,935 (105,123)

With this patch:
  950:calling FspMemoryInit               905,108 (20,103)
  951:returning from FspMemoryInit        964,038 (59,929)

Change-Id: Iebb3485b052386b43d5bccd67a04e6115cbcc20d
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73274
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-03-13 14:14:06 +00:00
Subrata Banik dbfbfaf608 drivers/intel/fsp2_0: Have provision for caching TOM region
This patch enables early caching of TOM region to optimize the boot
time if valid mrc cache is found (i.e. except the first boot after
flashing/updating few AP firmware image).

TEST=Able to build and boot google/rex to ChromeOS.

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: Ia575ad0f99d5b0fd015e40b0862e8560700f6c83
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73334
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2023-03-13 14:13:42 +00:00
Subrata Banik 725dd39f5b soc/intel/cmn/sa: Store TOM into the CMOS
This patch uses the IA common code API to store the top_of_ram (TOM)
address intonon-volatile space (CMOS).

The code logic will update the TOM address in CMOS NVS if the
`top_of_ram` address is calculated differently in any boot and
also takes care of caching the updated range.

TEST=Able to build and boot google/rex to ChromeOS.

First boot:

Before calling into FSP-M

  [DEBUG]  0x00000000fef00006: PHYBASE0: Address = 0x00000000fef00000, WB
  [DEBUG]  0x00003ffffff80800: PHYMASK0: Length  = 0x0000000000080000, Valid
  [DEBUG]  0x00000000fef80006: PHYBASE1: Address = 0x00000000fef80000, WB
  [DEBUG]  0x00003ffffffc0800: PHYMASK1: Length  = 0x0000000000040000, Valid
  [DEBUG]  0x00000000ff000005: PHYBASE2: Address = 0x00000000ff000000, WP
  [DEBUG]  0x00003fffff000800: PHYMASK2: Length  = 0x0000000001000000, Valid
  [DEBUG]  0x00000000f9800005: PHYBASE3: Address = 0x00000000f9800000, WP
  [DEBUG]  0x00003fffff800800: PHYMASK3: Length  = 0x0000000000800000, Valid
  ...
  [DEBUG] tom_table invalid signature
  [DEBUG]  top_of_ram = 0x76000000
  [DEBUG] Updated the TOM address into CMOS 0x76000000

On consecutive boot:Before calling into FSP-M:

The TOM region is already cached.

  [DEBUG]  0x00000000fef00006: PHYBASE0: Address = 0x00000000fef00000, WB
  [DEBUG]  0x00003ffffff80800: PHYMASK0: Length  = 0x0000000000080000, Valid
  [DEBUG]  0x00000000fef80006: PHYBASE1: Address = 0x00000000fef80000, WB
  [DEBUG]  0x00003ffffffc0800: PHYMASK1: Length  = 0x0000000000040000, Valid
  [DEBUG]  0x00000000ff000005: PHYBASE2: Address = 0x00000000ff000000, WP
  [DEBUG]  0x00003fffff000800: PHYMASK2: Length  = 0x0000000001000000, Valid
  [DEBUG]  0x00000000f9800005: PHYBASE3: Address = 0x00000000f9800000, WP
  [DEBUG]  0x00003fffff800800: PHYMASK3: Length  = 0x0000000000800000, Valid
  [DEBUG]  0x0000000075000005: PHYBASE4: Address = 0x0000000075000000, WP
  [DEBUG]  0x00003fffff000800: PHYMASK4: Length  = 0x0000000001000000, Valid

Change-Id: I2569495570652c488096f6a29f58dd8f0103af9d
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73273
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-03-13 14:12:17 +00:00
Subrata Banik bc8bbeed3b soc/intel/cmn/tom: Cache TOM region early
This patch implements a module that can store the top_of_ram (TOM)
address into non-volatile space (CMOS) during the first boot and
use it across all consecutive boot.

As top_of_ram address is not known until FSP-M has exited, it
results into lacking of MTRR programming to cache the 16 MB TOM,
hence accessing that range during FSP-M and/or late romstage causing
long access times.

Purpose of this driver code is to cache the TOM (with a fixed size of
16MB) for all consecutive boots even before calling into the FSP.
Otherwise, this range remains un-cached until postcar boot stage
updates the MTRR programming. FSP-M and late romstage uses this
uncached TOM range for various purposes (like relocating services
between SPI mapped cached memory to DRAM based uncache memory) hence
having the ability to cache this range beforehand would help to
optimize the boot time (more than 50ms as applicable).

TEST=Able to build and boot google/rex to ChromeOS.

Without this patch:
  950:calling FspMemoryInit               936,811 (19,941)
  951:returning from FspMemoryInit        1,041,935 (105,123)

With this patch:
  950:calling FspMemoryInit               905,108 (20,103)
  951:returning from FspMemoryInit        987,038 (81,929)

Change-Id: I29d3e1df91c6057280bdf7fb6a4a356db31a408f
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73272
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2023-03-13 14:11:31 +00:00
Zheng Bao 182cf7f120 top/Makefile.inc: Define regions-for-file with a flexibility
If we need to put a CBFS chunk into a specific region, add a line in
any Makefile.inc

regions-for-file-xxx=region_name

TODO:Do a complete binary identical test for all the mainboards.

Change-Id: Ie37a8a9230dc8b8e5664be8806f047afb94fba69
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70313
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
2023-03-13 14:02:03 +00:00
Fred Reitberger d8df2b7773 soc/amd/phoenix/mca.c: Remove excess MCA bank names
Documentation and hardware differ in the number of MCA bank names, so
remove the excess ones to prevent a "CPU has an unexpected number of MCA
banks!" warning message.

Signed-off-by: Fred Reitberger <reitbergerfred@gmail.com>
Change-Id: I75a2348561833f3f19181b4f30a6971ecb317899
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73650
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2023-03-13 14:01:58 +00:00
Felix Held 2f6f487c3c soc/amd/common/block/cpu/update_microcode: use raw MSR data
Since mst_t is a union of the struct containing the lower and higher 32
bits and the raw 64 bit value, the address of the microcode update can
be directly written to the raw value instead of needing to split it into
the lower and higher 32 bits and assigning those separately.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I51c84164e81477040a4b7810552d3d65c0e3656b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73636
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
2023-03-13 14:01:55 +00:00
Felix Held a83a4cb90c soc/amd/common/block/cpu/noncar/write_resume_eip: use raw MSR data
Since mst_t is a union of the struct containing the lower and higher 32
bits and the raw 64 bit value, the address of the bootblock_resume_entry
can be directly written to the raw value instead of needing to split it
into the lower and higher 32 bits and assigning those separately.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Suggested-by: Arthur Heymans <arthur@aheymans.xyz>
Change-Id: I7ebab1784ec592e18c29001b1cf3ee7790615bf8
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73635
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
2023-03-13 14:01:52 +00:00
Fabian Groffen 9b9d267f5a arch/x86/include/arch/mmio.h: Provide __always_inline definition for musl
fix compilation on musl-libc systems by providing an implementation
for __always_inline

Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Change-Id: I01a7eb9ed28e79523623ab362510ec2d93f4a8b7
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73667
Reviewed-by: Felix Singer <felixsinger@posteo.net>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-03-13 14:01:47 +00:00
Subrata Banik 2921a22613 soc/intel/meteorlake: Select `X86_CLFLUSH_CAR` config
This patch selects `X86_CLFLUSH_CAR` config for running
`clflush` to invalidate the cache region.

TEST=Able to build and boot google/rex.

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: I6b2dce39f82e28cd99ad8621c78bae494c4f16ba
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73333
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2023-03-13 13:44:28 +00:00
Arthur Heymans 3134a81525 cpu/x86/cache: CLFLUSH programs to memory before running
When cbmem is initialized in romstage and postcar placed in the stage
cache + cbmem where it is run, the assumption is made that these are
all in UC memory such that calling INVD in postcar is OK.

For performance reasons (e.g. postcar decompression) it is desirable
to cache cbmem and the stage cache during romstage.

Another reason is that AGESA sets up MTRR during romstage to cache all
dram, which is currently worked around by using additional MTRR's to
make that UC.

TESTED on asus/p5ql-em, up/squared on both regular and S3 resume
       bootpath. Sometimes there are minimal performance improvements
       when cbmem is cached (few ms).

Change-Id: I7ff2a57aee620908b71829457ea0f5a0c410ec5b
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37196
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-03-13 13:42:32 +00:00
Kevin Keijzer 4bad919ce4 MAINTAINERS: Add Kevin Keijzer for ASRock B75M-ITX
Change-Id: I6f2047e62c1e999823bf98acaf3530aa62478449
Signed-off-by: Kevin Keijzer <kevin@quietlife.nl>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73672
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
Reviewed-by: Fabian Groffen <grobian@gentoo.org>
2023-03-13 06:19:22 +00:00
EricKY Cheng 638eca3a94 mb/google/skyrim/var/winterhold: Change touch controller T3
Change stop_delay_ms time(T3) from 180 to 150 to meet specification.

T3 min-value of HID-I2C should be 150ms.

BUG=b:267280863
TEST=emerge-skyrim coreboot chromeos-bootimage.

Change-Id: I7ef7db4edaecece1fa5ab07e30a80e556ed35f8b
Signed-off-by: EricKY Cheng <ericky_cheng@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73665
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
2023-03-13 05:37:45 +00:00
Dtrain Hsu d8358ee292 mb/google/brask/var/kinox: Allow USB2/3 hotplug to wakeup S0ix
Allow USB2/3 hotplug event to wake up S0ix.

BUG=b:236189998
BRANCH=firmware-brya-14505.B
TEST=Verify USB-A device could wake up Kinox

Change-Id: I8aeeeac6c21289b70bdc7ffddc57687ac39e8456
Signed-off-by: Dtrain Hsu <dtrain_hsu@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73585
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
2023-03-13 00:28:26 +00:00
Fabian Groffen 6e04d8570f util/inteltool: Fix build on musl-libc systems
use __linux__ instead of __GLIBC__ guard for Linux-specific includes

Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Change-Id: Ifbf4552591c0df7811c5b37a9207c0901b6fd68f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73666
Reviewed-by: Felix Singer <felixsinger@posteo.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-03-12 11:42:48 +00:00
Fabian Groffen 318ddb8aab util/superiotool: Fix build on musl-libc systems
- use __linux__ instead of __GLIBC__ guard for Linux-specific includes
- use POSIX ioperm instead of deprecated iopl

Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Change-Id: I99613007aa9feddcb1041f31085cdeb195ff7a68
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73358
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
2023-03-12 11:42:38 +00:00
Zheng Bao c1cc7eb869 top/Makefile.inc: add _tohex
Get string of hex value of a given number.

Change-Id: I6d3525db19089938897b9d19ad9875bb07e0eecf
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/72953
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
2023-03-10 22:24:26 +00:00
Martin Roth 1ddb40f491 soc/amd/common/psp: Put spl_fuse in separate compilation unit
This separates the SPL fusing function into a separate C file which can
be excluded if it is not needed. This allows the psp_set_spl_fuse()
function to be made static again as the state of the function will
always match the boot_state entry.

Move the required #defines to the common header file so they can be
used by both psp_gen2.c & spl_fuse.c.

Signed-off-by: Martin Roth <gaumless@gmail.com>
Change-Id: Ifbc774a370dd35a5c1e82f271816e8a036745ad5
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73655
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
2023-03-10 22:12:25 +00:00
Felix Held cabf6eaac3 soc/amd/common/cpu/smm/smm_relocate: don't assume TSEG is below 4GB
Even though right now TSEG will always be located below 4GB, better not
make assumptions in the SMM relocation code. Instead of clearing the
higher 32 bits and just assigning the TSEG base and per-core SMM base to
the lower 32 bits of the MSR, assign those two base addresses to the raw
64 bit MSR value to not truncate the base addresses. Since TSEG will
realistically never be larger than 4GB and it needs to be aligned to its
power-of-two size, the TSEG mask still only needs to affect the lower
half of the corresponding MSR value.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I1004b5e05a7dba83b76b93b3e7152aef7db58f4d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73639
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2023-03-10 21:28:39 +00:00
Felix Held 65c4b8652d soc/amd/common/block/psp/psp_smm: use raw MSR data
Since mst_t is a union of the struct containing the lower and higher 32
bits and the raw 64 bit value, there's no need to convert the lower and
higher 32 bits into a 64 bit value and we can just use the 64 bit raw
value.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I5923df84f0eb3a28ba6eda4a06c7421f4459e560
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73638
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2023-03-10 21:26:12 +00:00
Felix Held 2c98218985 soc/amd/stoneyridge/monotonic_timer: use raw MSR data
Since mst_t is a union of the struct containing the lower and higher 32
bits and the raw 64 bit value, there's no need to convert the lower and
higher 32 bits into a 64 bit value and we can just use the 64 bit raw
value.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Ibc5d64c74eaabfc4b7834a34410b48f590f78a12
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73637
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2023-03-10 21:26:01 +00:00
Patrick Rudolph 7be147dfaa mp_init: Wait longer for APs to check in
On IBM/SBP1 with 384 cores it takes a while for all APs
to check in. Use linear scaling instead of hardcoding an
arbitrary limit for the timeout.

Change-Id: If020a3fa985bfc7fd2f0aa836dc04e6647a1a450
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73369
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
Reviewed-by: TangYiwei
Reviewed-by: Naresh <naresh.solanki.2011@gmail.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2023-03-10 20:01:22 +00:00
Naresh Solanki 559f9ed583 xeon_sp: Setup x2apic in SRAT
Set up SRAT table in X2APIC mode when necessary.

Change-Id: Ib8b4cebefe81f7b5514524dba2fa364eee4bb157
Signed-off-by: Naresh Solanki <Naresh.Solanki@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73366
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2023-03-10 19:56:21 +00:00
Zheng Bao 994ff52464 amdfwtool: Remove the option --list which nobody uses
It was used for printing the dependencies which is now taken by macro
DEP_FILES in soc/amd/common/Makefile.inc.

TEST=binary identical test on google/guybrush amd/chausie

Change-Id: I1b86df2cb2ed178cf0a263c50ccb3e2254a3852b
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73627
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-03-10 16:14:12 +00:00
Zheng Bao 4b6aa195b4 amdfwtool: Move PSP FWs padding into a loop for combo
Move main body of PSP padding into a loop which can add a new combo
entry. In the loop, get the FW files from each fw.cfg, create new pack
of PSP, and fill the combo header. Currently Feature COMBO is still
not fully functional. But the non-combo case will not be affected for
sure.

The real changes are
1. Add a do-while loop.
2. Remove a "TODO" comment.
All other changes are re-indenting and re-filling.

Change-Id: I351192a4bc5ed9ec0bfa3f2073c9633b8b44246d
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58554
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-03-10 16:12:45 +00:00
Sean Rhodes fe2f50f496 mb/starlabs/starbook/adl: Enable ASPM
Enable ASPM for RP5 (wireless) and RP9 (SSD).

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I428040caf171bdcfedc285cdeddc55bcbec40f3c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/72753
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-03-10 13:51:01 +00:00
John Su ab4ace2b8c mb/google/skyrim/var/markarth: Add 2 Micron parts to RAM ID table
Add new ram_id:0011 for Micron MT62F1G32D2DS-023 WT:B.
Add new ram_id:0100 for Micron MT62F2G32D4DS-023 WT:B.

DRAM Part Name                 ID to assign
K3KL8L80CM-MGCT                0 (0000)
H58G56BK7BX068                 0 (0000)
MT62F1G32D2DS-026 WT:B         0 (0000)
K3KL9L90CM-MGCT                1 (0001)
H58G66BK7BX067                 1 (0001)
MT62F2G32D4DS-026 WT:B         1 (0001)
MT62F512M32D2DR-031 WT:B       2 (0010)
H58G56BK8BX068                 3 (0011)
MT62F1G32D2DS-023 WT:B         3 (0011)
H58G66BK8BX067                 4 (0100)
MT62F2G32D4DS-023 WT:B         4 (0100)

BUG=b:271188237
BRANCH=None
TEST=FW_NAME=markarth emerge-skyrim coreboot

Change-Id: I59a6a6dff249cd4fe982a4de824848f1bac0ecba
Signed-off-by: John Su <john_su@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73510
Reviewed-by: Frank Wu <frank_wu@compal.corp-partner.google.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-03-10 13:47:16 +00:00
John Su 06a4cb437c spd/lp5: Add 2 Micron memory parts
Add Micron memory part MT62F1G32D2DS-023 and MT62F2G32D4DS-023 to LP5
global list. Attributes are derived from CCM005-1974498342-145. Also,
regenerate the SPD files for the SoC.

BUG=b:271188237
TEST=util/spd_tools/bin/spd_gen spd/lp5/memory_parts.json lp5

Change-Id: I6675a68b7a515bd6d21db3ea2da762b06dee017a
Signed-off-by: John Su <john_su@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73489
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2023-03-10 13:46:26 +00:00
Jamie Chen b78c09ee7d mb/google/brya/var/omnigul: Fix SSD can not boot into OS
1. device ref pcie_rp11 -> pcie_rp9 on.

BUG=b:270657362
TEST=FW_NAME=omnigul emerge-brya coreboot

Change-Id: If23785f42466ba94f33d4d15dde96de29dbb3a1e
Signed-off-by: Jamie Chen <jamie_chen@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73530
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Dtrain Hsu <dtrain_hsu@compal.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-03-10 13:45:18 +00:00
Dtrain Hsu ae3fa40b2e mb/google/brya/var/omnigul: Enable ELAN touchscreen
Enable ELAN eKTH5015M touchscreen.

BUG=b:271966059
BRANCH=firmware-brya-14505.B
TEST=FW_NAME=omnigul emerge-brya coreboot

Change-Id: I41eac949f21a48098b445f8d1b05f308672f7ab8
Signed-off-by: Dtrain Hsu <dtrain_hsu@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73584
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
2023-03-10 13:44:05 +00:00
Sean Rhodes 2d696516fd mb/starlabs/starbook/{tgl,adl}: Set DmiMaxLinkSpeed to 4
Set DmiMaxLinkSpeed to 4 in FSP to ensure that FSP always supports
PCIe Gen 4 drives.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I0e31919122dacfbdc2486fa8216a28b479f3bd00
Reviewed-on: https://review.coreboot.org/c/coreboot/+/72012
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2023-03-10 13:43:16 +00:00
Zheng Bao 0e3d18b130 amdfwtool: Add combo index and combo config table
For now, combo index is 0, and only the first entry in config table is
used. The index will grow when there are more combo entries.

Add a command parameter to give fw.cfg for combo index 1. Process the
combo config in the future loop.

Change-Id: I00609d91defc08e17f937ac8339575f84b1bd37c
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73496
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
2023-03-10 13:41:16 +00:00
Zheng Bao 39cae56c41 amdfwtool: Add a wrapper function to open and process config file
And move the additional processing to this new function.

Change-Id: Id101d63e4d30a6e57ac1aa79665a4ba22b2956f1
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73509
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
2023-03-10 13:40:21 +00:00
Zheng Bao 9bb62cb364 amdfwtool: Add HW IPCFG file whose subprog is 1
And rename PSP_HW_IPCFG_FILE to PSP_HW_IPCFG_FILE_SUB0

Change-Id: Ia1ab8482074105de367905be2b4b0418066823d2
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73531
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
2023-03-10 13:39:23 +00:00
ot_zhenguo.li 6bd9d959dd soc/mediatek/mt8188: Enable lastbus debug hardware
Lastbus is a bus debug tool. When the bus hangs, the bus transmission
information before resetting will be recorded.

The watchdog cannot clear it and it will be printed out for bus hanging
analysis.

There are two versions for lastbus:
Version 1 for MT8186, and version 2 for MT8188.

BUG=b:263753374
TEST=build pass.
Change-Id: Ibaf510481d1941376bd8da0168ef17c99a0fb9a2
Signed-off-by: ot_zhenguo.li <ot_zhenguo.li@mediatek.corp-partner.google.com>
Signed-off-by: jason-ch chen <Jason-ch.Chen@mediatek.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73624
Reviewed-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Reviewed-by: Yidi Lin <yidilin@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2023-03-10 12:38:31 +00:00
Anand Vaikar c9bf43f4d6 src/soc/amd/phoenix/include/soc/: Update the Data Fabric ID for Phoenix
Change-Id: I078b57825377f97f9f5f2b607fa134e3a67e9685
Signed-off-by: Anand Vaikar <a.vaikar2021@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73557
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: ritul guru <ritul.bits@gmail.com>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
2023-03-10 02:17:01 +00:00