Commit Graph

55133 Commits

Author SHA1 Message Date
Arthur Heymans adee6a6945 vendorcode/amd/opensil: Add initial setup and API calls
- First a console is set up for opensil.
- After that a region in CBMEM is reserved and passed to opensil which
will use it as a buffer for input/output information.
- Finally opensil is called and the return value handled.

Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Change-Id: I4833a5a86034a13e6be102a6b68c3bb54108bc9a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76515
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2023-12-06 18:32:58 +00:00
Ivy Jian 76e499319b mb/google/brox: Generate RAM IDs for two modules
Add the support LP5 RAM parts for brox:
1. HYNIX LPDDR5 6400 2GB H9JCNNNBK3MLYR-N6E
2. MICRON LPDDR5 6400 4GB MT62F1G32D4DR-031 WT:B

DRAM Part Name                  ID to assign
H9JCNNNBK3MLYR-N6E              0 (0000)
MT62F1G32D4DR-031 WT:B          1 (0001)

BUG=b:311450057
BRANCH=None
TEST=Run part_id_gen tool without any errors
Change-Id: Ib17f26a310435e37088191594863a645aa751440
Signed-off-by: Ivy Jian <ivy.jian@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79392
Reviewed-by: Shelley Chen <shchen@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2023-12-06 17:22:49 +00:00
Felix Held 903454e7b8 sb/intel/bd82x6x: assign EHCI controller ops in chipset devicetree
Since the EHCI controllers in the PCH are always on the same device
functions, the device operations can be statically assigned in the
devicetree and there's no need to bind the EHCI device operations to the
PCI devices during runtime via a list of PCI IDs.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I92ecc3607216fb2f31639db9628898c9ce81770d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79171
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
2023-12-06 16:20:24 +00:00
Felix Held afebab1ebe sb/intel/bd82x6x: assign PCH XHCI controller ops in chipset devicetree
Since the XHCI controller in the PCH is always on the same device
function, the device operations can be statically assigned in the
devicetree and there's no need to bind the XHCI device operations to the
PCI device during runtime via a list of PCI IDs.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I8685bec734415346a53330c9bd1aa82986995f1a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79170
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
2023-12-06 16:20:08 +00:00
Felix Held 898757fc44 sb/intel/bd82x6x: assign PCH PCI bridge ops in chipset devicetree
Since the PCI bridge in the PCH is always on the same device function,
the device operations can be statically assigned in the devicetree and
there's no need to bind the PCI bridge device operations to the PCI
device during runtime via a list of PCI IDs.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Ic9ca925a12e64c9a5b3bf295653bf032572ff29a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79169
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2023-12-06 16:19:01 +00:00
Felix Held 1bb327f216 sb/intel/bd82x6x: assign PCH SMBus controller ops in chipset devicetree
Since the SMBus controller in the PCH is always on the same device
function, the device operations can be statically assigned in the
devicetree and there's no need to bind the SMBus device operations to
the PCI device during runtime via a list of PCI IDs.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I3d3745ba5aefa30efbe705155d216aa7eadd26a7
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79168
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-12-06 16:18:31 +00:00
Varshit Pandya e8f62d1355 commonlib/bsd: Use tabs instead of whitespaces
Change-Id: I05e7ba10e499ea1e824bdd6c87df05fc5a0864f8
Signed-off-by: Varshit Pandya <pandyavarshit@gmail.com>
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79400
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-12-06 16:02:44 +00:00
Felix Held 2009b99834 nb/amd/pi/00730F01/chipset.cb: don't call dummy function host bridge
Function 0 of the device that has the bridges to other buses is a dummy
function that can be left enabled to not have to shuffle around the
device function numbers when the first PCI bridge on that device isn't
enabled. That dummy device function is however not a PCI host bridge, so
change the comment from 'Dummy Host Bridge' to 'Dummy device function'.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Suggested-by: Nico Huber <nico.h@gmx.de>
Change-Id: I6069205bd2e1cb0f75025e9f330afc50462e742a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79397
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-12-06 16:02:15 +00:00
Felix Held f5b09dbe18 soc/amd/*/chipset.cb: don't call dummy device functions host bridges
Function 0 of the devices that have the bridges to other buses are dummy
functions that can be left enabled to not have to shuffle around the
device function numbers when the first PCI bridge on those devices isn't
enabled. Those dummy device functions are however not PCI host bridges,
so change the comments from 'Dummy Host Bridge' to 'Dummy device
function'.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Suggested-by: Nico Huber <nico.h@gmx.de>
Change-Id: Ibddfdf558d84bc44434d718b86f41bd06044b22a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79396
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
2023-12-06 16:01:18 +00:00
Eran Mitrani 3e306d48cd mb/google/rex/variants/deku: Enable CNVi PCI device
BUG=b:305793886
TEST=util/abuild/abuild -p none -t google/rex -x -a -b deku

Change-Id: I41a64252f08304ffc66fd782e54720252064ca49
Signed-off-by: Eran Mitrani <mitrani@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79398
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2023-12-06 15:09:39 +00:00
Felix Held 88da16b92d soc/amd/genoa/Kconfig: add CONSOLE_UART_BASE_ADDRESS defaults
Add defaults for the CONSOLE_UART_BASE_ADDRESS Kconfig symbol so that
the SeaBIOS payload will know where the MMIO address of the UART is to
build successfully without any additional user input during the build.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Ia05c3531cdbf3fd3e2e5f81b9d652f9dfef2111a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79395
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Varshit Pandya <pandyavarshit@gmail.com>
2023-12-06 15:09:01 +00:00
Naresh Solanki 1fe1904f38 acpi/acpi_gic: Add GIC ITS subtable
Add support for generating GIC subtable ITS (Interrupt Translator
Service).

Change-Id: I1bcb3ad24de64cbba8aeef7ba7254d3157e0dc43
Signed-off-by: Naresh Solanki <naresh.solanki@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78115
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2023-12-06 13:07:27 +00:00
Naresh Solanki 6920c6f232 acpi: Add IO Remapping Table structures
Input Output Remapping Table (IORT) represents the IO topology of an Arm
based system.

Document number: ARM DEN 0049E.e, Sep 2022

Change-Id: I4e8e3323caa714a56882939914cac510bf95d30b
Signed-off-by: Naresh Solanki <naresh.solanki@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/77884
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2023-12-06 13:06:22 +00:00
Felix Held 67b3c8f278 acpi/acpi: make sure that table_ptr is non-NULL in acpidump_print
While acpidump_print shouldn't be called with a NULL pointer as
table_ptr argument, better add a check to not end up dereferencing the
NULL pointer.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Ic3cc103c8a47fb8c2fe4262236ea47013af27c4f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79393
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <inforichland@gmail.com>
2023-12-05 18:36:15 +00:00
Felix Held 372dfe0e20 sb/intel/bd82x6x: assign PCH LPC bridge ops in chipset devicetree
Since the LPC bridge in the PCH is always on the same device function,
the device operations can be statically assigned in the devicetree and
there's no need to bind the LPC bridge device operations to the PCI
device during runtime via a list of PCI IDs.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I366226be4aba75b98e45e4832bfe129fac14dbfa
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79167
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
2023-12-05 15:06:03 +00:00
Shelley Chen 1a06631243 mb/google/brox: Fix memory config
Fix up the memory config for brox based on the schematics.  Also,
since memory training needs to happen in romstage, initializing the
MEM_STRAP & MEM_CH_SEL gpios for use in romstage. Also consolidating
the GPIOs needing to be initialized in romstage into the baseboard
gpio.c file.

BUG=b:300690448
BRANCH=None
TEST=emerge-brox coreboot

Change-Id: I17615cda7df10e73e49fb49f736728787ef7625d
Signed-off-by: Shelley Chen <shchen@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79355
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Ivy Jian <ivy.jian@quanta.corp-partner.google.com>
2023-12-05 01:51:16 +00:00
Felix Held b164d7a291 nb/intel/sandybridge/pcie: drop unneeded HAVE_ACPI_TABLES guards
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I1e8c8b3e3672d1589a5910753986e4033d2ce766
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79116
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2023-12-04 17:54:36 +00:00
Paul Menzel 8742577548 ec/lenovo/h8/acpi/thermal: Make NameSeg FPWR all upper case
Building the Lenovo T60/T60p, iasl 20230628 shows the remark below:

    dsdt.asl   2099:   PowerResource (FPwR, 0, 0)
    Remark   2182 -                     ^ At least one lower case letter found in NameSeg, ASL is case insensitive - converting to upper case (FPWR)

    dsdt.asl   2118:    Name (_PR0, Package () { FPwR })
    Remark   2182 -                                ^ At least one lower case letter found in NameSeg, ASL is case insensitive - converting to upper case (FPWR)

Address it by making it all upper case.

Change-Id: Ia7924b015e76c43818d2d82da35ce0013d721c26
Fixes: 3ab13a8691 ("ec/lenovo/h8/acpi/thermal: Add support for passive cooling")
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79367
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-12-04 17:53:40 +00:00
Subrata Banik ffd9dd55af mb/google/rex/var/screebo: Override power limits
This patch allows variants to override the default baseboard PLx
limits.

Additionally, rearrange the include header files alphabetically.

BUG=b:313667378
TEST=Able to boot google/screebo with modified power limits.

Before:

[DEBUG]  WEAK: src/mainboard/google/rex/variants/baseboard/rex/
         ramstage.c/variant_devtree_update called
[INFO ]  Overriding power limits PL1 (mW) (10000, 15000)
         PL2 (mW) (40000, 40000) PL4 (W) (84)

After:

[INFO ]  Overriding power limits PL1 (mW) (10000, 15000)
         PL2 (mW) (40000, 40000) PL4 (W) (84)

Change-Id: Ic66872c530963238a0bf5eebbd5b5a76a7985e5c
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79330
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2023-12-04 17:04:02 +00:00
Nina Wu 5fe04f33ee soc/mediatek/mt8188: devapc: Allow APU to access BND_NORTH_APB2_S
Update BND_NORTH_APB2_S's domain 5 permission to allow the access from
APU. The APU requires certain information saved in BND_NORTH_APB2_S for
voltage tuning. If this information cannot be retrieved, the APU may
operate at a high frequency with low voltage. Consequently, the APU may
not function as expected.

Change-Id: I967b138dc5517e54da7fbf94b9e502e478c991b5
Signed-off-by: Nina Wu <nina-cm.wu@mediatek.com>
Signed-off-by: Jason Chen <Jason-ch.Chen@mediatek.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79348
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Yidi Lin <yidilin@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-12-04 16:48:33 +00:00
Michał Żygowski a87ab39817 security/vboot: Add Kconfig option to clear recovery request
For ChromeOS platform the recovery reason is cleared in
vb2api_kernel_phase2 which is probably not called by any non-ChromeOS
system. It results in the platform being stuck in recovery mode, e.g.
when RW firmware verification fails. Even if the RW partition is
flashed with correctly signed image, the persistent non-zero recovery
reason will prevent vboot from attempting the RW partition check.

Use the newly exposed vb2api_clear_recovery and
VBOOT_CLEAR_RECOVERY_IN_RAMSTAGE Kconfig option to clear the recovery
reason and save it immediately to the VBNV. The idea is to let
non-ChromeOS coreboot platform to clear the recovery reason when
needed.

TEST=Clear the recovery reason in mainboard_final function right
before payload jump when RW partition is corrupted and RW partition is
valid. In case it is corrupted, the platform stays in recovery mode,
when valid the platform boots from RW partition. Tested on MSI PRO
Z690-A DDR4.

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Change-Id: I7ffaf3e8f61a28a68c9802c184961b1b9bf9d617
Reviewed-on: https://review.coreboot.org/c/coreboot/+/74343
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-12-04 15:56:16 +00:00
Patrick Rudolph 7f991b3a90 cpu/intel/model_206ax: Use macro IS_IVY_CPU
Use existing macro instead of open coding magic numbers.
No functionality change.

Change-Id: If45f7f3f2b4226cedde6ff91b9848b9875f45f9f
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79148
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2023-12-04 15:54:45 +00:00
Eran Mitrani a8636ae86b mb/google/rex/variants/deku: Complete USB configuration
+-------------+----------------+------------+
| USB 2.0     | Connector Type | OC Mapping |
+-------------+----------------+------------+
|      1      |     Type-C     |    OC_0    |
+-------------+----------------+------------+
|      2      |     Type-C     |    OC_0    |
+-------------+----------------+------------+
|      3      |     Type-C     |    OC-0    |
+-------------+----------------+------------+
|      4      |     Type-A     |    OC_3    |
+-------------+----------------+------------+
|      5      |     Type-C     |    OC_0    |
+-------------+----------------+------------+
|      6      |     Type-A     |    OC_3    |
+-------------+----------------+------------+
|      7      |     Type-A     |    OC_3    |
+-------------+----------------+------------+
|      8      |     Type-A     |    OC_3    |
+-------------+----------------+------------+
|      9      |     Type-A     |    OC_3    |
+-------------+----------------+------------+
|      10     |       BT       |     NA     |
+-------------+----------------+------------+

+---------------------+-------------------+------------+
| USB 3.2 Gen 2x1     | Connector Details | OC Mapping |
+---------------------+-------------------+------------+
|          1          |       Type-A      |    OC_3    |
+---------------------+-------------------+------------+
|          2          |       Type-A      |    OC_3    |
+---------------------+-------------------+------------+

+------+-------------------+------------+
| TCPx | Connector Details | OC Mapping |
+------+-------------------+------------+
|   1  |   Type C port 0   |    OC_0    |
+------+-------------------+------------+
|   2  |   Type C port 1   |    OC_0    |
+------+-------------------+------------+
|   3  |   Type C port 2   |    OC_0    |
+------+-------------------+------------+
|   4  |   Type C port 3   |    OC_0    |
+------+-------------------+------------+

BUG=b:305793886
TEST=util/abuild/abuild -p none -t google/rex -x -a -b deku

Signed-off-by: Eran Mitrani <mitrani@google.com>
Change-Id: I90d3d984af6d40efb4553cf5675617700161d2d7
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79356
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2023-12-04 15:52:46 +00:00
Eran Mitrani 3bad203be1 mb/google/rex/variants/deku: Add basic DTT
Add default Intel DPTF.

BUG=b:305793886
TEST=util/abuild/abuild -p none -t google/rex -x -a -b deku

Signed-off-by: Eran Mitrani <mitrani@google.com>
Change-Id: Id681754fc8e7b418de35f66df097cadd4aad7448
Signed-off-by: Eran Mitrani <mitrani@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79353
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2023-12-04 15:52:31 +00:00
Eran Mitrani c2aa756ca1 mb/google/rex/var/deku: Enable LAN0, LAN1
google/deku is a Chromebox featuring two LAN ports.
Add overridetree.cb entry to configure the LAN0 LAN1 devices.

BUG=b:305793886
TEST=Built FW image correctly.

Signed-off-by: Eran Mitrani <mitrani@google.com>
Change-Id: I8980dabc7f9fc731a2b60c599e1e48c9b11dabb4
Signed-off-by: Eran Mitrani <mitrani@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79292
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2023-12-04 15:52:12 +00:00
Alexander Couzens 9092d221a1 inteltool: memory: log PCI id of unknown devices
Change-Id: I25396e5480c45729710b16345f997c78e8bcbccb
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79363
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2023-12-04 15:51:41 +00:00
Subrata Banik ceccd49ecb mb/google/rex/var/ovis: Add power limit support for MCH ID 0x7d14
This patch adds the power limit configuration for MCH ID index 3 aka
0x7d14 DID which is identical to MCH ID 0x7d01 (index 1).

TEST=Able to perform power limit configuration for google/ovis.

[DEBUG]  WEAK: src/mainboard/google/rex/variants/baseboard/ovis/
         ramstage.c/variant_devtree_update called
[INFO ]  Overriding power limits PL1 (mW) (19000, 28000)
         PL2 (mW) (64000, 64000) PL4 (W) (120)

Change-Id: Iff71adb4e26d18970b5947927c258419f751de32
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79332
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2023-12-04 15:51:14 +00:00
Subrata Banik 70770ebd36 mb/google/rex: Simplify power limit configuration usage
This patch removes the deprecated PL_PERFORMANCE and PL_BASELINE
configurations, relying instead on the refactored power limit flow.

This flow allows for seamless overrides by the baseboard and/or by
the variant board, if necessary.

Specifically, this patch:

- Removes PL_PERFORMANCE and PL_BASELINE configuration options from
  mainboard.c in the google/rex directory.
- Relies on the baseboard_devtree_update() function, which is
  implemented by the respective baseboard, to handle power limit
  configuration.
- Leverages the variant_devtree_update() function, which is a
  __weak implementation, to allow overrides by the variant directory.

This simplification improves code readability and maintainability while
maintaining the flexibility to handle power limit configurations as
needed.

Change-Id: I872e5cb59d7b2789ef517d4a090189785db46b85
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79331
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-12-04 15:50:55 +00:00
Subrata Banik 72d616c22c soc/intel/alderlake: Update LidStatus UPD dynamically
This patch ensures that the LidStatus UPD is passed a dynamic value,
rather than always passing 1 (CONFIG_RUN_FSP_GOP enabled) for FSP 2.0
devices.

Problem statement:
* FSP-S GFX PEIM initializes the on-board display (eDP) even when the
  LID is physically closed, because LidStatus is always set to 1.
* FSP-S skips external display initialization even when the LID is
  closed.

Solution:
* FSP-S GFX PEIM module understands the presence of an external display
  if LidStatus is not set, and tries to probe the other display
  endpoint.
* Statically passing LidStatus as always enabled (aka 1) does not
  illustrate the exact device scenarios, so this patch updates
  LidStatus dynamically by reading the EC memory map offset.

BUG=b:313886118
TEST=Able to build and boot google/marasov to redirect the display
using external HDMI monitor while LID is closed.

Change-Id: Idb1d71bd54837630f36d43a45effc53d35f9cb70
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79352
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-12-04 06:15:56 +00:00
David Milosevic d982274a4e acpi: Add PPTT support
This patch adds code to generate Processor Properties
Topology Tables (PPTT) compliant to the ACPI 6.4 specification.

 - The 'acpi_get_pptt_topology' hook is mandatory once ACPI_PPTT
 is selected. Its purpose is to return a pointer to a topology tree,
 which describes the relationship between CPUs and caches. The hook
 can be provided by, for example, mainboard code.

Background: We are currently working on mainboard code for qemu-sbsa
and Neoverse N2. Both require a valid PPTT table. Patch was tested
against the qemu-sbsa board.

Change-Id: Ia119e1ba15756704668116bdbc655190ec94ff10
Signed-off-by: David Milosevic <David.Milosevic@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78071
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-12-02 19:16:26 +00:00
Subrata Banik faf2779959 mb/google/rex: Enhance power limit override mechanism
This patch expands the power limit override capability to include
variants directories, enabling them to modify power limit settings
configured by the baseboard.

Previously, only the baseboard could override power limit settings.
For instance, while the google/rex baseboard sets the PL1 max power
limit to 15W, the google/screebo variant couldn't override this value.

This enhancement empowers variants directories to override baseboard-
configured power limit settings, allowing for greater flexibility and
control over power limits.

BUG=b:313667378
TEST=Able to call into _weak implementation of `variant_devtree_update`
unless there is one override.

[DEBUG]  WEAK: src/mainboard/google/rex/variants/baseboard/rex/
         ramstage.c/variant_devtree_update called
[INFO ]  Overriding power limits PL1 (mW) (10000, 15000) PL2 (mW)
         (40000, 40000) PL4 (W) (84)

Change-Id: Ib07691625e075b0fbab42271512322ffc60ba13b
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79329
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2023-12-02 18:03:52 +00:00
Matt DeVillier 73c918c590 Update amd_blobs submodule to upstream main branch
Updating from commit id eb91266f01db (2023-11-29):
  MDN: Update mendocino SMU to 90.43.0

to commit id 64cdd7c8ef19 (2023-12-01):
  Cezanne/PSP: clean up release notes

This brings in 3 new commits:
64cdd7c8ef Cezanne/PSP: clean up release notes
54c45443b8 Stoneyridge: Drop PSP binaries for Bristol Ridge (BR)
bfa3c44c8c Stoneyridge: Tidy up the PSP binaries folder

Change-Id: Ifd2ca49a472c516c69c9f43ed4dc3faefd8729d8
Signed-off-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79365
Reviewed-by: Varshit Pandya <pandyavarshit@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jason Glenesk <jason.glenesk@amd.corp-partner.google.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2023-12-02 17:53:11 +00:00
Zheng Bao 3ea3fbe4f2 soc/amd: Add DBG2 ACPI table
Dump the DBG2 table on Linux console.
$> acpidump -s
ACPI: DBG2 0x0000000000000000 000054 (v00 COREv4 COREBOOT 00000000 **)

$> acpidump > acpidump.bin
$> acpixtract -a acpidump.bin
$> iasl -d dbg2.dat
$> cat dbg2.dsl
/*
 * ACPI Data Table [DBG2]
 *
 * Format: [HexOffset DecimalOffset ByteLength] FieldName : FieldValue
 */

[000h 0000 4]             Signature : "DBG2" [Debug Port table type 2]
[004h 0004 4]          Table Length : 00000054
[008h 0008 1]              Revision : 00
[009h 0009 1]              Checksum : FA
[00Ah 0010 6]                Oem ID : "COREv4"
[010h 0016 8]          Oem Table ID : "COREBOOT"
[018h 0024 4]          Oem Revision : 00000000
[01Ch 0028 4]       Asl Compiler ID : "CORE"
[020h 0032 4] Asl Compiler Revision : 20220331

[024h 0036 4]           Info Offset : 0000002C
[028h 0040 4]            Info Count : 00000001

[02Ch 0044 1]              Revision : 00
[02Dh 0045 2]                Length : 0028
[02Fh 0047 1]        Register Count : 01
[030h 0048 2]       Namepath Length : 0002
[032h 0050 2]       Namepath Offset : 0026
[034h 0052 2]       OEM Data Length : 0000 [Optional field not present]
[036h 0054 2]       OEM Data Offset : 0000 [Optional field not present]
[038h 0056 2]             Port Type : 8000
[03Ah 0058 2]          Port Subtype : 0012
[03Ch 0060 2]              Reserved : 0000
[03Eh 0062 2]   Base Address Offset : 0016
[040h 0064 2]   Address Size Offset : 0022

[042h 006612] Base Address Register : [Generic Address Structure]
[042h 0066 1]              Space ID : 00 [SystemMemory]
[043h 0067 1]             Bit Width : 00
[044h 0068 1]            Bit Offset : 00
[045h 0069 1]  Encoded Access Width : 03 [DWord Access:32]
[046h 0070 8]               Address : 00000000FEDC9000

[04Eh 0078 4]          Address Size : 00000100

[052h 0082 2]              Namepath : "."

Raw Table Data: Length 84 (0x54)

 00: 44 42 47 32 54 00 00 00 00 FA 43 4F 52 45 76 34 // DBG2T.....COREv4
 10: 43 4F 52 45 42 4F 4F 54 00 00 00 00 43 4F 52 45 // COREBOOT....CORE
 20: 31 03 22 20 2C 00 00 00 01 00 00 00 00 28 00 01 // 1." ,........(..
 30: 02 00 26 00 00 00 00 00 00 80 12 00 00 00 16 00 // ..&.............
 40: 22 00 00 00 00 03 00 90 DC FE 00 00 00 00 00 01 // "...............
 50: 00 00 2E 00                                     // ....

BUG=b:303689867

Change-Id: I3c97a78d1889549421baf0bc1a2e8f959a0f47e2
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79174
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-12-02 17:51:42 +00:00
Felix Held 2eaebfc4bc acpi/acpi: update ACPI_DBG2_PORT_SERIAL_16550 subtype
The Microsoft Debug Port Table 2 (DBG2) specification says that the
serial port subtype 0x00 should only be used for I/O-mapped 16550
compatible UARTs. The subtype 0x12 is a superset of that, and supports
specifying MMIO vs IO and the register access size via the generic
address structure. Rename the subtype 0x00 definition to
ACPI_DBG2_PORT_SERIAL_16550_IO_ONLY and add the subtype 0x12 definition
as new ACPI_DBG2_PORT_SERIAL_16550, so that the acpi_write_dbg2_uart
function will write the correct subtype for the generic 16550 UART.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I816bb22e6f76e661c8b8e39a2a4cb83b0085acb5
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79219
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-12-02 17:51:02 +00:00
Nicholas Chin d5b0aeab2e inteltool/gpio_names/*.h: Add GPL-2.0-only SPDX license header
Inteltool is GPLv2 licensed so all files that link to it should be GPLv2
by default. In addition, the contents of several of these headers were
originally moved directly from gpio_groups.c, which is explicitly marked
as GPL-2.0-only.

Change-Id: Ie897cb238c0c9e89fe677c999cbf1803f5f4609a
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78628
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2023-12-02 08:13:39 +00:00
Mate Kukri 62c25351c1 superio/smsc: Add support for the SCH555x series
Used by the OptiPlex 3020/7020/9020:
- EMI and Runtime registers work
- UART1 works (including IRQs)
- PS/2 keyboard and mouse untested

Signed-off-by: Mate Kukri <kukri.mate@gmail.com>
Change-Id: I9323198f1139cd0c3dd37f977ae7693b721654f4
Reviewed-on: https://review.coreboot.org/c/coreboot/+/64359
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-12-01 17:40:11 +00:00
Weimin Wu b9523a4281 mb/google/nissa/var/anraggar: Trim GPIO comments
Trim all GPIO comments like "origin ==> current".

BUG=b:304920262
TEST=pass building

Change-Id: I05daa4df16b6da3d3f971b75c7c467032e3f854d
Signed-off-by: Weimin Wu <wuweimin@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79321
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-12-01 16:37:05 +00:00
Weimin Wu 64ae9fe2c0 mb/google/nissa/var/anraggar: Fix the GPP_D6 for LTE power.
Fix GPP_D6 configuration for LTE power enable.

BUG=b:304920262
TEST=mmcli -m any

Change-Id: I2996fd35c2897269997bc0290e0ce93bbbaa1bf8
Signed-off-by: Weimin Wu <wuweimin@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79166
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Dolan Liu <liuyong5@huaqin.corp-partner.google.com>
2023-12-01 16:36:32 +00:00
Weimin Wu 7ac0b43671 mb/google/nissa/var/anraggar: Fix Type-C & DP functions
Due to TCPC0 & TCPC1 exchanged compare to Neried design,
but related USB2 Ports not exchanged.

BUG=b:304920262
TEST=Tpye-C & DP functions workable

Change-Id: I9dacf06b1e672575a684856acdb10b6c88360b18
Signed-off-by: Weimin Wu <wuweimin@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79165
Reviewed-by: Dolan Liu <liuyong5@huaqin.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2023-12-01 16:36:06 +00:00
Weimin Wu 10db713100 mb/google/nissa/var/anraggar: Enable ILITEK touchscreen
For proto PCB:
GPP_C0 for enable power supply which also for sensor subsystem.
GPP_C0 must allways turn power on, so GPP_C6 is not only used
for enable function but also for stop report.

BUG=b:304920262
TEST=1. touchscreen function workable
     2. INT pin no active during suspend

Change-Id: I7dabf205dba616f57ef9717f950eba96282d8e3d
Signed-off-by: Weimin Wu <wuweimin@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79164
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Dolan Liu <liuyong5@huaqin.corp-partner.google.com>
2023-12-01 16:35:37 +00:00
Morris Hsu 0cf76cfabe mb/google/brya/var/dochi: Update overridetree for type c1
Update overridetree to correct AUX pin to USB-C port 3

BUG=b:299570339
TEST=emerge-brya coreboot chromeos-bootimage

Change-Id: I3a5a89c6008fbf28c927f83060e6e508d60845ba
Signed-off-by: Morris Hsu <morris-hsu@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79343
Reviewed-by: David Wu <david_wu@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2023-12-01 15:19:08 +00:00
kiwi liu 4bd12361dc soc/mediatek/mt8188: Support loading OP-TEE via an SMC
This patch adds compilation flags to BL31 to support loading
OP-TEE via an SMC from rootfs. This patch also reserves 80MB memory
space for running the OP-TEE image.

BUG=b:246837563
TEST=emerge-geralt coreboot

Change-Id: Ic38c8beb59c090ae56c5be6821dd8625435609e9
Signed-off-by: Kiwi Liu <kiwi.liu@mediatek.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78801
Reviewed-by: Kiwi Liu <kiwi.liu@mediatek.corp-partner.google.com>
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-12-01 02:55:12 +00:00
Yi Chou 32ea2abe3b libpayload: Fix the stack and data labels
We should make sure _stack/_estack and the other labels are consistent.
And _data & _edata is also useful to clean up the sensitive data on the
data section.

BUG=b:248610274
TEST=emerge-cherry libpayload
BRANCH=none

Cq-Depend: chromium:5052462
Change-Id: I589040f4db60b35813ea9f4ba9503244bd7def00
Signed-off-by: Yi Chou <yich@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79144
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2023-12-01 02:20:29 +00:00
Ivy Jian 1397fd3668 mb/google/brox: Update storage settings for SSD and UFS
Brox has SSD and UFS storage per different SKU.
1. Set SSD on CPU PCIe port (PCIEX4_A) and configure related gpio
settings according to the schematic.
2. Enable UFS, also enable ISH since it is PCI function 0, required
for UFS function 7 to be enabled.
3. Set unused SRCCLKREQ signals to NC.
4. Remove unused gpio settings in variant gpio table to prevent
unexpected overrides.

BUG=b:311450057
BRANCH=None
TEST=emerge-brox coreboot

Change-Id: I88922bcfa13652006aa10078c3c444624fd4575e
Signed-off-by: Ivy Jian <ivy.jian@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79295
Reviewed-by: Shelley Chen <shchen@google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-12-01 00:12:27 +00:00
Felix Held 2873cc6804 nb/amd/pi/00730F01: drop leftover family10_northbridge PCI driver
This is likely a copy-paste leftover, since this SoC neither has a PCI
device with the device ID 0x1200 nor is family 10h.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I7095f208a7503545ea012241d058692a510109f3
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79094
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-12-01 00:05:57 +00:00
Eran Mitrani 19b2ea68ab mb/google/rex/variants/deku: Add GPIO configuration
Based on Platform Mapping Document for Deku (go/cros-deku-mapping)
from Nov 8, 2023 (Rev 0.4)

BUG=b:305793886
TEST=WIP, not tested yet

Change-Id: Ib37a7ebf0aca788d14fafea0f97e364beafb4c4d
Signed-off-by: Eran Mitrani <mitrani@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78960
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2023-11-30 23:45:11 +00:00
Patrick Georgi 1cd374f563 Kconfig: Move rustccfg file to a more benign place
It's put in $(obj) now. Not sure if we'll need it, but there has been
some interest in rust support in coreboot, and removing support for it
would be more work than this, so let's just keep it around.

Change-Id: I532fde9625dbf7463752ef1af525b77d12676c93
Signed-off-by: Patrick Georgi <patrick@coreboot.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79342
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2023-11-30 17:46:15 +00:00
Patrick Georgi 1cc6c54d9f build system: Exempt `make *config` from strict symbol checks
The "config" targets exist to edit the .config file, and so they
should be more forgiving with invalid configs (that they'll convert
into valid configs on save). They will still emit warnings about
invalid symbols, but not exit with an error.

The regular build process still fails if the .config looks unexpected
(for example when there's an unknown config flag).

Change-Id: If427e075766c68d493dd406609f21b6bb27d1d74
Signed-off-by: Patrick Georgi <patrick@coreboot.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79298
Reviewed-by: Mike Banon <mikebdp2@gmail.com>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-11-30 17:45:50 +00:00
Matt DeVillier 132783baf8 Update amd_blobs submodule to upstream main branch
Updating from commit id 68ebd4b567f4 (2023-11-27):
  PCO: Update ABL to version CABLRV21080200

to commit id eb91266f01db (2023-11-29):
  MDN: Update mendocino SMU to 90.43.0

This brings in 1 new commit:
eb91266f01 MDN: Update mendocino SMU to 90.43.0

Change-Id: Iebc3d0ffe9874a84cac9cafc7b7b3514d251e4a5
Signed-off-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79315
Reviewed-by: Jason Glenesk <jason.glenesk@gmail.com>
Reviewed-by: Jon Murphy <jpmurphy@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-11-30 16:10:28 +00:00
Arthur Heymans ea2e210548 soc/amd/genoa: Implement romstage
The only thing romstage needs to do is find cbmem_top.

TESTED: reaches ramstage.

Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Change-Id: Ic2837c4a2b0ec8dcd9dd99602f9c073999c36139
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76514
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Varshit Pandya <pandyavarshit@gmail.com>
2023-11-30 15:18:45 +00:00