Commit Graph

54960 Commits

Author SHA1 Message Date
Michał Żygowski ed4bc980fa soc/intel/common/block/acpi/northbridge.asl: Reserve SBREG BAR
Reserve SBREG BAR if it is outside of the PCH reserved memory range.
Desktop series processors have larger SBREG BARs, which, unlike mobile
processors, do not fall into the standard PCH reserved range
(0xfc800000 - 0xfe7fffff). Create a separate reservation for such a case. There is no telling what could happen if the reservation is not
made in ACPI.

TEST=Boot Windows 11 and Ubuntu 22.04 on MSI PRO Z690-A DDR4

Change-Id: Ibaf45daba37e3acfcea0e653df69fa5c2f480c4a
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/77445
Reviewed-by: Krystian Hebel <krystian.hebel@3mdeb.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2023-10-16 08:30:37 +00:00
Paweł Anikiel ed3b688e76 acpi/acpigen: Allow general namestring in write mutex functions
BUG=b:301150499
TEST=Compiled and tested on google/redrix - PERST# goes low when wwan
modem goes into runtime suspend.

Change-Id: Ib09d5a6091cedfce24da49390cf980414f97a2c9
Signed-off-by: Paweł Anikiel <panikiel@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78349
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <inforichland@gmail.com>
2023-10-16 07:59:21 +00:00
Jamie Ryu 15010cd81f mb/google/rex/var/rex: Configure cpu power limits by battery status
When battery level is below critical level or battery is not present,
cpus need to run with a power optimized configuration to avoid platform
instabilities. This will check the current battery status and configure
cpu power limits properly.

BUG=b:296952944
TEST=Build rex0 and check cpu power limits are configured with
a performance efficient configuration and the platform boots to OS if
battery level is above the critical level. And check cpu power limits
are configured with a power optimized configuration and boots to OS
without an issue if battery is not present or battery level is at or
below critical level.

Change-Id: I12fd40abda76c8e7522b06a5aee72665f32ddec8
Signed-off-by: Jamie Ryu <jamie.m.ryu@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78322
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-16 03:42:26 +00:00
Jamie Ryu 19080a71c8 ec/google/chromeec: Add is_battery_present_and_above_critical_threshold
This adds is_battery_present_and_above_critical_threshold to check the
battery is present and the battery level is above critical level.

BUG=b:296952944
TEST=Build rex and check is_battery_present_and_above_critical_threshold
returns the correct battery status.

Change-Id: Ib38be55bc42559bab4f12d5e8580ddc3e1a6acc1
Signed-off-by: Jamie Ryu <jamie.m.ryu@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78321
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2023-10-16 03:41:29 +00:00
Shelley Chen 9b230ae295 mb/google/brox: Create new Brox baseboard
This CL is just getting the initial brox framework to get the
baseboard building.  Copied files from brask baseboard and tried to
remove contents of some files like the device tree and memory IDs.
Added support for memory part "MT62F512M32D2DR-031 WT:B", mapped to
DRAM ID 0.

BUG=b:300690448
BRANCH=None
TEST=./util/abuild/abuild -p none -t GOOGLE_BROX -x -a

Change-Id: I929b465646ac4c69d4bab33ce23848c7b1fa0f98
Signed-off-by: Shelley Chen <shchen@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78009
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
2023-10-13 18:35:11 +00:00
Naresh Solanki 8032dcee7f mb/ibm/sbp1: Disable SATA controller
SATA controller isn't used & hence disable.

Change-Id: Iab2d597e6a0f22b946e657a2851b68f752d1f7d4
Signed-off-by: Naresh Solanki <naresh.solanki@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/77893
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-13 13:52:09 +00:00
Naresh Solanki 0f973d6e61 soc/intel/xeon_sp/spr: Add SATA controllers 1 and 2 to devicetree
The board has three SATA controllers, so add the remaining two
on PCI device 18.0 and 19.0.

TEST=Verify in lspci the sata controllers.

Change-Id: Ia654c4ef895b52338554d89c25f61b262fbbcbbb
Signed-off-by: Naresh Solanki <naresh.solanki@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/77892
Reviewed-by: Annie Chen <chen.annieet@inventec.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
2023-10-13 13:51:50 +00:00
Eran Mitrani 92809f4042 mb/google/rex/variant/rex0: HID over SPI - change frequency to 30MHZ
BUG=NONE
TEST=Tested on Rex, touch over SPI works properly.

Signed-off-by: Eran Mitrani <mitrani@google.com>
Change-Id: If339f7a010fa51bf73b8898a55643b5e921d93b1
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78318
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
2023-10-13 13:51:19 +00:00
Krishna Prasad Bhat 4067adb8f7 soc/intel/cse: Remove unused header file
Systemagent related functions are not used in this file. Remove the
unused the header file.

Change-Id: Ifbb04898e9dcebef96d8c73771e66e0d6fabc7fb
Signed-off-by: Krishna Prasad Bhat <krishna.p.bhat.d@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78312
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Ronak Kanabar <ronak.kanabar@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-13 13:46:22 +00:00
Morris Hsu 2fa482d6c5 mb/google/brya/var/dochi: Update overridetree
Update overridetree base on schematics revision 20230923.

BUG=b:299284564, b:298328847, b:299570339
TEST=emerge-brya coreboot

Change-Id: I0aff94ef3233fbc4f52d33bb2dc1285b4fe473f9
Signed-off-by: Morris Hsu <morris-hsu@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78212
Reviewed-by: David Wu <david_wu@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-13 13:46:06 +00:00
Morris Hsu d3df99f88d mb/google/brya/var/dochi: use RPL FSP headers
To support an RPL SKU on dochi, it must use the FSP for RPL.

Select SOC_INTEL_RAPTORLAKE for dochi so that it will use the RPL
FSP headers.

BUG=b:299570339
TEST=emerge-brya intel-rplfsp coreboot
coreboot-private-files-baseboard-brya

Change-Id: I51c28744bd9f21fae58bad38abb01d38965140a4
Signed-off-by: Morris Hsu <morris-hsu@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78323
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: David Wu <david_wu@quanta.corp-partner.google.com>
2023-10-13 13:45:29 +00:00
Robert Chen 33ca39219b mb/google/nissa/var/quandiso: Update touchscreen power sequence
Pull GPP_C1 to high in ramstage to meet touchscreen power sequence.

BUG=b:302236370
BRANCH=firmware-nissa-15217.B
TEST=emerge-nissa coreboot chromeos-bootimage
& test touchscreen function on quandiso DUT

Change-Id: Ia9f600ec0cc4be2d77ff08c0ae8951c90aec944f
Signed-off-by: Robert Chen <robert.chen@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78264
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shawn Ku <shawnku@google.com>
Reviewed-by: Derek Huang <derekhuang@google.com>
2023-10-13 13:45:00 +00:00
Jamie Ryu 58e9c2159e mb/google/rex/var/rex0: Update NVM configuration for WFC
This updates NVM Configuration according to EEPROM BRCA016GWZ-W
datasheet for rex World Facing Camera module - O9B13-NT01BA to
enumerate Camera module properly.

BUG=b:301226048
TEST=Build rex0 and check SSDT table is updated correctly. Check
"cros-camera-tool modules list" lists up the modules properly.
cros-camera-tool modules list:
/sys/devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-0/i2c-PRP0001:01/i2c-PRP0001:011/nvmem
/sys/devices/pci0000:00/0000:00:19.1/i2c_designware.4/i2c-13/i2c-PRP0001:03/i2c-PRP0001:032/nvmem
[ {
   "module_id": "KC6977",
   "sensor_id": "OV013b",
   "sysfs_name": "i2c-0/i2c-PRP0001:01"
}, {
   "module_id": "CH3c6d",
   "sensor_id": "HN0556",
   "sysfs_name": "i2c-13/i2c-PRP0001:03"
} ]

Change-Id: I51bdf249549d3e03180e9d126a85e9dff91028db
Signed-off-by: Jamie Ryu <jamie.m.ryu@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78211
Reviewed-by: Kiran2 Kumar <kiran2.kumar@intel.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2023-10-13 06:56:47 +00:00
Wentao Qin 70e9fcd0e0 Revert "mb/google/rex/var/screebo: Set `SAGV_POINTS_0_1_2` to avoid hang"
This reverts commit 5c35d30ffc.

Reason for revert: Here we need to confirm whether the issue in
mtl-staging-MTL.3323.92 has been improved in the QS sample
in the factory build.

BUG=b:287170545
TEST=Able to idle for more than 5+ hours without any hang.

Change-Id: I4517bbbefe11d95623d7e16a5e4bba2dd6f408e1
Signed-off-by: Wentao Qin <qinwentao@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78320
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Mike Lee <mike5@huaqin.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2023-10-13 05:20:59 +00:00
Felix Held 383e1df639 soc/amd/genoa/include/data_fabric: add VGA decode enable register
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Iaf4a1fd61ad1d545b1ea0ab3fcf6c7a3d0260cd0
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78319
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Varshit Pandya <pandyavarshit@gmail.com>
2023-10-12 23:14:17 +00:00
Tyler Wang d862695f5f mb/google/rex/var/karis: Fix touchscreen HID to ELAN9004
Confirmed with vendor, Elan touchscreen HID should set to "ELAN9004".
Correct Elan touchscreen HID to "ELAN9004" for karis.

BUG=b:294155897
TEST=Dump the SSDT on karis and check the HID had been modified.

Change-Id: I6ebb02540c894460388b9b9fe03f5c4031f8186d
Signed-off-by: Tyler Wang <tyler.wang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78266
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2023-10-12 14:22:46 +00:00
Patrick Rudolph 96cd78eae7 sb/intel/bd82x6x/pcie: Drop register write
The write to register 0x42 has no effect as at this point all
of the bits are read-only. Drop the line.

Change-Id: I7293e6eaa2d0bac5efe8316029bdecb04a5586e9
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78238
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-12 12:41:17 +00:00
Patrick Rudolph 653459016d sb/intel/bd82x6x/pch: Mark static devices hidden
Because integrated PCI devices are hidden in chip_ops
the PCI enumeration code never sees them.

When hiding static devices mark them as hidden so the
PCI enumeration no longer complains about them being
missing, even though they are present and were working
just fine.

Test: Disabled southbridge devices no longer appear in
      "Leftover static devices:" log.

Change-Id: Iae70072a85b62a456102190a5f72f4d652ad6d5a
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78230
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2023-10-12 12:41:00 +00:00
Patrick Rudolph 2fcef78ff8 sb/intel/bd82x6x: Warn about slow PCIe downstream devices
Warn when a device took longer than usual to appear.
Use the PDS bit to detect if a root port has a downstream
device connected and warn if enumeration failed.

Test: On Lenovo X220 all PCIe device are visible, thus the
      added code path is never taken.

Change-Id: I86b498b89d672b239d9951e116dc3680030666a6
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78229
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-12 12:39:42 +00:00
Patrick Rudolph f94a522086 sb/intel/bd82x6x/pcie: Use defines
Use defines instead of magic values.

Test: Lenovo X220 still boots and all PCIe devices are
      still working.

Change-Id: Ie8fc7cc863017da07dd3ed37b487dae18de92b18
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78293
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-12 12:38:15 +00:00
Patrick Rudolph 359d8a63fc sb/intel/bd82x6x: Improve SLCAP
- Use pci_find_capability() and defines from pci_def.h
- Set the 'Hotplug Capable' bit and 'Hot Plug Surprise' bit in SLCAP
  for hotplugable PCIe slots.
- Assign unique slot number and set power limit for PCIe root ports
  that have a slot connected. For integrated devices clear slot number
  and power limit.

Test: System still boots and all PCIe devices are working.

Change-Id: I03aeb0a1ff0041901acc20fe700d3f7995d22366
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78228
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2023-10-12 12:36:33 +00:00
Kun Liu d31e972a5f Revert "mb/google/rex/var/screebo: Enable GL9750 invert WP function"
This reverts commit ee4191852a.

Reason for revert: In schematic a sdcard write protection pull-down
resistor was added, so need to disable GL9750 invert WP function

Change-Id: I00a8f43094d8b3674a4bbaeed24b96aab64b9b75
Signed-off-by: Kun Liu <liukun11@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78295
Reviewed-by: Rui Zhou <zhourui@huaqin.corp-partner.google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2023-10-11 19:04:05 +00:00
Felix Held be9fcf10ab soc/amd/genoa: add root complex support code
This functionality will eventually be used by the common data fabric
domain resource reporting code.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Ieedd432c144e53e43d8099ec617a15056bb36fd1
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78307
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-11 17:55:28 +00:00
Felix Held 58d00e604d soc/amd/genoa/include: add data_fabric.h
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I18871af0a8dbc1423524b681d516476e63b9596a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78306
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2023-10-11 17:55:02 +00:00
Arthur Heymans 5c511206c1 mb/amd/onyx: Use BMC SOL by default
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Change-Id: Iefe61d25367bbe5cff0cacbfbafa32607de77d0f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76509
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2023-10-11 17:50:03 +00:00
Varshit Pandya ec27898f75 mb/amd/onyx: use AMD SoC UART
Change-Id: I79ebbcc6a4a3a93e8437ef56aebdcf72f9a3e6ab
Signed-off-by: Varshit Pandya <pandyavarshit@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78267
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2023-10-11 17:49:49 +00:00
Varshit Pandya 970d7701c7 soc/amd/genoa: Enable uart
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Signed-off-by: Varshit Pandya <pandyavarshit@gmail.com>
Change-Id: I1529657f30b6e228c2e3cd7e0438255522381367
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76507
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-11 17:49:32 +00:00
Varshit Pandya 95d78d9e42 soc/amd/genoa: Add GPIO support
Change-Id: I2e827e9ffbb2ec1be0f1247b77660a9fdeb04f7b
Signed-off-by: Varshit Pandya <pandyavarshit@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78222
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2023-10-11 17:49:00 +00:00
Varshit Pandya c0f19834f4 soc/amd/genoa: Add SMI support
Add SMI definitions as per Genoa PPR Doc #55901

Change-Id: I491f4075cef8976e4b0762752c9e2e3c2ef886d5
Signed-off-by: Varshit Pandya <pandyavarshit@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78221
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2023-10-11 17:48:45 +00:00
Varshit Pandya a85634ce3a soc/amd/genoa: Add GPIO definitions
Add GPIO definitions as per Genoa PPR Doc #55901

Change-Id: I0c4e425699c9a158ca95a1baf94f7756f0b12b44
Signed-off-by: Varshit Pandya <pandyavarshit@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78220
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2023-10-11 17:48:24 +00:00
Martin Roth 340d02b8e6 AUTHORS: Update Authors list from original to 4.21 release
This commit adds all the individual authors and their companies, as
determined by their email addresses. Because it is very difficult to
figure out if an individual is doing work on their own, or on the
company's behalf, both are being added.

This will be maintained as a part of the release process from here on.

Signed-off-by: Martin Roth <gaumless@gmail.com>
Change-Id: Id199f1c5d49d74290002d46dbdfc1d33b0fb55e5
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78286
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2023-10-11 16:03:02 +00:00
Tyler Wang b8c3d96daa mb/google/rex/var/karis: Set touchscreen power/reset GPIOs correctly
The tochscreen isn't powered on yet when the detection is done, it
makes touchscren no function.

Set touchscreen power and reset GPIOs correctly in romstage and
ramstage to make the detect feature works.

BUG=b:303130400
TEST=(1) emerge-rex coreboot
     (2) Test on karis, touchscreen function works

Change-Id: I6c7815b81eb47fb41e58233fde512ac6b9c000a7
Signed-off-by: Tyler Wang <tyler.wang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78254
Reviewed-by: Subrata Banik <subratabanik@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>
2023-10-11 15:07:08 +00:00
Patrick Rudolph 155a21974a sb/intel/common/spi: Fix I/O alignment
On ICH9 the SPI control register is not naturally aligned
and a word write might be split into smaller naturally aligned
I/O transactions.

As the first byte starts a new SPI transfer, replace the existing
word write with two byte writes and write the second byte first.

This is required for platforms that do not support unaligned
word I/O instructions and would start a SPI transfer while the
second byte hasn't reached the control register yet.

TEST: Virtual SPI controller on qemu 8.0 doesn't start a transfer
      early.

Change-Id: Id05b1a080911b71b94ef781c6e26d98165f02f67
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78090
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2023-10-11 13:41:33 +00:00
Patrick Georgi 44a48ce7a4 Kconfig: Bring HEAP_SIZE to a common, large value
We have a tiny HEAP_SIZE by default, except when we don't, and
mainboards that override it, or not.

Since memory isn't exactly at a premium these days, and unused heap
doesn't cost anything extra, just crank it up to the highest value
we have in the tree by default and remove all overrides.

Change-Id: I918a6c58c02496e8074e5fba06e38d9cfd691020
Signed-off-by: Patrick Georgi <patrick@coreboot.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78270
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-11 12:09:01 +00:00
Patrick Georgi 42f15054b1 memlayout.ld: Increase RAMSTAGE size to more than 1MB everywhere
This is in preparation of a larger heap. I went for 2MB because why not?

Change-Id: I51f999a10ba894a7f2f5fce224d30bf914107c38
Signed-off-by: Patrick Georgi <patrick@coreboot.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78273
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2023-10-11 12:08:22 +00:00
Arthur Heymans c666a91611 soc/amd/genoa: Enable eSPI early
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Change-Id: I4965eac4ec3d600b1e840affce4e5b4fa2ea4360
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76508
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
2023-10-10 16:01:20 +00:00
Arthur Heymans 4da9d6b41d soc/amd/genoa: Add aoac.c & enable AOAC devices early
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Signed-off-by: Martin Roth <gaumless@gmail.com>
Change-Id: Ic9553e6016c92c9b1678c395cd6a9e6860bf8a76
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76506
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-10 16:00:16 +00:00
Arthur Heymans f955ecb4c5 soc/amd/genoa: Enable cf9 IO early
Signed-off-by: Varshit Pandya <pandyavarshit@gmail.com>
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Change-Id: I05990c2aca40d9cf47a9ebdfd269b80b8f60e300
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76505
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2023-10-10 15:59:27 +00:00
Morris Hsu ded03d55cc mb/google/brya/var/dochi: update gpio settings
Configure GPIOs according to schematics revision 20230923.

TEST=emerge-brya coreboot

Change-Id: I10bd1b72c9b0299b8d29ab642fddb5f0c4727652
Signed-off-by: Morris Hsu <morris-hsu@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78112
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: David Wu <david_wu@quanta.corp-partner.google.com>
Reviewed-by: Ren Kuo <ren.kuo@quanta.corp-partner.google.com>
2023-10-10 13:42:38 +00:00
Karthikeyan Ramasubramanian ff63106dec util/amdfwtool: Check for pkg-config presence
Check for pkg-config presence and fail out with actionable message.

BUG=b:302521446
TEST=Build successfully with working pkg-config and failed build with no
pkg-config

Change-Id: I5d604145c919e7f71680d1e095dc68cb21868319
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78191
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2023-10-10 13:41:07 +00:00
Reka Norman e486082dfb mb/google/dedede: Wait for HPD on dibbi variants
Some Type-C monitors do not immediately assert HPD. If we enter FSP-S
before HDP is asserted, display initialisation may fail. So wait for
HPD.

This is similar to commit b40c600914 ("mainboard/hatch: Fix puff DP
output on cold boots") on puff, except we don't use
google_chromeec_wait_for_displayport() since that EC command was removed
for TCPMv2 (https://crrev.com/c/4221975). Instead we use the HPD signals
only. By waiting for any HPD signal (Type-C or HDMI), we skip waiting if
HDMI is connected, which is the same behaviour as puff and fizz.

TEST=On dibbi, connect a display via a Type-C to HDMI dongle and check
the dev and recovery screens are now displayed correctly. Also check the
logs in the following cases:

Cold reboot in dev mode, Type-C to HDMI dongle:
HPD ready after 800 ms

Warm reboot in dev mode, Type-C to HDMI dongle:
HPD ready after 0 ms

Cold/warm reboot in dev mode, direct Type-C:
HPD ready after 0 ms

Cold/warm reboot in dev mode, direct HDMI:
HPD ready after 0 ms

Cold/warm reboot in dev mode, no display:
HPD not ready after 3000 ms. Abort.

Change-Id: Id4657b5d5a95a68ecbd9efcf3585cf96ad1e13e1
Signed-off-by: Reka Norman <rekanorman@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78294
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sam McNally <sammc@google.com>
2023-10-10 13:39:01 +00:00
Kun Liu 7c193b9480 mb/google/rex/var/screebo: Update DTT settings for thermal control
update DTT settings for thermal control, as follows:

1.Cancel TCPU trip point and fine tune other protection temperature on the Critical policy table

2.Fine tune EC/Bios protection temperature

BUG=b:291217859
TEST=emerge-rex coreboot

Change-Id: I0e2ff6eea9fed71ad7680c1fac4921984b87aca5
Signed-off-by: Kun Liu <liukun11@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78290
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: zhongtian wu <wuzhongtian@huaqin.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-10 13:38:03 +00:00
Sumeet Pawnikar 639d6c7c17 mb/google/rex/var/rex0: update thermal settings to start fan earlier
Internal testing showed that CPU heatsink gets hot and temperature
goes over 75C. In this situation, the fan does not even start
to lower down CPU temperature. This is because of existing temperature
thresholds of TSR0 and TSR1 sensors are set at 45C to start fan.
With updated new settings based on tuning from thermal team,
the fan starts early at 43C for TSR0 and TSR1 so the CPU temperature
stays below 75C.

BUG=b:302673874
TEST=Built and tested on google/rex board

Signed-off-by: Sumeet Pawnikar <sumeet.r.pawnikar@intel.com>
Change-Id: I6580652d6165946e98ecf1b46ace3352cd34dcdf
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78279
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2023-10-10 13:37:38 +00:00
Patrick Georgi 69bbe26a82 include/stddef: define SIZE_MAX
It's needed for future work.

Change-Id: I3419d11072bc0e3791ad08144c2a25c607550f28
Signed-off-by: Patrick Georgi <patrick@coreboot.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78269
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2023-10-10 06:43:37 +00:00
Patrick Rudolph bd7a7fd4b2 sb/intel/bd82x6x: Use helper for PCIe hotplug
Introduce pci_is_hotplugable is helper to find hotpluggable
PCIe devices.

Test: PCI express slot is still marked as the only hotpluggable
      PCIe root port.

Change-Id: I25aae540ff2ffa3ec5b93ed9caa838b4e50048d2
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78227
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Jan Samek <jan.samek@siemens.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-09 14:08:05 +00:00
Patrick Rudolph 91c38146a4 sb/intel/bd82x6x: Disable unused PCIe root ports
Follow the PCH BIOS spec more closely by porting the broadwell
and braswell PCIe downstream device detection. To safe power
disable PCIe root ports that have no downstream device connected.

By setting the FLAGS_SLOT bit in register PCI_EXP_FLAGS the
PCI_EXP_SLTSTA_PDS bit will be updated with in band device
detection from the PCIe PHY. While this is primarly used for PCIe
hot-plug detection, it is more reliable than probing for downstream
devices by reading DID/VID PCI registers.

The FLAGS_SLOT bit should stay cleared for integrated devices,
as those are known to be present, but to simplify the code all
PCIe ports will have the FLAGS_SLOT bit set. There currently
used devicetrees might also be lacking integrated devices on
the PCH root ports...

The SLOTCAP field must be updated by BIOS when the FLAGS_SLOT
is set, but it shouldn't be filled for integrated devices. Until
now the SLOTCAP field has always been populated and it never
was a problem.

- Set FLAGS_SLOT "Slot Implemented" bit early.
- Read bit PCI_EXP_SLTSTA_PDS to detect connected downstream
  devices as done on braswell.
- Disable unused PCIe slots that are not hotplugable.
- Set BIT26 in register 0x338 and wait for bits in register 0x328
  to clear as done on broadwell.

Test: Tested on Lenovo X220. Unused root ports are disabled and port
      that are in used or marked hot-plug are kept enabled.

Change-Id: I8ccfcab2e0e4faba8322755a4f8c2108d9b007ac
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78226
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-09 14:07:14 +00:00
Jianjun Wang f1b5b0dfa6 soc/mediatek: PCI: Fix translation window
Dojo fails to boot from NVMe with CONFIG_RESOURCE_ALLOCATION_TOP_DOWN
enabled. The root cause is using __fls() will get a smaller value when
the size is not a power of 2, for example, __fls(0x3000000) = 25. Hence
the PCIe translation window size is set to 0x2000000. Accessing
addresses higher than 0x2300000 will fail.

Fix translation window by splitting the MMIO space to multiple tables if
its size is not a power of 2.

Resolves: https://ticket.coreboot.org/issues/508.

TEST=Build pass and boot up to kernel successfully via SSD on Dojo
board, it can boot with and without the
CONFIG_RESOURCE_ALLOCATION_TOP_DOWN option.

BUS=b:298255933
BRANCH=cherry

Change-Id: I42b0f0bf9222d284dee0c29f1a6ed6366d6e6689
Signed-off-by: Jianjun Wang <jianjun.wang@mediatek.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78044
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-09 13:59:16 +00:00
Patrick Rudolph 873178bfd6 sb/intel/bd82x6x: Follow PCH BIOS spec
PCH BIOS spec says that BIOS must clear BIT26 in register 0x338
in PEI, as done on lynxpoint.
Copy and adapt the lynxpoint code to do the same on bd82x6x.
Add special case for UM77 chipset, which only has 4 PCIe ports.

Test: System still boots and all PCIe ports are fully working.

Change-Id: I865818c0c22194fffcb2bbdf8c43737b0dce2307
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78225
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2023-10-09 13:56:56 +00:00
Karthikeyan Ramasubramanian a9b3cf3358 soc/amd/common/vboot: Fix PSP verstage timestamps after TSC adoption
Commit 26d54b70e2 ("soc/amd/common/cpu: use TSC_MONOTONIC_TIMER for
SOC_AMD_COMMON_BLOCK_TSC") updated all the AMD SoCs with Zen-based CPU
cores to use TSC_MONOTONIC_TIMER. The same change adjusted the PSP
Verstage timestamps (in microseconds) to the x86 TSC rate. But it
included only the base_time during the adjustment leaving the individual
entry timestamp. This leads to incorrectly adjusted PSP Verstage
timestamps. Fix the adjustment logic.

BUG=None
TEST=Build and boot to OS in Skyrim. Ensure that the PSP Verstage
timestamps in cbmem -t output are adjusted correctly.
Before this change:
   5:start of verified boot                         67,890 (69,936)
 503:starting to initialize TPM                     67,890 (0)
 504:finished TPM initialization                    67,902 (12)
 505:starting to verify keyblock/preamble (RSA)     67,906 (3)
 506:finished verifying keyblock/preamble (RSA)     67,984 (77)
 511:starting TPM PCR extend                        67,984 (0)
 512:finished TPM PCR extend                        67,992 (7)
 513:starting locking TPM                           67,992 (0)
 514:finished locking TPM                           67,995 (3)
   6:end of verified boot                           67,995 (0)
  11:start of bootblock                             572,152 (504,156)

After this change:
   5:start of verified boot                         71,000 (73,040)
 503:starting to initialize TPM                     71,065 (65)
 504:finished TPM initialization                    101,506 (30,441)
 505:starting to verify keyblock/preamble (RSA)     110,624 (9,118)
 506:finished verifying keyblock/preamble (RSA)     297,101 (186,477)
 511:starting TPM PCR extend                        297,297 (196)
 512:finished TPM PCR extend                        315,338 (18,041)
 513:starting locking TPM                           315,341 (3)
 514:finished locking TPM                           322,922 (7,581)
   6:end of verified boot                           322,943 (21)
  11:start of bootblock                             570,296 (247,353)

Change-Id: I3e52bef22f65596152f29c511bed680427660ff5
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78231
Reviewed-by: Tim Van Patten <timvp@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2023-10-09 13:56:22 +00:00
Kenneth Chan 2651351805 mb/google/dedede: Create dexi variant
Create the dexi variant of the taranza project by
copying the files to a new directory named for the variant.

BUG=b:303533815
BRANCH=dedede
TEST=util/abuild/abuild -p none -t google/dedede -x -a
make sure the build includes GOOGLE_DEXI

Signed-off-by: Kenneth Chan <kenneth.chan@quanta.corp-partner.google.com>
Change-Id: I708a16cb864dca7309cb0201e7887af7456a4885
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78249
Reviewed-by: David Wu <david_wu@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-09 13:55:07 +00:00