Compare commits

...

191 Commits

Author SHA1 Message Date
Maximilian Brune
96084d5957 payloads/external/leanefi/Makefile: Fix clean target
Just follow the examples of other payloads and simply remove the build
directory of said payload.

Change-Id: Idf2a8f3b9ecbb300514d2d1deede76785fd402b7
Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82897
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-06-04 15:33:06 +00:00
Seunghwan Kim
b152f10d5a mb/google/brya/var/xol: Enable FSP UPD LpDdrDqDqsReTraining
Set LpDdrDqDqsReTraining to 1 for xol. Value 0 will cause black screen
issue.

Reference: https://review.coreboot.org/c/coreboot/+/79527
> FSP default value for LpDdrDqDqsReTraining is 1. For boards
> that didn't set LpDdrDqDqsReTraining to any value, 0 was being
> assigned and it caused black screen issue.

BUG=b:332980211
BRANCH=brya
TEST=Built and verified there is no black screen issue during power
on/off test for over 100 cycles.

Change-Id: Ia346ce559b4509ea1a63abe28b12ad909f9b7b0d
Signed-off-by: Seunghwan Kim <sh_.kim@samsung.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82778
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-06-04 14:50:34 +00:00
Shon Wang
b870b66834 mb/google/brask/var/bujia: change ALC5650 to ALC5682I-VS
Due to system spec change, change audio codec ALC5650 to ALC5682I-VS

BUG=b:329787697
TEST= USE="-project_all project_bujia" emerge-brask coreboot

Change-Id: I38e5c58b3ef3fbe709b98601975ae3821bb77213
Signed-off-by: Shon Wang <shon.wang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82774
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Derek Huang <derekhuang@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-06-04 14:49:19 +00:00
Ronak Kanabar
79be6da071 vc/intel/fsp: Update ADL N FSP headers from v3343.05 to v5021.00
Update generated FSP headers for Alder Lake N from v5021.00

Changes include:
- Add FspProducerDataHeader.h header file
- Open Usb4CmMode & CnviWifiCore Upd in FspsUpd.h
- Update UPD Offset in FspsUpd.h

BUG=b:296433836
TEST=Able to build and boot google/nivviks

Change-Id: Ieb4cc8f2f83d8f6e821894f0ec2e56262a25743c
Signed-off-by: Ronak Kanabar <ronak.kanabar@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82780
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2024-06-04 13:59:30 +00:00
Ronak Kanabar
397a4965b2 Revert "vc/intel/fsp2/alderlake_n: Drop unused header files"
This reverts commit 79503ef515.

The Intel FSP repository at https://github.com/intel/FSP.git currently
lacks the Client ADL-N headers. The existing coreboot code references
the "IoT/AlderLakeN/" directory for these headers, but it is missing the
crucial FspProducerDataHeader.h file. Without this header, the ADL-N
platform is unable to utilize the appropriate MRC version needed for
updating MRC caches. This patch aims to restore the necessary FSP
headers for the ADL-N platform within the vendorcode directory.

Change-Id: I99e9d5a07b4ca8d1666e3fd50d3d363ed5d4618e
Signed-off-by: Ronak Kanabar <ronak.kanabar@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82779
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-06-04 13:59:24 +00:00
Elyes Haouas
78bd2710a7 util/xcompile: Use new GCC's warning options only if supported
Wflex-array-member-not-at-end & Wcalloc-transposed-args are
not supported when using GCC older than GCC-14.
Use them only when supported.

Change-Id: I11c1e729569c8130bd254a10454c5066a72974d6
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82785
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-06-04 10:23:03 +00:00
Maximilian Brune
b62f86be43 payloads: Add leanefi payload
This adds another external payload to coreboot. The payload has been
heavily based on u-boots UEFI implementation.

The leanefi payload is basically a translator from coreboot to UEFI. It
takes the coreboot tables and transforms them into UEFI interfaces.
Although it can potentially load any efi application that can
handle the minimized interface that leanefi provides, it has only
been tested with LinuxBoot (v6.3.5) as a payload. It has been optimized
to support only those interfaces that Linux requires to start.

Among other leanefi does not support:
- efi capsule update (also efi system resource table)
- efi variables
- efi text input protocol (it can only output)
- most boot services. mostly memory services are left (e.g. alloc/free)
- all runtime services (although there is still a very small runtime
  footprint that is planned to be removed in the near future)
- TCG2/TPM (although that is mostly because of laziness)
The README.md currently provides more details on why.

The payload currently only supports arm64 and has only been tested
on emulation/simulator targets. The original motivation was to get ACPI
on arm64 published to the OS without using EDK2. It is however also
possible to supply the leanefi with a FDT that is published to the OS.
At that point one would however probably use coreboot only instead of
this shim layer on top. It would be way nicer to have Linux support
something else than UEFI to propagate the ACPI tables, but it requires
to get the Linux maintainer/community on board. So for now this shim
layer ciruimvents that.

LBBR Test:
// 1. dump FDT from QEMU like mentioned in aarch64 coreboot doc
// 2. compile u-root however you like (aarch64)
// 3. compile Linux (embed u-root initramfs via Kconfig)
// 4. copy Linux kernel to payloads/leanefi/Image
// 5. copy following coreboot defconfig to configs/defconfig:
CONFIG_BOARD_EMULATION_QEMU_AARCH64=y
CONFIG_PAYLOAD_NONE=n
CONFIG_PAYLOAD_LEANEFI=y
CONFIG_LEANEFI_PAYLOAD=y
CONFIG_LEANEFI_PAYLOAD_PATH="[path-to-linux]/arch/arm64/boot/Image"
CONFIG_LEANEFI_FDT=y
CONFIG_LEANEFI_FDT_PATH="[path-to-dumped-DTB]"
// 6. compile coreboot
make defconfig
make -j$(nproc)
// 7. run qemu like mentioned in coreboot doc (no FIT)
// 8. say hello to u-root and optionally kexec into the next kernel

Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: I4093378e89c3cb43fb0846666de80a7da36b03f1
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78913
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Ron Minnich <rminnich@gmail.com>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-06-04 00:26:14 +00:00
Elyes Haouas
178a5054b3 tree: Use calloc(n, sizeof(struct)) insteadof calloc(sizeof(struct), n)
Change-Id: I5e67e370d4eb8fe28227843bbca34db06ad84b26
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82786
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-03 19:02:31 +00:00
Elyes Haouas
ea7a83ee88 Revert "Makefile: Warn if flexible array members are not at the end"
This reverts commit f4acef92.

Reason for revert: '-Wflex-array-member-not-at-end' is new command
option came with GCC-14. older versions will not support it.

Change-Id: I179d0bc0db3e863645ae4c87e1534c5c20025dfb
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82758
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-03 17:27:24 +00:00
Reagan Bohan
ba39cd59db mb/razer/blade_stealth_kbl: Add H3Q variant
The Razer Blade Stealth Kaby Lake has 2 variants. One is the H2U
variant, as originally committed, with the SKU number RZ09-01962, also
known as the 2016 model, and the H3Q model with SKU numbers RZ09-01963
and RZ09-01964, known as the Mid 2017 model. This commit adds support
for the H3Q model. With respect to coreboot, there are few known
differences:

1. Only the H2U has TPM.
2. The USB ports are different.
3. The screen size (and therefore VBIOS Table) is different.
4. The hda_verb is very slightly different.
5. The gpio is different.

Change-Id: I493a651e52c2eb938daa67a05e9caaa784020fa4
Signed-off-by: Reagan Bohan <xbjfk.github@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82506
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-06-03 16:57:09 +00:00
Jeremy Soller
657cef204a soc/intel/meteorlake: Enable USB2 port reset message on Type-C ports
Apply commit c6b65c1a81 ("soc/intel/alderlake: Enable USB2 port reset
message on Type-C ports") to Meteor Lake.

This change is added to address the issue of USB3 ports downgrading to
high speed during low power modes and not returning back to super speed.

The patch enables port reset event on USB2 ports. This event is
is passed to USB3 upstream ports to upgrade back to super speed (USB3)
after a downgrade during low power state.

Change-Id: Iac702a8d8edd2b3b7e03abcac020be7e45335821
Signed-off-by: Jeremy Soller <jeremy@system76.com>
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82730
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-03 16:55:47 +00:00
Shuo Liu
740cf98f0f util/cbfstool: Fix linux_trampoline.c generation
linux_trampoline.c generation is broken with latest crossgcc-i386
toolchain. Fix the issue to enable the building.

../cbfstool/linux_trampoline.S: Assembler messages:
../cbfstool/linux_trampoline.S💯 Error: no instruction mnemonic
	suffix given and no register operands; can't size
	instruction
<builtin>: recipe for target '../cbfstool/linux_trampoline.o'
	failed

TEST=Build and boot on intel/archercity CRB

cd util/cbfstool/
rm linux_trampoline.c
make linux_trampoline.c

Change-Id: I7faca296f946bb4e9fd510661357925e5dcf9a6b
Signed-off-by: Shuo Liu <shuo.liu@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82704
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-06-03 16:54:02 +00:00
Tim Crawford
ed55218c5e mb/system76/rpl: Fix addw4 Kconfig name
Change-Id: I1ed280c1e62e0f094fd40d2165892240f76de390
Fixes: 29f1b79127 ("mb/system76/rpl: Add Adder WS 4 as a variant")
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82725
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jeremy Soller <jeremy@system76.com>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-06-03 16:47:40 +00:00
Tim Crawford
cfcd0851a2 mb/system76/rpl: Hook up TAS5825M init
Ensure per-board smart amp init is configured. Fixes speaker output on
oryp12.

Change-Id: I40ff1889dd144bf83ef85979a55535493aa7abdd
Fixes: 8b9716e226 ("mb/system76/rpl: Add Oryx Pro 12 as a variant")
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82726
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jeremy Soller <jeremy@system76.com>
2024-06-03 16:47:26 +00:00
Tim Crawford
8093b77c34 mb/system76: Add SPDX ID to devicetree files
Change-Id: I55f2730f7277a3c699b86ded5864e9690d92d518
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82700
Reviewed-by: Jeremy Soller <jeremy@system76.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-03 16:46:51 +00:00
Michał Kopeć
3a26aec8bd soc/intel/meteorlake: Hook up PchHdaAudioLinkHdaEnable to devicetree
The comment that the PchHdaAudioLink UPDs only configure GPIOs is
incorrect. Setting this to 1 is needed to enable HDA audio link.

Same exact situation as with Alder Lake in CL 71715.

Change-Id: Iecbe106ae18b5a8b53c04a5335a4e4c4ae27c7a0
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82685
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Crawford <tcrawford@system76.com>
2024-06-03 16:46:00 +00:00
Michał Kopeć
a79af4c7fd ec/dasharo/ec: Add initial copy of ec/system76/ec
Initial commit is a copy of ec/system76/ec from tag v24.02.1 (commit
0a280ff7) with string changes. Dasharo-specific features will be added
in subsequent commits, similar to how Librem EC support was added in
changes 52390 and 52391.

Change-Id: Ic7c3d9413488026548514963eb78accc28e41e06
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82671
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-06-03 16:45:20 +00:00
Alper Nebi Yasak
377157c7fb device_tree: Add function to get top of memory from a FDT blob
coreboot needs to figure out top of memory to place CBMEM data. On some
non-x86 QEMU virtual machines, this is achieved by probing the RAM space
to find where the VM starts discarding data since it's not backed by
actual RAM. This behaviour seems to have changed on the QEMU side since
then, VMs using the "virt" model have started raising exceptions/errors
instead of silently discarding data (likely [1] for example) which has
previously broken coreboot on these emulation boards.

The qemu-aarch64 and qemu-riscv mainboards are intended for the "virt"
models and had this issue, which were mostly fixed by using exception
handlers in the RAM detection process [2][3]. But on 32-bit RISC-V we
fail to initialize CBMEM if we have 2048 MiB or more of RAM, and on
64-bit RISC-V we had to limit probing to 16383 MiB because it can run
into MMIO regions otherwise.

The qemu-armv7 mainboard code is intended for the "vexpress-a9" model VM
which doesn't appear to suffer from this issue. Still, the issue can be
observed on the ARMv7 "virt" model via a port based on qemu-aarch64.

QEMU docs for ARM and RISC-V "virt" models [4][5] recommend reading the
device tree blob it provides for device information (incl. RAM size).
Implement functions that parse the device tree blob to find described
memory regions and calculate the top of memory in order to use it in
mainboard code as an alternative to probing RAM space. ARM64 code
initializes CBMEM in romstage where malloc isn't available, so take care
to do parsing without unflattening the blob and make the code available
in romstage as well.

[1] https://lore.kernel.org/qemu-devel/1504626814-23124-1-git-send-email-peter.maydell@linaro.org/T/#u
[2] https://review.coreboot.org/c/coreboot/+/34774
[3] https://review.coreboot.org/c/coreboot/+/36486
[4] https://qemu-project.gitlab.io/qemu/system/arm/virt.html
[5] https://qemu-project.gitlab.io/qemu/system/riscv/virt.html

Change-Id: I8bef09bc1bc4e324ebeaa37f78d67d3aa315f52c
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80322
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2024-06-03 15:38:55 +00:00
Elyes Haouas
eed791e851 Revert "tree: Use Wcalloc-transposed-args command option"
This reverts commit b3db3abd63.

Reason for revert: `Wcalloc-transposed-args` is new command option came with GCC-14. older versions will not support it.

Change-Id: I74ef8de1f7d38e1e0519c3b41e79fd9b11d8e16f
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82759
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-03 14:58:01 +00:00
Maximilian Brune
6466354ee9 lib/device_tree.c: Fix wrong check for FDT validity
Obviously one should return NULL if a FDT is not valid an not the other
way around.

Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: I77c0e187b841e60965daac17025110181bdd32bc
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82773
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2024-06-03 11:17:30 +00:00
Elyes Haouas
f38c940754 tree: Add some SMBIOS_PROCESSOR_FAMILY macros
Change-Id: Ibe551a4c83f416ba30326077aa165818cf79c1fd
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82648
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-06-01 06:40:14 +00:00
Subrata Banik
87a6600264 mainboard/google/rex: Enable Rex64 build configuration
- Add Rex64 board to Kconfig menu
- Enable building for Rex64 with x86_64 support

Change-Id: I02e2c49b4aeb2cb98d9d0cb66717db18c3f96d45
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82625
Reviewed-by: Dinesh Gehlot <digehlot@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>
2024-05-31 22:11:55 +00:00
Appukuttan V K
c097c4788b soc/intel: Fix pointer size mismatch errors in crashlog
The crashlog code in intel/common/block and meteorlake soc
was casting integer addresses directly to pointer types,
which caused compilation errors in x86_64 bit builds.

This commit fixes the issue by using uintptr_t for casting
integer addresses to pointer types before dereferencing.

BUG=b:329034258
TEST=Successfully build Meteor Lake (rex) in both x86_32 and
x86_64 modes.

Change-Id: I2d0814a8b767270ec140341bfb51d0782469545d
Signed-off-by: Appukuttan V K <appukuttan.vk@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82481
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2024-05-31 20:36:45 +00:00
Kenneth Chan
1f97d801ce mb/google/brya/var/nova: Update USB ports setting
Update used USB port[2][3](type-a) setting for nova.

BUG=b:328711879
TEST=emerge-constitution coreboot chromeos-bootimage

Change-Id: I63cf97b23627feac05743f2a6e514a33fcaf7dff
Signed-off-by: Kenneth Chan <kenneth.chan@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82703
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: David Wu <david_wu@quanta.corp-partner.google.com>
2024-05-31 16:18:12 +00:00
Shuo Liu
eaaa630e7d soc/intel/xeon_sp: Add _OSC ASL generation utils for IIO domains
For multi-SKU/SoC supports, IIO domain layouts are returned from FSP
HOBs. Add _OSC ASL generation utils so that static IIO domain layout
definition file per SKU/SoC are not needed any more.

The _OSC generation codes is a thin AML generation layer which
further invokes \_SB.POSC which is defined in ASL. The ASL handler
is able to handle boot-time generated info as parameters while keeps
good readability for the ease of maintenance. In this case, firmware
granted capabilities are calculated in boot time and passed to ASL
handler as parameters.

TEST=Build and boot on intel/archercity CRB

Change-Id: Ibd3bfa2428725fe593754436d5ed75a3a11b4cdc
Signed-off-by: Shuo Liu <shuo.liu@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82034
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Christian Walter <christian.walter@9elements.com>
2024-05-31 13:18:11 +00:00
Appukuttan V K
cf4c6fd225 vc/edk2-stable202302: Remove FSPM_ARCH_UPD config guard
This commit removes config guard around FSPM_ARCH_UPD from the
FspApi.h header file. This change is done to ensure
that this header file can be used with both x86_32 and x86_64
architectures and also with different FSP specification versions.

The following modifications are made:
- Removes PLATFORM_USES_FSP2_X86_32 config guard around
  FSPM_ARCH_UPD, this was added to isolate the structure from
  x64 build. This is not really required since the x64 build uses
  FSP2.4 structures.

BUG=b:343428206
TEST=Verified x86_32 and x86_64 builds on Meteor Lake board (Rex)

Change-Id: Idc849de73723036323f81dfd055730f6669cd52e
Signed-off-by: Appukuttan V K <appukuttan.vk@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82425
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-05-31 10:46:13 +00:00
Pranava Y N
3303b3684b mb/google/trulo: Support OCP fault on A0/1 ports
The devicetree entry and gpio.c updated as per the schematics of Trulo
to map the OC fault signals from A0/A1 USB ports.

BUG=b:335858378
TEST= Able to build google/trulo

Change-Id: Ic17debc5eecebca8c000c43a660e1b52d2932f2a
Signed-off-by: Pranava Y N <pranavayn@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82637
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
2024-05-31 09:13:17 +00:00
Appukuttan V K
11fad8fc86 soc/intel/meteorlake: Exclude deprecated upd from FSP2.4 builds
EnableMultiPhaseSiliconInit upd is deprecated and has been
removed starting with v2.4 of FSP specification. Multi-phase
silicon initialization is mandatory for all FSP implementations
compliant to v2.4.

The following modifications are made:
- In fsp_params.c and silicon_init.c EnableMultiPhaseSiliconInit
  update is guarded so that it will get included only if FSP2.4
  is not selected.

BUG=b:329034258
TEST=Verified x86_32 and x86_64 builds on Meteor Lake board (Rex)

Change-Id: Icdbf3bacc0a05975fc941b264fd400d74f506fce
Signed-off-by: Appukuttan V K <appukuttan.vk@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82699
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2024-05-31 08:22:01 +00:00
Subrata Banik
415932097a soc/intel/meteorlake: Tailor FSP Version Selection for Architecture
* Conditionally select FSP 2.4 when x86_64 support is available
  (HAVE_X86_64_SUPPORT).
* Default to FSP 2.3 otherwise.
* Adjust default FSP header path to align with architecture.

BUG=b:242829490
TEST=Able to build google/rex in both 32-bit and 64-bit mode.

Change-Id: Ib77a34c6bf7bca3485a197f109d1550ac3d51cc0
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82624
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2024-05-31 06:13:48 +00:00
Subrata Banik
09b9a80677 soc/intel/meteorlake: Enable eSOL without 64-bit support
This change allows eSOL to be enabled on production Meteor Lake silicon
even when 64-bit support is not present. eSOL support is still TBD for
64-bit FSP hence, skip adding this support for 64-bit build.

TEST=Able to build and boot google/rex64 w/o eSOL.

Change-Id: I16762e5b74ae0aaa3c28730479a1fd9defc4d93c
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82716
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-31 06:13:43 +00:00
Elyes Haouas
9761b87fae tree: Remove duplicated <soc/gpio.h>
<gpio.h> is supposed to chain-include <soc/gpio.h>.

Change-Id: Ib25581bd2c8dd38cdd0396561ce5f9a782365f14
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82691
Reviewed-by: Michał Kopeć <michal.kopec@3mdeb.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-30 14:40:32 +00:00
Appukuttan V K
e527e954be vc/intel/fsp/mtl: Add x86_64 FSP V3471.91 headers
This commit introduces new header files of V3471.91 for the x86_64
architecture in the fsp2_0/meteorlake directory. FSP2.4 brings FSP
64-bits support and the soc Kconfig file has been updated to select
this new header path when FSP2.4 is in use.

BUG=b:329034258
TEST=Verified x86_32 and x86_64 builds on Meteor Lake board (Rex)

Change-Id: Ib41b57e794311db729ac65a968f562aa127e86c3
Signed-off-by: Appukuttan V K <appukuttan.vk@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82473
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
2024-05-30 13:22:10 +00:00
Appukuttan V K
acd0e1a5b8 vc/intel/fsp/mtl: Organize FSP headers into x86_32 directory
This commit moves FSP V3471.91 header files for Meteor Lake
into a new x86_32 directory to better organize the files based
on the architecture. The Kconfig file has been modified accordingly
to reflect the new paths of the relocated headers.

BUG=b:329034258
TEST=Verified x86_32 and x86_64 builds on Meteor Lake board (Rex)

Change-Id: Id30186a8b1b5a9082f498e18a3378f5e9907b668
Signed-off-by: Appukuttan V K <appukuttan.vk@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82424
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2024-05-30 13:21:58 +00:00
Appukuttan V K
3725fce22b soc/intel/meteorlake: Adjust FSP parameters for FSP2.4 compatibility
This commit updates the type definitions for FSP parameters in the
Meteor Lake platform to ensure compatibility with the FSP2.4
specification, that supports 64-bit builds for the first time and
this  also ensures that parameter types works for both 32-bit
and 64-bit builds.

- In fsp_params.c, FSPS_ARCH_UPD macro is changed to
  FSPS_ARCHx_UPD which supports FSP2.4 and older specifications.
  Special handling is added for FspEventHandler assignment to handle
  as the variable type is different in both cases.

- In meminit.c, the type for SPD pointers is changed from uint32_t
  to efi_uintn_t to support both 32-bit and 64-bit builds.

BUG=b:329034258
TEST=Verified x86_32 and x86_64 builds on Meteor Lake board (Rex)

Change-Id: Ide220f60184135a6488f4472f69a471e2b383e2a
Signed-off-by: Appukuttan V K <appukuttan.vk@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82177
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-30 13:21:46 +00:00
Mario Scheithauer
8c3cf9eace mb/siemens/mc_ehl5: Remove DDI settings from devicetree
Since this mainboard no longer uses the FSP GOP driver, the DDI port
settings are no longer necessary. The GOP driver was used in the initial
phase of development where we used Tianocore as payload for some test
cases. Finally, this mainboard uses a self-made Linux payload, which
does the graphic initialization.

BUG=none
TEST=Boot into Linux and check if graphic works correctly

Change-Id: Ie9e135fbc2627546d6ef95d7d5ff3e9a9222b5d2
Signed-off-by: Mario Scheithauer <mario.scheithauer@siemens.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82663
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-by: Uwe Poeche <uwe.poeche@siemens.com>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-05-30 13:02:55 +00:00
Tim Crawford
29f1b79127 mb/system76/rpl: Add Adder WS 4 as a variant
The Adder WS 4 (addw4) is a Raptor Lake-HX board.

Tested with a custom edk2 UefiPayloadPkg.

Working:

- PS/2 keyboard
- I2C HID touchpad
- Both DIMM slots (with Crucial CT8G48C40S5)
- M.2 NVMe SSDs
- All USB ports
- MicroSD card reader
- Webcam
- Ethernet
- WiFi/Bluetooth
- Integrated graphics using Intel GOP driver
- Backlight controls on Linux 6.8
- DisplayPort output over USB-C
- Internal microphone
- Internal speakers
- Combined headset + mic 3.5mm audio
- 3.5mm microphone input
- S3 suspend/resume
- Booting Pop!_OS Linux 22.04 with kernel 6.8.0
- TPM 2.0 device

Not working:

- Discrete/Hybrid graphics
- Detection of devices in TBT slot on boot

Change-Id: I4a6819cbcf64f68237008adebdd7eb196336514c
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82595
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-29 21:50:32 +00:00
Tim Crawford
8b9716e226 mb/system76/rpl: Add Oryx Pro 12 as a variant
The Oryx Pro 12 (oryp12) is a Raptor Lake-HX board.

Tested with a custom edk2 UefiPayloadPkg.

Working:

- PS/2 keyboard
- I2C HID touchpad
- Both DIMM slots (with Crucial CT8G48C40S5)
- M.2 NVMe SSDs
- MicroSD card reader
- Webcam
- Ethernet
- WiFi/Bluetooth
- Integrated graphics using Intel GOP driver
- Backlight controls on Linux 6.8
- Internal microphone
- Internal speakers
- Combined headset + mic 3.5mm audio
- 3.5mm microphone input
- S3 suspend/resume
- Booting Pop!_OS Linux 22.04 with kernel 6.8.0
- TPM 2.0 device

Not working:

- Discrete/Hybrid graphics
- Thunderbolt

Change-Id: I11cf2dbd1512ebae44e0109bdb78e6eafa027444
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82596
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-05-29 20:57:44 +00:00
Tim Crawford
3a4e1392df mb/system76/rpl: darp9: Add SSD RTD3 configs
Some drives block the CPU from reaching C10 during S0ix suspend without
the RTD3 configs.

Fixes suspend with the following drives:

- Kingston KC3000 (SKC3000D/4096G)
- Kingston HyperX (SHPM2280P2H/240G)
- Solidigm P44 Pro (SSDPFKKW010X7)

The following drives continue to work:

- Samsung 970 Evo (MZVLB250HAHQ)
- WD Black SN770 (WDS250G3X0E)
- WD Green SN350 (WDS240G2G0C-00AJM0)
- WD Blue SN570 (WDS100T3B0C)

Change-Id: Ia369727d0f1aa5ff546cfb5700a63063730e8248
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Tested-by: Levi Portenier <levi@system76.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82597
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jeremy Soller <jeremy@system76.com>
2024-05-29 20:09:07 +00:00
Jay Patel
ac44327bc2 mb/intel/mtlrvp: Enable EC MKBP device
MKBP device is required for passing events from input sources to AP.
Input sources include buttons (power, volume); switches (lid, tablet
mode) and sysrq.

BUG=b:342227155
TEST=Able to build coreboot for mtlrvp platform and switch tablet
     mode.

Change-Id: I630421c83784bb4492486d72290b9e8cdada1d47
Signed-off-by: Jay Patel <jay2.patel@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82612
Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Ravishankar Sarawadi <ravishankar.sarawadi@intel.com>
Reviewed-by: Jamie Ryu <jamie.m.ryu@intel.com>
2024-05-29 19:49:37 +00:00
Maciej Pijanowski
0306cc2bbd payloads/iPXE: Hook up TRUST_CMD switch
Change-Id: Ia4f5d4140eeb8625c5ee41e38f048658db28a199
Signed-off-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79684
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-29 19:22:57 +00:00
Krystian Hebel
fda9d75d90 cpu/x86/pae/pgtbl.c: extract reusable code from memset_pae()
Code dealing with PAE can be used outside of memset_pae(). This change
extracts creation of identity mapped pagetables to init_pae_pagetables()
and mapping of single 2 MiB map to pae_map_2M_page(). Both functions are
exported in include/cpu/x86/pae.h to allow use outside of pgtbl.c.

MEMSET_PAE_* macros were renamed to PAE_* since they no longer apply
only to memset_pae().

Change-Id: I8aa80eb246ff0e77e1f51d71933d3d00ab75aaeb
Signed-off-by: Krystian Hebel <krystian.hebel@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82249
Reviewed-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-29 13:04:30 +00:00
Leo Chou
b1bd442ca9 mb/google/nissa/var/sundance: Add WWAN power off sequence
Sundance support FM101 WWAN, use wwan_power.asl to handle the
power off sequence

BUG=b:343139385
TEST=Build and boot on sundance

Change-Id: I82085172db370ab5a6c0f77afe6042c53b89e43e
Signed-off-by: Leo Chou <leo.chou@lcfc.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82683
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-05-29 12:37:59 +00:00
Roger Wang
6d21f5c845 mb/google/nissa/var/pujjoga: Update touchscreen IC settings
Modify the Goodix touchscreen from new vendor and remove 3 unused
touchscreens. According to the information provided by the key-part
team.

BUG=b:340689681
TEST=Build and check Goodix touchscreen can work.

Change-Id: I1e6349e80431aadf27cd72b8439b01f95348071d
Signed-off-by: Roger Wang <roger2.wang@lcfc.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82427
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-05-29 12:37:36 +00:00
Roger Wang
2f2ceef27b mb/google/nissa/var/sundance: Update eMMC DLL settings
Currently Samsung eMMC (KLMBG2JETD-B041) can't power on to OS nomally.
According to Intel provides eMMC DLL delay patch that tuning on each
Sundance different eMMC system to modify some system can't boot to OS problem.

BUG=b:342057438
TEST=Build and check each SKU eMMC can work.

Change-Id: I29d4305bbe5f91d822d947cae942b654e80a8a57
Signed-off-by: Roger Wang <roger2.wang@lcfc.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82602
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-05-29 12:37:11 +00:00
Elyes Haouas
08375b5082 tree: Remove unused <string.h>
Change-Id: I9ed1a82fcd3fc29124ddc406592bd45dc84d4628
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82666
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Yidi Lin <yidilin@google.com>
2024-05-29 10:34:08 +00:00
Elyes Haouas
bdd03c20d5 tree: Use <stdio.h> for snprintf
<stdio.h> header is used for input/output operations (such as printf,
scanf, fopen, etc.). Although some input/output functions can manipulate
strings, they do not need to directly include <string.h> because they
are declared independently.

Change-Id: Ibe2a4ff6f68843a6d99cfdfe182cf2dd922802aa
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82665
Reviewed-by: Yidi Lin <yidilin@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-29 10:33:54 +00:00
Subrata Banik
93ca6b676c libpayload: Include libpayload-config.h in lib target
- Added `$(obj)/libpayload-config.h` as a dependency for the `lib`
  target.
- This ensures the config header is up-to-date before building the
  library.

TEST=Able to build google/rex.

Change-Id: If26336f6261aadf611fa5338c4300873156cc3da
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82687
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2024-05-29 09:18:26 +00:00
Elyes Haouas
eec556be2d util/nvidia: Use c11 dialect
Change-Id: I75909ce85eed549d9094ba6f62d93656621d9f0d
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82679
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-29 08:19:15 +00:00
Elyes Haouas
fbca398293 util/superiotool: Use c11 dialect
Change-Id: Ic03d9ac883a92d52467d563f048446871b928712
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82678
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-05-29 08:19:09 +00:00
Elyes Haouas
b3db3abd63 tree: Use Wcalloc-transposed-args command option
GCC-14 documentation says "The first argument to calloc is documented to
be number of elements in array, while the second argument is size of
each element, so calloc(n, sizeof (int)) is preferred over
calloc(sizeof(int), n)."

Change-Id: I77b6f4d2eda487b087ba5665b588999633c33e8d
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82658
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-29 08:19:02 +00:00
Elyes Haouas
877fafab57 tree: Remove unused <stddef.h>
Change-Id: I7d7ad562eeff7247b7377b6570d489faee0aeda0
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82669
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yidi Lin <yidilin@google.com>
2024-05-29 02:51:20 +00:00
Tim Crawford
5d1494adda mb/system76/tgl: Update VBTs to version 250
Commit 4c7e97b26a ("Update fsp submodule to upstream master branch")
included an update to the VBT from 240 to 250, breaking parsing of
existing VBTs.

After that commit, the VBT was parsed as (from gaze16-3060-b):

    [DEBUG]  PCI: 00:02.0 init
    [INFO ]  GMA: Found VBT in CBFS
    [INFO ]  GMA: Found valid VBT in CBFS
    [INFO ]  framebuffer_info: bytes_per_line: 4096, bits_per_pixel: 32
    [INFO ]                     x_res x y_res: 1024 x 768, size: 3145728 at 0xd0000000
    [DEBUG]  PCI: 00:02.0 init finished in 6 msecs

When the expected output is:

    [DEBUG]  PCI: 00:00:02.0 init
    [INFO ]  GMA: Found VBT in CBFS
    [INFO ]  GMA: Found valid VBT in CBFS
    [INFO ]  framebuffer_info: bytes_per_line: 7680, bits_per_pixel: 32
    [INFO ]                     x_res x y_res: 1920 x 1080, size: 8294400 at 0xd0000000
    [DEBUG]  PCI: 00:00:02.0 init finished in 6 msecs

Generate blobs for the new version using Intel Display Configuration
Tool (DisCon) v3.3, based on the existing 237 and 240 VBTs.

(For our edk2 payload, the UEFI GOP driver was updated to 17.0.1077.)

Tested on all affected systems:

- darp7
- galp5
- gaze16-3050
- gaze16-3060
- gaze16-3060-b
- lemp10
- oryp8

Tested:

- Boot splash displays on screen again
- Firmware setup menu is rendered, at correct resolution

Change-Id: I918356d9f660b985ee4408ef77544fbd071ab35f
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Tested-by: Daniel Sutton <daniel@system76.com>
Tested-by: Jacob Kauffmann <jacob@system76.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82246
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-05-28 20:01:10 +00:00
Sowmya Aralguppe
5a8c11e2aa mb/google/brox: Add romstage early graphics
Select MAINBOARD_USE_EARLY_LIBGFXINIT for brox to enable SOL image.
This patch enables Sign of Life image during MRC training.

BUG=b:335369811
TEST=Able to boot to ChromeOS with SOL image.

CPU log:
[SPEW ]  bootmode is set to: 0 (boot with full config)
[0.384818] DP PHY mode status not complete
[0.388911] DP PHY mode status not complete
[0.393197] DP PHY mode status not complete
[0.397484] DP PHY mode status not complete
[0.401771] DP PHY mode status not complete
[0.406057] DP PHY mode status not complete
[0.410345] DP PHY mode status not complete
[0.414632] DP PHY mode status not complete
[0.418916] DP PHY mode status not complete
[0.423203] DP PHY mode status not complete
[0.427491] DP PHY mode status not complete
[0.431777] DP PHY mode status not complete
[INFO ]  Informing user on-display of memory training.
[DEBUG]  FMAP: area COREBOOT found @ 1877000 (7901184 bytes)
[WARN ]  CBFS: 'preram_locales' not found.
[ERROR]  ux_locales_get_text: preram_locales not found.
[DEBUG]  FMAP: area RW_ELOG found @ f20000 (16384 bytes)
[INFO ]  ELOG: NV offset 0xf20000 size 0x4000

elogtool list:
0 | 2024-05-10 02:26:07-0700 | Log area cleared | 4088
1 | 2024-05-10 02:26:07-0700 | Early Sign of Life | MRC Early SOL Screen Shown
2 | 2024-05-10 02:26:51-0700 | Memory Cache Update | Normal | Success
3 | 2024-05-10 02:27:09-0700 | System boot | 4
4 | 2024-05-10 02:27:09-0700 | Firmware Splash Screen | Enabled
5 | 2024-05-10 02:27:11-0700 | System Reset
6 | 2024-05-10 02:27:11-0700 | Firmware vboot info | boot_mode=Developer | fw_tried=A | fw_try_count=0 | fw_prev_tried=A | fw_prev_result=Unknown
7 | 2024-05-10 02:27:18-0700 | ACPI Enter | S5
8 | 2024-05-10 02:27:36-0700 | System boot | 5
9 | 2024-05-10 02:27:36-0700 | Firmware Splash Screen | Enabled
10 | 2024-05-10 02:27:37-0700 | System Reset
11 | 2024-05-10 02:27:37-0700 | Firmware vboot info | boot_mode=Developer | fw_tried=A | fw_try_count=0 | fw_prev_tried=A | fw_prev_result=Unknown


Change-Id: I1d4795825960bc58f8f7ef494b01aa975f3bc346
Signed-off-by: Sowmya Aralguppe <sowmya.aralguppe@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81931
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Shelley Chen <shchen@google.com>
Reviewed-by: Ashish Kumar Mishra <ashish.k.mishra@intel.com>
2024-05-28 19:14:23 +00:00
Elyes Haouas
b72f5949cc tree: Add smbios_processor_type
Change-Id: I46f799ad255993ac42dab11b5c1d2608daa52b42
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82645
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-28 13:27:15 +00:00
Subrata Banik
23e3ea889f mb/google/trulo: Add initial devicetree.cb
This patch adds initial PCI device entries into the baseboard
devicetree.cb.

TEST=Able to build google/trulo.

Change-Id: I6ec25b98379cf7c8cbdb5be94d9f3ea43878620c
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82652
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-05-28 13:17:27 +00:00
Subrata Banik
e75148cd13 mb/google/trulo: Mark unused USB ports as empty
This patch marks unused USB ports (USB2.0/TCSS) empty to avoid
prompting wrong dmesg as below.

   ```
  usb usb2-port3: Cannot enable. Maybe the USB cable is bad?
   ```
Trulo variants to override the USB ports as per the target
board design.

TEST=Able to build google/trulo.

Change-Id: I6240e66ed3d1a7198c1a526fdca2483910157235
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82651
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-05-28 13:17:08 +00:00
Subrata Banik
fab5482a1f mb/google/trulo: Program EC ranges (host cmd and memory map)
This patch adds chip config entries for EC host cmd and memory map
ranges.

TEST=Able to build Google/Trulo.

Change-Id: Id4b0f3bba934c8da56b6d7ca8579b46b6cccac28
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82650
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-05-28 13:16:36 +00:00
Shuo Liu
70de5bf9fd soc/intel/xeon_sp: Add PD_TYPE_CLUSTER
Add a new proximity type to represent the sub-NUMA cluster (SNC).

This patch adds necessary Xeon-SP common code level support for
SNC support. When SNC on, each SNC cluster will have a proximity
domain. DIMMs and CPU cores are attached to SNC proximity domains
instead of the processor proximity domains.

With SNC, there are 3 types of proximity domains,
PD_TYPE_PROCESSOR, PD_TYPE_GENERIC_INITIATOR and PD_TYPE_CLUSTER.
proximity domain type checks in Xeon-SP codes are updated to
correctly handle the adding of the new type.

This patch doesn't actually enable SNC. To fully enable SNC, SoC
codes need to override soc_get_cluster_count(), soc_set_cpu_node_
id() and memory_to_pd(), and call soc_set_cpu_node_id() in its
per-CPU init routine.

Change-Id: I32558983780f302ff4893901540a90baebf47add
Signed-off-by: Shuo Liu <shuo.liu@intel.com>
Co-authored-by: Ziang Wang <ziang.wang@intel.com>
Co-authored-by: Gang Chen <gang.c.chen@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81443
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2024-05-28 09:47:35 +00:00
Shuo Liu
bd33b6ab9f include/device: Fix IO resource handling covering 0xFFFF
IO resource creation utils taking 'from' and 'to' as parameters
use uint16_t for them, where 'to' equals the resource limit plus
1. When a resource is with a limit of 0xFFFF, the value of 'to'
will be clipped to 0x0000 by uint16_t. Fix this problem by use
uint32_t and checks the effective range to make sure it no larger
than UINT16_MAX + 1.

TEST=Build and boot on intel/archercity CRB
TEST=Build on intel/avenuecity CRB

Change-Id: Ie83045683094d6330c1676809f83acf30175cc90
Signed-off-by: Shuo Liu <shuo.liu@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82192
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2024-05-28 09:46:08 +00:00
Shuo Liu
6c708d8a46 soc/intel/xeon_sp: Add domain resource window creation utils
It might be benefical to have utils for domain resource window
creation so that the correct IORESOURCE flags used could be
guaranteed.

TEST=Build and boot on intel/archercity CRB
TEST=Build on intel/avenuecity CRB

Change-Id: I1e90512a48ab002a1c1d5031585ddadaac63673e
Signed-off-by: Shuo Liu <shuo.liu@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82103
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2024-05-28 09:45:35 +00:00
Elyes Haouas
94bfdd1282 tree: Remove unused <stdarg.h>
<stdarg.h> header is used to define macros for handling variable
argument lists in functions like printf. It does not depend on the string
or memory manipulation functions provided by <string.h>.
So let follow conventions and include only the necessary headers in each
header file.

Change-Id: I07ffc65b7feefb8ec4ab8dd268113f9ed8d24685
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82664
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-28 03:22:34 +00:00
Elyes Haouas
0554fc10c0 spd_bin.h: Use same macro for DDR3 and LPDDR3
DDR3 and LPDDR3 share the same PART_NUM and PART_LEN.
So use the same macro.
This is to prepare SPD de-duplication in following patch.

Change-Id: Iea824a847b5072b1cbaa38dc38deae1d484d5b16
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82409
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-05-28 03:21:37 +00:00
Gavin Liu
1361beefb5 soc/mediatek/mt8188: Decrease OP-TEE image size from 80 MB to 70 MB
The secure buffer shrank from 42 MB to 32 MB, decreasing the total
OP-TEE image size from 80 MB to 70 MB.

BUG=b:246837563
TEST=emerge-geralt coreboot
     build coreboot and verify SVP works well

Change-Id: I6729e65f83ef994fe59b5bd4ed098e6d3a847695
Signed-off-by: Gavin Liu <gavin.liu@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82634
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2024-05-28 01:35:24 +00:00
Felix Held
dfad318095 acpi/acpi_apic;arch/x86/acpi: better document ACPI_NO_PCAT_8259 case
Both acpi_create_madt_sci_override and acpi_sci_int have special
handling for the ACPI_NO_PCAT_8259 case, but those cases weren't exactly
obvious, so add a comment with the reason for that.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Ia6dcf59d5ab9226c61e9c4af95a73a07771b71d1
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82643
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-27 14:49:22 +00:00
Federico Amedeo Izzo
a0d453fa4d mb/aoostar: Add Alder Lake based AOOSTAR R1 (WTR_R1)
AOOSTAR R1 is a Chinese NAS based on Intel N100 (Alder Lake N), with
two 3.5" HDD slots, an M.2 NVMe 2280 SSD slot and a single DDR4-3200
SODIMM slot up to 32GB. It also comes with 2x 2.5Gb Intel NICs,
Intel AX200 WiFi + BT and USB-C Alt-DP Power Delivery.

Working:
- DDR4 RAM (tested with Crucial 16GB 3200MHz CL22)
- Automatic FAN control (IT8613E Super I/O)
- M.2 NVME slot
- 2x SATA ports (Issue on 3.5" HDD, see below)
- USB 2.0 ports
- USB 3.0 ports
- USB-C port with Alt-DP and PD
- HDMI / DisplayPort ports
- 2x 2.5Gb NICs
- WiFi + BT
- MicroSD card reader
- ASPM (Unavailable on stock)
- Linux (Arch Linux, kernel 6.8.7-arch1-1) UEFI booting with EDK2
- Windows 10 UEFI booting with EDK2

Broken:
- Power button (OFF->ON broken, ON->OFF works)
- 3.5" SATA HDDs (Detected only after reboot)

Untested:
- Internal audio
- S3

My motivation for doing this port is enabling ASPM, as it makes a
great difference on idle power consumption (from 8.4W to 5W measured
from the wall).

The last remaining annoyance of this port is the power button not
working. I spent a few hours double checking the Super I/O registers but
then I gave up. A workaround for this is to use the "ON after power
loss" feature and reconnect the power cord to turn on the board.
It's not a big problem for a NAS that will stay ON 24/7.
Any hint on the power button or 3.5" HDD issue is welcome.

VBT extracted from vendor UEFI firmware version 1AXFE 0.01 x64
(Build date and time 11/29/2023 10:57:44)
Compiled with FSP GOP video initialization, using IFD descriptor
and ME blob extracted from vendor UEFI firmware (see above).

The board can be flashed externally using a 1.8V adapter, I used a
CH341a modded for 3.3V I/O. Internal flashing works, as flash is
not read/write protected.

Patchset 5: Re-enabled dptf, added default options to Kconfig.
Patchset 7: Configured USB port mapping and overcurrent, USB3.0 works
Patchset 8: Fixed microSD card reader
Patchset 13: Change Super I/O Fan configuration to reduce fan noise

Change-Id: I9414eb742b6b90459e010b038c1994537e9801a5
Signed-off-by: Federico Amedeo Izzo <federico@izzo.pro>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82010
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-27 14:07:14 +00:00
Tony Huang
61f826bdf1 mb/google/ovis/var/deku: Set PsysPL2 value to 178W
Adjust setting as recommended by power team.
Add ramstage.c in Makefile.inc to set psys_pl2_watts in
variant_devtree_update().

Also copy CPU power limit values from ovis baseboard.

BUG=b:320410462
BRANCH=firmware-rex-15709.B
TEST=FSP debug emerge-ovis coreboot intelfsp
     check overrides setting
     [INFO] CPU PsysPL2 = 178 Watts
     [INFO] Overriding PsysPL2 (178)
     [INFO] Overriding power limits PL1 (mW) (19000,28000) PL2 (mW)
     (64000, 64000) PL4 (W) (120)

Change-Id: I9ce3a8f843a87e81d404778aaf250b876b6801eb
Signed-off-by: Tony Huang <tony-huang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82200
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
Reviewed-by: Derek Huang <derekhuang@google.com>
2024-05-27 12:53:20 +00:00
Tony Huang
e5b86c7d5a mb/google/ovis/var/deku: Increase TDP PL1 value from 28 W to 33 W
Adjust settings as recommended by thermal team.

Set PL1 max value tdp_pl1_override from 28W to 33W.

PL2, PL4 remain the same as CPU default.

BUG=b:308704811
BRANCH=firmware-rex-15709.B
TEST=emerge-ovis coreboot chromeos-bootimage
     built bootleg and verified test result by thermal team

Change-Id: Iad0bca913496dda666ba9bcfe5f6fce1a6396692
Signed-off-by: Tony Huang <tony-huang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82615
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-27 12:52:42 +00:00
Tony Huang
02b29e2f59 mb/google/ovis/var/deku: Set TCC_offset to 5
Adjust settings as recommended by thermal team.

Set tcc_offset value to 5 in devicetree.

BUG=b:308704811
BRANCH=firmware-rex-15709.B
TEST=emerge-ovis coreboot chromeos-bootimage
     built bootleg and verified test result by thermal team

Change-Id: I30f54ae6017c54c91ff9b432bba0ebd5bfc65ab9
Signed-off-by: Tony Huang <tony-huang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82614
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-05-27 12:52:32 +00:00
Tony Huang
86028de8d4 mb/google/rex/var/deku: Update DPTF parameters
Adjust settings as recommended by thermal team.

Update DPTF parameters based on b:308704811#comment4.

BUG=b:308704811
BRANCH=firmware-rex-15709.B
TEST=emerge-ovis coreboot chromeos-bootimage
     built bootleg and verified test result by thermal team

Change-Id: I710682771bd0679ae4b44dd43be68f60e8984b2e
Signed-off-by: Tony Huang <tony-huang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82434
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-05-27 12:52:19 +00:00
Krystian Hebel
5ba17d5ccb security/memory_clear: fix wrong size of reserved memory range
The code used to reserve MEMSET_PAE_PGTL_SIZE (20 KiB) for page used
for clearing the memory above 4 GiB that was assumed to be 2 MiB page.
memset_pae() checks only the alignment and not the size of this region,
so no error was reported by it.

In most cases this reserved memory in 2-4 MiB range, and because this
range isn't usually used by coreboot (architectural stuff is located in
lower 1 MiB, coreboot tables and ramstage are close to TOLUM and payload
isn't yet loaded when the broken code is executed), it never caused any
problems.

Change MEMSET_PAE_PGTL_SIZE to MEMSET_PAE_VMEM_SIZE and fix wrong macro
definition to reserve properly sized region.

Change-Id: I0df15b0d1767196fe70be14d94428ccdf8dbd5d3
Signed-off-by: Krystian Hebel <krystian.hebel@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82397
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2024-05-27 12:43:50 +00:00
Felix Held
ca88b5f0ac acpi/acpi_apic: use generic MADT IRQ override function for SCI override
Call acpi_create_madt_irqoverride from acpi_create_madt_sci_override
with the correct parameters instead or re-implementing the same
functionality.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I7e6ee0eed837c2d46da62092b7cc5669dc177d8d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82644
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-05-27 12:40:14 +00:00
Maximilian Brune
96a193afa6 lint-stable-003-whitespace: Exclude DTB files
This excludes Devicetree blob files from the list of files to check for
superfluous whitespaces. A DTB file has recently been added in commit
33079b8174 ("lib/device_tree: Add some FDT helper functions").

Change-Id: Ic25ee5361163446370c530cccefa3bf085895d15
Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82638
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-27 08:02:26 +00:00
Elyes Haouas
f4acef9233 Makefile: Warn if flexible array members are not at the end
Change-Id: Ib704f7659d3b431ce7eebb4432c5b1a4272de3d2
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/77147
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-26 11:40:47 +00:00
Subrata Banik
afa39105d8 libpayload: Add x86_64 (64-bit) support
This patch introduces x86_64 (64-bit) support to the payload, building
upon the existing x86 (32-bit) architecture. Files necessary for 64-bit
compilation are now guarded by the `CONFIG_LP_ARCH_X86_64` Kconfig
option.

BUG=b:242829490
TEST=Able to verify all valid combinations between coreboot and
payload with this patch.

Payload Entry Point Behavior with below code.

+----------------+--------------------+----------------------------+
| LP_ARCH_X86_64 | Payload Entry Mode | Description                |
+----------------+--------------------+----------------------------+
| No             | 32-bit             | Direct protected mode init |
+----------------+--------------------+----------------------------+
| Yes            | 32-bit             | Protected to long mode     |
+----------------+--------------------+----------------------------+
| Yes            | 64-bit             | Long mode initialization   |
+----------------+--------------------+----------------------------+

Change-Id: I69fda47bedf1a14807b1515c4aed6e3a1d5b8585
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81968
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-26 01:26:31 +00:00
Felix Held
4244527d8c acpi: add and use defines for LAPIC feature flags
Both the processor local APIC structure and the processor local x2APIC
structure use the same flag bit definitions. ACPI spec 6.4 was used as a
reference.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I8101c2ea874c8b12b130dbe9a0a7e0f0d94adffa
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82641
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2024-05-25 14:45:43 +00:00
Felix Held
824d9303f2 acpi: introduce and use ACPI_MADT_PCAT_COMPAT define
The multiple APIC flags table from the ACPI specification version 6.4
was used as a reference.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I36f67ca21465bc8753bb36896ee05669de6de333
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82640
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-25 14:42:57 +00:00
Benjamin Doron
69bc2cc7de arch/arm64: Implement initial set of SMBIOS tables
Implement the two architectural tables: processor and cache.

Note that SoC/board code should override core-thread count
and, for spec-compliance, create CBMEM_ID_MEMINFO.

Change-Id: Iedae0f26f168bd6d3af866e35d9d39ddb01abc15
Signed-off-by: Benjamin Doron <benjamin.doron@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78285
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2024-05-25 06:58:23 +00:00
Benjamin Doron
f27b22ab4e arch/arm64: Support calling a trusted monitor
Implement support for generating an SMC to call a trusted monitor. Some
functions are provided to read the SoC ID from the monitor, if
supported.

Change-Id: I158db0b971aba722b3995d52162146aa406d1644
Signed-off-by: Benjamin Doron <benjamin.doron@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78284
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-25 06:55:31 +00:00
Shuo Liu
c2ed5eaa12 soc/intel/xeon_sp: Move get_cxl_mode out of soc/util.h
get_cxl_mode() is the interface for CXL mode config check used by
SoC codes. It could be implemented by mechanisms outside of the
SoC codes, e.g. board codes or OCP VPD driver.

Move the interface declaration out of soc/util.h to a dedicated
header, a.k.a., soc/config.h, so that the implementation codes do
not need to include soc/util.h where there are lots of irrelevant
definitions. Future SoC config check interfaces could be added
to soc/config.h as well.

The default weak implementation is moved out of util.c to
config.c as well.

TEST=Build and boot on intel/archercity CRB

Change-Id: Ia0302b0d3fd93c49e1d6f64e8159f59d50f33e20
Signed-off-by: Shuo Liu <shuo.liu@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82293
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-24 13:28:25 +00:00
Felix Held
8ed95c3d2b device/pci_rom: handle non-remapped VGA_BIOS_ID
While the SoC-level defaults for VGA_BIOS_ID are the expected correctly
remapped PCI VID/PID of the GPU which matches the PCI VID/DID inside the
VBIOS file, some mainboards override the VGA_BIOS_ID setting to the
non-remapped PCI ID. This resulted in coreboot not finding the VBIOS
file after commit 42f0396a10 ("device/pci_rom: rework PCI ID remapping
in pci_rom_probe"). The proper solution would be to not override this
SoC-level config in neither the mainboard code nor some external config
file. This however requires adding/using some mechanism to tell SeaBIOS
which VBIOS image to use for the GPU device. Once this is implemented,
the SoC default for VGA_BIOS_ID shouldn't be overridden any more and
this patch can be reverted again.

This sort-of reverts parts of commit 42f0396a10 ("device/pci_rom:
rework PCI ID remapping in pci_rom_probe"), but it still tries to find
the VBIOS image with the expected remapped PCI ID and only adds trying
the non-remapped PCI ID as a fallback when the file with the remapped
PCI ID doesn't exist and prints a notice in that case. Before the patch
referenced above, using the correct remapped PCI VID/DID resulted in a
warning about the CBFS file with the non-remapped name not being found,
but first checking the remapped version solves that problem.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I7cd8e2036250f4ca2239b04cd070bbf0778b13aa
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82592
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
2024-05-24 13:16:27 +00:00
Elyes Haouas
ebfb285085 AUTHORS: Remove whitespaces at end of line
Change-Id: I8445ac2e1bfca6cbf9d4d544318eec666948a8c4
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82623
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2024-05-24 11:06:45 +00:00
Martin Roth
29c5e0012d AUTHORS: Update with 24.05 release info
This adds the Authors from the 24.02 tag to the 24.05 tag.

Signed-off-by: Martin Roth <gaumless@gmail.com>
Change-Id: Icb53c62c9a122ccdf2548cc2eebc8b0316a844ef
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82617
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-24 11:02:50 +00:00
Martin Roth
58a398e89d Update 24.05 release notes with final statistics
The pre-release notes never capture everything, so we need to do an
update to finalize them after the release is tagged.

This captures on additional SoC added right before the release and
updates the statistics.

Signed-off-by: Martin Roth <gaumless@gmail.com>
Change-Id: Id3efcd15597e4fee0bdbca76e474974ae32d3263
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82613
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-24 11:02:20 +00:00
Subrata Banik
36e2b97e4c libpayload: Inject head.S into libc, remove separate class
Integrate head.S directly into libc and remove all instances of head.o.

* Drop 'separate class' entry for head.S.
* Drop special treament for head.o inside lpgcc.
* Change the .text in `x86/head.S` to `.section .text._entry`.
* Drop arch/mock/head.c, initially added as a dummy file.

Change-Id: I156d781908fcc38d455bbf9f2c29e5ab95c7775a
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82478
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2024-05-24 08:10:56 +00:00
Subrata Banik
814ae3b055 libpayload: x86: Move Multiboot header to include file
This moves the multiboot header into its own include file, simplifying
head.S and making it easier to include/exclude the multiboot header
based on config options.

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

Change-Id: I59a22dfe36044b4dd64a5b028a134be7a7d02a48
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82533
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-24 08:10:51 +00:00
Subrata Banik
4050ef091a mb/google/trulo: Refactor gpio pad configuration
This patch tries to simplify the baseboard/variant GPIO programming
for Google/Trulo. The idea is to let each variant maintain
its own complete GPIO PAD configuration table instead of having a
back-and-forth call between baseboard and variants.

With this patch coreboot performing GPIO programming is now much
simpler where the common code block calls into respective variants
and gets the gpio table prior to the pad configuration.

BUG=b:334826281 ([TWL] Decouple GPIO from baseboard to variant)
TEST=Able to build google/orisa.

Change-Id: I4ab88ac094a45c608cd894feb5eeec24b867527a
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82629
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2024-05-24 05:50:05 +00:00
Subrata Banik
2889787522 mb/google/nissa: Fix potential null pointer dereference
* Introduce a null check before calling `gpio_padbased_override`
  in `variant_configure_pads`.
* This prevents potential errors in cases where the
`variant_gpio_override_table` function returns a null pointer,
indicating that there are no override pads to configure.

BUG=b:334826281
TEST=Able to avoid hang incase there is no GPIO override.

Change-Id: I733210a08091b37eda6e6b0d6924aafd5e7e6280
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82628
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-24 05:49:55 +00:00
Felix Held
bfc92cb944 device: drop unnecessary CHECK_REV_IN_OPROM_NAME option
The CHECK_REV_IN_OPROM_NAME Kconfig option was introduced to solve the
problem of the PCI VID/DID combination of the Picasso iGPU not being
sufficient information to know which VGA BIOS file to run, so a new
function that additionally checks the PCI revision of that device was
introduced. Later it turned out that there might be a case where even
that isn't sufficient, so the soc_is_raven2() function is used in the
remap function to always use the correct VBIOS file.

Picasso is the only SoC that selected the CHECK_REV_IN_OPROM_NAME
Kconfig option, so all other SoCs are unaffected by this change.

Now that we use the VBIOS images with only the PCI VID and DID in the
CBFS file name for Picasso, SeaBIOS will find the VBIOS with the same ID
as the iGPU in CBFS and we don't need the workaround to add a third
VBIOS image via VGA_BIOS_DGPU_* that has the name that SeaBIOS expects.
This will result in SeaBIOS now running the VBIOS that has the same PCI
VID/DID as the hardware which will be the wrong one in the RV2 silicon
showing the PCO silicon PCI VID/DID, but that was also the case with the
VGA_BIOS_DGPU_* workaround where the board's Kconfig just selected one
of the two possible images during build time and hoped that it was the
correct one for that actual hardware. The only board where this patch
might cause a regression compared to the old behavior is the AMD Cereme
reference board with Pollock APU, but I'm not even sure if any coreboot
developer still has one of those boards, so I'm willing to accept that.

To properly solve the problem with SeaBIOS using the correct VBIOS file
in all cases, we'd need to generate that info during coreboot runtime
and somehow pass it to SeaBIOS, but that's out of scope for this patch.

TEST=On Mandolin with PCO silicon, the display output in both SeaBIOS
and Ubuntu still works. Booting Windows 10 via the pre-built EDK2
payload that I'm using also resulted in the display output working.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Ia6de533c536044698d85404427719b8f534870fa
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82598
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-23 21:54:26 +00:00
Elyes Haouas
47eed41dcb soc/intel/xeon_sp/gnr/soc_iio: Remove unused <string.h>
Change-Id: I8d4500edaa0739921831a3b04131046599c35a87
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82618
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
2024-05-23 20:18:03 +00:00
Prashant Malani
e3fbd2a958 mb/google/brox/var/brox: Remove mux references from typec port
The Type-C kernel driver no longer programs the AP mux, as of
https://review.coreboot.org/c/coreboot/+/82077. So remove device
references to the TCSS Mux control device from the Type-C port driver.

This eliminates the following kernel error which was observed as a
result of the kernel trying to program muxes it no longer has control
over:

[    4.618600] cros-ec-typec GOOG0014:00: Failed to get mux info for port: 0, err = -95
[    4.618608] cros-ec-typec GOOG0014:00: Configure muxes failed, err = -95

BUG=b:341331428
TEST=Run system reboot; configure mux kernel errors no longer seen.

Change-Id: I93e498b12b109c0e649a23a4a49868976a9ee06b
Signed-off-by: Prashant Malani <pmalani@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82599
Reviewed-by: Caveh Jalali <caveh@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-23 18:29:15 +00:00
Felix Held
fe8323b7b6 mb/amd/birman/display_card_type.h: add missing include
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I5208ceeec17051e7849263a4caa0838efd59c044
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82608
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2024-05-23 16:33:32 +00:00
Felix Held
4520555656 mb/amd/birman/display_card_type.h: add missing include guards
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Iaf4478814e672fb8cfae5ffc4fa89c475f5bb0b2
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82607
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-23 16:33:20 +00:00
Felix Held
53523dc2a4 soc/amd/phoenix/chip_opensil.h: add missing include guards
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Iba17d44772333ed59e3fdde1443a1862bae8e32f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82606
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2024-05-23 16:33:02 +00:00
Ronak Kanabar
3a5ed9b45a mb/google/brya: Add romstage early graphics for nissa
1) Add all changes needed for early graphics
2) select MAINBOARD_USE_EARLY_LIBGFXINIT for nissa

The InnoLux (N156HCN-EBA C7) panel is used for the device tree.

BUG=b:296433986
TEST=On-screen text message seen during MRC training on Craask

Logs:
[NOTE ]  MRC: no data in 'RW_MRC_CACHE'
[SPEW ]  bootmode is set to: 0
[0.171409] DP PHY mode status not complete
[0.175509] DP PHY mode status not complete
[0.179799] DP PHY mode status not complete
[0.184087] DP PHY mode status not complete
[0.188376] DP PHY mode status not complete
[0.192665] DP PHY mode status not complete
[0.196954] DP PHY mode status not complete
[0.201243] DP PHY mode status not complete
[0.205532] DP PHY mode status not complete
[0.209821] DP PHY mode status not complete
[0.214110] DP PHY mode status not complete
[0.218397] DP PHY mode status not complete
[INFO ]  Informing user on-display of memory training.

Change-Id: I33cfc5d1f8c25c344e598befd21c50a78a65275a
Signed-off-by: Ronak Kanabar <ronak.kanabar@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78932
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-23 13:52:47 +00:00
Brandon Weeks
c8b379bb79 mb/cwwk: Add CWWK CW-ADL-4L-V1.0 board
This board is the CWWK variant based upon Alder Lake with 4 2.5 GbE
ports, similar boards are available in other port configurations. As a
low cost, relatively high performance board with 4 NICs, it is well
suited for networking or 'homelab' tasks.

CPU: Intel N100 or N350
Memory: DDR5-4800 SODIMM (max 16 GB)
NIC: 4x Intel I226-V 2.5 GbE
Expansion:
- M.2 2230 E key
- M.2 2280 M key
- USB 2.0 header
- Fan header
External ports:
- DC power
- 4x Ethernet
- Display Port
- HDMI
- 4x USB 2.0
- Micro SD

Working:
- Boots Debian 12 with SeaBIOS and EDK II payloads
- Serial port
- External USB ports
- DisplayPort / HDMI
- 4x Intel I226 2.5 GbE NICs
- M.2 ports
- Micro SD slot
- ACPI S3

Not working / not tested:
- Fan (ITE IT8613E)
- Audio
- S0ix
- Internal USB ports

VBT extracted from vendor UEFI firmware version ADLN 0.01 x64
(04/04/2023 11:42:38).

Change-Id: Ice9174d95c10afc6a22ddd15fb3be4fa38d329be
Signed-off-by: Brandon Weeks <me@brandonweeks.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81595
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-05-23 12:36:46 +00:00
Patrick Rudolph
57e36a3320 cpu/intel/model_206ax: Program Ivy Bridge defaults for MSR_PKGC_IRTL
Ivy Bridge has lower latencies than Sandy Bridge has. Update MSRs
MSR_PKGC_IRTL with values from BWG.

Test: Lenovo X220 still boots.

Change-Id: Ib307e3b191ba68e016cc348f82e2dccf1dc9ae16
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78609
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2024-05-23 12:33:17 +00:00
Shuo Liu
93791db23e soc/intel/xeon_sp: Dump proximity domain info per types
Some proximity domain info are type specifics, e.g. base/size/dev
are effective for PD_TYPE_GENERIC_INITIATOR, but not for
PD_TYPE_PROCESSOR. Dump info per their type.

TEST=Build and boot on intel/archercity

Change-Id: I7e722a0577bba954efba3e91cc152c758c001d68
Signed-off-by: Shuo Liu <shuo.liu@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82292
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
2024-05-23 09:28:05 +00:00
Shuo Liu
0f87730a94 soc/intel/xeon_sp: Move proximity domain setting up
Move proximity domain setting up to ahead of attach_iio_stacks()
so that proximity domain info could be ready before
attach_iio_stacks()/create_xeonsp_domains().

For example in SPR, is_iio_cxl_stack_res() refers to proximity
domain info, and it will be called in create_xeonsp_domains().

TEST=Build and boot on intel/archercity

No significant boot log difference except for proximity domain
dump info display are moved ahead (with correct contents).

Change-Id: I594f0ec0c23e3b62c3bdd917ebf6e45be6e4069e
Signed-off-by: Shuo Liu <shuo.liu@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82267
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-23 09:27:59 +00:00
Amanda Huang
a839eb116b mb/google/nissa/var/orisa: Generate RAM ID for Micron MT62F512M32D2DR-031 WT:B
Add Micron part MT62F512M32D2DR-031 WT:B only for Orisa.

DRAM Part Name                 ID to assign
MT62F512M32D2DR-031 WT:B       0 (0000)

BUG=b:337178014
BRANCH=firmware-nissa-15217.B
TEST=emerge-nissa coreboot

Change-Id: I559ed817250c40795e6c613794d4f65c636f5fc5
Signed-off-by: Amanda Huang <amanda_hwang@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82586
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Dtrain Hsu <dtrain_hsu@compal.corp-partner.google.com>
Reviewed-by: Ian Feng <ian_feng@compal.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-23 03:01:02 +00:00
Tony Huang
f85f1d7a4f Revert "mb/google/rex/var/deku: Configure GPIO"
This reverts commit 7088257b1a.

Reason for revert:  Intel suggest is NC only.
No need to change anything that isn't broken.

Change-Id: I976a85b35c69b03f1bc0ccd2bc7df923e47be815
Signed-off-by: Tony Huang <tony-huang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82572
Reviewed-by: Derek Huang <derekhuang@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-22 20:58:44 +00:00
Angel Pons
fa27d2dc2a mb/prodrive/hermes: Tidy up hda_verb.c
Use the `AZALIA_PIN_CFG_NC(0)` macro instead of `0x411111f0` and tidy up
some comments (align them and be consistent with capitalisation).

Tested with BUILD_TIMELESS=1, prodrive/hermes remains identical.

Change-Id: I1ff1197b1309fc0e5b978d6d36867a3f1a68c67c
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82396
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
2024-05-22 16:55:41 +00:00
Felix Held
9251ddc27d mb/amd/birman/devicetree_phoenix_opensil: add USB PHY config
Now that we also have the devicetree registers for the USB PHY config
in the openSIL case, add the USB PHY config setting from the Phoenix
with FSP devicetree.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I3a0acbf1b9d705dbf09f4480eb35e71e587ddd44
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82585
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
2024-05-22 15:46:16 +00:00
Felix Held
d4938ba37b soc/amd/phoenix/chip.h: add USB PHY configuration for openSIL
Add the USB PHY configuration structs for the openSIL case, so that
those can be configured in the devicetree like in the FSP case.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Ied25e90859c4b1bc9b876bed3f3c46358ca36d32
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82584
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-22 15:46:05 +00:00
Felix Held
af42198729 mb/amd/birman/update_devicetree_phoenix_opensil: update DDI1 config
Use the now common get_ddi1_type function to update the connector type
of the DDI1 port to match the display output extension card plugged into
the reference board.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I7c51eab0d32e0a1708da415f690689a8ec38dcd3
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82583
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-22 15:45:55 +00:00
Felix Held
84f8b8eb60 mb/amd/birman: factor out get_ddi1_type
Both port descriptor files used in the FSP case contain an identical
get_ddi1_type implementation, so factor it out into a separate file.
This will also allow using the same function in the openSIL case in a
following patch.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I6f5b75b9bdbdc67901d157079785c8fa2915bf0c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82582
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-22 15:45:44 +00:00
Felix Held
be1f05a24f mb/amd/birman/devicetree_phoenix_opensil: add static DDI configuration
Add a static DDI port configuration to the devicetree used in the
Phoenix with openSIL case. The configuration is taken from the
birman_ddi_descriptors array in port_descriptor_phoenix.c.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I7b85b04114591f3e9da183019c98ca2cb08e59da
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82581
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-by: Varshit Pandya <pandyavarshit@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-22 15:45:26 +00:00
Felix Held
27cb75a075 soc/amd/phoenix/chip.h: add DDI configuration for openSIL
In the FSP case, the DDI descriptors aren't part of the devicetree and
are instead retrieved in romstage by calling the mainboard's
mainboard_get_dxio_ddi_descriptors function which allows updating the
descriptors during romstage where the devicetree is static. In the
openSIL case, the DDI configuration is first needed in ramstage, so we
can put this info into the devicetree and update it if needed in
ramstage.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I3de12ff6af42e38751a3016efa313613677fa87a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82580
Reviewed-by: Varshit Pandya <pandyavarshit@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
2024-05-22 15:45:17 +00:00
Felix Held
abcbd5b998 mb/amd/birman/devicetree_phoenix_opensil: remove unexpected '<'
Remove the unexpected '<' char at the end of the comment about the PSPP
policy config.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Id821351ce3a7a2b7844d8e7478fa3de3227a7da9
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82579
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-by: Varshit Pandya <pandyavarshit@gmail.com>
2024-05-22 15:45:08 +00:00
Felix Held
59d1796d66 soc/amd/phoenix/chipset_*.cb: remove TODO
Remove the TODO to update the chipset devicetree for Phoenix, since this
has already been done.

When re-checking the chipset devicetree, I found conflicting information
about the existence of the PCI bridge to an external PCIe port on bus 0
device 1 function 5, but after looking into this, I'm reasonably certain
that it either doesn't exist or at least wouldn't be usable, so I won't
add that one to the chipset devicetree.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I8f0e1540ed45408e86186253d3982a7ba0065ac6
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82578
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-by: Varshit Pandya <pandyavarshit@gmail.com>
2024-05-22 15:45:01 +00:00
Patrick Rudolph
f2ac23fb13 mb/intel/archercity_crb: Fix build for specific configurations
Guard OCP functions calls to allow builds without OCP drivers.

Change-Id: Ie9a82387366a8bb3387bcba3ec7a4c7f0100f78c
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82168
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-05-22 15:03:43 +00:00
Anil Kumar
1f199f283d mb/intel/mtlrvp: Include fw_config.c file
Update Makefile to include fw_config file for mtlrvp board.

Signed-off-by: Anil Kumar <anil.kumar.k@intel.com>
Change-Id: Id41cd8b015a796f7a959ceccf85106a48d15ae35
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82559
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Bora Guvendik <bora.guvendik@intel.com>
Reviewed-by: Jamie Ryu <jamie.m.ryu@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-22 13:04:26 +00:00
Terry Cheong
6211c3f865 Revert "mb/google/brox: Update verb table to fix headset detection"
This reverts commit f867c9c547.

The new verb table breaks external mic detection on brox.
Revert and use old verb tables instead.

BUG=b:330433089
BRANCH=main
TEST=Verified headset on Brox
When connected to audiojack in power_save state of legacy hda driver,
headset is detected and audio is resumed.

Change-Id: I0d8c092de6166b2c62f5ecc3deaf4960128e6106
Signed-off-by: Terry Cheong <htcheong@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82273
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Shelley Chen <shchen@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-22 13:03:35 +00:00
Kenneth Chan
6a3ff9ce68 mb/google/brya/var/nova: Add SOLDERDOWN support
Nova will use SOLDERDOWN. Add memory.c to override baseboard.
Update dram id table for correct platform parameter.

BUG=b:328711879

Change-Id: I6fbce991ef5ab9f0e6216ad1a5af73fcc1996a2a
Signed-off-by: Kenneth Chan <kenneth.chan@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82474
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: David Wu <david_wu@quanta.corp-partner.google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-21 13:46:17 +00:00
Wu Garen
7dcb3d9c72 mb/google/brox/var/greenbayupoc: Update verb table from ALC256 to ALC236
On GreenbayPOC, HDA Codec used is ALC236, different with Brox (ALC256)
Update to Realtek provided verb table for ALC236 audio codec.

BUG=b:336967284
TEST=Verified headset and audio workable on DUT with "rec" and
"aplay" command.

Change-Id: I9fbe57a0acab20387754f6b6cb5705e34c1c149b
Signed-off-by: Wu Garen <wu.garen@inventec.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82413
Reviewed-by: Ivan Chen <yulunchen@google.com>
Reviewed-by: Derek Huang <derekhuang@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-21 13:45:49 +00:00
Maximilian Brune
33079b8174 lib/device_tree: Add some FDT helper functions
This adds some helper functions for FDT, since more and more mainboards
seem to need FDT nowadays. For example our QEMU boards need it in order
to know how much RAM is available. Also all RISC-V boards in our tree
need FDT.

This also adds some tests in order to test said functions.

Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: I2fb1d93c5b3e1cb2f7d9584db52bbce3767b63d8
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81081
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-21 13:44:47 +00:00
Maximilian Brune
25c737d403 tests/lib: Factor out file related functions
Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: I5c22913b35848c5ea32d6805ea081abefd3380bf
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82237
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jakub Czapiga <czapiga@google.com>
2024-05-21 13:44:39 +00:00
Tony Huang
62a6188da5 soc/intel/meteorlake: Add PsysPL2 configuration
psys_pl2_watts is configured in SoC node of devicetree.
Value represents Watts.

BUG=b:320410462
BRANCH=firmware-rex-15709.B
TEST=emerge-ovis coreboot

Change-Id: I9c4d62b93fc751db9e0ea04e475acb8861a844f8
Signed-off-by: Tony Huang <tony-huang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82553
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-05-21 13:37:09 +00:00
Shon Wang
0da12e0f2a mb/google/brya/var/bujia: Add devicetree based on schematics
Add devicetree settings per the schematic.
Differences to gladios:
1. remove SD reader
2. remove EMMC setting
3. modify USB port distribution

FRONT
-------------------------------------------------------
|                                        A3   A1      |
|               C0                       A2   A0      |
-------------------------------------------------------

BACK
-------------------------------------------------------
|                    ---------------                  |
|                    |    TX25A    |                  |
-------------------------------------------------------

BUG=b:327549688
TEST= USE="-project_all project_bujia" emerge-brask coreboot

Change-Id: Ia010e99c21e8d6088f6bb873f79dc19cadc9e455
Signed-off-by: Shon Wang <shon.wang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81447
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Derek Huang <derekhuang@google.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2024-05-21 13:36:33 +00:00
Elyes Haouas
b4949d3de5 crossgcc: Update LLVM from 18.1.5 to 18.1.6
Change-Id: Ie087f43e6f60df7b97d7d7b402d3540c3a0a2461
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82552
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-05-20 20:33:20 +00:00
Martin Roth
c3086b12a4 util/docker: Change Debian suite from Sid to stable
Debian sid is too unstable at this point, and frequently ends up having
issues that cause the coreboot-sdk docker image to fail to build. Using
stable also better reflects what users will typically be running.

Also remove the parameters to quiet the apt-get install command so that
if something does break, we can see what happened more easily.

Fixes bug 536

Signed-off-by: Martin Roth <gaumless@gmail.com>
Change-Id: I41b6464b024df89c114db2cdb9367c0526eb0297
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82411
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-20 19:30:33 +00:00
Angel Pons
455538d3ae 3rdparty/libgfxinit: Update submodule pointer
Update the submodule pointer to current main. This brings in 5 commits:

* e096913 connector_info: Fix HDMI/DVI default bytes per color setting
* 87469f2 gma config: Add new device IDs for Raptor Lake
* 4be2e75 gma: Update transcoder setup for TGL
* 4b991bf gfxtest: Drop unnecessary with of ancestor
* 17cfc92 tgl plls: Disable warnings about unused variable

Change-Id: Ic40edc773ba11ab9a0f9e92057bd687d10b95069
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82554
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-by: Ronak Kanabar <ronak.kanabar@intel.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-05-20 13:24:36 +00:00
Angel Pons
78a26aca8b mb/prodrive/hermes/hda_verb.c: Refactor port B Vref cfg
Refactor the `get_port_b_vref_cfg()` function to only return the
variable bits of the value. The NID itself is not connected, and
the `misc` field in the verb conveys the Vref value.

Change-Id: I5108f5339c5b002403a4e5339da6d52046c8bcbe
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82395
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-20 12:58:07 +00:00
Subrata Banik
f2d260d988 Libpayload: Rename arch variable _ARCH to _ARCHDIR for consistency
This commit renames the variable _ARCH to _ARCHDIR in the libpayload
build script (lpgcc) to align with the naming convention of other
variables used in this file.

This change improves code readability and maintainability.

Change-Id: Iea4af68e49ab1cd7ec8156a14f8215244e9c0622
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82479
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-18 18:27:53 +00:00
Robert Chen
67a96902d5 mb/google/dedede/var/kracko: Disable un-used C1 port by daughterboard
Probe C1 port in devicetree and disable un-used C1/A1 port by FW_CONFG.

BUG=b:339534479
BRANCH=firmware-dedede-13606.B
TEST=emerge-dedede coreboot chromeos-bootimage
flash and check boot log on DUT.

Change-Id: I944ff6f2fa712e7579ed1c9879f75835adc3ac4c
Signed-off-by: Robert Chen <robert.chen@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82263
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2024-05-17 17:48:59 +00:00
Kenneth Chan
917bdbffd3 mb/google/brask/var/nova: Remove unused retimer
Remove unused setting for retimer.

BUG=b:328711879
Change-Id: I48d8680d43a07aa3408dfbf5b25b568c2b51b343
Signed-off-by: Kenneth Chan <kenneth.chan@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82475
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-17 13:17:37 +00:00
Tyler Wang
557aad1df9 cr50: Replace "cr50" to "GSC" in debug messages
The cr50.c file currently prints "cr50" in debug messages no
matter the system is using Cr50 or Ti50. This can be confusing
for developers.

This patch replaces "cr50" with "GSC" in debug messages. Using
"GSC" makes the messages more clear and easier to search via
`grep`.

BUG=none
TEST=Build and test on karis

Change-Id: I21f66cf8b608ca4e4dc82d7a55a851ec996c8bb3
Signed-off-by: Tyler Wang <tyler.wang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82420
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Jon Murphy <jpmurphy@google.com>
2024-05-17 12:50:28 +00:00
Shuo Liu
43a54184b0 mb/intel/beechnutcity_crb: Add GNR/SRF-SP 2S server board Beechnut City
Beechnut City CRB is the 2 socket reference board for 6th Gen Xeon-SP
SP SoCs (Granite Rapids SP and Sierra Forest SP).

This patch initially sets the code set up as a compilation target with
GNR N-1 FSP, and with basic feature supports (Integrated IO Controller
(IIO) configuration, BMC, UART, HPET).

TEST=Build on intel/beechnutcity CRB

Change-Id: I3f6a0fb97b62baadb438fb9f11fdd78fccb3f89a
Signed-off-by: Shuo Liu <shuo.liu@intel.com>
Co-authored-by: Gang Chen <gang.c.chen@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81322
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2024-05-16 21:05:28 +00:00
Gang Chen
921ddba69e mb/intel/avenuecity_crb: Add GNR/SRF-AP 2S server board Avenue City
Avenue City CRB is the 2 socket reference board for 6th Gen Xeon-SP
AP SoCs (Granite Rapids AP and Sierra Forest AP).

This patch initially sets the code set up as a compilation target
with GNR N-1 FSP, and with basic feature supports (Integrated IO
Controller (IIO) configuration, BMC, UART, HPET).

TEST=Build on intel/avenuecity CRB

Change-Id: I64fdd5388aadf7732f6d3daa600c1455d3672a46
Signed-off-by: Gang Chen <gang.c.chen@intel.com>
Co-authored-by: Shuo Liu <shuo.liu@intel.com>
Co-authored-by: Jincheng Li <jincheng.li@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81319
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2024-05-16 20:55:05 +00:00
Gang Chen
6258093575 soc/intel/xeon_sp/gnr: Add IIO config utils
Add IIO configuration utils shared in GNR boards to handle the
complex IIO configuration settings.

Change-Id: If7146761db6f73a0c4b0d31b010c0d30a42bf690
Signed-off-by: Gang Chen <gang.c.chen@intel.com>
Co-authored-by: Shuo Liu <shuo.liu@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81318
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2024-05-16 20:52:20 +00:00
Aseda Aboagye
cc82f74605 chromeec/ec_acpi: Convert TK_DICTATE to ps2_action_key
When support for the dictation key was added in commit f2782b8328
(acpigen_ps2_keybd: Add support for dictation key), I had failed to
include this portion of the change in that commit. The top row key of
`TK_DICTATE` needs to be converted to the ps2_action_key.  This commit
simply adds that mapping so that it can be translated.

BUG=b:333101631
TEST=Flash DUT that emits a scancode for a dictation key, verify that it
is mapped to KEY_DICTATE in the Linux kernel using `evtest`.

Change-Id: I1be8c0a96931cca36e6bbbfa0be7d36c4cd93768
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82274
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Caveh Jalali <caveh@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-16 17:08:56 +00:00
Felix Held
e189043aec mb/amd/birman/update_devicetree_phoenix_opensil: use common header file
Instead of including stub/mpio/chip.h, include chip/mpio/chip.h that
will include the correct implementation to be able to use the same file
with both the openSIL stub and the actual openSIL implementation glue
code.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Iaae26a0dfe0ba96842e72582c06f1b0b3f29871c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82472
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-16 15:47:15 +00:00
Subrata Banik
c61b35b696 mb/google/rex: Remove redundant VPU enablement code
This patch removes VPU enablement code that is no longer needed because
the VPU is already enabled by default in the baseboard devicetree.

BUG=b:332488817
TEST=Able to see VPU PCI device in lspci list after booting
google/screebo to OS

Change-Id: I94de92e970be1548068ed4e19309a95129f041ff
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82423
Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
Reviewed-by: Jamie Ryu <jamie.m.ryu@intel.com>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-05-16 13:03:31 +00:00
Subrata Banik
a0426b6d93 mb/google/rex: Enable VPU device for Rex/Ovis baseboard
This patch enables the Versatile Processing Unit (VPU) by default for
Rex/Ovis baseboard. VPU is a dedicated AI engine that is included in
the 14th generation "Meteor Lake" Core processors.

The VPU is designed to efficiently run AI models directly on the
system on chip (SoC). There is no power regression observed while
keeping the VPU default enabled to run AI models natively hence, this
patch enables the VPU by default.

BUG=b:332488817
TEST=Able to see VPU PCI device in lspci (0:11:0) list after booting
google/screebo to OS.

Change-Id: I8b3521c8ec613b002f971eaf9d346927fe8cd656
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82422
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Jamie Ryu <jamie.m.ryu@intel.com>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-05-16 13:03:24 +00:00
Saurabh Mishra
1b2fe88a04 include/device/pci_ids.h: Update TWL device IDs
Set lowercase hex format for IGD DIDs.

BUG=b:326901448
TEST=Build tivviks and verify the IGD IDs.

Change-Id: I1299512d1c48eba854fea2ec394cef40d44a87d7
Signed-off-by: Saurabh Mishra <mishra.saurabh@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82414
Reviewed-by: V Sowmya <v.sowmya@intel.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-05-16 11:29:40 +00:00
Tony Huang
3d4128299f mb/google/rex/var/baseboard/ovis: Support CPU power limits per variant
There is no direct way to override CPU default power_limits for
different SKUs.

This CL add structure variant_get_soc_power_limit_config() for
variants to define and configure the values of soc_power_limits_config
for current CPU SKU.

Variants can override these values i.e. pl1, pl2, psyspl2
in variant_devtree_update().

BUG=b:320410462
BRANCH=firmware-rex-15709.B
TEST=FSP debug emerge-ovis coreboot intelfsp
     check overrides setting

Change-Id: Ib60fa4e3fc502d0aeb0c94ad46ba5a55b4dd027c
Signed-off-by: Tony Huang <tony-huang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82199
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-16 11:28:58 +00:00
Shon Wang
ff79993e95 mb/google/brask/var/bujia: Update gpio table
Based on latest schematic to update the gpio table.

BUG=b:327549688
TEST= USE="-project_all project_bujia" emerge-brask coreboot

Change-Id: I3d01e3b9eaef72d9e143f5163ee49d8c8f455b5f
Signed-off-by: Shon Wang <shon.wang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82412
Reviewed-by: Derek Huang <derekhuang@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-16 11:28:00 +00:00
Krystian Hebel
a8fdafa427 cpu/x86/pae/pgtbl.c: remove dead paging_identity_map_addr()
This function had roughly the same use (except PAT) as part of
memset_pae(), however the latter is able to make use of PAE and map
physical memory located above 4 GB. Remove paging_identity_map_addr()
to avoid semi-duplicated code.

The function has been unused since CB:26745.

Change-Id: I7a4ebd84a6f5d222c3b2c6c6e3d26d6464cf01b8
Signed-off-by: Krystian Hebel <krystian.hebel@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82248
Reviewed-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-15 16:53:50 +00:00
Elyes Haouas
07913736e0 Doc/releases: List toolchain updates in coreboot-24.08-relnotes
Report upgraded version for ACPICA, CMake, nasm, LLVM and GCC.

Change-Id: I93a9ae4a2f4c3403a6e8c9a8b7aca74b996e7db8
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82410
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-05-15 16:51:31 +00:00
Nicholas Sudsgaard
744e389800 payload/external/edk2: Explicitly define the build arch as X64
Upstream commit 11ad164bce (UefiPayloadPkg: Make UPL build script arch
agnostic, 2024-02-22) changes the build script's behavior to not assume
the arch. Without defining BUILD_ARCH, the build script will not
function properly and results in the payload failing to build.

Both UefiPayload and Universal Payload can only be built in X64.

Change-Id: Icd942d0c15a99231d09f9cbdc5eb48333b6aa6e5
Signed-off-by: Nicholas Sudsgaard <devel+coreboot@nsudsgaard.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80883
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
2024-05-15 16:49:26 +00:00
Jason Glenesk
ab42a64d99 Add 24.08 release notes template
In preparation for the upcoming release, add the template for the
24.05 release and update index.md.

Change-Id: I733f541a2d6e556c82aff1656fe7f79ae3673ba7
Signed-off-by: Jason Glenesk <jason.glenesk@amd.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82400
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2024-05-15 15:16:52 +00:00
Felix Held
b43accd233 mb/amd/birman: add function to update MPIO config in devicetree
Phoenix 2 has less PCIe lanes than Phoenix, so some of the lane end
numbers need to be adjusted to take that into account. When the Kconfig
options WLAN01 or WWAN01 are set, either the WLAN or the WWAN card uses
both PICe lanes that are available for those two devices, so the MPIO
descriptor information the devicetree needs to be updated accordingly
and the bridge to the PCIe port that doesn't have any lane left needs to
be disabled. Two other PCIe devices will be disabled when the
corresponding Kconfig options ENABLE_EVAL_CARD and DISABLE_DT_M2 have
the value that results in the device being disabled via some GPIO driven
by the EC. Since the code is specific to the openSIL case, only include
it in the build in the CONFIG_BOARD_AMD_BIRMAN_PHOENIX_OPENSIL case.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I23c14cc03980ea1e39f7e5aec551b975c237e487
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82106
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-by: Varshit Pandya <pandyavarshit@gmail.com>
2024-05-15 15:01:55 +00:00
Felix Held
d7158c8149 mb/amd/birman/devicetree_phoenix_opensil: add stub MPIO chips
Add the stub MPIO chips that contain the PCIe engine configuration for
the external PCIe interfaces to the devicetree. Birman's
port_descriptors_phoenix.c was used as a reference. The static
configuration in the devicetree assumes that the default WLAN0_WWAN0 is
selected; for the other cases we'll still need to fix up things
accordingly in the mutable devicetree. The WLAN01 and WWAN01 cases still
need to be handled in a follow-up patch. Since openSIL currently doesn't
use the info from the gpio_group struct element, but deasserts both PCIe
reset pins GPIO 26 and 27, the gpio_group isn't specified in the chip
configuration in the devicetree.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Icabe60322d46c1195284dd77ec39f9d143e3d2cb
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81101
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
2024-05-15 15:01:05 +00:00
EricKY Cheng
7728ed3ea2 mb/google/brya: Create orisa variant
Create the orisa variant of the nissa reference board by copying
the template files to a new directory named for the variant.

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

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

Change-Id: I0cd8d763ffd8864b455a7f8909e95f6aee8bb23e
Signed-off-by: EricKY Cheng <ericky_cheng@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82241
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Amanda Hwang <amanda_hwang@compal.corp-partner.google.com>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-05-15 12:08:23 +00:00
Felix Singer
acdd8dd14d util/crossgcc: Update GCC from 13.2 to 14.1.0
Change-Id: Idf5912d1fcdfabab7fe006b7e0cd4ebd25c07d09
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81683
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
2024-05-15 01:53:34 +00:00
Lennart Eichhorn
e885aa5a05 util/crossgcc: Update LLVM from 17.0.6 to 18.1.5
Change-Id: I03a44e0c23a925396f614f282882405dc886ba58
Signed-off-by: Lennart Eichhorn <lennarteichhorn@googlemail.com>
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80314
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
2024-05-15 01:53:22 +00:00
Elyes Haouas
0090039bbd crossgcc: upgrade nasm from 2.16.01 to 2.16.03
Remove the patch since it was picked from master before and thus it's
included in the new release.

Change-Id: I70408b189b974f8abaadc66f0c809a1dbe10504b
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81900
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-15 01:53:10 +00:00
Felix Singer
41fdb882f1 util/crossgcc: Update ACPICA from 20230628 to 20240321
Change-Id: I41f56ba58af51b1ec1d7554fb35a49ccf9e778f6
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81671
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2024-05-14 23:35:39 +00:00
Felix Singer
6b4036ee9e util/crossgcc: Update CMake from 3.28.3 to 3.29.3
Change-Id: Iaf2d4f579d987fbfd4187ae41c1be5cec55e0e8e
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81672
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-05-14 23:34:36 +00:00
Martin Roth
5a0207e56a Documentation: Finalize 24.05 release notes
These are the final release notes for the 24.05 release before the tree
is marked with a tag, completing the release. We will update the notes
with final numbers and anything else after the release is tagged.

The 24.05 release will be announced a week later, barring any issues
that require an updated release tag.

Signed-off-by: Martin Roth <gaumless@gmail.com>
Change-Id: I00be0127351f8641116b4bc523c266628b084e69
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82407
Reviewed-by: Nicholas Chin <nic.c3.14@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-05-14 22:13:50 +00:00
Shuo Liu
a5487ba17a soc/intel/xeon_sp: Add Granite Rapids initial codes
coreboot GNR (Granite Rapids) is a FSP 2.4 based, no-PCH, single
IO-APIC Xeon-SP platform. The same set of codes is also used
for SRF (Sierra Forest) SoC.

This patch initially sets the code set up as a build target with
Granite Rapids N-1 FSP (src/vc/intel/fsp/fsp2_0/graniterapids).

1. All register definitions are forked from SPR (Sapphire Rapids)
and EBG (Emmitsburg PCH)'s codes are reused.

2. src/soc/intel/xeon_sp/chip_gen6.c is newly added as chip
common codes for 6th Gen Xeon-SP SoC (Granite Rapids) and later.

Change-Id: I3084e1b5abf25d8d9504bebeaed2a15b916ed56b
Signed-off-by: Shuo Liu <shuo.liu@intel.com>
Co-authored-by: Gang Chen <gang.c.chen@intel.com>
Co-authored-by: Jincheng Li <jincheng.li@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81316
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2024-05-14 20:49:04 +00:00
Jason Glenesk
ed366c07bb Documentation/vboot: Update vboot supported boards list
Auto-generated by util/vboot_list/vboot_list.sh.

Change-Id: I5e1a7046b03687d15e8ceae2074ec25aa72a6f28
Signed-off-by: Jason Glenesk <jason.glenesk@amd.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82399
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: coreboot org <coreboot.org@gmail.com>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-05-14 20:33:35 +00:00
Ashish Kumar Mishra
5a86707417 soc/intel/common: Add RPL tracehub support
Add PCI ID for RPL tracehub and update the PCI ID in the
pci_device_ids[] in tracehub.c.

Reference:
Raptor Lake External Design Specification Volume 1 (640555)

BUG=None
TEST=Verified on brox

Change-Id: I5d5c6c8ff44bcb5a7bbbd3e27a1577c169ecd6a9
Signed-off-by: Ashish Kumar Mishra <ashish.k.mishra@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82415
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2024-05-14 19:48:55 +00:00
Angel Pons
f1e4067a90 util/autoport: Remove incorrect comment
Yes, the DSDT revision is the OEM revision. But most certainly not that
of the board being ported. Because no one seems to care about the value
(newer boards inexplicably use lower values even though this represents
a date in 0xYYYYMMDD format), simply drop the incorrect comment. Should
save a bit of effort when reviewing mainboard ports: no longer will one
have to ask authors to drop the comment.

Change-Id: I9c425573e4fcb0f670a780e7821e815eadc8a2aa
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82401
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2024-05-14 19:48:31 +00:00
Angel Pons
ff0f6dcba3 util/autoport/.gitignore: Ignore logs folder
The README suggests using `logs` as the folder name where autoport puts
the generated logs. Thus, add this folder to .gitignore for the sake of
convenience. Yes, people can use other folder names, but `logs` is most
commonly used.

Change-Id: I37906b43ba3e132de616184e4a5082ce00f4b230
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82398
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2024-05-14 19:48:17 +00:00
Saurabh Mishra
2e532b19d5 soc/intel/common: Add Panther Lake DIDs
Reference:
Panther Lake External Design Specification Volume 0.51 (815002)

BUG=b:329787286
TEST=verified on Panther Lake Simics Platform.

Change-Id: I941d6e1c8a697234b8e64a2523e60587897d7f7a
Signed-off-by: Saurabh Mishra <mishra.saurabh@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81848
Reviewed-by: Ashish Kumar Mishra <ashish.k.mishra@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-14 13:12:00 +00:00
Saurabh Mishra
1057865a89 soc/intel: Add Panther Lake PCIE device IDs
Add Panther Lake specific CPU and PCIE device IDs

Reference:
Panther Lake External Design Specification Volume 0.51 (815002)

BUG=b:329787286
TEST=verified on Panther Lake Simics Platform.

Change-Id: I82f47b6077e28a01f34c59b7e7697323b3d5f990
Signed-off-by: Saurabh Mishra <mishra.saurabh@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81849
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Ashish Kumar Mishra <ashish.k.mishra@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-14 13:11:04 +00:00
Saurabh Mishra
47e7240ffc soc/intel/common: Add Lunar Lake IAA and TBTRP3 device IDs
Reference:
Lunar Lake External Design Specification Volume 1 (734362)

BUG=b:329787286
TEST=verified on Lunar Lake RVP board (lnlrvp).

Change-Id: I92b65c946682387cbb841d558c6f0a7cb0fcd4ac
Signed-off-by: Saurabh Mishra <mishra.saurabh@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81850
Reviewed-by: Ashish Kumar Mishra <ashish.k.mishra@intel.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-14 13:10:34 +00:00
Frank Chu
e3b1a9d7a1 mb/google/nissa/var/glassway: Set VccIn Aux Imon IccMax to 25 A
Iccmax of VccIn_Aux is 25A with MBVR design.

BUG=b:330117043
BRANCH=firmware-nissa-15217.B
TEST=Local build successfully and boot to OOBE normally.

Change-Id: I105dc9df53c624fd7fc697408a1097e023a3cd68
Signed-off-by: Frank Chu <frank_chu@pegatron.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81445
Reviewed-by: Simon Yang <simon1.yang@intel.com>
Reviewed-by: Derek Huang <derekhuang@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-14 13:10:10 +00:00
Robert Chen
e7e717b3a6 mb/google/nissa/var/quandiso: Add stop pin for G2 touchscreen
Add stop pin control for G2 touchscreen refer to
G7500_Datasheet_Ver.1.2.

BUG=b:335803573
TEST=build and verified touchscreen works normally

Change-Id: I4f085c67c0cdb8b9ca3ff03993fda69cca6319ef
Signed-off-by: Robert Chen <robert.chen@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82254
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-14 13:09:43 +00:00
Eren Peng
d2f810ed9f mb/google/brox/var/greenbayupoc: Add vbt from brox
Copy the data.vbt from brox to greenbayupoc

BUG=b:326413034
TEST=emerge-brox coreboot chromeos-bootimage, flash and boot on DUT

Change-Id: I1e8101519ab2ecbb4654c20485fbe83c90656e4d
Signed-off-by: Eren Peng <peng.eren@inventec.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82108
Reviewed-by: Derek Huang <derekhuang@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-14 13:09:29 +00:00
Eren Peng
bb616ca483 mb/google/brox/var/greenbayupoc: Update devicetree and gpio settings
Based on latest schematics GREENBAY_0412.SCH update the gpio and
devicetree settings.

BUG=b:326413034
TEST=emerge-brox coreboot chromeos-bootimage, flash and boot on DUT

Cq-Depend:chrome-internal:7218819
Change-Id: I59f25b8abb7dd8a2dff7ff567b231bddc9db8455
Signed-off-by: Eren Peng <peng.eren@inventec.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82093
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Derek Huang <derekhuang@google.com>
2024-05-14 13:08:30 +00:00
Subrata Banik
d05611d264 arch/x86: Remove unused protected_mode_jump API
This patch removes all instances of the `protected_mode_jump` API and
its associated header file.

The API is no longer used by any code within the tree.

BUG=b:332759882
TEST=Built and booted 64-bit coreboot with 32-bit payload successfully.

Change-Id: I3eb31b09c92512338ccc540f60289960bd6bf439
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82372
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-14 13:08:04 +00:00
Subrata Banik
06b25c26a1 x86: Switch to protected_mode_call_1arg for correct argument passing
The payload execution process has been updated to utilize
protected_mode_call_1arg in order to guarantee proper handling of
function parameters.

The previous use of protected_mode_jump with a "jmp" instruction did
not allow for proper stack setup for argument passing, as the calling
convention was not aligned with the System V ABI calling convention.

This patch ensures that calling into the libpayload entry point using
protected mode is now aligned with the System V ABI calling convention.

This resolves an issue where retrieving the "pointer to coreboot tables"
from within the libpayload entry point was failing due to incorrect
argument passing.

BUG=b:332759882
TEST=Built and booted 64-bit coreboot with 32-bit payload successfully.

Change-Id: Ibd522544ad1e9deed6a11015b0c0e95265bda8eb
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82294
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
2024-05-14 13:07:28 +00:00
Leo Chou
94d50bbe2a mb/google/nissa/var/sundance: Update HID offset to 0x01 for Focal touchpad
Currently the Focal touchpad does not work. Based on the Focal touchpad vendor, upadet the HID descriptor address from 0x20 to 0x01.

BUG=b:339756281
TEST=Build and check Focal touchpad can work.

Change-Id: I383ad907e6a23c34ab1bd0f6594a87564e21181d
Signed-off-by: Leo Chou <leo.chou@lcfc.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82270
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-05-14 13:06:12 +00:00
Daniel_Peng
958d29fd83 mb/google/dedede/var/pirika: Add SPD IDs for two new memory parts
Support Memory of Micron MT53E512M32D1NP-046 WT:B and Hynix
H54G46CYRBX267 in mem_parts_used list, and generate SPD ID for these
parts.

DRAM Part Name                 ID to assign
MT53E512M32D1NP-046 WT:B       0 (0000)
H54G46CYRBX267                 0 (0000)

BUG=b:337173071
BRANCH=firmware-dedede-13606.B
TEST=Run command "go run \
     ./util/spd_tools/src/part_id_gen/part_id_gen.go \
     JSL lp4x src/mainboard/google/dedede/variants/pirika/memory/ \
     src/mainboard/google/dedede/variants/pirika/memory/\
     mem_parts_used.txt"

Change-Id: I9b1a2a622d0ca1298671b1da58beacc1b4244769
Signed-off-by: Daniel_Peng <Daniel_Peng@pegatron.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82094
Reviewed-by: Daniel Peng <daniel_peng@pegatron.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-05-14 13:05:49 +00:00
Lennart Eichhorn
fbc4f699bc doc/release/24.05: Add git submodule updates
Change-Id: I136905d60de14749cfa325b24de3df204f0135ec
Signed-off-by: Lennart Eichhorn <lennart@zebre.us>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82116
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-13 20:18:52 +00:00
Keith Hui
8869414105 mb/asus/p8z77-m: Support AC97 front audio panel
Add a nvram option for front audio panel type.

If it is set to AC97, reprogram front line out and microphone
pins to match vendor firmware under same configuration.

TEST=On asus/p8z77-m housed in an AOpen H340D case with an AC97
front audio panel, front panel line out port is now available as
headphone port in Fedora 39 with this patch applied and option
set correctly. And it works. Without the patch (or with this option
set to HD Audio), front audio ports are completely inoperable.

Change-Id: I39ccf066d87c5744a697599861719182768e0728
Signed-off-by: Keith Hui <buurin@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79734
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Nicholas Chin <nic.c3.14@gmail.com>
2024-05-13 17:18:22 +00:00
Elyes Haouas
ca3764ab18 nb/intel/haswell: Use <device/dram/ddr3.h>
Change-Id: I353ceb7ab5ec0c82f5e717c856ad7934fcbd03b6
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82355
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-13 17:12:45 +00:00
Elyes Haouas
200075ba2d mb/google/rambi: Use <device/dram/ddr3.h>
Change-Id: I3aa669042908b92d7b270df077a352e197071780
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82354
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-13 17:12:30 +00:00
Elyes Haouas
c2837e70b9 soc/intel/xeon_sp: Use <spd.h>
Change-Id: Ib86df42c74474ab6d0bd389073c36ca0761748af
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82353
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
2024-05-13 17:12:19 +00:00
Elyes Haouas
27becf5da6 mb/intel/{harcuvar,kunimitsu}: Use <spd.h> and <dram/ddr{3,4}.h>
Change-Id: I2d73f7815e83e8bf0c6d0a402d32bc99c32c7d90
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82243
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-13 17:11:35 +00:00
Elyes Haouas
7809eb8db6 mb/google/{eve,glados}: Use <spd.h> and <dram/ddr3.h>
Change-Id: I48b833a3727d4b7d7c50371dbe8f090983d80e36
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82313
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-05-13 17:10:25 +00:00
Fabian Meyer
a8a4a39adc util/inteltool: Fix Emmitsburg GPIO Group J pad names
Pad names now matching soc/intel/xeon_sp/ebg/soc_gpio.c.

Test: Generated pad names for ASRock Rack SPC741D8 now compile.

Change-Id: Ied53b654f905add86a05bce8c2e366dea9ccf4d3
Signed-off-by: Fabian Meyer <fabian.meyer@student.kit.edu>
Co-authored-by: Yussuf Khalil <yussuf.khalil@kit.edu>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82205
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-13 15:09:45 +00:00
Elyes Haouas
6fe35343b1 soc/amd/common/block/psp: Comment unused symbol
This adds a comment for unused AMD_FWM_POSITION_20000_DEFAULT.

Change-Id: Id8369f488893e7e5b2e7e7126d1b53199ed1aa77
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81973
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2024-05-13 14:30:54 +00:00
David Wu
de7492e942 mb/google/brya/var/riven: Copy VBT data file from nivviks
Add data.vbt file for riven recovery image. Select INTEL_GMA_HAVE_VBT
for riven as it has a VBT file now.
The VBT file is copied from the nivviks reference board.

BUG=b:337169542
TEST=build pass

Change-Id: I499c1b3e61581483a1640375270f7707ebe8deeb
Signed-off-by: David Wu <david_wu@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82269
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Tyler Wang <tyler.wang@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-13 12:32:17 +00:00
Krystian Hebel
33192a3752 cpu/x86/pae/pgtbl.c: remove dead map_2M_page()
This function isn't used anywhere. It probably wouldn't work with
current coreboot anyway, as it identity mapped lower 2GB of RAM, while
ramstage is run from CBMEM, which is usually just below top of memory.

It was last used in K8 code that is long gone.

Change-Id: I97e2830f381181d7f21ab5f6d4c544066c15b08c
Signed-off-by: Krystian Hebel <krystian.hebel@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82247
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2024-05-13 12:31:32 +00:00
Ashish Kumar Mishra
7e7e569db4 mb/google/brox: Disable c1 state auto-demotion
Disable c1 state auto-demotion support for brox

BUG=None
BRANCH=None
TEST=Boot brox and verify in fsp debug logs

Change-Id: I18d40cd721d46fce4702cf1a943583cd41c03cf4
Signed-off-by: Ashish Kumar Mishra <ashish.k.mishra@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82104
Reviewed-by: Shelley Chen <shchen@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-13 12:30:40 +00:00
Saurabh Mishra
254a4b9072 soc/intel/lunarlake: Support stepping A0_2
Details:
- Add support for new Lunar Lake MCH ID 0x6410
- Add new CPU id 0xb06d1

Reference:
Lunar Lake External Design Specification Volume 1 (734362)

TEST=Build, boot the system and verfiy MCH-ID prints in bootblock stage.
	Below prints verified on Lunar Lake RVP board (lnlrvp).
	[DEBUG]  MCH: device id 6410 (rev 02) is LunarLake M

Change-Id: I976d7f269485633d835d204afa224736d71baaa8
Signed-off-by: Saurabh Mishra <mishra.saurabh@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81847
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Wonkyu Kim <wonkyu.kim@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-05-12 18:57:39 +00:00
Saurabh Mishra
7f2020b712 soc/intel/common: Add Lunar Lake CNVI device IDs
Without this patch, ACPI SSDT does not supports and lists CNVW.

With this patch, verified "CNVW" in ACPI SSDT listing.

Scope (\_SB.PCI0)
    {
        Device (CNVW)
        {
            Name (_ADR, 0x0000000000140003)  // _ADR: Address
            Method (_STA, 0, NotSerialized)  // _STA: Status
            {
                Return (0x0F)
            }
        }
    }

Reference:
Lunar Lake External Design Specification Volume 1 (734362)

BUG=b:329787286
TEST=verified on Lunar Lake RVP board (lnlrvp).

Change-Id: I5a0a3fbc9f43a6a573e33fcf3901055e10faaed1
Signed-off-by: Saurabh Mishra <mishra.saurabh@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81846
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-12 18:57:05 +00:00
Tony Huang
83fd2d8a28 mb/google/rex/var/deku: Correct FVM Itrip for GT VR domain
Previous CL misspelling VR domain to IA not GT which cause
FVM Itrip(GT) not set correctly.

This CL corrects it to VR_DOMIAN_GT and confirm FVM Itrip(GT)
has set to 54.

BUG=b:320410462
BRANCH=firmware-rex-15709.B
TEST= FSP debug emerge-ovis coreboot intel-mtlfsp
      check overrides setting
      IccLimit[1] = 216 ( 1/4 A)

Change-Id: I99df053869aa11b7c82aa0b7f7ec0acf73467a76
Signed-off-by: Tony Huang <tony-huang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82268
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Derek Huang <derekhuang@google.com>
2024-05-12 18:55:47 +00:00
Felix Held
0fc69141e5 vc/amd/opensil: introduce common mpio/chip.h header file
The chip drivers in the devicetree use the path where the corresponding
chip.h file resides both to include this chip.h file in the static.c
generated by util/sconfig from the devicetree and also for the names of
the chip config and chip ops struct. To be able to build a SoC using
either the MPIO chip driver from the openSIL stub or from the actual
openSIL glue code without needing different devicetree files for the
different cases, introduce a common MPIO chip.h file that then includes
the correct MPIO header file. The chip config and ops structures also
need to be renamed to take this change into account.

Thanks to Matt for pointing out how to make the path to the actual MPIO
chip.h file configurable via a Kconfig setting. This allows overriding
this path from site-local without the need to have any reference to
site-local in the upstream code.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Iead97d1727569ec0d23a2b9c4fd96daff4bebcf6
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82262
Reviewed-by: Varshit Pandya <pandyavarshit@gmail.com>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-12 18:54:50 +00:00
Felix Held
444edcba5d vc/amd/opensil/*/mpio/chip.h: add missing include guards
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Idef3b661b1cf3008373e61e0760a7dd3b9e9fede
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82261
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Reviewed-by: Varshit Pandya <pandyavarshit@gmail.com>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-12 18:53:48 +00:00
Filip Lewiński
7898594b7c util/intelp2m: add Meteor Lake support
Enables parsing Meteor Lake inteltool output into gpio.h pad macros.

Change-Id: Iaebd51d587507e68c6f263b92dc61cb6c0411bf8
Signed-off-by: Filip Lewiński <filip.lewinski@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81916
Reviewed-by: Maxim <max.senia.poliak@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Michał Kopeć <michal.kopec@3mdeb.com>
2024-05-12 18:53:31 +00:00
Michał Kopeć
c42e28f077 mb/protectli/vault_cml: use combo v1/v2 FSP
Also switch configs to use combo v1/v2 FSP
The reason for this change is to simplify configuration - instead of
multiple targets for VP4630 and VP4650 or VP4670, it's now possible to
have one target covering all VP46x0.

Change-Id: I1a6f6e873e4ec35b9777dc17c0495151348d1d88
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81963
Reviewed-by: Maciej Pijanowski <maciej.pijanowski@3mdeb.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-05-12 18:52:41 +00:00
Eren Peng
1a395728df mb/google/brox/var/greenbayupoc: Configure board for SODIMM use
Configure SODIMM settings for greenbayupoc. The SODIMM settings are
copied from mainboard/google/brya/variants/baseboard/brask/memory.c.

BUG=b:336955026, b:332230842
TEST=emerge-brox coreboot chromeos-bootimage, flash and boot to OS
using Hynix HMAG56EXNSA051N 4G and Micron MTA8AFT1G64HZ-3G2R1 8G SODIMM.

Change-Id: I1552cadfa81c48fe561947ded078bcca2e6bc6ad
Signed-off-by: Eren Peng <peng.eren@inventec.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82085
Reviewed-by: Derek Huang <derekhuang@google.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2024-05-12 18:51:46 +00:00
David Wu
a56baa1d50 mb/google/brya/var/riven: Generate SPD ID for supported parts
Add supported memory parts in mem_parts_used.txt, and generate
SPD id for these parts.

1. MT62F1G32D4DR-031 WT:B (Mircon)
2. MT62F512M32D2DR-031 WT:B (Mircon)
3. H9JCNNNBK3MLYR-N6E (Hynix)
4. K3LKLKL0EM-MGCN (Samsung)
5. K3LKBKB0BM-MGCP (Samsung)
6. H9JCNNNCP3MLYR-N6E (Hynix)

BUG=b:337169542
TEST=build pass

Change-Id: I0ff3b1e14fb8bb87d8fc9cbe0e177a5bcedef08c
Signed-off-by: David Wu <david_wu@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82255
Reviewed-by: Tyler Wang <tyler.wang@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2024-05-12 18:50:39 +00:00
Filip Lewiński
eacc1c7ea9 util/inteltool: add Meteor Lake support
Based on:
Intel Core Ultra Processor External Design Specification
Meteor Lake SOC IO Registers
Meteor Lake-U/H/U Type4 and Arrow Lake-U/H GPIO Implementation Summary

Change-Id: I7473119fa97c57cd2a1303f08f964abd0ca96270
Signed-off-by: Filip Lewiński <filip.lewinski@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81843
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Michał Kopeć <michal.kopec@3mdeb.com>
2024-05-12 18:50:10 +00:00
Frans Hendriks
6d5cc39a78 LinuxBoot/Makefile: initramfs not build for bzImage
initramfs is not build when bzImage is selected

Add build/initramfs dependency to build/bzImage

BUG = N/A
TEST = Built and boot facebook monolith

Change-Id: I002202a0340347e78ce22024761d997605bd3f72
Signed-off-by: Frans Hendriks <fhendriks@eltan.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/77606
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-11 18:28:30 +00:00
Subrata Banik
cf5fc2312a include/efi: Override EFIAPI macro for x86_64
This commit overrides the EFIAPI macro definition when using FSP on
x86_64 to ensure the correct calling convention is used.

On i386, there is no side-effect since the C calling convention used
by coreboot and FSP are the same. However, on x86_64, FSP/UEFI uses
the Microsoft x64 calling convention while coreboot uses the System
V AMD64 ABI.

This change resolves this incompatibility by setting EFIAPI to
attribute((ms_abi)) on x86_64 when using FSP.

TEST=Able to build google/rex0 in 32-bit and 64-bit mode.

Change-Id: Ifae910be66d550af04cce5136d186a7e9dd085b3
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82266
Reviewed-by: Ronak Kanabar <ronak.kanabar@intel.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-11 08:28:17 +00:00
Subrata Banik
f5be5e4999 driver/intel/fsp2_0: Update soc_binding.h for coreboot compatibility
Included <efi/efi_datatype.h> to address coreboot style header
definitions rather using EDK2 header <Base.h>.

TEST=Able to build google/rex0.

Change-Id: I66559872c8d137d1baef5860fb98cad2a5214368
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82265
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Ronak Kanabar <ronak.kanabar@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-05-11 08:28:11 +00:00
Zhongtian Wu
3a3804f458 drivers/mipi: Update init code for IVO_T109NW41 panel
1. VCOM OTP burning, initial code Settings can be deleted, B6h
2. Fine-tune VGH, VGL, VGHO, VGLO voltage, B1h PA6
3. Boot CLK performance change: add E9h, C7h, E9h
4. Extend TFT life: D5h PA25~PA32,D3h PA1~PA5;
5. Gamma optimization: E0h
6. Improve picture quality, add EQ: D2h to CLK
7. Press mura to improve and modify B1h PA4 and PA5

BUG=b:320892589
TEST=boot ciri with IVO_T109NW41 panel and see firmware screen

Change-Id: I13421660faba9ef8e33a51c5ab28aeb1388aff40
Signed-off-by: Zhongtian Wu <wuzhongtian@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82240
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Yidi Lin <yidilin@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: cong yang <yangcong5@huaqin.corp-partner.google.com>
2024-05-10 09:25:59 +00:00
640 changed files with 27957 additions and 1868 deletions

34
AUTHORS
View File

@@ -39,7 +39,9 @@ Alexandru Gagniuc
Alexey Buyanov
Alexey Vazhnov
Alice Sell
Alicja Michalska
Allen-KH Cheng
Alper Nebi Yasak
Amanda Hwang
American Megatrends International, LLC
Amersel
@@ -62,6 +64,7 @@ Anna Karaś
Annie Chen
Anton Kochkov
Ao Zhong
Appukuttan V K
Arashk Mahshidfar
Arec Kao
Ariel Fang
@@ -93,6 +96,7 @@ Bora Guvendik
Boris Barbulovski
Boris Mittelberg
Brandon Breitenstein
Brandon Weeks
Brian Norris
Bryant Ou
Carl-Daniel Hailfinger
@@ -101,6 +105,7 @@ Caveh Jalali
Cavium Inc.
Chao Gui
Chen-Tsung Hsieh
Chen. Gang C
Chia-Ling Hou
Chien-Chih Tseng
Chris Wang
@@ -128,6 +133,7 @@ Da Lao
Daisuke Nojiri
Damien Zammit
Dan Callaghan
Dan Campbell
Daniel Campello
Daniel Gröber
Daniel Kang
@@ -181,6 +187,7 @@ Eltan B.V
Eltan B.V.
Elyes Haouas
Eran Mitrani
Eren Peng
Eric Biederman
Eric Lai
Eric Peers
@@ -194,13 +201,16 @@ Evan Green
Evgeny Zinoviev
Fabian Groffen
Fabian Kunkel
Fabian Meyer
Fabio Aiuto
Fabrice Bellard
Facebook, Inc.
Fei Yan
Felix Friedlander
Felix Held
Felix Singer
Fengquan Chen
Filip Lewiński
Flora Fu
Florian Laufenböck
Francois Toguo Fotso
@@ -214,7 +224,7 @@ Free Software Foundation, Inc.
Freescale Semiconductor, Inc.
Furquan Shaikh
Gaggery Tsai
Gang C Chen
Gang C Chen
Garmin Chang
Gary Jennejohn
George Trudeau
@@ -234,6 +244,7 @@ HardenedLinux
Harsha B R
Harshit Sharma
Henry C Chen
Herbert Wu
Hewlett Packard Enterprise Development LP
Hewlett-Packard Development Company, L.P.
Himanshu Sahdev
@@ -286,6 +297,7 @@ Jason Zhao
jason-ch chen
Jason-jh Lin
Jay Patel
Jean Lucas
Jeff Chase
Jeff Daly
Jeff Li
@@ -307,6 +319,7 @@ Jitao Shi
Joe Pillow
Joe Tessler
Joel Kitching
Joel Linn
Joey Peng
Johanna Schander
John Su
@@ -325,6 +338,7 @@ Jordan Crouse
Jörg Mische
Joseph Smith
Josie Nordrum
Juan José García-Castro Crespo
Julia Tsai
Julian Schroeder
Julian Stecklina
@@ -337,6 +351,7 @@ Kangheui Won
Kapil Porwal
Karol Zmyslowski
Karthik Ramasubramanian
Kei Hiroyoshi
Keith Hui
Keith Packard
Kenneth Chan
@@ -367,9 +382,11 @@ Lawrence Chang
Leah Rowe
Lean Sheng Tan
Lei Wen
Lennart Eichhorn
Lenovo Group Ltd
Leo Chou
Li-Ta Lo
Li1 Feng
Liam Flaherty
Libra Li
Libretrend LDA
@@ -397,6 +414,7 @@ Marc Bertens
Marc Jones
Marco Chen
Marek Kasiewicz
Marek Maślanka
Marek Vasut
Mario Scheithauer
Marius Gröger
@@ -465,10 +483,12 @@ Myles Watson
Nancy.Lin
Naresh Solanki
Nathan Lu
Naveen R. Iyer
Neill Corlett
Network Appliance Inc.
Nicholas Chin
Nicholas Sielicki
Nicholas Sudsgaard
Nick Barker
Nick Chen
Nick Vaccaro
@@ -502,6 +522,7 @@ Paul Fagerburg
Paul Menzel
Paul2 Huang
Paulo Alcantara
Pavan Holla
Pavel Sayekat
Paz Zcharya
PC Engines GmbH
@@ -520,6 +541,7 @@ Philipp Deppenwiese
Philipp Hug
Piotr Kleinschmidt
Po Xu
Poornima Tom
Prasad Malisetty
Prashant Malani
Pratik Vishwakarma
@@ -529,6 +551,7 @@ Protectli
Purism SPC
Purism, SPC
Qii Wang
Qinghong Zeng
Qualcomm Technologies, Inc.
Quanta Computer INC
Raihow Shi
@@ -572,6 +595,7 @@ Robinson P. Tryon
Rockchip, Inc.
Rocky Phagura
Roger Lu
Roger Wang
Roja Rani Yarubandi
Romain Lievin
Roman Zippel
@@ -745,12 +769,14 @@ Wojciech Macek
Wolfgang Denk
Won Chung
Wonkyu Kim
Wuxy
Wuxy
Xiang W
Xin Ji
Xixi Chen
Xuxin Xiong
YADRO
Yan Liu
Yang Wu
Yann Collet
Yaroslav Kurlaev
YH Lin
@@ -767,6 +793,7 @@ Yuanliding
Yuchen He
Yuchen Huang
Yunlong Jia
Yuval Peress
Zachary Yedidia
Zanxi Chen
Zhanyong Wang
@@ -776,10 +803,11 @@ Zhi7 Li
Zhiqiang Ma
Zhixing Ma
Zhiyong Tao
zhongtian wu
Zhongtian Wu
Zhuohao Lee
Ziang Wang
Zoey Wu
Zoltan Baldaszti
小田喜陽彦
忧郁沙茶
陳建宏

View File

@@ -1,37 +1,76 @@
Upcoming release - coreboot 24.05
coreboot 24.05 release
========================================================================
The 24.05 release is scheduled for Mid May, 2024
The coreboot project is pleased to announce the release of coreboot version
24.05. This update represents three months of hard work and commitment from our
community. With over 20 new members and contributions from more than a hundred
fifty other people in coding, reviewing patches, and other areas, this release
showcases the strength of our collaborative efforts.
With this release, coreboot has expanded its support, adding 25 new platforms or
variants and 2 new processors, further demonstrating our dedication to offering
flexible and adaptable firmware solutions. From laptops and servers to embedded
devices, coreboot 24.05 is designed to enhance a variety of hardware platforms
with its strong features.
Update this document with changes that should be in the release notes.
We are grateful to all the contributors who have made this release possible.
Your expertise and collaborative efforts continue to propel the coreboot project
forward. We value the participation of everyone in the community, from long-time
developers to those new to the project, and encourage you to explore the new
opportunities that coreboot 24.05 offers.
* Please use Markdown.
* See the past few release notes for the general format.
* The chip and board additions and removals will be updated right
before the release, so those do not need to be added.
* Note that all changes before the release are done are marked upcoming.
A final version of the notes are done after the release.
Our next release will be 24.08, scheduled for mid-August.
Significant or interesting changes
----------------------------------
* Add changes that need a full description here
### Mark 64-bit support as stable
* This section should have full descriptions and can or should have
a link to the referenced commits.
A significant amount of work has gone into fully supporting 64-bit coreboot
builds. There are still additional pieces that are happening, but with SMM
holding page tables itself, we can consider SMM support stable and safe enough
for general use.
### security/tpm: support compiling in multiple TPM drivers
Previously, boards could only be built with code supporting TPM 1.x or TPM 2.x
specifications. This has been updated with code allowing both to be built in
simultaneously, allowing the system to query the TPM. For systems with
soldered-down TPMs or firmware TPM solutions, its still possible to specify a
single TPM version so that the code for the other version isnt included.
### arch/arm64: Add EL1/EL2/EL3 support for arm64
Previously, arch/arm64 required coreboot to run on EL3 due to EL3 register
access. This might be an issue when, for example, one boots into TF-A first and
drops into EL2 for coreboot afterwards.
This patch aims at making arch/arm64 more versatile by removing the current EL3
constraint and allowing arm64 coreboot to run on EL1, EL2 and EL3.
The strategy is to add a Kconfig option (ARM64_CURRENT_EL) which allows us to
specify coreboot's EL upon entry. Based on that, we access the appropriate ELx
registers. So, for example, when running coreboot on EL1, we would not access
vbar_el3 or vbar_el2 but instead vbar_el1. This way, we don't generate faults
when accessing higher-EL registers.
Additional coreboot changes
---------------------------
The following are changes across a number of patches, or changes worth
noting, but not needing a full description.
* Changes that only need a line or two of description go here.
* util/smmstoretool: support processing ROMs
* cpu/x86: Link page tables in stage if possible
* lib/lzmadecode: Allow for 8 byte reads on 64bit to speed up decompression
* mb/lenovo/*: Set VR12 PSI to fix crash
* Numerous fixes for clang support
* Ongoing code cleanup
* Docs: Replace Recommonmark with MyST Parser. For changes, see the commit
message in https://review.coreboot.org/73158
@@ -40,11 +79,29 @@ Changes to external resources
### Toolchain updates
* util/kconfig: Uprev to Linux 6.8's kconfig
* crossgcc: Upgrade CMake from 3.27.7 to version 3.28.3
* util/crossgcc: Update LLVM from 16.0.6 to 17.0.6
* crossgcc: Upgrade binutils from 2.41 to 2.42
* util/crossgcc/buildgcc: Use Intel mirror for ACPICA
### Git submodule pointers
- amd_blobs: Update from commit id 64cdd7c8ef to ae5fc7d277 (1 commits)
- arm-trusted-firmware: Update from commit id 17bef2248d to 48f1bc9f52 (517
commits)
- cmocka: Update from commit id 8931845c35 to 8be3737209 (32 commits)
- fsp: Update from commit id 507ef01cce to cc6399e8c7 (14 commits)
- intel-microcode: Update from commit id ece0d294a2 to 41af345005 (1 commit)
- vboot: Update from commit id 3d37d2aafe to 09fcd2184f (27 commits)
### External payloads
#### External payloads
* payloads/U-Boot: Upgrade from U-Boot v2023.07 to v2024.4
* payloads/edk2: Add Kconfig options for LAPIC timer & UFS support
* payloads/Kconfig: Add flat binary as payload option
@@ -52,42 +109,155 @@ Platform Updates
----------------
### Added mainboards:
* To be filled in immediately before the release by the release team
* AMD BirmanPlus for Glinda SoC
* AMD BirmanPlus for Phoenix SoC
* ASROCK Z97 Extreme6
* Dell OptiPlex 7020/9020 MT
* Dell OptiPlex 7020/9020 SFF
* Framework Azalea (Framework 13 AMD 7040)
* Google Brox EC ISH
* Google Bujia
* Google Glassway
* Google Greenbayupoc
* Google Kyogre
* Google Lotso
* Google Nova
* Google Pujjoga
* Google Riven
* Google Skitty
* Google Squirtle
* Google Sundance
* Google Tivviks
* Google Trulo
* Google Veluza
* Google Wugtrio
* Google Yavista
* HP Pro 3500 Series
* Lenovo ThinkCentre M700 / M900 Tiny
* Lenovo ThinkCentre M710s
* Raptor Computing Systems Talos II
* SiFive HiFive Unmatched
### Removed Mainboards
* To be filled in immediately before the release by the release team
* Intel Alderlake-M RVP
* Intel Alderlake-M RVP with Chrome EC
### Updated SoCs
* To be filled in immediately before the release by the release team
* Added src/soc/ibm/power9
* Added src/soc/intel/xeon_sp/gnr
* Added src/soc/sifive/fu740
Plans to move platform support to a branch
------------------------------------------
* To be filled in immediately before the release by the release team
Statistics from the 4.22 to the 24.02 release
Statistics from the 24.02 to the 24.05 release
--------------------------------------------
* To be filled in immediately before the release by the release team
* Total Commits: 739
* Average Commits per day: 8.64
* Total lines added: 304721
* Average lines added per commit: 412.34
* Number of patches adding more than 100 lines: 60
* Average lines added per small commit: 37.74
* Total lines removed: 16195
* Average lines removed per commit: 21.91
* Total difference between added and removed: 288526
* Total authors: 131
* New authors: 23
Significant Known and Open Issues
---------------------------------
Issues from the coreboot bugtracker: https://ticket.coreboot.org/
* To be filled in immediately before the release by the release team
## coreboot-wide or architecture-wide issues
```{eval-rst}
+-----+-----------------------------------------------------------------+
| # | Subject |
+=====+=================================================================+
| 522 | 'region_overlap()' issues due to an integer overflow. |
+-----+-----------------------------------------------------------------+
| 519 | make gconfig - could not find glade file |
+-----+-----------------------------------------------------------------+
| 518 | make xconfig - g++: fatal error: no input files |
+-----+-----------------------------------------------------------------+
```
## Payload-specific issues
```{eval-rst}
+-----+-----------------------------------------------------------------+
| # | Subject |
+=====+=================================================================+
| 499 | edk2 boot fails with RESOURCE_ALLOCATION_TOP_DOWN enabled |
+-----+-----------------------------------------------------------------+
| 496 | Missing malloc check in libpayload |
+-----+-----------------------------------------------------------------+
| 484 | No USB keyboard support with secondary payloads |
+-----+-----------------------------------------------------------------+
| 414 | X9SAE-V: No USB keyboard init on SeaBIOS using Radeon RX 6800XT |
+-----+-----------------------------------------------------------------+
```
## Platform-specific issues
```{eval-rst}
+-----+-----------------------------------------------------------------+
| # | Subject |
+=====+=================================================================+
| 524 | X2APIC Options cause Linux to crash on emulation/qemu-i440fx |
+-----+-----------------------------------------------------------------+
| 517 | lenovo x230 boot stuck with connected external monitor |
+-----+-----------------------------------------------------------------+
| 509 | SD Card hotplug not working on Apollo Lake |
+-----+-----------------------------------------------------------------+
| 507 | Windows GPU driver fails on Google guybrush & skyrim boards |
+-----+-----------------------------------------------------------------+
| 506 | APL/GML don't boot OS when CPU microcode included "from tree" |
+-----+-----------------------------------------------------------------+
| 505 | Harcuvar CRB - 15 of 16 cores present in the operating system |
+-----+-----------------------------------------------------------------+
| 499 | T440p - EDK2 fails with RESOURCE_ALLOCATION_TOP_DOWN enabled |
+-----+-----------------------------------------------------------------+
| 495 | Stoney Chromebooks not booting PSPSecureOS |
+-----+-----------------------------------------------------------------+
| 478 | X200 booting Linux takes a long time with TSC |
+-----+-----------------------------------------------------------------+
| 474 | X200s crashes after graphic init with 8GB RAM |
+-----+-----------------------------------------------------------------+
| 457 | Haswell (t440p): CAR mem region conflicts with CBFS_SIZE > 8mb |
+-----+-----------------------------------------------------------------+
| 453 | Intel HDMI / DP Audio not present in Windows after libgfxinit |
+-----+-----------------------------------------------------------------+
| 449 | ThinkPad T440p fail to start, continuous beeping & LED blinking |
+-----+-----------------------------------------------------------------+
| 448 | Thinkpad T440P ACPI Battery Value Issues |
+-----+-----------------------------------------------------------------+
| 446 | Optiplex 9010 No Post |
+-----+-----------------------------------------------------------------+
| 439 | Lenovo X201 Turbo Boost not working (stuck on 2,4GHz) |
+-----+-----------------------------------------------------------------+
| 427 | x200: Two battery charging issues |
+-----+-----------------------------------------------------------------+
| 412 | x230 reboots on suspend |
+-----+-----------------------------------------------------------------+
| 393 | T500 restarts rather than waking up from suspend |
+-----+-----------------------------------------------------------------+
| 350 | I225 PCIe device not detected on Harcuvar |
+-----+-----------------------------------------------------------------+
```
coreboot Links and Contact Information
--------------------------------------
* Main Web site: https://www.coreboot.org
* Main Website: https://www.coreboot.org
* Downloads: https://coreboot.org/downloads.html
* Source control: https://review.coreboot.org
* Documentation: https://doc.coreboot.org

View File

@@ -0,0 +1,100 @@
Upcoming release - coreboot 24.08
========================================================================
The 24.08 release is scheduled for Mid Aug, 2024
Update this document with changes that should be in the release notes.
* Please use Markdown.
* See the past few release notes for the general format.
* The chip and board additions and removals will be updated right
before the release, so those do not need to be added.
* Note that all changes before the release are done are marked upcoming.
A final version of the notes are done after the release.
Significant or interesting changes
----------------------------------
* Add changes that need a full description here
* This section should have full descriptions and can or should have
a link to the referenced commits.
Additional coreboot changes
---------------------------
The following are changes across a number of patches, or changes worth
noting, but not needing a full description.
* Changes that only need a line or two of description go here.
Changes to external resources
-----------------------------
### Toolchain updates
* Upgrade ACPICA from 20230628 to 20240321
* Upgrade CMake from 3.28.3 to 3.29.3
* Upgrade nasm from 2.16.01 to 2.16.03
* Upgrade LLVM from 17.0.6 to 18.1.6
* Upgrade GCC from 13.2 to 14.1.0
### Git submodule pointers
### External payloads
Platform Updates
----------------
### Added mainboards:
* To be filled in immediately before the release by the release team
### Removed Mainboards
* To be filled in immediately before the release by the release team
### Updated SoCs
* To be filled in immediately before the release by the release team
Plans to move platform support to a branch
------------------------------------------
* To be filled in immediately before the release by the release team
Statistics from the 24.05 to the 24.08 release
--------------------------------------------
* To be filled in immediately before the release by the release team
Significant Known and Open Issues
---------------------------------
Issues from the coreboot bugtracker: https://ticket.coreboot.org/
* To be filled in immediately before the release by the release team
coreboot Links and Contact Information
--------------------------------------
* Main Web site: https://www.coreboot.org
* Downloads: https://coreboot.org/downloads.html
* Source control: https://review.coreboot.org
* Documentation: https://doc.coreboot.org
* Issue tracker: https://ticket.coreboot.org/projects/coreboot
* Donations: https://coreboot.org/donate.html

View File

@@ -6,7 +6,7 @@ Please add to the release notes as changes are added:
```{toctree}
:maxdepth: 1
24.05 - May 2024 <coreboot-24.05-relnotes.md>
24.08 - August 2024 <coreboot-24.08-relnotes.md>
```
The [checklist] contains instructions to ensure that a release covers all
@@ -22,6 +22,7 @@ important is taken care of.
```{toctree}
:maxdepth: 1
24.05 - May 2024 <coreboot-24.05-relnotes.md>
24.02 - February 2024 <coreboot-24.02-relnotes.md>
4.22 - November 2023 <coreboot-4.22-relnotes.md>
4.21 - August 2023 <coreboot-4.21-relnotes.md>

View File

@@ -4,6 +4,8 @@
- Birman for Phoenix SoC using FSP
- Birman for Phoenix SoC using openSIL
- Birman for Glinda SoC
- BirmanPlus for Phoenix SoC
- BirmanPlus for Glinda SoC
- Chausie
- Majolica
- Mayan for Phoenix SoC
@@ -35,6 +37,9 @@
- Tricky (Dell Chromebox 3010)
- Zako (HP Chromebox G1)
- Brox
- Brox EC ISH
- Lotso
- Greenbayupoc
- Agah
- Anahera
- Anahera4ES
@@ -53,6 +58,7 @@
- Gimble
- Gimble4ES
- Gladios
- Glassway
- Gothrax
- Hades
- Kano
@@ -74,11 +80,14 @@
- Quandiso
- Redrix
- Redrix4ES
- Riven
- Skolas
- Skolas4ES
- Taeko
- Taeko4ES
- Taniks
- Tivviks
- Trulo
- Uldren
- Vell
- Volmar
@@ -87,19 +96,29 @@
- Yavilla
- Zydron
- Xol
- Nova
- Bujia
- Yavista
- Sundance
- Pujjoga
- Butterfly (HP Pavilion Chromebook 14)
- Cherry
- Dojo
- Tomato
- Kingler
- Kyogre
- Ponyta
- Squirtle
- Steelix
- Voltorb
- Ponyta
- Krabby
- Tentacruel
- Magikarp
- Chinchou
- Krabby
- Magikarp
- Skitty
- Tentacruel
- Veluza
- Starmie
- Wugtrio
- Banon (Acer Chromebook 15 (CB3-532))
- Celes (Samsung Chromebook 3)
- Cyan (Acer Chromebook R11 (C738T))
@@ -305,8 +324,6 @@
- Alderlake-P RVP
- Alderlake-P RVP with Chrome EC
- Alderlake-P RVP with Microchip EC
- Alderlake-M RVP
- Alderlake-M RVP with Chrome EC
- Alderlake-N RVP
- Alderlake-N RVP with Chrome EC
- Raptorlake silicon with Alderlake-P RVP
@@ -365,6 +382,7 @@
- ThinkPad X230
- ThinkPad X230t
- ThinkPad X230s
- ThinkPad X230 eDP Mod (2K/FHD)
- ThinkPad X60 / X60s / X60t
## MSI

View File

@@ -0,0 +1,50 @@
# Type this in coreboot root directory to get a working .config:
# make defconfig KBUILD_DEFCONFIG=configs/builder/config.intel.crb.avc
#
# [RO] Board Configurations
#
CONFIG_VENDOR_INTEL=y
CONFIG_BOARD_INTEL_AVENUECITY_CRB=y
CONFIG_HAVE_CONFIGURABLE_RAMSTAGE=y
CONFIG_CONFIGURABLE_RAMSTAGE=y
CONFIG_NO_GFX_INIT=y
CONFIG_HAVE_IFD_BIN=y
CONFIG_DO_NOT_TOUCH_DESCRIPTOR_REGION=y
CONFIG_CPU_MICROCODE_CBFS_EXTERNAL_BINS=y
CONFIG_ADD_FSP_BINARIES=y
CONFIG_PAYLOAD_LINUX=y
CONFIG_UART_FOR_CONSOLE=0
CONFIG_CONSOLE_SERIAL_115200=y
#
# [RW] IFWI Ingredients
#
CONFIG_IFD_BIN_PATH="site-local/avenuecity/descriptor.bin"
CONFIG_CPU_UCODE_BINARIES="site-local/avenuecity/ucode.mcb"
CONFIG_FSP_T_FILE="site-local/avenuecity/Server_T.fd"
CONFIG_FSP_M_FILE="site-local/avenuecity/Server_M.fd"
CONFIG_FSP_S_FILE="site-local/avenuecity/Server_S.fd"
CONFIG_FSP_HEADER_PATH="src/vendorcode/intel/fsp/fsp2_0/graniterapids/ap/"
CONFIG_PAYLOAD_FILE="site-local/avenuecity/linuxboot_bzImage"
CONFIG_LINUX_COMMAND_LINE="loglevel=7 earlyprintk=serial,ttyS0,115200 console=ttyS0,115200"
#
# [RW] Debug Settings
#
CONFIG_CONSOLE_POST=y
CONFIG_DEFAULT_CONSOLE_LOGLEVEL_8=y
CONFIG_VERIFY_HOBS=y
CONFIG_DISPLAY_MTRRS=y
CONFIG_DISPLAY_FSP_CALLS_AND_STATUS=y
CONFIG_DISPLAY_FSP_HEADER=y
CONFIG_HAVE_DEBUG_GPIO=y
CONFIG_DEBUG_GPIO=y

View File

@@ -0,0 +1,50 @@
# Type this in coreboot root directory to get a working .config:
# make defconfig KBUILD_DEFCONFIG=configs/builder/config.intel.crb.bnc
#
# [RO] Board Configurations
#
CONFIG_VENDOR_INTEL=y
CONFIG_BOARD_INTEL_BEECHNUTCITY_CRB=y
CONFIG_HAVE_CONFIGURABLE_RAMSTAGE=y
CONFIG_CONFIGURABLE_RAMSTAGE=y
CONFIG_NO_GFX_INIT=y
CONFIG_HAVE_IFD_BIN=y
CONFIG_DO_NOT_TOUCH_DESCRIPTOR_REGION=y
CONFIG_CPU_MICROCODE_CBFS_EXTERNAL_BINS=y
CONFIG_ADD_FSP_BINARIES=y
CONFIG_PAYLOAD_LINUX=y
CONFIG_UART_FOR_CONSOLE=0
CONFIG_CONSOLE_SERIAL_115200=y
#
# [RW] IFWI Ingredients
#
CONFIG_IFD_BIN_PATH="site-local/beechnutcity/descriptor.bin"
CONFIG_CPU_UCODE_BINARIES="site-local/beechnutcity/ucode.mcb"
CONFIG_FSP_T_FILE="site-local/beechnutcity/Server_T.fd"
CONFIG_FSP_M_FILE="site-local/beechnutcity/Server_M.fd"
CONFIG_FSP_S_FILE="site-local/beechnutcity/Server_S.fd"
CONFIG_FSP_HEADER_PATH="src/vendorcode/intel/fsp/fsp2_0/graniterapids/sp/"
CONFIG_PAYLOAD_FILE="site-local/beechnutcity/linuxboot_bzImage"
CONFIG_LINUX_COMMAND_LINE="loglevel=7 earlyprintk=serial,ttyS0,115200 console=ttyS0,115200"
#
# [RW] Debug Settings
#
CONFIG_CONSOLE_POST=y
CONFIG_DEFAULT_CONSOLE_LOGLEVEL_8=y
CONFIG_VERIFY_HOBS=y
CONFIG_DISPLAY_MTRRS=y
CONFIG_DISPLAY_FSP_CALLS_AND_STATUS=y
CONFIG_DISPLAY_FSP_HEADER=y
CONFIG_HAVE_DEBUG_GPIO=y
CONFIG_DEBUG_GPIO=y

View File

@@ -1,5 +1,5 @@
CONFIG_VENDOR_PROTECTLI=y
CONFIG_BOARD_PROTECTLI_VP4670=y
CONFIG_BOARD_PROTECTLI_VP46XX=y
CONFIG_TPM_MEASURED_BOOT=y
CONFIG_SMMSTORE_SIZE=0x40000
CONFIG_TPM2=y

View File

@@ -1,13 +0,0 @@
CONFIG_VENDOR_PROTECTLI=y
CONFIG_BOARD_PROTECTLI_VP4630_VP4650=y
CONFIG_TPM_MEASURED_BOOT=y
CONFIG_SMMSTORE_SIZE=0x40000
CONFIG_TPM2=y
CONFIG_POST_IO_PORT=0x80
CONFIG_PAYLOAD_EDK2=y
CONFIG_EDK2_BOOT_MANAGER_ESCAPE=y
CONFIG_EDK2_BOOT_TIMEOUT=6
CONFIG_EDK2_FOLLOW_BGRT_SPEC=y
# CONFIG_EDK2_FULL_SCREEN_SETUP is not set
CONFIG_EDK2_SD_MMC_TIMEOUT=10
CONFIG_EDK2_SERIAL_SUPPORT=y

View File

@@ -28,6 +28,7 @@ payloads/external/edk2 \
payloads/external/GRUB2 \
payloads/external/LinuxBoot \
payloads/external/skiboot \
payloads/external/leanefi \
payloads/external/coreDOOM \
force-payload:

View File

@@ -33,7 +33,7 @@ endif
ifeq ($(CONFIG_LINUXBOOT_KERNEL_BZIMAGE),y)
build/bzImage: $(kernel_dir)/arch/x86/boot/bzImage | build
build/bzImage: $(kernel_dir)/arch/x86/boot/bzImage build/initramfs | build
cp $< $@
else ifeq ($(CONFIG_LINUXBOOT_KERNEL_UIMAGE),y)

View File

@@ -381,6 +381,7 @@ payloads/external/iPXE/ipxe/ipxe.rom ipxe: $(DOTCONFIG) $(IPXE_CONFIG_SCRIPT)
CONFIG_HAS_SCRIPT=$(CONFIG_IPXE_ADD_SCRIPT) \
CONFIG_IPXE_NO_PROMPT=$(CONFIG_IPXE_NO_PROMPT) \
CONFIG_IPXE_HAS_HTTPS=$(CONFIG_IPXE_HAS_HTTPS) \
CONFIG_PXE_TRUST_CMD=$(CONFIG_PXE_TRUST_CMD) \
MFLAGS= MAKEFLAGS=
# LinuxBoot
@@ -435,6 +436,13 @@ payloads/external/skiboot/build/skiboot.elf:
$(MAKE) -C payloads/external/skiboot all \
CONFIG_SKIBOOT_GIT_REPO=$(CONFIG_SKIBOOT_GIT_REPO) \
CONFIG_SKIBOOT_REVISION=$(CONFIG_SKIBOOT_REVISION)
# leanefi
payloads/external/leanefi/leanefi/build/leanefi.elf: FORCE $(DOTCONFIG)
$(MAKE) -C payloads/external/leanefi
FORCE: ;
# COREDOOM
payloads/external/coreDOOM/coredoom/doomgeneric/coredoom.elf coredoom:

View File

@@ -37,6 +37,8 @@ BUILD_STR += -s
endif
endif
BUILD_STR += -D BUILD_ARCH=X64
#
# EDK II (edk2/master) has the following build options relevant to coreboot:
#

View File

@@ -108,7 +108,16 @@ config IPXE_HAS_HTTPS
Enable HTTPS protocol, which allows you to encrypt all communication
with a web server and to verify the server's identity
config PXE_TRUST_CMD
bool "Enable TRUST commands"
default y
help
Enable imgverify and imgtrust commands, which allow you to verify
digital signature of file prior loading it, and restrict to loading
trusted files only.
endif # BUILD_IPXE
endmenu
endif # PXE

View File

@@ -52,6 +52,9 @@ endif
ifeq ($(CONFIG_IPXE_HAS_HTTPS),y)
sed -i'' 's|.*DOWNLOAD_PROTO_HTTPS|#define DOWNLOAD_PROTO_HTTPS|g' "$(project_dir)/src/config/general.h"
endif
ifeq ($(CONFIG_PXE_TRUST_CMD),y)
sed -i'' 's|.*IMAGE_TRUST_CMD|#define IMAGE_TRUST_CMD|g' "$(project_dir)/src/config/general.h"
endif
build: config $(CONFIG_SCRIPT)
ifeq ($(CONFIG_HAS_SCRIPT),y)

58
payloads/external/leanefi/Kconfig vendored Normal file
View File

@@ -0,0 +1,58 @@
if PAYLOAD_LEANEFI
menu "leanEFI configuration"
config PAYLOAD_FILE
string
default "payloads/external/leanefi/leanefi/build/leanefi.elf"
config LEANEFI_EFI_ECPT
bool
default y if ARCH_ARM64
config LEANEFI_HEAP_SIZE
int "Heap size"
default 131072
help
This is the heap size (malloc'able size) available
to the payload.
If unsure, set to 131072 (128K)
config LEANEFI_STACK_SIZE
int "Stack size"
default 16384
help
This is the stack size available to the payload.
If unsure, set to 16384 (16K)
config LEANEFI_BASE_ADDRESS
hex "Base address"
default 0x62000000 if BOARD_EMULATION_QEMU_AARCH64
#default 0x10023300000 if BOARD_EMULATION_QEMU_SBSA
help
This is the base address for the payload.
config LEANEFI_PAYLOAD
bool "Add a payload"
default y
help
If selected leanEFI will start a payload.
This option should only be unselected for debug purposes.
config LEANEFI_PAYLOAD_PATH
string "path to leanefi payload"
depends on LEANEFI_PAYLOAD
config LEANEFI_FDT
bool "Add an FDT that is propagated as EFI configuration table"
default y if BOARD_EMULATION_QEMU_AARCH64
config LEANEFI_FDT_PATH
string "path to FDT"
depends on LEANEFI_FDT
endmenu
endif

View File

@@ -0,0 +1,6 @@
config PAYLOAD_LEANEFI
bool "leanefi"
depends on ARCH_ARM64
help
Select this option if you want to build a coreboot image
with an leanefi payload.

22
payloads/external/leanefi/Makefile vendored Normal file
View File

@@ -0,0 +1,22 @@
unexport KCONFIG_AUTOHEADER
unexport KCONFIG_AUTOCONFIG
unexport KCONFIG_DEPENDENCIES
unexport KCONFIG_SPLITCONFIG
unexport KCONFIG_TRISTATE
unexport KCONFIG_NEGATIVES
unexport $(COREBOOT_EXPORTS)
build: leanefi
$(MAKE) -C leanefi
leanefi:
git clone "https://review.coreboot.org/leanefi"
distclean:
rm -rf leanefi
clean:
rm -rf leanefi/build
.PHONY: build clean distclean

View File

@@ -106,17 +106,22 @@ menu "Architecture Options"
choice
prompt "Target Architecture"
default ARCH_X86
default ARCH_X86_32
config ARCH_ARM
bool "ARM"
help
Support the ARM architecture
config ARCH_X86
bool "x86"
config ARCH_X86_32
bool "x86_32"
help
Support the x86 architecture
Support the x86_32 architecture
config ARCH_X86_64
bool "x86_64"
help
Support the x86_64 architecture
config ARCH_ARM64
bool "ARM64"
@@ -133,6 +138,12 @@ config ARCH_MOCK
endchoice
config ARCH_X86
bool
default y if ARCH_X86_32 || ARCH_X86_64
help
Support the x86 architecture
config MULTIBOOT
bool "Multiboot header support"
depends on ARCH_X86

View File

@@ -118,7 +118,8 @@ ARCH-y := $(ARCHDIR-y)
# override here.
ARCH-$(CONFIG_LP_ARCH_ARM) := arm
ARCH-$(CONFIG_LP_ARCH_ARM64) := arm64
ARCH-$(CONFIG_LP_ARCH_X86) := x86_32
ARCH-$(CONFIG_LP_ARCH_X86_32) := x86_32
ARCH-$(CONFIG_LP_ARCH_X86_64) := x86_64
ARCH-$(CONFIG_LP_ARCH_MOCK) := mock
# Five cases where we don't need fully populated $(obj) lists:

View File

@@ -56,7 +56,6 @@ classes-$(CONFIG_LP_REMOTEGDB) += libgdb
classes-$(CONFIG_LP_VBOOT_LIB) += vboot_fw
classes-$(CONFIG_LP_VBOOT_LIB) += tlcl
libraries := $(classes-y)
classes-y += head.o
subdirs-y := arch/$(ARCHDIR-y)
subdirs-y += crypto libc drivers libpci gdb
@@ -97,7 +96,7 @@ $(obj)/libpayload-config.h: $(KCONFIG_AUTOHEADER) $(obj)/libpayload.config
cmp $@ $< 2>/dev/null || cp $< $@
library-targets = $(addsuffix .a,$(addprefix $(obj)/,$(libraries))) $(obj)/libpayload.a
lib: $$(library-targets) $(obj)/head.o
lib: $$(library-targets) $(obj)/libpayload.ldscript
extract_nth=$(word $(1), $(subst |, ,$(2)))
@@ -116,17 +115,16 @@ $(obj)/%.a: $$(%-objs)
printf " AR $(subst $(CURDIR)/,,$(@))\n"
printf "create $@\n$(foreach objc,$(filter-out %.a,$^),addmod $(objc)\n)$(foreach lib,$(filter %.a,$^),addlib $(lib)\n)save\nend\n" | $(AR) -M
$(obj)/head.o: $(obj)/arch/$(ARCHDIR-y)/head.head.o.o
printf " CP $(subst $(CURDIR)/,,$(@))\n"
cp $^ $@
$(obj)/libpayload.ldscript: arch/$(ARCHDIR-y)/libpayload.ldscript $(obj)/libpayload-config.h
@printf " LDSCRIPT $@\n"
$(CC) $(CFLAGS) $(EXTRA_CFLAGS) -E -P -x assembler-with-cpp -undef -o $@ $<
install: real-target
printf " INSTALL $(DESTDIR)/libpayload/lib\n"
install -m 755 -d $(DESTDIR)/libpayload/lib
install -m 644 $(library-targets) $(DESTDIR)/libpayload/lib/
install -m 644 arch/$(ARCHDIR-y)/libpayload.ldscript $(DESTDIR)/libpayload/lib/
install -m 644 $(obj)/libpayload.ldscript $(DESTDIR)/libpayload/lib/
install -m 755 -d $(DESTDIR)/libpayload/lib/$(ARCHDIR-y)
install -m 644 $(obj)/head.o $(DESTDIR)/libpayload/lib/$(ARCHDIR-y)
printf " INSTALL $(DESTDIR)/libpayload/include\n"
install -m 755 -d $(DESTDIR)/libpayload/include
find include -type d -exec install -m755 -d $(DESTDIR)/libpayload/{} \;

View File

@@ -29,7 +29,7 @@
CFLAGS += -mthumb -march=armv7-a
arm_asm_flags = -Wa,-mthumb -Wa,-mimplicit-it=always -Wa,-mno-warn-deprecated
head.o-y += head.S
libc-y += head.S
libc-y += eabi_compat.c
libc-y += main.c sysinfo.c
libc-y += timer.c coreboot.c util.S
@@ -44,5 +44,4 @@ libc-$(CONFIG_LP_GPL) += memcpy.S memset.S memmove.S
libgdb-y += gdb.c
# Add other classes here when you put assembly files into them!
head.o-S-ccopts += $(arm_asm_flags)
libc-S-ccopts += $(arm_asm_flags)

View File

@@ -29,7 +29,7 @@
CFLAGS += -march=armv8-a
arm64_asm_flags =
head.o-y += head.S
libc-y += head.S
libc-y += main.c sysinfo.c
libc-y += timer.c coreboot.c util.S
libc-y += virtual.c
@@ -42,5 +42,4 @@ libc-y += mmu.c
libgdb-y += gdb.c
# Add other classes here when you put assembly files into them!
head.o-S-ccopts += $(arm64_asm_flags)
libc-S-ccopts += $(arm64_asm_flags)
libc-S-ccopts += $(arm64_asm_flags)

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: GPL-2.0-only
head.o-y += head.c
libc-y += virtual.c
CFLAGS += -Wno-address-of-packed-member

View File

@@ -1,3 +0,0 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* This file is empty on purpose. It should not be used. */

View File

@@ -27,16 +27,26 @@
##
ifneq ($(CONFIG_LP_COMPILER_LLVM_CLANG),y)
ifeq ($(CONFIG_LP_ARCH_X86_64),y)
CFLAGS += -mpreferred-stack-boundary=4
else
CFLAGS += -mpreferred-stack-boundary=2
endif
endif
head.o-y += head.S
libc-$(CONFIG_LP_ARCH_X86_32) += head.S
libc-$(CONFIG_LP_ARCH_X86_64) += head_64.S
libc-$(CONFIG_LP_ARCH_X86_64) += pt.S
libc-y += main.c sysinfo.c
libc-y += timer.c coreboot.c util.S
libc-y += exec.S virtual.c
libc-y += virtual.c
libc-y += selfboot.c cache.c
libc-y += exception_asm.S exception.c
libc-y += exception.c
libc-y += delay.c
libc-$(CONFIG_LP_ARCH_X86_32) += exec.c
libc-$(CONFIG_LP_ARCH_X86_32) += exec.S
libc-$(CONFIG_LP_ARCH_X86_32) += exception_asm.S
libc-$(CONFIG_LP_ARCH_X86_64) += exception_asm_64.S
# Will fall back to default_memXXX() in libc/memory.c if GPL not allowed.
libc-$(CONFIG_LP_GPL) += string.c

View File

@@ -34,7 +34,13 @@
#define IF_FLAG (1 << 9)
u32 exception_stack[0x400] __attribute__((aligned(8)));
#if CONFIG(LP_ARCH_X86_64)
#define REGISTER_FMT "0x%016zx"
#else
#define REGISTER_FMT "0x%08zx"
#endif
u8 exception_stack[0x400] __aligned(16);
static interrupt_handler handlers[256];
@@ -143,17 +149,27 @@ static void dump_exception_state(void)
break;
}
printf("\n");
printf("EIP: 0x%08x\n", exception_state->regs.eip);
printf("REG_IP: " REGISTER_FMT "\n", exception_state->regs.reg_ip);
printf("REG_FLAGS: " REGISTER_FMT "\n", exception_state->regs.reg_flags);
printf("REG_AX: " REGISTER_FMT "\n", exception_state->regs.reg_ax);
printf("REG_BX: " REGISTER_FMT "\n", exception_state->regs.reg_bx);
printf("REG_CX: " REGISTER_FMT "\n", exception_state->regs.reg_cx);
printf("REG_DX: " REGISTER_FMT "\n", exception_state->regs.reg_dx);
printf("REG_SP: " REGISTER_FMT "\n", exception_state->regs.reg_sp);
printf("REG_BP: " REGISTER_FMT "\n", exception_state->regs.reg_bp);
printf("REG_SI: " REGISTER_FMT "\n", exception_state->regs.reg_si);
printf("REG_DI: " REGISTER_FMT "\n", exception_state->regs.reg_di);
#if CONFIG(LP_ARCH_X86_64)
printf("REG_R8: 0x%016zx\n", exception_state->regs.reg_r8);
printf("REG_R9: 0x%016zx\n", exception_state->regs.reg_r9);
printf("REG_R10: 0x%016zx\n", exception_state->regs.reg_r10);
printf("REG_R11: 0x%016zx\n", exception_state->regs.reg_r11);
printf("REG_R12: 0x%016zx\n", exception_state->regs.reg_r12);
printf("REG_R13: 0x%016zx\n", exception_state->regs.reg_r13);
printf("REG_R14: 0x%016zx\n", exception_state->regs.reg_r14);
printf("REG_R15: 0x%016zx\n", exception_state->regs.reg_r15);
#endif
printf("CS: 0x%04x\n", exception_state->regs.cs);
printf("EFLAGS: 0x%08x\n", exception_state->regs.eflags);
printf("EAX: 0x%08x\n", exception_state->regs.eax);
printf("ECX: 0x%08x\n", exception_state->regs.ecx);
printf("EDX: 0x%08x\n", exception_state->regs.edx);
printf("EBX: 0x%08x\n", exception_state->regs.ebx);
printf("ESP: 0x%08x\n", exception_state->regs.esp);
printf("EBP: 0x%08x\n", exception_state->regs.ebp);
printf("ESI: 0x%08x\n", exception_state->regs.esi);
printf("EDI: 0x%08x\n", exception_state->regs.edi);
printf("DS: 0x%04x\n", exception_state->regs.ds);
printf("ES: 0x%04x\n", exception_state->regs.es);
printf("SS: 0x%04x\n", exception_state->regs.ss);
@@ -164,7 +180,7 @@ static void dump_exception_state(void)
void exception_dispatch(void)
{
die_if(exception_state->vector >= ARRAY_SIZE(handlers),
"Invalid vector %u\n", exception_state->vector);
"Invalid vector %zu\n", exception_state->vector);
u8 vec = exception_state->vector;
@@ -184,7 +200,7 @@ void exception_dispatch(void)
vec);
dump_exception_state();
dump_stack(exception_state->regs.esp, 512);
dump_stack(exception_state->regs.reg_sp, 512);
/* We don't call apic_eoi because we don't want to ack the interrupt and
allow another interrupt to wake the processor. */
halt();
@@ -197,6 +213,10 @@ success:
void exception_init(void)
{
/* TODO: Add exception init code for x64, currently only supporting 32-bit code */
if (CONFIG(LP_ARCH_X86_64))
return;
exception_stack_end = exception_stack + ARRAY_SIZE(exception_stack);
exception_init_asm();
}
@@ -206,6 +226,17 @@ void set_interrupt_handler(u8 vector, interrupt_handler handler)
handlers[vector] = handler;
}
#if CONFIG(LP_ARCH_X86_64)
static uint64_t eflags(void)
{
uint64_t eflags;
asm volatile(
"pushfq\n\t"
"popq %0\n\t"
: "=rm" (eflags));
return eflags;
}
#else
static uint32_t eflags(void)
{
uint32_t eflags;
@@ -215,6 +246,7 @@ static uint32_t eflags(void)
: "=rm" (eflags));
return eflags;
}
#endif
void enable_interrupts(void)
{

View File

@@ -0,0 +1,221 @@
/*
*
* Copyright 2024 Google Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
.align 16
.global exception_stack_end
exception_stack_end:
.quad 0
.global exception_state
exception_state:
.quad 0
/* Some temporary variables which are used while saving exception state. */
vector:
.quad 0
error_code:
.quad 0
old_rsp:
.quad 0
old_rax:
.quad 0
.align 16
/*
* Each exception vector has a small stub associated with it which sets aside
* the error code, if any, records which vector we entered from, and calls
* the common exception entry point. Some exceptions have error codes and some
* don't, so we have a macro for each type.
*/
.macro stub num
exception_stub_\num:
movq $0, error_code
movq $\num, vector
jmp exception_common
.endm
.macro stub_err num
exception_stub_\num:
pop error_code
movq $\num, vector
jmp exception_common
.endm
.altmacro
.macro user_defined_stubs from, to
stub \from
.if \to-\from
user_defined_stubs %(from+1),\to
.endif
.endm
stub 0
stub 1
stub 2
stub 3
stub 4
stub 5
stub 6
stub 7
stub_err 8
stub 9
stub_err 10
stub_err 11
stub_err 12
stub_err 13
stub_err 14
stub 15
stub 16
stub_err 17
stub 18
stub 19
stub 20
stub 21
stub 22
stub 23
stub 24
stub 25
stub 26
stub 27
stub 28
stub 29
stub_err 30
stub 31
/* Split the macro so we avoid a stack overflow. */
user_defined_stubs 32, 63
user_defined_stubs 64, 127
user_defined_stubs 128, 191
user_defined_stubs 192, 255
exception_common:
/* Return from the exception. */
iretl
/*
* We need segment selectors for the IDT, so we need to know where things are
* in the GDT. We set one up here which is pretty standard and largely copied
* from coreboot.
*/
.align 16
gdt:
/* selgdt 0, unused */
.word 0x0000, 0x0000
.byte 0x00, 0x00, 0x00, 0x00
/* selgdt 8, unused */
.word 0x0000, 0x0000
.byte 0x00, 0x00, 0x00, 0x00
/* selgdt 0x10, flat 4GB code segment */
.word 0xffff, 0x0000
.byte 0x00, 0x9b, 0xcf, 0x00
/* selgdt 0x18, flat 4GB data segment */
.word 0xffff, 0x0000
.byte 0x00, 0x92, 0xcf, 0x00
/* selgdt 0x20, flat x64 code segment */
.word 0xffff, 0x0000
.byte 0x00, 0x9b, 0xaf, 0x00
gdt_end:
/* GDT pointer for use with lgdt */
.global gdt_ptr
gdt_ptr:
.word gdt_end - gdt - 1
.quad gdt
/*
* Record the target and construct the actual entry at init time. This
* is necessary because the linker doesn't want to construct the entry
* for us.
*/
.macro interrupt_gate target
.quad \target
.quad \target
.endm
.altmacro
.macro user_defined_gates from, to
interrupt_gate exception_stub_\from
.if \to-\from
user_defined_gates %(from+1),\to
.endif
.endm
.align 16
.global idt
idt:
interrupt_gate exception_stub_0
interrupt_gate exception_stub_1
interrupt_gate exception_stub_2
interrupt_gate exception_stub_3
interrupt_gate exception_stub_4
interrupt_gate exception_stub_5
interrupt_gate exception_stub_6
interrupt_gate exception_stub_7
interrupt_gate exception_stub_8
interrupt_gate exception_stub_9
interrupt_gate exception_stub_10
interrupt_gate exception_stub_11
interrupt_gate exception_stub_12
interrupt_gate exception_stub_13
interrupt_gate exception_stub_14
interrupt_gate exception_stub_15
interrupt_gate exception_stub_16
interrupt_gate exception_stub_17
interrupt_gate exception_stub_18
interrupt_gate exception_stub_19
interrupt_gate exception_stub_20
interrupt_gate exception_stub_21
interrupt_gate exception_stub_22
interrupt_gate exception_stub_23
interrupt_gate exception_stub_24
interrupt_gate exception_stub_25
interrupt_gate exception_stub_26
interrupt_gate exception_stub_27
interrupt_gate exception_stub_28
interrupt_gate exception_stub_29
interrupt_gate exception_stub_30
interrupt_gate exception_stub_31
user_defined_gates 32, 63
user_defined_gates 64, 127
user_defined_gates 128, 191
user_defined_gates 192, 255
idt_end:
/* IDT pointer for use with lidt */
idt_ptr:
.word idt_end - idt - 1
.quad idt
.global exception_init_asm
exception_init_asm:
ret

View File

@@ -29,8 +29,10 @@
#include <libpayload-config.h>
#include <libpayload.h>
#if CONFIG(LP_ARCH_X86)
#if CONFIG(LP_ARCH_X86_32)
extern void i386_do_exec(long addr, int argc, char **argv, int *ret);
#else
#error "exec does not currently support x86_64."
#endif
/**
@@ -45,7 +47,7 @@ int exec(long addr, int argc, char **argv)
{
int val = -1;
#if CONFIG(LP_ARCH_X86)
#if CONFIG(LP_ARCH_X86_32)
i386_do_exec(addr, argc, argv, &val);
#endif
return val;

View File

@@ -15,6 +15,7 @@
#include <exception.h>
#include <gdb.h>
#include <libpayload.h>
#include <stddef.h>
static const u8 type_to_signal[] = {
[EXC_DE] = GDB_SIGFPE,
@@ -53,12 +54,15 @@ void gdb_arch_init(void)
void gdb_arch_enter(void)
{
u32 *esp;
asm volatile ("mov %%esp, %0" : "=r"(esp) );
u8 *stack_pointer;
#if CONFIG(LP_ARCH_X86_64)
asm volatile ("movq %%rsp, %0" : "=r"(stack_pointer));
#else
asm volatile ("mov %%esp, %0" : "=r"(stack_pointer));
#endif
/* Avoid reentrant exceptions, just call the hook if in one already. */
if (esp >= exception_stack && esp <= exception_stack_end)
if (stack_pointer >= exception_stack && stack_pointer <= exception_stack_end)
gdb_exception_hook(EXC_BP);
else
asm volatile ("int3");
@@ -66,12 +70,12 @@ void gdb_arch_enter(void)
int gdb_arch_set_single_step(int on)
{
const u32 tf_bit = 1 << 8;
const size_t tf_bit = 1 << 8;
if (on)
exception_state->regs.eflags |= tf_bit;
exception_state->regs.reg_flags |= tf_bit;
else
exception_state->regs.eflags &= ~tf_bit;
exception_state->regs.reg_flags &= ~tf_bit;
return 0;
}

View File

@@ -29,7 +29,7 @@
.code32
.global _entry
.text
.section .text._entry
.align 4
/*
@@ -38,37 +38,14 @@
* change anything.
*/
_entry:
jmp _init
.align 4
#define MB_MAGIC 0x1BADB002
#define MB_FLAGS 0x00010003
mb_header:
.long MB_MAGIC
.long MB_FLAGS
.long -(MB_MAGIC + MB_FLAGS)
.long mb_header
.long _start
.long _edata
.long _end
.long _init
/*
* This function saves off the previous stack and switches us to our
* own execution environment.
*/
_init:
/* Add multiboot header and jump around it when building with multiboot support. */
#if CONFIG(LP_MULTIBOOT)
#include "multiboot_header.inc"
#endif
/* No interrupts, please. */
cli
#if CONFIG(LP_MULTIBOOT)
/* Store EAX and EBX */
movl %eax, loader_eax
movl %ebx, loader_ebx
#endif
/* save pointer to coreboot tables */
movl 4(%esp), %eax
movl %eax, cb_header_ptr

View File

@@ -0,0 +1,141 @@
/*
*
* Copyright (C) 2024 Google Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#define IA32_EFER 0xC0000080
#define EFER_LME (1 << 8)
.code32
.global _entry
.section .text._entry
.align 4
/*
* WARNING: Critical Code Section - 32/64-bit Compatibility
* This code between `_entry` and `jnz _init64` is executed during system initialization.
* It MUST function correctly regardless of whether the system is booting in:
* - 32-bit protected mode
* - 64-bit long mode
* To achieve this, ONLY use instructions that produce identical binary output in both modes.
* Thoroughly test ALL modifications to this section in BOTH 32-bit and 64-bit boot
* environments.
*/
_entry:
/* Add multiboot header and jump around it when building with multiboot support. */
#if CONFIG(LP_MULTIBOOT)
#include "multiboot_header.inc"
#endif
/* No interrupts, please. */
cli
movl $IA32_EFER, %ecx
rdmsr
testl $EFER_LME, %eax
jnz _init64
lgdt %cs:gdt_ptr
/* save pointer to coreboot tables */
movl 4(%esp), %eax
/*
* NOTE: coreboot tables has passed over the top of the stack
* while calling in protected mode.
*/
movl %eax, cb_header_ptr
call init_page_table
movl $pm4le, %eax
/* load identity mapped page tables */
movl %eax, %cr3
/* enable PAE */
movl %cr4, %eax
btsl $5, %eax
movl %eax, %cr4
/* enable long mode */
movl $(IA32_EFER), %ecx
rdmsr
btsl $8, %eax
wrmsr
/* enable paging */
movl %cr0, %eax
btsl $31, %eax
movl %eax, %cr0
/* Jump to selgdt 0x20, flat x64 code segment */
ljmp $0x20, $_entry64
.code64
.align 16
_init64:
movabs $gdt_ptr, %rax
lgdt (%rax)
/*
* Note: The `cb_header_ptr` has passed as the first argument
* to the x86-64 calling convention.
*/
movq %rdi, cb_header_ptr
call init_page_table
movq $pm4le, %rax
/* load identity mapped page tables */
movq %rax, %cr3
_entry64:
/* Store current stack pointer and set up new stack. */
movq %rsp, %rax
movabs $_estack, %rsp
push %rax
fninit
movq %cr0, %rax
andq $0xFFFFFFFFFFFFFFFB, %rax /* clear EM */
orq $0x00000022, %rax /* set MP, NE */
movq %rax, %cr0
movq %cr4, %rax
orq $0x00000600, %rax /* set OSFXSR, OSXMMEXCPT */
movq %rax, %cr4
/* Let's rock. */
call start_main
/* %rax has the return value - pass it on unmolested */
_leave:
/* Restore old stack. */
pop %rsp
/* Return to the original context. */
ret

View File

@@ -26,8 +26,13 @@
* SUCH DAMAGE.
*/
#if CONFIG(LP_ARCH_X86_64)
OUTPUT_FORMAT(elf64-x86-64)
OUTPUT_ARCH(x86_64)
#else
OUTPUT_FORMAT(elf32-i386)
OUTPUT_ARCH(i386)
#endif
ENTRY(_entry)

View File

@@ -0,0 +1,54 @@
/*
*
* Copyright (C) 2008 Advanced Micro Devices, Inc.
* Copyright (C) 2017 Patrick Rudolph <siro@das-labor.org>
* Copyright (C) 2024 Google Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#define MB_MAGIC 0x1BADB002
#define MB_FLAGS 0x00010003
jmp _init
/*
* Note: The Multiboot standard requires Multiboot header to be placed
* below 0x2000 in the resulting image. See:
* http://www.gnu.org/software/grub/manual/multiboot/html_node/OS-image-format.html
*/
mb_header:
.long MB_MAGIC
.long MB_FLAGS
.long -(MB_MAGIC + MB_FLAGS)
.long mb_header
.long _start
.long _edata
.long _end
.long _init
_init:
/* Store EAX and EBX */
movl %eax, loader_eax
movl %ebx, loader_ebx

View File

@@ -0,0 +1,149 @@
/*
*
* Copyright 2024 Google Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
/*
* For reference see "AMD64 Architecture Programmer's Manual Volume 2",
* Document 24593-Rev. 3.31-July 2019 Chapter 5.3.4
*
* Page table attributes: WB, User+Supervisor, Present, Writeable, Accessed, Dirty
*/
.section .bss
#define _PRES (1ULL << 0)
#define _RW (1ULL << 1)
#define _US (1ULL << 2)
#define _A (1ULL << 5)
#define _D (1ULL << 6)
#define _PS (1ULL << 7)
.section .bss.pm4le
.global pm4le
.align 4096
pm4le:
.skip 8
.section .bss.main_page_table
.global main_page_table
.align 4096
main_page_table:
.skip 8192
.section .bss.extra_page_table
.global extra_page_table
.align 4096
extra_page_table:
.skip 32
/*
* WARNING: 32-bit/64-bit Mode Compatibility for Page Table Initialization
* This `init_page_table` function is designed to work in both 32-bit protected
* mode AND 64-bit long mode.
*
* Key Considerations:
* - Assembly Instructions: Use ONLY instructions that have the SAME binary representation
* in both 32-bit and 64-bit modes.
* - `.code64` Directive: We're compiling with `.code64` to ensure the assembler uses
* the correct 64-bit version of instructions (e.g., `inc`).
* - Register Notation:
* - Use 64-bit register names (like `%rsi`) for register-indirect addressing to avoid
* incorrect address size prefixes.
* - It's safe to use `%esi` with `mov` instructions, as the high 32 bits are zeroed
* in 64-bit mode.
*
* IMPORTANT:
* Thoroughly test ANY changes to this function in BOTH 32-bit and 64-bit boot environments.
*/
.code64
.section .text.init_page_table
.globl init_page_table
.type init_page_table, @function
init_page_table:
mov $0x80000001, %eax
cpuid
test $(1 << 26), %edx
jnz setup_1gb
setup_2mb:
mov $2048, %edi
mov $(_PRES + _RW + _US + _PS + _A + _D), %eax
mov $0, %ecx
mov $main_page_table, %esi
loop_2mb:
mov %eax, (%rsi, %rcx, 8)
mov $0, 4(%rsi, %rcx, 8)
add $0x200000, %eax
inc %ecx
cmp %edi, %ecx
jb loop_2mb
mov $4, %edi
mov $main_page_table, %eax
add $(_PRES + _RW + _US + _A), %eax
mov $0, %ecx
mov $extra_page_table, %esi
fill_extra_page_table:
mov %eax, (%rsi, %rcx, 8)
mov $0, 4(%rsi, %rcx, 8)
add $4096, %eax
inc %ecx
cmp %edi, %ecx
jb fill_extra_page_table
mov $extra_page_table, %eax
jmp leave
setup_1gb:
mov $512, %edi
mov $(_PRES + _RW + _US + _PS + _A + _D), %eax
mov $0, %ebx
mov $0, %ecx
mov $main_page_table, %esi
loop_1gb:
mov %eax, (%rsi, %rcx, 8)
mov %ebx, 4(%rsi, %rcx, 8)
add $0x40000000, %eax
cmp $0x40000000, %eax
ja no_overflow_1gb
inc %ebx
no_overflow_1gb:
inc %ecx
cmp %edi, %ecx
jb loop_1gb
mov $main_page_table, %eax
leave:
or $(_PRES + _RW + _US + _A), %eax
mov %eax, pm4le
ret

View File

@@ -81,6 +81,16 @@ void *memcpy(void *dest, const void *src, size_t n)
{
unsigned long d0, d1, d2;
#if CONFIG(LP_ARCH_X86_64)
asm volatile(
"rep ; movsq\n\t"
"mov %4,%%rcx\n\t"
"rep ; movsb\n\t"
: "=&c" (d0), "=&D" (d1), "=&S" (d2)
: "0" (n >> 3), "g" (n & 7), "1" (dest), "2" (src)
: "memory"
);
#else
asm volatile(
"rep ; movsl\n\t"
"movl %4,%%ecx\n\t"
@@ -89,6 +99,7 @@ void *memcpy(void *dest, const void *src, size_t n)
: "0" (n >> 2), "g" (n & 3), "1" (dest), "2" (src)
: "memory"
);
#endif
return dest;
}

View File

@@ -74,34 +74,34 @@ else
fi
if [ "$CONFIG_LP_ARCH_ARM" = "y" ]; then
_ARCHINCDIR=$_INCDIR/arm
_ARCHLIBDIR=$_LIBDIR/arm
_ARCHDIR=arm
_ARCHEXTRA=""
_ARCH=arm
fi
if [ "$CONFIG_LP_ARCH_ARM64" = "y" ]; then
_ARCHINCDIR=$_INCDIR/arm64
_ARCHLIBDIR=$_LIBDIR/arm64
_ARCHDIR=arm64
_ARCHEXTRA=""
_ARCH=arm64
fi
if [ "$CONFIG_LP_ARCH_X86" = "y" ]; then
_ARCHINCDIR=$_INCDIR/x86
_ARCHLIBDIR=$_LIBDIR/x86
_ARCHEXTRA="-m32 "
_ARCH=x86
_ARCHDIR=x86
if [ "$CONFIG_LP_ARCH_X86_32" = "y" ]; then
_ARCHEXTRA="-m32 "
else
_ARCHEXTRA="-m64 "
fi
fi
if [ "$CONFIG_LP_ARCH_MOCK" = "y" ]; then
_ARCHINCDIR=$_INCDIR/mock
_ARCHLIBDIR=$_LIBDIR/mock
_ARCHDIR=mock
_ARCHEXTRA=""
_ARCH=mock
fi
_ARCHINCDIR=$_INCDIR/$_ARCHDIR
_ARCHLIBDIR=$_LIBDIR/$_ARCHDIR
if [ -f $_LIBDIR/libpayload.ldscript ]; then
_LDDIR=$_LIBDIR
elif [ -f $BASE/../arch/$_ARCH/libpayload.ldscript ]; then
_LDDIR=$BASE/../arch/$_ARCH
elif [ -f $BASE/../arch/$_ARCHDIR/libpayload.ldscript ]; then
_LDDIR=$BASE/../arch/$_ARCHDIR
fi
# Host arch should youse default linker script
if [ "$CONFIG_LP_ARCH_MOCK" = "y" ]; then
@@ -126,13 +126,10 @@ CMDLINE=
while [ $# -gt 0 ]; do
case $1 in
-m32|-fno-stack-protector)
-m32|-fno-stack-protector|-m64)
shift
continue
;;
-m64)
error "Invalid option --64 - only 32 bit architectures are supported"
;;
-c)
DOLINK=0
;;
@@ -205,14 +202,6 @@ if [ $DOLINK -eq 0 ]; then
$DEFAULT_CC $CMDLINE $_CFLAGS
else
_LIBGCC=`$DEFAULT_CC $_ARCHEXTRA -print-libgcc-file-name`
if [ -f $_ARCHLIBDIR/head.o ]; then
HEAD_O=$_ARCHLIBDIR/head.o
elif [ -f $_OBJ/head.o ]; then
HEAD_O=$_OBJ/head.o
else
echo "Could not find head.o"
exit 1
fi
if [ "$CONFIG_LP_ARM64_A53_ERRATUM_843419" = y ] &&
grep -q fix-cortex-a53-843419 $_XCOMPILE; then
@@ -224,13 +213,8 @@ else
_LDFLAGS="$_LDFLAGS -Wl,--defsym=CONFIG_LP_STACK_SIZE=$CONFIG_LP_STACK_SIZE"
if [ $DEBUGME -eq 1 ]; then
echo "$DEFAULT_CC $_LDFLAGS $HEAD_O $CMDLINE $_CFLAGS -lpayload $_LIBGCC"
echo "$DEFAULT_CC $_LDFLAGS $CMDLINE $_CFLAGS -lpayload $_LIBGCC"
fi
# Note: $_ARCHLIBDIR/head.o must be the first object being linked, because it
# contains a Multiboot header. The Multiboot standard requires this
# header to be placed below 0x2000 in the resulting image. See:
# http://www.gnu.org/software/grub/manual/multiboot/html_node/OS-image-format.html
$DEFAULT_CC $_LDFLAGS $HEAD_O $CMDLINE $_CFLAGS -lpayload -xnone $_LIBGCC
$DEFAULT_CC $_LDFLAGS $CMDLINE $_CFLAGS -lpayload -xnone $_LIBGCC
fi

View File

@@ -66,7 +66,7 @@ static u8 *ahci_prdbuf_init(ahci_dev_t *const dev,
u8 *const user_buf, const size_t len,
const int out)
{
if ((u32)user_buf & 1) {
if ((uintptr_t)user_buf & 1) {
printf("ahci: Odd buffer pointer (%p).\n", user_buf);
if (dev->buf) /* orphaned buffer */
free(dev->buf - *(dev->buf - 1));
@@ -76,7 +76,7 @@ static u8 *ahci_prdbuf_init(ahci_dev_t *const dev,
dev->user_buf = user_buf;
dev->write_back = !out;
dev->buflen = len;
if ((u32)dev->buf & 1) {
if ((uintptr_t)dev->buf & 1) {
dev->buf[0] = 1;
dev->buf += 1;
} else {

View File

@@ -274,7 +274,7 @@ uhci_stop(hci_t *controller)
#define UHCI_SLEEP_TIME_US 30
#define UHCI_TIMEOUT (USB_MAX_PROCESSING_TIME_US / UHCI_SLEEP_TIME_US)
#define GET_TD(x) ((void*)(((unsigned int)(x))&~0xf))
#define GET_TD(x) ((void *)(((unsigned long)(x))&~0xf))
static td_t *
wait_for_completed_qh(hci_t *controller, qh_t *qh)

View File

@@ -29,6 +29,7 @@
#ifndef _ARCH_EXCEPTION_H
#define _ARCH_EXCEPTION_H
#include <stddef.h>
#include <stdint.h>
void exception_init_asm(void);
@@ -38,20 +39,28 @@ void disable_interrupts(void);
/** Returns 1 if interrupts are enabled. */
int interrupts_enabled(void);
struct exception_state
{
#if CONFIG(LP_ARCH_X86_64)
struct exception_state {
/* Careful: x86/gdb.c currently relies on the size and order of regs. */
struct {
u32 eax;
u32 ecx;
u32 edx;
u32 ebx;
u32 esp;
u32 ebp;
u32 esi;
u32 edi;
u32 eip;
u32 eflags;
size_t reg_ax;
size_t reg_bx;
size_t reg_cx;
size_t reg_dx;
size_t reg_si;
size_t reg_di;
size_t reg_bp;
size_t reg_sp;
size_t reg_r8;
size_t reg_r9;
size_t reg_r10;
size_t reg_r11;
size_t reg_r12;
size_t reg_r13;
size_t reg_r14;
size_t reg_r15;
size_t reg_ip;
size_t reg_flags;
u32 cs;
u32 ss;
u32 ds;
@@ -59,13 +68,39 @@ struct exception_state
u32 fs;
u32 gs;
} regs;
u32 error_code;
u32 vector;
size_t error_code;
size_t vector;
} __packed;
#else
struct exception_state {
/* Careful: x86/gdb.c currently relies on the size and order of regs. */
struct {
size_t reg_ax;
size_t reg_cx;
size_t reg_dx;
size_t reg_bx;
size_t reg_sp;
size_t reg_bp;
size_t reg_si;
size_t reg_di;
size_t reg_ip;
size_t reg_flags;
u32 cs;
u32 ss;
u32 ds;
u32 es;
u32 fs;
u32 gs;
} regs;
size_t error_code;
size_t vector;
} __packed;
#endif
extern struct exception_state *exception_state;
extern u32 exception_stack[];
extern u32 *exception_stack_end;
extern u8 exception_stack[];
extern u8 *exception_stack_end;
enum {
EXC_DE = 0, /* Divide by zero */

View File

@@ -29,7 +29,7 @@
libc-$(CONFIG_LP_LIBC) += malloc.c printf.c console.c string.c
libc-$(CONFIG_LP_LIBC) += memory.c ctype.c lib.c libgcc.c
libc-$(CONFIG_LP_LIBC) += rand.c time.c exec.c
libc-$(CONFIG_LP_LIBC) += rand.c time.c
libc-$(CONFIG_LP_LIBC) += readline.c getopt_long.c sysinfo.c
libc-$(CONFIG_LP_LIBC) += args.c
libc-$(CONFIG_LP_LIBC) += strlcpy.c

View File

@@ -15,7 +15,8 @@ vboot-fixup-includes = $(filter -I$(coreboottop)/%, $(1)) \
$(filter-out -I$(coreboottop)/%,$(1)))))
VBOOT_FIRMWARE_ARCH-$(CONFIG_LP_ARCH_ARM) := arm
VBOOT_FIRMWARE_ARCH-$(CONFIG_LP_ARCH_X86) := x86
VBOOT_FIRMWARE_ARCH-$(CONFIG_LP_ARCH_X86_32) := x86
VBOOT_FIRMWARE_ARCH-$(CONFIG_LP_ARCH_X86_64) := x86_64
VBOOT_FIRMWARE_ARCH-$(CONFIG_LP_ARCH_ARM64) := arm64
ifneq ($(CONFIG_LP_ARCH_MOCK),)

View File

@@ -918,8 +918,9 @@ config GENERATE_PIRQ_TABLE
If unsure, say Y.
config GENERATE_SMBIOS_TABLES
depends on ARCH_X86
depends on ARCH_X86 || ARCH_ARM64
bool "Generate SMBIOS tables"
default n if ARCH_ARM64
default y
help
Generate SMBIOS tables for this board.

View File

@@ -11,7 +11,7 @@ static int acpi_create_madt_lapic(acpi_madt_lapic_t *lapic, u8 cpu, u8 apic)
{
lapic->type = LOCAL_APIC; /* Local APIC structure */
lapic->length = sizeof(acpi_madt_lapic_t);
lapic->flags = (1 << 0); /* Processor/LAPIC enabled */
lapic->flags = ACPI_MADT_LAPIC_ENABLED;
lapic->processor_id = cpu;
lapic->apic_id = apic;
@@ -23,7 +23,7 @@ static int acpi_create_madt_lx2apic(acpi_madt_lx2apic_t *lapic, u32 cpu, u32 api
lapic->type = LOCAL_X2APIC; /* Local APIC structure */
lapic->reserved = 0;
lapic->length = sizeof(acpi_madt_lx2apic_t);
lapic->flags = (1 << 0); /* Processor/LAPIC enabled */
lapic->flags = ACPI_MADT_LAPIC_ENABLED;
lapic->processor_id = cpu;
lapic->x2apic_id = apic;
@@ -127,17 +127,12 @@ static int acpi_create_madt_sci_override(acpi_madt_irqoverride_t *irqoverride)
ioapic_get_sci_pin(&gsi, &irq, &flags);
/* In systems without 8259, the SCI_INT field in the FADT contains the SCI GSI number
instead of the 8259 IRQ number */
if (!CONFIG(ACPI_HAVE_PCAT_8259))
irq = gsi;
irqoverride->type = IRQ_SOURCE_OVERRIDE; /* Interrupt source override */
irqoverride->length = sizeof(acpi_madt_irqoverride_t);
irqoverride->bus = MP_BUS_ISA;
irqoverride->source = irq;
irqoverride->gsirq = gsi;
irqoverride->flags = flags;
return irqoverride->length;
return acpi_create_madt_irqoverride(irqoverride, MP_BUS_ISA, irq, gsi, flags);
}
static unsigned long acpi_create_madt_ioapic_gsi0_default(unsigned long current)
@@ -234,7 +229,7 @@ unsigned long acpi_arch_fill_madt(acpi_madt_t *madt, unsigned long current)
madt->lapic_addr = cpu_get_lapic_addr();
if (CONFIG(ACPI_HAVE_PCAT_8259))
madt->flags |= 1;
madt->flags |= ACPI_MADT_PCAT_COMPAT;
if (CONFIG(ACPI_COMMON_MADT_LAPIC))
current = acpi_create_madt_lapics_with_nmis(current);

View File

@@ -14,6 +14,7 @@
#include <console/console.h>
#include <device/device.h>
#include <device/soundwire.h>
#include <stdio.h>
#include <types.h>
static char *gencurrent;

View File

@@ -4,6 +4,7 @@
#include <acpi/acpigen_dptf.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
/* Defaults */
#define DEFAULT_RAW_UNIT "ma"

View File

@@ -5,6 +5,7 @@
#include <acpi/acpigen.h>
#include <acpi/acpigen_usb.h>
#include <device/device.h>
#include <stdio.h>
static const char *power_role_to_str(enum usb_typec_power_role power_role)
{

View File

@@ -8,6 +8,7 @@
#include <acpi/acpigen_pci.h>
#include <device/device.h>
#include <stdlib.h>
#include <stdio.h>
#include <types.h>
#include <crc_byte.h>

View File

@@ -30,6 +30,9 @@ bootblock-y += eabi_compat.c
decompressor-$(CONFIG_ARM64_USE_ARCH_TIMER) += arch_timer.c
bootblock-$(CONFIG_ARM64_USE_ARCH_TIMER) += arch_timer.c
bootblock-y += transition.c transition_asm.S
ifneq ($(CONFIG_ARM64_CURRENT_EL),3)
bootblock-y += smc.c smc_asm.S
endif
decompressor-y += memset.S
bootblock-y += memset.S
@@ -69,6 +72,9 @@ verstage-y += memcpy.S
verstage-y += memmove.S
verstage-y += transition.c transition_asm.S
ifneq ($(CONFIG_ARM64_CURRENT_EL),3)
verstage-y += smc.c smc_asm.S
endif
endif # CONFIG_ARCH_VERSTAGE_ARM64
@@ -88,6 +94,9 @@ romstage-y += memmove.S
romstage-y += ramdetect.c
romstage-y += romstage.c
romstage-y += transition.c transition_asm.S
ifneq ($(CONFIG_ARM64_CURRENT_EL),3)
romstage-y += smc.c smc_asm.S
endif
rmodules_arm64-y += memset.S
rmodules_arm64-y += memcpy.S
@@ -109,6 +118,7 @@ ifeq ($(CONFIG_ARCH_RAMSTAGE_ARM64),y)
ramstage-y += div0.c
ramstage-y += eabi_compat.c
ramstage-y += boot.c
ramstage-$(CONFIG_GENERATE_SMBIOS_TABLES) += smbios.c
ramstage-y += tables.c
ramstage-y += ramdetect.c
ramstage-$(CONFIG_ARM64_USE_ARCH_TIMER) += arch_timer.c
@@ -117,6 +127,9 @@ ramstage-y += memcpy.S
ramstage-y += memmove.S
ramstage-$(CONFIG_ARM64_USE_ARM_TRUSTED_FIRMWARE) += bl31.c
ramstage-y += transition.c transition_asm.S
ifneq ($(CONFIG_ARM64_CURRENT_EL),3)
ramstage-y += smc.c smc_asm.S
endif
ramstage-$(CONFIG_PAYLOAD_FIT_SUPPORT) += fit_payload.c
ramstage-$(CONFIG_HAVE_ACPI_TABLES) += acpi.c
ramstage-y += dma.c

View File

@@ -0,0 +1,52 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef ARM_ARM64_SMC_H
#define ARM_ARM64_SMC_H
#include <types.h>
uint64_t smc(uint32_t function_id, uint64_t arg1, uint64_t arg2, uint64_t arg3,
uint64_t arg4, uint64_t arg5, uint64_t arg6, uint64_t arg7);
#define smc_call0(function_id) smc(function_id, 0, 0, 0, 0, 0, 0, 0)
#define smc_call1(function_id, a1) smc(function_id, a1, 0, 0, 0, 0, 0, 0)
#define smc_call2(function_id, a1, a2) smc(function_id, a1, a2, 0, 0, 0, 0, 0)
#define smc_call3(function_id, a1, a2, a3) smc(function_id, a1, a2, a3, 0, 0, 0, 0)
/* Documented in https://developer.arm.com/documentation/den0022/ */
enum psci_return_values {
PSCI_SUCCESS = 0,
PSCI_NOT_SUPPORTED = -1,
PSCI_INVALID_PARAMETERS = -2,
PSCI_DENIED = -3,
PSCI_ALREADY_ON = -4,
PSCI_ON_PENDING = -5,
PSCI_INTERNAL_FAILURE = -6,
PSCI_NOT_PRESENT = -7,
PSCI_DISABLED = -8,
PSCI_INVALID_ADDRESS = -9,
};
/* PSCI functions */
#define PSCI_VERSION 0x84000000
#define PSCI_FEATURES 0x8400000a
/* Documented in https://developer.arm.com/documentation/den0028/ */
enum smccc_return_values {
SMC_SUCCESS = 0,
SMC_NOT_SUPPORTED = -1,
SMC_NOT_REQUIRED = -2,
SMC_INVALID_PARAMETER = -3,
};
/* SMCCC functions */
#define SMCCC_VERSION 0x80000000
#define SMCCC_ARCH_FEATURES 0x80000001
#define SMCCC_ARCH_SOC_ID 0x80000002
#define SMCCC_GET_SOC_VERSION 0
#define SMCCC_GET_SOC_REVISION 1
uint8_t smccc_supports_arch_soc_id(void);
enum cb_err smccc_arch_soc_id(uint32_t *jep106code, uint32_t *soc_revision);
#endif /* ARM_ARM64_SMC_H */

190
src/arch/arm64/smbios.c Normal file
View File

@@ -0,0 +1,190 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <arch/cache.h>
#include <arch/lib_helpers.h>
#include <arch/smc.h>
#include <console/console.h>
#include <smbios.h>
#include <stdio.h>
static void smbios_processor_id(u32 *processor_id)
{
uint32_t jep106code, soc_revision;
uint64_t midr_el1;
if (smccc_supports_arch_soc_id()) {
smccc_arch_soc_id(&jep106code, &soc_revision);
processor_id[0] = jep106code;
processor_id[1] = soc_revision;
} else {
midr_el1 = raw_read_midr_el1();
processor_id[0] = midr_el1;
processor_id[1] = 0;
}
}
static int smbios_processor_manufacturer(u8 *start)
{
char midr_el1_implementer;
char buf[32];
// [31:24] - Implementer code
midr_el1_implementer = (raw_read_midr_el1() & 0xff000000) >> 24;
snprintf(buf, sizeof(buf), "CPU implementer %x", midr_el1_implementer);
return smbios_add_string(start, buf);
}
static int smbios_processor_name(u8 *start)
{
uint16_t midr_el1_partnumber;
char buf[32];
// [15:4] - PartNum
midr_el1_partnumber = (raw_read_midr_el1() & 0xfff0) >> 4;
snprintf(buf, sizeof(buf), "ARMv8 Processor rev %d", midr_el1_partnumber);
return smbios_add_string(start, buf);
}
#define MAX_CPUS_ENABLED(cpus) (cpus > 0xff ? 0xff : cpus)
/* NOTE: Not handling big.LITTLE clusters. Consider using MP services (not yet) or the DSU. */
int smbios_write_type4(unsigned long *current, int handle)
{
static unsigned int cnt = 0;
char buf[8];
uint16_t characteristics = 0;
unsigned int cpu_voltage;
struct smbios_type4 *t = smbios_carve_table(*current, SMBIOS_PROCESSOR_INFORMATION,
sizeof(*t), handle);
snprintf(buf, sizeof(buf), "CPU%d", cnt++);
t->socket_designation = smbios_add_string(t->eos, buf);
smbios_processor_id(t->processor_id);
t->processor_manufacturer = smbios_processor_manufacturer(t->eos);
t->processor_version = smbios_processor_name(t->eos);
t->processor_family = SMBIOS_PROCESSOR_FAMILY_FROM_FAMILY2;
t->processor_family2 = SMBIOS_PROCESSOR_FAMILY2_ARMV8;
t->processor_type = SMBIOS_PROCESSOR_TYPE_CENTRAL;
smbios_cpu_get_core_counts(&t->core_count2, &t->thread_count2);
t->core_count = MAX_CPUS_ENABLED(t->core_count2);
t->thread_count = MAX_CPUS_ENABLED(t->thread_count2);
/* Assume we always enable all cores */
t->core_enabled = t->core_count;
t->core_enabled2 = t->core_count2;
t->l1_cache_handle = 0xffff;
t->l2_cache_handle = 0xffff;
t->l3_cache_handle = 0xffff;
t->serial_number = smbios_add_string(t->eos, smbios_processor_serial_number());
t->status = SMBIOS_PROCESSOR_STATUS_CPU_ENABLED | SMBIOS_PROCESSOR_STATUS_POPULATED;
t->processor_upgrade = PROCESSOR_UPGRADE_UNKNOWN;
t->external_clock = smbios_processor_external_clock();
if (t->external_clock == 0)
t->external_clock = (raw_read_cntfrq_el0() / 1000 / 1000);
t->current_speed = smbios_cpu_get_current_speed_mhz();
/* This field identifies a capability for the system, not the processor itself. */
t->max_speed = smbios_cpu_get_max_speed_mhz();
/* TODO: Are "Enhanced Virtualization" (by EL2) and "Power/Performance Control" supported? */
characteristics |= PROCESSOR_64BIT_CAPABLE;
characteristics |= BIT(5); /* Execute Protection */
if (t->core_count > 1)
characteristics |= PROCESSOR_MULTI_CORE;
if (t->thread_count > 1)
characteristics |= BIT(4); /* BIT4: Hardware Thread */
if (smccc_supports_arch_soc_id())
characteristics |= BIT(9); /* Arm64 SoC ID */
t->processor_characteristics = characteristics | smbios_processor_characteristics();
cpu_voltage = smbios_cpu_get_voltage();
if (cpu_voltage > 0)
t->voltage = 0x80 | cpu_voltage;
const int len = smbios_full_table_len(&t->header, t->eos);
*current += len;
return len;
}
int smbios_write_type7_cache_parameters(unsigned long *current,
int *handle,
int *max_struct_size,
struct smbios_type4 *type4)
{
enum cache_level level = CACHE_L1;
int h;
int len = 0;
while (1) {
enum smbios_cache_type type;
struct cache_info info;
const u8 cache_type = cpu_get_cache_type(level);
/* No more caches in the system */
if (!cache_type)
break;
switch (cache_type) {
case CACHE_INSTRUCTION:
type = SMBIOS_CACHE_TYPE_INSTRUCTION;
cpu_get_cache_info(level, cache_type, &info);
break;
case CACHE_DATA:
type = SMBIOS_CACHE_TYPE_DATA;
cpu_get_cache_info(level, cache_type, &info);
break;
case CACHE_SEPARATE:
type = SMBIOS_CACHE_TYPE_DATA;
cpu_get_cache_info(level, CACHE_DATA, &info);
h = (*handle)++;
update_max(len, *max_struct_size, smbios_write_type7(current, h,
level, smbios_cache_sram_type(), smbios_cache_associativity(info.associativity),
type, info.size, info.size));
type = SMBIOS_CACHE_TYPE_INSTRUCTION;
cpu_get_cache_info(level, CACHE_INSTRUCTION, &info);
break;
case CACHE_UNIFIED:
type = SMBIOS_CACHE_TYPE_UNIFIED;
cpu_get_cache_info(level, cache_type, &info);
break;
default:
type = SMBIOS_CACHE_TYPE_UNKNOWN;
info.size = info.associativity = 0;
break;
}
h = (*handle)++;
update_max(len, *max_struct_size, smbios_write_type7(current, h,
level, smbios_cache_sram_type(), smbios_cache_associativity(info.associativity),
type, info.size, info.size));
if (type4) {
switch (level) {
case 1:
type4->l1_cache_handle = h;
break;
case 2:
type4->l2_cache_handle = h;
break;
case 3:
type4->l3_cache_handle = h;
break;
default:
break;
}
}
level++;
}
return len;
}

66
src/arch/arm64/smc.c Normal file
View File

@@ -0,0 +1,66 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <arch/smc.h>
#include <console/console.h>
#include <types.h>
/* Assumes at least a PSCI implementation is present */
uint8_t smccc_supports_arch_soc_id(void)
{
static uint8_t supported = 0xff;
uint64_t smc_ret;
if (supported != 0xff)
return supported;
// PSCI_FEATURES mandatory from PSCI 1.0
smc_ret = smc_call0(PSCI_VERSION);
if (smc_ret < 0x10000)
goto fail;
smc_ret = smc_call1(PSCI_FEATURES, SMCCC_VERSION);
if (smc_ret == PSCI_NOT_SUPPORTED)
goto fail;
// SMCCC_ARCH_FEATURES supported from SMCCC 1.1
smc_ret = smc_call0(SMCCC_VERSION);
if (smc_ret < 0x10001)
goto fail;
smc_ret = smc_call1(SMCCC_ARCH_FEATURES, SMCCC_ARCH_SOC_ID);
if (smc_ret != SMC_SUCCESS)
goto fail;
supported = 1;
return supported;
fail:
supported = 0;
return supported;
}
enum cb_err smccc_arch_soc_id(uint32_t *jep106code, uint32_t *soc_revision)
{
uint64_t smc_ret;
if (jep106code == NULL || soc_revision == NULL)
return CB_ERR_ARG;
smc_ret = smc_call1(SMCCC_ARCH_SOC_ID, SMCCC_GET_SOC_VERSION);
if (smc_ret != SMC_INVALID_PARAMETER)
*jep106code = smc_ret;
else
*jep106code = -1;
smc_ret = smc_call1(SMCCC_ARCH_SOC_ID, SMCCC_GET_SOC_REVISION);
if (smc_ret != SMC_INVALID_PARAMETER)
*soc_revision = smc_ret;
else
*soc_revision = -1;
if (*jep106code == -1 || *soc_revision == -1) {
printk(BIOS_ERR, "SMCCC_ARCH_SOC_ID failed!\n");
return CB_ERR;
} else
return CB_SUCCESS;
}

9
src/arch/arm64/smc_asm.S Normal file
View File

@@ -0,0 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <arch/asm.h>
ENTRY(smc)
/* W0, X1-X7 passed as arguments. Function ID is always W0. */
smc #0
ret /* X0 passed back as return value */
ENDPROC(smc)

View File

@@ -6,6 +6,9 @@
#include <boot/tables.h>
#include <bootmem.h>
#include <cbmem.h>
#include <console/console.h>
#include <smbios.h>
#include <string.h>
#include <symbols.h>
static void write_acpi_table(void)
@@ -18,10 +21,40 @@ static void write_acpi_table(void)
printk(BIOS_DEBUG, "ACPI tables: %ld bytes.\n", acpi_end - acpi_start);
}
static void write_smbios_table(void)
{
unsigned long smbios_begin, smbios_end;
#define MAX_SMBIOS_SIZE (32 * KiB)
smbios_begin = (unsigned long)cbmem_add(CBMEM_ID_SMBIOS, MAX_SMBIOS_SIZE);
if (!smbios_begin) {
printk(BIOS_ERR, "Out of memory for SMBIOS tables\n");
return;
}
/*
* Clear the entire region to ensure the unused space doesn't
* contain garbage from a previous boot, like stale table
* signatures that could be found by the OS.
*/
memset((void *)smbios_begin, 0, MAX_SMBIOS_SIZE);
smbios_end = smbios_write_tables(smbios_begin);
if (smbios_end > (smbios_begin + MAX_SMBIOS_SIZE))
printk(BIOS_ERR, "Increase SMBIOS size\n");
printk(BIOS_DEBUG, "SMBIOS tables: %ld bytes.\n", smbios_end - smbios_begin);
}
void arch_write_tables(uintptr_t coreboot_table)
{
if (CONFIG(HAVE_ACPI_TABLES))
write_acpi_table();
if (CONFIG(GENERATE_SMBIOS_TABLES))
write_smbios_table();
}
void bootmem_arch_add_ranges(void)

View File

@@ -3,7 +3,6 @@
#ifndef _VM_H
#define _VM_H
#include <string.h>
#include <stdint.h>
#include <arch/encoding.h>

View File

@@ -253,7 +253,6 @@ ramstage-$(CONFIG_ACPI_BERT) += acpi_bert_storage.c
ramstage-y += boot.c
ramstage-y += post.c
ramstage-y += c_start.S
ramstage-y += c_exit.S
ramstage-y += cpu.c
ramstage-y += cpu_common.c
ramstage-$(CONFIG_DEBUG_HW_BREAKPOINTS) += breakpoint.c

View File

@@ -12,7 +12,8 @@ static u16 acpi_sci_int(void)
ioapic_get_sci_pin(&gsi, &irq, &flags);
/* ACPI Release 6.5, 5.2.9 and 5.2.15.5. */
/* In systems without 8259, the SCI_INT field in the FADT contains the SCI GSI number
instead of the 8259 IRQ number */
if (!CONFIG(ACPI_HAVE_PCAT_8259))
return gsi;

View File

@@ -1,9 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <arch/boot/boot.h>
#include <arch/cpu.h>
#include <commonlib/helpers.h>
#include <console/console.h>
#include <mode_switch.h>
#include <program_loading.h>
#include <symbols.h>
#include <assert.h>
@@ -26,7 +26,7 @@ void arch_prog_run(struct prog *prog)
const uint32_t entry = pointer_to_uint32_safe(prog_entry(prog));
/* On x86 coreboot payloads expect to be called in protected mode */
protected_mode_jump(entry, arg);
protected_mode_call_1arg((void *)(uintptr_t)entry, arg);
#else
#if ENV_X86_64
void (*doit)(void *arg);

View File

@@ -1,36 +0,0 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <arch/ram_segs.h>
#include <cpu/x86/cr.h>
#if ENV_X86_64
/*
* Functions to handle mode switches from long mode to protected
* mode.
*/
.text
.code64
.section ".text.protected_mode_jump", "ax", @progbits
.globl protected_mode_jump
protected_mode_jump:
push %rbp
mov %rsp, %rbp
/* Arguments to stack */
push %rdi
push %rsi
#include <cpu/x86/64bit/exit32.inc>
movl -8(%ebp), %eax /* Function to call */
movl -16(%ebp), %ebx /* Argument 0 */
/* Align the stack */
andl $0xFFFFFFF0, %esp
subl $12, %esp
pushl %ebx /* Argument 0 */
jmp *%eax
#endif

View File

@@ -1,16 +0,0 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef X86_BOOT_H
#define X86_BOOT_H
#include <types.h>
/*
* Jump to function in protected mode.
* @arg func_ptr Function to jump to in protected mode
* @arg Argument to pass to called function
*
* @noreturn
*/
void protected_mode_jump(uint32_t func_ptr, uint32_t argument);
#endif /* X86_BOOT_H */

View File

@@ -1,10 +1,10 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <string.h>
#include <smbios.h>
#include <console/console.h>
#include <arch/cpu.h>
#include <cpu/x86/name.h>
#include <stdio.h>
static int smbios_cpu_vendor(u8 *start)
{
@@ -68,7 +68,7 @@ static int get_socket_type(void)
unsigned int __weak smbios_processor_family(struct cpuid_result res)
{
return (res.eax > 0) ? 0x0c : 0x6;
return (res.eax > 0) ? SMBIOS_PROCESSOR_FAMILY_PENTIUM_PRO : SMBIOS_PROCESSOR_FAMILY_INTEL486;
}
static size_t get_number_of_caches(size_t max_logical_cpus_sharing_cache)
@@ -126,7 +126,7 @@ int smbios_write_type4(unsigned long *current, int handle)
t->processor_manufacturer = smbios_cpu_vendor(t->eos);
t->processor_version = smbios_processor_name(t->eos);
t->processor_family = smbios_processor_family(res);
t->processor_type = 3; /* System Processor */
t->processor_type = SMBIOS_PROCESSOR_TYPE_CENTRAL;
/*
* If CPUID leaf 11 is available, calculate "core count" by dividing
* SMT_ID (logical processors in a core) by Core_ID (number of cores).

View File

@@ -1,7 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <console/vtxprintf.h>
#include <string.h>
#include <stdio.h>
struct vsnprintf_context {
char *str_buf;

View File

@@ -190,17 +190,26 @@ static void configure_c_states(struct device *dev)
/* C3 Interrupt Response Time Limit */
msr.hi = 0;
msr.lo = IRTL_VALID | IRTL_1024_NS | 0x50;
if (IS_IVY_CPU(cpu_get_cpuid()))
msr.lo = IRTL_VALID | IRTL_1024_NS | 0x3b;
else
msr.lo = IRTL_VALID | IRTL_1024_NS | 0x50;
wrmsr(MSR_PKGC3_IRTL, msr);
/* C6 Interrupt Response Time Limit */
msr.hi = 0;
msr.lo = IRTL_VALID | IRTL_1024_NS | 0x68;
if (IS_IVY_CPU(cpu_get_cpuid()))
msr.lo = IRTL_VALID | IRTL_1024_NS | 0x50;
else
msr.lo = IRTL_VALID | IRTL_1024_NS | 0x68;
wrmsr(MSR_PKGC6_IRTL, msr);
/* C7 Interrupt Response Time Limit */
msr.hi = 0;
msr.lo = IRTL_VALID | IRTL_1024_NS | 0x6D;
if (IS_IVY_CPU(cpu_get_cpuid()))
msr.lo = IRTL_VALID | IRTL_1024_NS | 0x57;
else
msr.lo = IRTL_VALID | IRTL_1024_NS | 0x6D;
wrmsr(MSR_PKGC7_IRTL, msr);
/* Primary Plane Current Limit (Icc) */

View File

@@ -100,6 +100,97 @@ void paging_disable_pae(void)
write_cr4(cr4);
}
/*
* Prepare PAE pagetables that identity map the whole 32-bit address space using
* 2 MiB pages. The PAT are set to all cacheable, but MTRRs still apply. CR3 is
* loaded and PAE is enabled by this function.
*
* Requires a scratch memory for pagetables.
*
* @param pgtbl Where pagetables reside, must be 4 KiB aligned and 20 KiB in
* size.
* Content at physical address isn't preserved.
* @return 0 on success, 1 on error
*/
int init_pae_pagetables(void *pgtbl)
{
struct pg_table *pgtbl_buf = (struct pg_table *)pgtbl;
struct pde *pd = pgtbl_buf->pd, *pdp = pgtbl_buf->pdp;
printk(BIOS_DEBUG, "%s: Using address %p for page tables\n",
__func__, pgtbl_buf);
/* Cover some basic error conditions */
if (!IS_ALIGNED((uintptr_t)pgtbl_buf, s4KiB)) {
printk(BIOS_ERR, "%s: Invalid alignment\n", __func__);
return 1;
}
paging_disable_pae();
/* Point the page directory pointers at the page directories. */
memset(pgtbl_buf->pdp, 0, sizeof(pgtbl_buf->pdp));
pdp[0].addr_lo = ((uintptr_t)&pd[512*0]) | PDPTE_PRES;
pdp[1].addr_lo = ((uintptr_t)&pd[512*1]) | PDPTE_PRES;
pdp[2].addr_lo = ((uintptr_t)&pd[512*2]) | PDPTE_PRES;
pdp[3].addr_lo = ((uintptr_t)&pd[512*3]) | PDPTE_PRES;
/* Identity map the whole 32-bit address space */
for (size_t i = 0; i < 2048; i++) {
pd[i].addr_lo = (i << PDE_IDX_SHIFT) | PDE_PS | PDE_PRES | PDE_RW;
pd[i].addr_hi = 0;
}
paging_enable_pae_cr3((uintptr_t)pdp);
return 0;
}
/*
* Map single 2 MiB page in pagetables created by init_pae_pagetables().
*
* The function does not check if the page was already non identity mapped,
* this allows callers to reuse one page without having to explicitly unmap it
* between calls.
*
* @param pgtbl Where pagetables created by init_pae_pagetables() reside.
* Content at physical address is preserved except for single
* entry corresponding to vmem_addr.
* @param paddr Physical memory address to map. Function prints a warning if
* it isn't aligned to 2 MiB.
* @param vmem_addr Where the virtual non identity mapped page resides, must
* be at least 2 MiB in size. Function prints a warning if it
* isn't aligned to 2 MiB.
* Content at physical address is preserved.
* @return 0 on success, 1 on error
*/
void pae_map_2M_page(void *pgtbl, uint64_t paddr, void *vmem_addr)
{
struct pg_table *pgtbl_buf = (struct pg_table *)pgtbl;
struct pde *pd;
if (!IS_ALIGNED(paddr, s2MiB)) {
printk(BIOS_WARNING, "%s: Aligning physical address to 2MiB\n",
__func__);
paddr = ALIGN_DOWN(paddr, s2MiB);
}
if (!IS_ALIGNED((uintptr_t)vmem_addr, s2MiB)) {
printk(BIOS_WARNING, "%s: Aligning virtual address to 2MiB\n",
__func__);
vmem_addr = (void *)ALIGN_DOWN((uintptr_t)vmem_addr, s2MiB);
}
/* Map a page using PAE at virtual address vmem_addr. */
pd = &pgtbl_buf->pd[((uintptr_t)vmem_addr) >> PDE_IDX_SHIFT];
pd->addr_lo = paddr | PDE_PS | PDE_PRES | PDE_RW;
pd->addr_hi = paddr >> 32;
/* Update page tables */
asm volatile ("invlpg (%0)" :: "b"(vmem_addr) : "memory");
}
/*
* Use PAE to map a page and then memset it with the pattern specified.
* In order to use PAE pagetables for virtual addressing are set up and reloaded
@@ -130,22 +221,18 @@ void paging_disable_pae(void)
int memset_pae(uint64_t dest, unsigned char pat, uint64_t length, void *pgtbl,
void *vmem_addr)
{
struct pg_table *pgtbl_buf = (struct pg_table *)pgtbl;
ssize_t offset;
const uintptr_t pgtbl_s = (uintptr_t)pgtbl;
const uintptr_t pgtbl_e = pgtbl_s + sizeof(struct pg_table);
printk(BIOS_DEBUG, "%s: Using virtual address %p as scratchpad\n",
__func__, vmem_addr);
printk(BIOS_DEBUG, "%s: Using address %p for page tables\n",
__func__, pgtbl_buf);
/* Cover some basic error conditions */
if (!IS_ALIGNED((uintptr_t)pgtbl_buf, s4KiB) ||
!IS_ALIGNED((uintptr_t)vmem_addr, s2MiB)) {
if (!IS_ALIGNED((uintptr_t)vmem_addr, s2MiB)) {
printk(BIOS_ERR, "%s: Invalid alignment\n", __func__);
return 1;
}
const uintptr_t pgtbl_s = (uintptr_t)pgtbl_buf;
const uintptr_t pgtbl_e = pgtbl_s + sizeof(struct pg_table);
if (OVERLAP(dest, dest + length, pgtbl_s, pgtbl_e)) {
printk(BIOS_ERR, "%s: destination overlaps page tables\n",
@@ -160,31 +247,12 @@ int memset_pae(uint64_t dest, unsigned char pat, uint64_t length, void *pgtbl,
return 1;
}
paging_disable_pae();
struct pde *pd = pgtbl_buf->pd, *pdp = pgtbl_buf->pdp;
/* Point the page directory pointers at the page directories. */
memset(pgtbl_buf->pdp, 0, sizeof(pgtbl_buf->pdp));
pdp[0].addr_lo = ((uintptr_t)&pd[512*0]) | PDPTE_PRES;
pdp[1].addr_lo = ((uintptr_t)&pd[512*1]) | PDPTE_PRES;
pdp[2].addr_lo = ((uintptr_t)&pd[512*2]) | PDPTE_PRES;
pdp[3].addr_lo = ((uintptr_t)&pd[512*3]) | PDPTE_PRES;
if (init_pae_pagetables(pgtbl))
return 1;
offset = dest - ALIGN_DOWN(dest, s2MiB);
dest = ALIGN_DOWN(dest, s2MiB);
/* Identity map the whole 32-bit address space */
for (size_t i = 0; i < 2048; i++) {
pd[i].addr_lo = (i << PDE_IDX_SHIFT) | PDE_PS | PDE_PRES | PDE_RW;
pd[i].addr_hi = 0;
}
/* Get pointer to PD that's not identity mapped */
pd = &pgtbl_buf->pd[((uintptr_t)vmem_addr) >> PDE_IDX_SHIFT];
paging_enable_pae_cr3((uintptr_t)pdp);
do {
const size_t len = MIN(length, s2MiB - offset);
@@ -192,11 +260,7 @@ int memset_pae(uint64_t dest, unsigned char pat, uint64_t length, void *pgtbl,
* Map a page using PAE at virtual address vmem_addr.
* dest is already 2 MiB aligned.
*/
pd->addr_lo = dest | PDE_PS | PDE_PRES | PDE_RW;
pd->addr_hi = dest >> 32;
/* Update page tables */
asm volatile ("invlpg (%0)" :: "b"(vmem_addr) : "memory");
pae_map_2M_page(pgtbl, dest, vmem_addr);
printk(BIOS_SPEW, "%s: Clearing %llx[%lx] - %zx\n", __func__,
dest + offset, (uintptr_t)vmem_addr + offset, len);
@@ -213,69 +277,6 @@ int memset_pae(uint64_t dest, unsigned char pat, uint64_t length, void *pgtbl,
return 0;
}
#if ENV_RAMSTAGE
void *map_2M_page(unsigned long page)
{
struct pde {
uint32_t addr_lo;
uint32_t addr_hi;
} __packed;
struct pg_table {
struct pde pd[2048];
struct pde pdp[512];
} __packed;
static struct pg_table pgtbl[CONFIG_MAX_CPUS]
__attribute__((aligned(4096)));
static unsigned long mapped_window[CONFIG_MAX_CPUS];
int index;
unsigned long window;
void *result;
int i;
index = cpu_index();
if (index < 0)
return MAPPING_ERROR;
window = page >> 10;
if (window != mapped_window[index]) {
paging_disable_pae();
if (window > 1) {
struct pde *pd, *pdp;
/* Point the page directory pointers at the page
* directories
*/
memset(&pgtbl[index].pdp, 0, sizeof(pgtbl[index].pdp));
pd = pgtbl[index].pd;
pdp = pgtbl[index].pdp;
pdp[0].addr_lo = ((uintptr_t)&pd[512*0])|1;
pdp[1].addr_lo = ((uintptr_t)&pd[512*1])|1;
pdp[2].addr_lo = ((uintptr_t)&pd[512*2])|1;
pdp[3].addr_lo = ((uintptr_t)&pd[512*3])|1;
/* The first half of the page table is identity mapped
*/
for (i = 0; i < 1024; i++) {
pd[i].addr_lo = ((i & 0x3ff) << 21) | 0xE3;
pd[i].addr_hi = 0;
}
/* The second half of the page table holds the mapped
* page
*/
for (i = 1024; i < 2048; i++) {
pd[i].addr_lo = ((window & 1) << 31)
| ((i & 0x3ff) << 21) | 0xE3;
pd[i].addr_hi = (window >> 1);
}
paging_enable_pae_cr3((uintptr_t)pdp);
}
mapped_window[index] = window;
}
if (window == 0)
result = (void *)(page << 21);
else
result = (void *)(0x80000000 | ((page & 0x3ff) << 21));
return result;
}
#endif
void paging_set_nxe(int enable)
{
msr_t msr = rdmsr(IA32_EFER);
@@ -340,177 +341,3 @@ int paging_enable_for_car(const char *pdpt_name, const char *pt_name)
return 0;
}
static void *get_pdpt_addr(void)
{
if (preram_symbols_available())
return _pdpt;
return (void *)(uintptr_t)read_cr3();
}
static uint64_t pde_pat_flags(int pat)
{
switch (pat) {
case PAT_UC:
return 0 | PDE_PCD | PDE_PWT;
case PAT_WC:
return 0 | 0 | PDE_PWT;
case PAT_WT:
return PDE_PAT | PDE_PCD | PDE_PWT;
case PAT_WP:
return PDE_PAT | 0 | PDE_PWT;
case PAT_WB:
return 0 | 0 | 0;
case PAT_UC_MINUS:
return 0 | PDE_PCD | 0;
default:
printk(BIOS_ERR, "PDE PAT defaulting to WB: %x\n", pat);
return pde_pat_flags(PAT_WB);
}
}
static uint64_t pde_page_flags(int pat)
{
uint64_t flags = PDE_PS | PDE_PRES | PDE_RW | PDE_A | PDE_D;
return flags | pde_pat_flags(pat);
}
static uint64_t pte_pat_flags(int pat)
{
switch (pat) {
case PAT_UC:
return 0 | PTE_PCD | PTE_PWT;
case PAT_WC:
return 0 | 0 | PTE_PWT;
case PAT_WT:
return PTE_PAT | PTE_PCD | PTE_PWT;
case PAT_WP:
return PTE_PAT | 0 | PTE_PWT;
case PAT_WB:
return 0 | 0 | 0;
case PAT_UC_MINUS:
return 0 | PTE_PCD | 0;
default:
printk(BIOS_ERR, "PTE PAT defaulting to WB: %x\n", pat);
return pte_pat_flags(PAT_WB);
}
}
static uint64_t pte_page_flags(int pat)
{
uint64_t flags = PTE_PRES | PTE_RW | PTE_A | PTE_D;
return flags | pte_pat_flags(pat);
}
/* Identity map an address. This function does not handle splitting or adding
* new pages to the page tables. It's assumed all the page tables are already
* seeded with the correct amount and topology. */
static int identity_map_one_page(uintptr_t base, size_t size, int pat,
int commit)
{
uint64_t (*pdpt)[4];
uint64_t pdpte;
uint64_t (*pd)[512];
uint64_t pde;
pdpt = get_pdpt_addr();
pdpte = (*pdpt)[(base >> PDPTE_IDX_SHIFT) & PDPTE_IDX_MASK];
/* No page table page allocation. */
if (!(pdpte & PDPTE_PRES))
return -1;
pd = (void *)(uintptr_t)(pdpte & PDPTE_ADDR_MASK);
/* Map in a 2MiB page. */
if (size == s2MiB) {
if (!commit)
return 0;
pde = base;
pde |= pde_page_flags(pat);
(*pd)[(base >> PDE_IDX_SHIFT) & PDE_IDX_MASK] = pde;
return 0;
}
if (size == s4KiB) {
uint64_t (*pt)[512];
uint64_t pte;
pde = (*pd)[(base >> PDE_IDX_SHIFT) & PDE_IDX_MASK];
/* No page table page allocation. */
if (!(pde & PDE_PRES)) {
printk(BIOS_ERR, "Cannot allocate page table for pde %p\n",
(void *)base);
return -1;
}
/* No splitting pages */
if (pde & PDE_PS) {
printk(BIOS_ERR, "Cannot split pde %p\n", (void *)base);
return -1;
}
if (!commit)
return 0;
pt = (void *)(uintptr_t)(pde & PDE_ADDR_MASK);
pte = base;
pte |= pte_page_flags(pat);
(*pt)[(base >> PTE_IDX_SHIFT) & PTE_IDX_MASK] = pte;
return 0;
}
return -1;
}
static int _paging_identity_map_addr(uintptr_t base, size_t size, int pat,
int commit)
{
while (size != 0) {
size_t map_size;
map_size = IS_ALIGNED(base, s2MiB) ? s2MiB : s4KiB;
map_size = MIN(size, map_size);
if (identity_map_one_page(base, map_size, pat, commit) < 0)
return -1;
base += map_size;
size -= map_size;
}
return 0;
}
static int paging_is_enabled(void)
{
return !!(read_cr0() & CR0_PG);
}
int paging_identity_map_addr(uintptr_t base, size_t size, int pat)
{
if (!paging_is_enabled()) {
printk(BIOS_ERR, "Paging is not enabled.\n");
return -1;
}
if (!IS_ALIGNED(base, s2MiB) && !IS_ALIGNED(base, s4KiB)) {
printk(BIOS_ERR, "base %p is not aligned.\n", (void *)base);
return -1;
}
if (!IS_ALIGNED(size, s2MiB) && !IS_ALIGNED(size, s4KiB)) {
printk(BIOS_ERR, "size %zx is not aligned.\n", size);
return -1;
}
/* First try without committing. If success commit. */
if (_paging_identity_map_addr(base, size, pat, 0))
return -1;
return _paging_identity_map_addr(base, size, pat, 1);
}

View File

@@ -11,6 +11,7 @@
#include <device/mmio.h>
#include <rmodule.h>
#include <smmstore.h>
#include <stdio.h>
#include <string.h>
#include <types.h>

View File

@@ -846,18 +846,18 @@ config VGA_BIOS_ID
depends on VGA_BIOS
default "1106,3230"
help
The comma-separated PCI vendor and device ID with optional revision if that
feature is enabled that would associate your vBIOS to your video card.
The comma-separated PCI vendor and device ID that would associate
your vBIOS to your video card.
Example: 1106,3230 or 1106,3230,a3
Example: 1106,3230
In the above example 1106 is the PCI vendor ID (in hex, but without
the "0x" prefix) and 3230 specifies the PCI device ID of the
video card (also in hex, without "0x" prefix). a3 specifies the revision.
video card (also in hex, without "0x" prefix).
This ID needs to match the PCI VID and DID in the VGA BIOS file's
header and also needs to match the value returned by map_oprom_vendev
or map_oprom_vendev_rev if the remapping feature is used.
if the remapping feature is used.
Under GNU/Linux you can run `lspci -nn` to list the IDs of your PCI devices.
@@ -879,23 +879,17 @@ config VGA_BIOS_SECOND_ID
string "Graphics device PCI IDs"
depends on VGA_BIOS_SECOND
help
The comma-separated PCI vendor and device ID with optional revision if that
feature is enabled that would associate your vBIOS to your video card.
The comma-separated PCI vendor and device ID that would associate
your vBIOS to your video card.
Example: 1106,3230 or 1106,3230,a3
Example: 1106,3230
In the above example 1106 is the PCI vendor ID (in hex, but without
the "0x" prefix) and 3230 specifies the PCI device ID of the
video card (also in hex, without "0x" prefix). a3 specifies the revision.
video card (also in hex, without "0x" prefix).
Under GNU/Linux you can run `lspci -nn` to list the IDs of your PCI devices.
config CHECK_REV_IN_OPROM_NAME
def_bool n
help
Select this in the platform BIOS or chipset if the option rom has a revision
that needs to be checked when searching CBFS.
config VGA_BIOS_DGPU
bool "Add a discrete VGA BIOS image"
depends on VGA_BIOS

View File

@@ -4,6 +4,7 @@
#include <console/console.h>
#include <device/device.h>
#include <device/pci_def.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <types.h>
@@ -776,7 +777,7 @@ void show_all_devs_resources(int debug_level, const char *msg)
}
}
const struct resource *fixed_resource_range_idx(struct device *dev, unsigned long index,
const struct resource *resource_range_idx(struct device *dev, unsigned long index,
uint64_t base, uint64_t size, unsigned long flags)
{
struct resource *resource;
@@ -785,8 +786,13 @@ const struct resource *fixed_resource_range_idx(struct device *dev, unsigned lon
resource = new_resource(dev, index);
resource->base = base;
resource->size = size;
resource->flags = IORESOURCE_FIXED | IORESOURCE_ASSIGNED;
if (flags & IORESOURCE_FIXED)
resource->size = size;
if (flags & IORESOURCE_BRIDGE)
resource->limit = base + size - 1;
resource->flags = IORESOURCE_ASSIGNED;
resource->flags |= flags;
printk(BIOS_SPEW, "dev: %s, index: 0x%lx, base: 0x%llx, size: 0x%llx\n",

View File

@@ -6,13 +6,13 @@
#include <device/pci.h>
#include <device/pci_ids.h>
#include <device/pci_ops.h>
#include <stdio.h>
#include <string.h>
#include <cbfs.h>
#include <cbmem.h>
#include <acpi/acpigen.h>
/* Rmodules don't like weak symbols. */
void __weak map_oprom_vendev_rev(u32 *vendev, u8 *rev) { return; }
u32 __weak map_oprom_vendev(u32 vendev) { return vendev; }
void vga_oprom_preload(void)
@@ -39,34 +39,26 @@ static void *cbfs_boot_map_optionrom(uint16_t vendor, uint16_t device)
return cbfs_map(name, NULL);
}
static void *cbfs_boot_map_optionrom_revision(uint16_t vendor, uint16_t device, uint8_t rev)
{
char name[20] = "pciXXXX,XXXX,XX.rom";
snprintf(name, sizeof(name), "pci%04hx,%04hx,%02hhx.rom", vendor, device, rev);
return cbfs_map(name, NULL);
}
struct rom_header *pci_rom_probe(const struct device *dev)
{
struct rom_header *rom_header = NULL;
struct pci_data *rom_data;
u8 rev = pci_read_config8(dev, PCI_REVISION_ID);
u8 mapped_rev = rev;
u32 vendev = (dev->vendor << 16) | dev->device;
u32 mapped_vendev = vendev;
/* If the ROM is in flash, then don't check the PCI device for it. */
if (CONFIG(CHECK_REV_IN_OPROM_NAME)) {
map_oprom_vendev_rev(&mapped_vendev, &mapped_rev);
rom_header = cbfs_boot_map_optionrom_revision(mapped_vendev >> 16,
mapped_vendev & 0xffff,
mapped_rev);
} else {
mapped_vendev = map_oprom_vendev(vendev);
rom_header = cbfs_boot_map_optionrom(mapped_vendev >> 16,
mapped_vendev & 0xffff);
mapped_vendev = map_oprom_vendev(vendev);
rom_header = cbfs_boot_map_optionrom(mapped_vendev >> 16, mapped_vendev & 0xffff);
/* Handle the case of VGA_BIOS_ID not being set to the remapped PCI ID. This is a
workaround that should be removed once the underlying issue is fixed. */
if (!rom_header && vendev != mapped_vendev) {
rom_header = cbfs_boot_map_optionrom(vendev >> 16, vendev & 0xffff);
if (rom_header) {
printk(BIOS_NOTICE, "VGA_BIOS_ID should be the remapped PCI ID "
"%04hx,%04hx in the VBIOS file\n",
mapped_vendev >> 16, mapped_vendev & 0xffff);
}
}
if (rom_header) {

View File

@@ -5,8 +5,8 @@
#include <commonlib/bsd/helpers.h>
#include <console/console.h>
#include <device/device.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "chip.h"

View File

@@ -3,7 +3,8 @@
#include <acpi/acpi_device.h>
#include <acpi/acpigen.h>
#include <device/device.h>
#include <string.h>
#include <stdio.h>
#include "chip.h"
#include <console/console.h>

View File

@@ -3,7 +3,7 @@
#include <acpi/acpi_device.h>
#include <acpi/acpigen.h>
#include <device/device.h>
#include <string.h>
#include <stdio.h>
#include "chip.h"

View File

@@ -6,6 +6,7 @@
#include <console/console.h>
#include <device/i2c_simple.h>
#include <device/device.h>
#include <stdio.h>
#include "chip.h"

View File

@@ -7,7 +7,8 @@
#include <device/i2c_simple.h>
#include <device/device.h>
#include <gpio.h>
#include <string.h>
#include <stdio.h>
#include "chip.h"
#if CONFIG(HAVE_ACPI_TABLES)

View File

@@ -4,7 +4,7 @@
#include <acpi/acpigen.h>
#include <console/console.h>
#include <device/device.h>
#include <string.h>
#include <stdio.h>
#include "chip.h"

View File

@@ -4,7 +4,7 @@
#include <acpi/acpigen.h>
#include <console/console.h>
#include <device/device.h>
#include <string.h>
#include <stdio.h>
#include "chip.h"

View File

@@ -4,7 +4,8 @@
#include <acpi/acpi_device.h>
#include <assert.h>
#include <device/device.h>
#include <string.h>
#include <stdio.h>
#include "chip.h"
#include <gpio.h>
#include <console/console.h>

View File

@@ -7,6 +7,7 @@
#include <device/device.h>
#include <identity.h>
#include <stdint.h>
#include <stdio.h>
#include <vendorcode/google/dsm_calib.h>
#include "chip.h"

View File

@@ -5,6 +5,7 @@
#include <console/console.h>
#include <device/i2c_simple.h>
#include <device/device.h>
#include <stdio.h>
#include "chip.h"

View File

@@ -6,6 +6,7 @@
#include <device/i2c.h>
#include <device/device.h>
#include <stdint.h>
#include <stdio.h>
#include <vendorcode/google/dsm_calib.h>
#include "chip.h"

View File

@@ -4,6 +4,8 @@
#include <acpi/acpigen.h>
#include <console/console.h>
#include <device/device.h>
#include <stdio.h>
#include "chip.h"
#define RT5645_ACPI_NAME "RT58"

View File

@@ -5,7 +5,8 @@
#include <console/console.h>
#include <device/i2c_simple.h>
#include <device/device.h>
#include <string.h>
#include <stdio.h>
#include "chip.h"
#define I2C_SX9310_ACPI_ID "STH9310"

View File

@@ -5,7 +5,8 @@
#include <console/console.h>
#include <device/i2c_simple.h>
#include <device/device.h>
#include <string.h>
#include <stdio.h>
#include "chip.h"
#define I2C_SX9324_ACPI_ID "STH9324"

View File

@@ -5,7 +5,8 @@
#include <console/console.h>
#include <device/i2c_simple.h>
#include <device/device.h>
#include <string.h>
#include <stdio.h>
#include "chip.h"
#define I2C_SX9360_ACPI_ID "STH9360"

View File

@@ -498,7 +498,7 @@ tpm_result_t tpm_vendor_init(struct tpm_chip *chip, unsigned int bus, uint32_t d
if (rc)
return rc;
printk(BIOS_DEBUG, "cr50 TPM 2.0 (i2c %u:0x%02x id %#x)\n",
printk(BIOS_DEBUG, "GSC TPM 2.0 (i2c %u:0x%02x id %#x)\n",
bus, dev_addr, did_vid >> 16);
if (tpm_first_access_this_boot()) {

View File

@@ -5,6 +5,7 @@
#include <console/console.h>
#include <device/device.h>
#include <intelblocks/pmc_ipc.h>
#include <stdio.h>
#include <soc/dptf.h>
#include <soc/pci_devs.h>
#include "chip.h"

View File

@@ -7,6 +7,8 @@
#pragma pack(push)
#include <efi/efi_datatype.h>
/**
* These includes are required to include headers that are missing in
* the FSP headers. Import order matter for the correct PiHob definition
@@ -24,7 +26,6 @@
* This file is a implementation specific header. i.e. different
* FSP implementations for different chipsets.
*/
#include <Base.h>
#include <FspmUpd.h>
#include <FspsUpd.h>
#if CONFIG(MRC_CACHE_USING_MRC_VERSION)

View File

@@ -77,7 +77,7 @@ bool fsp_is_multi_phase_init_enabled(void)
static void fsp_fill_common_arch_params(FSPS_UPD *supd)
{
#if CONFIG(FSPS_HAS_ARCH_UPD)
#if (CONFIG(FSPS_HAS_ARCH_UPD) && !CONFIG(PLATFORM_USES_FSP2_4))
FSPS_ARCHx_UPD *s_arch_cfg = &supd->FspsArchUpd;
s_arch_cfg->EnableMultiPhaseSiliconInit = fsp_is_multi_phase_init_enabled();
#endif

View File

@@ -8,6 +8,7 @@
#include <commonlib/fsp.h>
#include <console/console.h>
#include <fsp/util.h>
#include <stdio.h>
#include <string.h>
#include <types.h>
#include <assert.h>

View File

@@ -1,7 +1,8 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#include <acpi/acpigen.h>
#include <string.h>
#include <stdio.h>
#include "i915.h"
void

View File

@@ -79,6 +79,7 @@ static const struct device_operations pci_ish_device_ops = {
};
static const unsigned short pci_device_ids[] = {
PCI_DID_INTEL_PTL_ISHB,
PCI_DID_INTEL_LNL_ISHB,
PCI_DID_INTEL_MTL_ISHB,
PCI_DID_INTEL_CNL_ISHB,

View File

@@ -9,6 +9,8 @@
#include <device/i2c_simple.h>
#include <device/device.h>
#include <device/pci_def.h>
#include <stdio.h>
#include "chip.h"
#define CSI2_DATA_STREAM_INTERFACE_GUID \

View File

@@ -7,6 +7,7 @@
#include <console/console.h>
#include <drivers/usb/acpi/chip.h>
#include <intelblocks/acpi.h>
#include <stdio.h>
#include "chip.h"

View File

@@ -7,7 +7,8 @@
#include <device/device.h>
#include <drivers/usb/acpi/chip.h>
#include <gpio.h>
#include <string.h>
#include <stdio.h>
#include "chip.h"
#include "retimer.h"

View File

@@ -21,14 +21,13 @@ struct panel_serializable_data IVO_T109NW41 = {
.init = {
PANEL_DELAY(60),
PANEL_DCS(0xB9, 0x83, 0x10, 0x21, 0x55, 0x00),
PANEL_DCS(0xB1, 0x2C, 0xED, 0xED, 0x27, 0xE7, 0x42, 0xF5, 0x39,
PANEL_DCS(0xB1, 0x2C, 0xED, 0xED, 0x0F, 0xCF, 0x42, 0xF5, 0x39,
0x36, 0x36, 0x36, 0x36, 0x32, 0x8B, 0x11, 0x65, 0x00, 0x88,
0xFA, 0xFF, 0xFF, 0x8F, 0xFF, 0x08, 0xD6, 0x33),
PANEL_DCS(0xB2, 0x00, 0x47, 0xB0, 0x80, 0x00, 0x12, 0x71, 0x3C,
0xA3, 0x22, 0x20, 0x00, 0x00, 0x88, 0x01),
PANEL_DCS(0xB4, 0x35, 0x35, 0x43, 0x43, 0x35, 0x35, 0x30, 0x7A,
0x30, 0x7A, 0x01, 0x9D),
PANEL_DCS(0xB6, 0x34, 0x34, 0x03),
PANEL_DCS(0xE9, 0xCD),
PANEL_DCS(0xBA, 0x84),
PANEL_DCS(0xE9, 0x3F),
@@ -40,6 +39,9 @@ struct panel_serializable_data IVO_T109NW41 = {
PANEL_DCS(0xE9, 0xCC),
PANEL_DCS(0xC7, 0x80),
PANEL_DCS(0xE9, 0x3F),
PANEL_DCS(0xE9, 0xD3),
PANEL_DCS(0xC7, 0x22),
PANEL_DCS(0xE9, 0x3F),
PANEL_DCS(0xE9, 0xC6),
PANEL_DCS(0xC8, 0x97),
PANEL_DCS(0xE9, 0x3F),
@@ -56,19 +58,25 @@ struct panel_serializable_data IVO_T109NW41 = {
0x00, 0x02, 0x00, 0x02, 0x00, 0x00),
PANEL_DCS(0xD5, 0x25, 0x24, 0x25, 0x24, 0x18, 0x18, 0x18, 0x18,
0x07, 0x06, 0x07, 0x06, 0x05, 0x04, 0x05, 0x04, 0x03, 0x02,
0x03, 0x02, 0x01, 0x00, 0x01, 0x00, 0xA8, 0xA8, 0xA8, 0xA8,
0x29, 0x29, 0x29, 0x29, 0x21, 0x20, 0x21, 0x20, 0x18, 0x18,
0x03, 0x02, 0x01, 0x00, 0x01, 0x00, 0x1E, 0x1E, 0x1E, 0x1E,
0x1F, 0x1F, 0x1F, 0x1F, 0x21, 0x20, 0x21, 0x20, 0x18, 0x18,
0x18, 0x18, 0x18, 0x18, 0x18, 0x18),
PANEL_DCS(0xD8, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xA0, 0xAA, 0xAA,
0xAA, 0xAA, 0xAA, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00),
PANEL_DCS(0xE0, 0x04, 0X04, 0X06, 0X0A, 0X0A, 0X05, 0X12, 0X14,
0X17, 0X13, 0X2C, 0X33, 0X39, 0X4B, 0X4C, 0X56, 0X61, 0X78,
0X7A, 0X41, 0X50, 0X68, 0X73, 0X04, 0X04, 0X06, 0X0A, 0X0A,
0X05, 0X12, 0X14, 0X17, 0X13, 0X2C, 0X33, 0X39, 0X4B, 0X4C,
0X56, 0X61, 0X78, 0X7A, 0X41, 0X50, 0X68, 0X73),
PANEL_DCS(0xE7, 0x07, 0x10, 0x10, 0x1A, 0x26, 0x9E, 0x00, 0x4F,
0xA0, 0x14, 0x14, 0x00, 0x00, 0x00, 0x00, 0x12, 0x0A, 0x02,
0x02, 0x00, 0x33, 0x02, 0x04, 0x18, 0x01),
PANEL_DCS(0xBD, 0x01),
PANEL_DCS(0xB1, 0x01, 0x7F, 0x11, 0xFD),
PANEL_DCS(0xCB, 0x86),
PANEL_DCS(0xD3, 0x00, 0X00, 0X04, 0X00, 0X00),
PANEL_DCS(0xD8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xA0,
0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xA0, 0x00, 0x00, 0x00, 0x00,
@@ -94,6 +102,7 @@ struct panel_serializable_data IVO_T109NW41 = {
PANEL_DCS(0xE9, 0x3F),
PANEL_DCS(0xE1, 0x00),
PANEL_DCS(0xBD, 0x00),
PANEL_DCS(0xD2, 0xFF, 0XFF, 0XFF, 0XFF, 0XFF, 0XFF),
PANEL_DCS(0xE9, 0xC4),
PANEL_DCS(0xBA, 0x96),
PANEL_DCS(0xE9, 0x3F),

View File

@@ -6,7 +6,8 @@
#include <device/device.h>
#include <device/spi.h>
#include <spi-generic.h>
#include <string.h>
#include <stdio.h>
#include "chip.h"
static int spi_acpi_get_bus(const struct device *dev)

View File

@@ -6,6 +6,7 @@
#include <delay.h>
#include <cpu/x86/mp.h>
#include <timer.h>
#include <stdio.h>
#include <string.h>
#include <soc/soc_util.h>
#include <soc/util.h>

View File

@@ -6,7 +6,8 @@
#include <device/device.h>
#include <device/spi.h>
#include <spi-generic.h>
#include <string.h>
#include <stdio.h>
#include "chip.h"
static int spi_acpi_get_bus(const struct device *dev)

View File

@@ -3,7 +3,8 @@
#include <acpi/acpi_device.h>
#include <acpi/acpigen.h>
#include <console/console.h>
#include <string.h>
#include <stdio.h>
#include "chip.h"
static bool uart_acpi_add_gpios_to_crs(struct drivers_uart_acpi_config *config)

View File

@@ -1,7 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <stdint.h>
#include <stddef.h>
#include <device/pci_ops.h>
#include <console/uart.h>
#include <device/pci.h>

Some files were not shown because too many files have changed in this diff Show More