Commit Graph

42858 Commits

Author SHA1 Message Date
Aamir Bohra af343cff76 soc/amd/picasso: Allow end range entry for max device ID in IVRS
Allow hot plug devices to subscribe to IOMMU services. Currently the
IOMMU end range is limited to device B:0 D:1f F:6. This prevents the
devices on bus 1 and higher to subscribe to IOMMU services. As per AMD
IOMMU spec v3 section 5.2.2.1 all possible device IDs must be defined,
whether the device ID is actually populated or not. Device entries are
used to report ranges when hot-plug and SR-IOV devices are possible.
With this change the hot plug devices can now bind to IOMMU services
(as tested on kernel v5.4), and below errors are not seen in dmesg.

AMD-Vi: Event logged [IO_PAGE_FAULT device=04:00.3 domain=0x0000]

AMD-Vi: Event logged [IO_PAGE_FAULT device=05:00.0 domain=0x0000]

AMD-Vi: Event logged [IO_PAGE_FAULT device=04:00.4 domain=0x0000]

TEST= Verify dGPU can enumerate on hotplug. No IO page fault errors seen.
      The hot plug devices can successfully bind to IOMMU services in
      kernel.

Signed-off-by: Aamir Bohra <aamirbohra@gmail.com>
Change-Id: I256c0f8032662674a4d75746de49c250e341c579
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55816
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Jason Glenesk <jason.glenesk@amd.corp-partner.google.com>
Reviewed-by: ritul guru <ritul.bits@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-07-06 22:10:10 +00:00
Arthur Heymans 0a71934585 configs/config.foxconn_g41m: Build test with X86_64
Change-Id: I755f2037bc9368e610eb97a2633aa66da7f626b0
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56042
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-07-06 06:11:50 +00:00
Arthur Heymans d7461f1e4b nb/intel/x4x: Expose x86_64 support
TESTED on foxconn g41m.

Change-Id: I2d5d5dfbd76a84aa400e44b4bc2ac4f3b5b6f739
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56022
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-07-06 06:09:48 +00:00
Arthur Heymans 8a6053b2bf cpu/intel/car/p4: Add x86_64 support
Change-Id: I77516e3cd5f0d3b7442be660c005a65b00454343
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56021
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2021-07-06 06:09:37 +00:00
Patrick Rudolph adcf7827bd arch/x86: Use ENV_X86_64 instead of _x86_64_
Tested on Intel Sandybridge x86_64 and x86_32.

Change-Id: I152483d24af0512c0ee4fbbe8931b7312e487ac6
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44867
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2021-07-06 06:09:13 +00:00
Patrick Rudolph e85e7af6d0 configs: Build test x86_64 on Sandy Bridge
Add defconfig to build test x86_64 code on Sandy Bridge.

Change-Id: I2c18af8bfa87636c68741e4759059276c287d052
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55472
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrik Tesarik <depate@das-labor.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2021-07-05 16:49:22 +00:00
Werner Zeh c4d110afde mb/siemens/mc_ehl: Provide a proper scheme for variants
There will be more variants of this mainboard so prepare the scheme for
Kconfig to handle the variants properly.

Change-Id: If1cf418836d77a45955ee55d30ba670db8ff2533
Signed-off-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56033
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Mario Scheithauer <mario.scheithauer@siemens.com>
2021-07-05 10:53:16 +00:00
Werner Zeh e5a1fc788f mb/siemens/mc_ehl: Add new mainboard based on elkhartlake_crb
Add a new mainboard called mc_ehl which is based on Intel's
'elkhartlake_crb'. This commit simply copies the mainboard directory and
adjusts the naming to match the new board's name. Follow-up commits will
introduce the needed changes for the new mainboard.

Change-Id: Ia7c0616098046d975aa698910ac81f435d7882cb
Signed-off-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56032
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Mario Scheithauer <mario.scheithauer@siemens.com>
2021-07-05 10:52:53 +00:00
Angel Pons d19cc1119f device: Reflow strings in printk statements
To ease finding some log messages, reflow their strings to use one line.

Tested with BUILD_TIMELESS=1, Asrock B85M Pro4 remains identical.

Change-Id: I5284429ca6d07debf2d6c4fdbffa286140fb7694
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56057
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2021-07-05 10:52:19 +00:00
Varshit B Pandya a932a471cc mb/intel/adlrvp_m: Remove ASL code and enable dynamic SSDT creation for camera ACPI
This change updates device tree to enable SSDT generation for
world facing camera and user facing camera for ADLRVP.
Also reverts DSDT changes related to both camera.

TEST=Build and Boot aldrvp check i2c enumeration and output of media-ctl

Signed-off-by: Varshit B Pandya <varshit.b.pandya@intel.com>
Change-Id: I39f82dc9eb91496d80479ae3f59ca5e03402a599
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55733
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
2021-07-05 10:51:43 +00:00
Varshit B Pandya 048870ae2c mb/intel/adlrvp: Remove ASL code and enable dynamic SSDT creation for camera ACPI
This change updates device tree to enable SSDT generation for
world facing camera and user facing camera for ADLRVP.
Also reverts DSDT changes related to both camera.

TEST=Build and Boot aldrvp check i2c enumeration and output of media-ctl
Compared SSDT with this patch against DSDT without this patch, they are same

Signed-off-by: Varshit B Pandya <varshit.b.pandya@intel.com>
Change-Id: I08834bbcf80dc46737de07f69a2402ed6bf93d4f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55526
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
2021-07-05 10:51:32 +00:00
Paul Menzel adface7ace util/board_status: Do not display grep message
Redirect stdout and stderr from grep to check for unknown timestamps,
when no timestamps are stored, which is already logged earlier.

    Failed to run "/root/coreboot/util/cbmem/cbmem -t", ignoring
    Getting remote dmesg
    grep: /tmp/coreboot_board_status.dXmbUIBP/emulation/qemu-i440fx/4.14-876-gdb28040ee1/2021-07-02T23_14_33Z/coreboot_timestamps.txt: No such file or directory

Change-Id: Ib5400d4bd17e957b4cc1bf75bbd332d60ad226f5
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56056
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2021-07-05 10:51:12 +00:00
Karthikeyan Ramasubramanian bb87552c98 mb/google/dedede: Fix the pointer/address used in memcpy
The caller is already passing the address to the required LTE reset and
enable GPIO. During memcpy, the address to that pointer is used which
will lead to copying undefined data. Fix the pointer/address used in
memcpy.

BUG=None
BRANCH=dedede
TEST=Build Kracko, Drawcia and Metaknight mainboards which use this
function.

Change-Id: I79d6d9af03acd59ab5e1cd7df97bf451011dfeaa
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Found-by: Coverity CID 1458053, 1458054.
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56046
Reviewed-by: Evan Green <evgreen@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-07-05 10:50:24 +00:00
Raul E Rangel 4693f3dfe9 timestamp,vc/google/chromeos/cr50: Add timestamp for enable update
cr50_enable_update takes a non-trivial amount of time.

TEST=Boot guybrush and dump timestamps
 553:started TPM enable update                         3,615,156 (444)
 554:finished TPM enable update                        3,632,810 (17,654)

Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: I522d0638a4a6ae9624965e49b47bca8743c3206c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55402
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2021-07-05 10:50:06 +00:00
Paul Menzel 2efcafa7b0 device/resource_allocator_v4: Only highlight log message with ===
Currently, four instead of three = are used in one log message.

    Done reading resources.
    ==== Resource allocator: DOMAIN: 0000 - Pass 1 (gathering requirements) ===
    === Resource allocator: DOMAIN: 0000 - Pass 2 (allocating resources) ===

As the ending mark is `===` change it to `===` in the beginning.

    Done reading resources.
    === Resource allocator: DOMAIN: 0000 - Pass 1 (gathering requirements) ===
    === Resource allocator: DOMAIN: 0000 - Pass 2 (allocating resources) ===

Change-Id: I40c3876e1f895b7f9771479234c9529cca2b97ba
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56045
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-07-05 10:49:53 +00:00
Arthur Heymans 028b94b765 sb/intel/i82801gx: Prepare for x86_64
Do the usual int conversions.

TESTED: BUILD_TIMELESS=1 produces identical image on foxconn/g41m.

Change-Id: Idebfe4669854b307bee653df6d93e46ae3f39dec
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56020
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-07-05 10:49:12 +00:00
Arthur Heymans 4d06ff0faa nb/intel/x4x: Use write32p and read32p
This removes the need for type conversions all over the place.

Change-Id: I633a453aff17f1cbbe06b60e3efb67661733d06c
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56029
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-07-05 10:48:41 +00:00
Arthur Heymans 2aeb2a1561 nb/intel/x4x: Prepare for x86_64 support
Do the usual type conversions

TESTED: Same image with BUILD_TIMELESS=1

Change-Id: Id44eeb7660d0b521a326a5b981c04c16cf0a6f84
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56019
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-07-05 10:48:27 +00:00
Arthur Heymans bc7b63fa6b cpu/intel/car/p4-netburst: Prepare for x86_64
Use proper car symbols.

Change-Id: I169fd6020e5b81da66dbe4fe83ba446eedc882e9
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56018
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-07-05 10:48:15 +00:00
V Sowmya 3476410039 mb/intel/adlrvp: Update the FIVR configurations
This patch sets the optimized FIVR configuration for adlrvp cutomized
based on the pnp measurements to achieve the better power savings in
sleep states.
* Enable the external V1p05, Vnn, VnnSx rails in S0i1, S0i2, S0i3, S3,
  S4, S5 states.
* Update the supported voltage states.
* Set the ICC max to 500mA for v1p05 and vnn.

Signed-off-by: V Sowmya <v.sowmya@intel.com>
Change-Id: I83e6910502d5cf9d4c26fa581272f59ac483ae19
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55703
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
2021-07-05 10:47:31 +00:00
V Sowmya 418d37e689 soc/intel/alderlake: Add support to update the FIVR configs
This patch adds the supports to update the optimal FIVR
configurations for external voltage rails via devicetree.

Signed-off-by: V Sowmya <v.sowmya@intel.com>
Change-Id: Icf6c74bda5a167abf63938ebed6affc6b31c76f5
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55702
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-07-05 10:47:17 +00:00
Tim Wawrzynczak 912a2353d2 mb/google/brya/brya0: Enable Crashlog
brya0 is a reference and development platform, therefore it would be
helpful to have Crashlog enabled.

Change-Id: I936e73e808e0a05e8b7822cddbb5ee3fa7dee13e
Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55326
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com>
2021-07-05 10:46:56 +00:00
Tim Wawrzynczak 56adcc8fb7 mb/google/brya: Add HANG_DETECT host event to EC S0ix wake mask
The brya EC supports S0ix hang detection, but it was not enabled in
coreboot as well, masking that event out of S0ix, therefore add it in to
the EC S0ix wake mask.

TEST=After EC prints "Warning: Detected sleep hang! Waking host up!",
the host actually wakes up

Change-Id: I2c699114abcd9a045a41858c731e4b6fe99d3000
Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55988
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2021-07-05 10:46:48 +00:00
Dtrain Hsu f294378622 mb/google/dedede/var/cret: Disable SDCard controller
Cret doesn't support SDCard. Disable SDCard contorller for Cret.

BUG=b:191232222
TEST=Build and boot to check lspci

Cq-Depend: chromium:2993724
Signed-off-by: Dtrain Hsu <dtrain_hsu@compal.corp-partner.google.com>
Change-Id: I889f0545883aa75813dd91dc3e6a4dcfc246687f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55935
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2021-07-05 10:46:22 +00:00
Varshit B Pandya f09b39bf88 soc/intel/alderlake: Correct Bus and Device of Touch Host Controller
Correct Bus and Device for THC0 and THC1

Signed-off-by: Varshit B Pandya <varshit.b.pandya@intel.com>
Change-Id: I41858ea156c8258ea0e7be9e2f67fb0e24144c80
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55998
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
2021-07-05 05:27:26 +00:00
Alexander Couzens ca4e6aa3ad supermicro/x11: enable COMB via LPC
Allow to use the 2nd COM port of the AST2400 which can be also used via
IPMI/serial-over-lan.

Change-Id: I6f9c85b1f5428d3c3acf7a2f20296134c4611b1e
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/51759
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2021-07-04 13:11:55 +00:00
Raul E Rangel db28040ee1 util/cbfstool: Allow setting alignment for payload
The -a flag was already implemented, it just wasn't exposed for the
add-payload command.

Setting the alignment of the payload will enable using the SPI DMA
controller to read the payload on AMD devices.

BUG=b:179699789
TEST=cbfstool foo.bin add-payload -a 64 ...

Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: I9f4aea5f0cbeaa8e761212041099b37f4718ac39
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55973
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2021-07-02 23:14:33 +00:00
Raul E Rangel f702705c04 soc/amd/common/espi: Fix debug message log level
BUG=none
TEST=Boot with CONSOLE_LOGLEVEL_3 and no longer see the message printed.

Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: I0bdb92f547ceb8be624521211f4a3b94a91dae22
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55972
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2021-07-02 23:13:03 +00:00
Raul E Rangel 43e993b3b0 drivers/intel/fsp2: Change FSPS returned message to INFO
This message is not an error, but just informational.

BUG=none
TEST=Boot with CONSOLE_LOGLEVEL_3 and no longer see it printed

Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: Ifb64edbe029cafa82aec99aa50de47f51cd50dce
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55971
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2021-07-02 23:12:54 +00:00
Raul E Rangel 35e27b34f5 soc/amd/common/block/cpu: Cache the uCode to avoid multiple SPI reads
We are currently reading the uCode for each CPU. This is unnecessary
since the uCode never changes.

BUG=b:177909625
TEST=Boot guybrush and see "microcode: being updated to patch id" for
each CPU. I no longer see CBFS access for each CPU. This drops device
initialization time by 32 ms.
Also boot Ezkinil and verify microcode was also updated.

Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: I98b9d4ce8290a1f08063176809e903e671663208
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55987
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2021-07-02 23:12:34 +00:00
Raul E Rangel 9942af2b5b soc/amd/cezanne: Enable SPI DMA support
Start using the custom boot device.

BUG=b:179699789
TEST=Boot guybrush to OS

Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: I4ae7272677f563e8827ba154fe5177c8c01155c0
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55855
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2021-07-02 23:12:19 +00:00
Raul E Rangel 3ba21804ff soc/amd/common/block/lpc: Add custom SPI DMA boot device
This is a copy of mmap_boot.c and mem_rdev_ro_ops. I split it up so it
was easier to review.

The next patches will add support for the SPI DMA controller. This will
provide a minor speed up vs using mmap reads. It will also provide the
facilities to perform asynchronous SPI loading.

BUG=b:179699789
TEST=Boot guybrush to OS

Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: Id26e2a69601d0f31e256d0010008904a447c8e21
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55854
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2021-07-02 23:11:48 +00:00
Raul E Rangel e92a982558 arch/x86: Add X86_CUSTOM_BOOTMEDIA
In order to disable X86_TOP4G_BOOTMEDIA_MAP it requires the definition
to be overridden. This makes it a little less ergonomic to use. Instead
introduce the inverse option that can be selected. I chose to leave
X86_TOP4G_BOOTMEDIA_MAP since it keeps the Makefiles simple.

BUG=b:179699789
TEST=none

Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: I65bbc118bde88687a7d7749c87acf1cbdc56a269
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55853
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2021-07-02 23:11:16 +00:00
Angel Pons e19d0efb5e cpu/qemu-x86: Increase heap size
On x86_64, the default heap size is too small when using 32 CPUs.

Change-Id: Ib4f770a7a54d975d213b2456cc7d1ed9151cb6f9
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55761
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2021-07-02 08:19:56 +00:00
Angel Pons 16fe5e1511 src: Consolidate x86_64 support Kconfig
Introduce `USE_EXP_X86_64_SUPPORT` in `src/arch/x86/Kconfig` and guard
it with `HAVE_EXP_X86_64_SUPPORT`. Replace the per-CPU implementations
of the same functionality with the newly-added Kconfig options. Update
documentation and the config file for QEMU accordingly.

Change-Id: I550216fd2a8323342d6b605306b0b95ffd5dcd1c
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55760
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2021-07-02 08:19:21 +00:00
Angel Pons 6f5a6581a6 src: Introduce `ARCH_ALL_STAGES_X86`
Introduce the `ARCH_ALL_STAGES_X86` Kconfig symbol to automatically
select the per-stage arch options. Subsequent commits will leverage
this to allow choosing between 32-bit and 64-bit coreboot where all
stages are x86. AMD Picasso and AMD Cezanne are the only exceptions
to this rule: they disable `ARCH_ALL_STAGES_X86` and explicitly set
the per-stage arch options accordingly.

Change-Id: Ia2ddbae8c0dfb5301352d725032f6ebd370428c9
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55759
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2021-07-02 08:19:10 +00:00
Tyler Wang de62f55507 mb/google/dedede/var/magolor: Enable G2 touchscreen for magma
Add G2 touchscreen support for magma.

BUG=b:189852808
TEST=Build and verify that touchscreen works.

Signed-off-by: Tyler Wang <tyler.wang@quanta.corp-partner.google.com>
Change-Id: I3e032bff7f3e97f54f3e544035e862058ea0dbfc
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55976
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: David Wu <david_wu@quanta.corp-partner.google.com>
2021-07-02 07:51:08 +00:00
Tim Wawrzynczak f004a72af0 soc/intel/common/block/cse: Add ME EOP timestamps
BUG=b:191362590
TEST=on brya, cbmem -t:
 942:before sending EOP to ME                          2,628,446 (5,879)
 943:after sending EOP to ME                           2,631,177 (2,730)

Change-Id: I0376610c5cbae7df1bf1a927b3bc99b1022de4cb
Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55774
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
2021-07-02 07:50:53 +00:00
Mark Hsieh fa4581fdf3 mb/google/volteer/variants/eldrid: Include SPD for MT40A512M16TB-062E:R
Add SPD support to eldrid for DDR4 memory part MT40A512M16TB-062E:R.

Eldrid should use DRAM_ID strap ID 0 (0000) on SKUs populated
with MT40A512M16TB-062E:R DDR4 memory parts.

BUG=b:192380070
TEST="FW_NAME=eldrid emerge-volteer coreboot" and verify it builds
successfully.

Signed-off-by: Mark Hsieh <mark_hsieh@wistron.corp-partner.google.com>
Change-Id: I4d07727c9c41bf494fbef373abce0ac1fc65c316
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55983
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-07-02 07:49:19 +00:00
Maxim Polyakov 8b35851e4c util/intelp2m: use import once for all included modules
There is no need to repeat "import" for each module in GoLang. Use
this keyword only once in each file for code cleanliness.

Change-Id: Ibb24fafd409b31b174946a39ca1f810d59b87e76
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55985
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-07-02 07:48:58 +00:00
Bernardo Perez Priego 421ce56f83 soc/intel/alderlake: Add USB TCSS enablement
In order to detect USB Type C device port as Super Speed, we need to set
corresponding bit in UPD UsbTcPortEn. This patch will use device path
to determine which port should be enabled.

BUG=b:184324979
Test=Boot board, USB Type C must be functional and operate at Super Speed.

Signed-off-by: Bernardo Perez Priego <bernardo.perez.priego@intel.com>
Change-Id: I7da63f21d51889a888699540f780cb26b480c26d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55361
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sridhar Siricilla <sridhar.siricilla@intel.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-07-02 07:47:50 +00:00
Shelley Chen 2033afa682 selfboot: Add support for selfload in romstage
Since bootmem is not available in romstage, calls to bootmem APIs need
to be compile-time eliminated in order to avoid linker error:

     undefined reference to `bootmem_region_targets_type

BUG=None
BRANCH=None
TEST=./util/abuild/abuild -p none -t GOOGLE_HEROBRINE -x -a -B
     cherry-picked on top of CB:49392 and verified successful
     compilation.

Change-Id: I8dfa2f2079a9a2859114c53c22bf7ef466ac2ad9
Signed-off-by: Shelley Chen <shchen@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55865
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-07-02 00:47:23 +00:00
Maulik V Vaghela a6b60ebedb drivers/intel/gma: Move extended VBT just below opregion
Currently the flow for opregion init is as below:
1. Allocate memory for opregion first (cbmem_add(opregion))
2. Check if VBT size > 6 KiB (this requires extended VBT support)
3. In case of extended VBT requirement, we allocate another chunk
   of memory which is equal to size of VBT (cbmem_add(extended_vbt))
4. Pass physical address pointer to OS via RVDA

We can optimize the above flow to allocate single chunk of memory by
checking VBT size in earlier step. The new optimized flow for opregion
init is as below:
1. Check if VBT size > 6 KiB (this requires extended VBT support)
2. In case of extended VBT requirement, total memory to be allocated
   is calculated as sizeof(opregion) + sizeof (extended_vbt)
   In case where VBT size is < 6 KiB, total memory requirement would
   be equal to sizeof(opregion)
3. Based on above calculation, allocate single chunk of memory based on
   total size.

This will also be helpful for the case of virtualization where guest
users don't have access to physical address and when it needs relative
address of VBT compared to absolute address.

In case of opregion 2.1 spec, we need to pass relative address of
VBT from opregion base in RVDA. This optimization will help in meeting
this requirement since relative address of extended VBT is easy to get.
This change will ensure that it meets opregion specification
requirement and will be compatible with future versions as well.

BUG=b:190019970
BRANCH=None
TEST=check the address of extended VBT region and address is coming
correctly.

Change-Id: Ic0e255df63145409096b0b9312c6c51c05f49931
Signed-off-by: Maulik V Vaghela <maulik.v.vaghela@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55341
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-07-01 16:36:47 +00:00
Arthur Heymans 5bb7dc4e05 cbfstool/cbfs-mkstage.c: Change signature of parse_elf_to_xip_stage()
The dereferced parameter is never updated so passing a copy would work
too.

Change-Id: Ie36f64f55d4fc7034780116c28aaed65aa304d5e
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55792
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-07-01 15:22:08 +00:00
Jeff Chase d9b714dada mb/google/hatch/scout: update gpios and device tree
Scout-specific changes to puff reference following bring-up
- copy baseline changes from genesis
- update GPIOs
- update PCIe ports for TPUs
- remove LSPCON
- enable eMMC
- disable touch I2C
- enable uart

BUG=b:187078663
TEST=boot scout
BRANCH=none

Signed-off-by: Jeff Chase <jnchase@google.com>
Change-Id: Ic3cb9cf515ab7a4a0ebbee249644dd3f133d8735
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55922
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-07-01 14:13:37 +00:00
Eric Lai cf6e4570db mb/google/brya: Swap P-sensor IRQ
P-sensor is swap by the latest schematic. Thus, swap the IRQ for correct
P-sensor.

BUG=b:192331122,b:181555900
TEST=check P-sensor driver can be probed without error.

Signed-off-by: Eric Lai <ericr_lai@compal.corp-partner.google.com>
Change-Id: I3ccb31c1925e476e2ebb34b2439a491759472405
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55977
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-07-01 13:51:34 +00:00
V Sowmya 844dcb3725 soc/intel/alderlake: Enable energy efficiency turbo mode
This patch enables the energy efficiency turbo mode.

Signed-off-by: V Sowmya <v.sowmya@intel.com>
Change-Id: I2d76c948bdc9c208f5728e305b3034fcede6f4bf
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55705
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Maulik V Vaghela <maulik.v.vaghela@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-07-01 13:41:55 +00:00
Angel Pons c7cfe0ba54 soc/intel: Refactor `xdci_can_enable()` function
The same pattern appears on all `xdci_can_enable()` call sites. Move the
logic inside the function and take the xDCI devfn as parameter.

Change-Id: I94c24c10c7fc7c5b4938cffca17bdfb853c7bd59
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55790
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-07-01 12:14:02 +00:00
Sumeet R Pawnikar 3657187789 drivers/intel/dptf: Add OEM variables support
This adds OEM variables feature under DPTF as per BWG doc #541817. Using
this, platform vendors can expose an array of OEM-specific values as OEM
variables to be used in determining DPTF policy. These are obtained via
the ODVP method, and then simply exposed under sysfs. In addition, these
gets updated when a notification is received or when the DPTF policy is
changed by userspace.

BRANCH=None
BUG=b:187253038
TEST=Built and tested on dedede board

Change-Id: Iaf3cf7b40e9a441b41d0c659d76895a58669c2fb
Signed-off-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/50127
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2021-07-01 12:12:33 +00:00
Kyösti Mälkki b2287718ef device: Clean up resource utility function signatures
Drop extern declarations from functions.
Declare resource arguments as const.

Change-Id: I7684cc7813bad805c39a762892636818279ac134
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55475
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-07-01 09:46:09 +00:00