summaryrefslogtreecommitdiff
path: root/src/drivers/ocp
AgeCommit message (Collapse)Author
2024-01-24driver/intel to /driver/ocp: Rename Makefiles from .inc to .mkMartin Roth
The .inc suffix is confusing to various tools as it's not specific to Makefiles. This means that editors don't recognize the files, and don't open them with highlighting and any other specific editor functionality. This issue is also seen in the release notes generation script where Makefiles get renamed before running cloc. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: Id47a5ef3c53f767d1e03c788e0022d05b21f5c28 Reviewed-on: https://review.coreboot.org/c/coreboot/+/80079 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
2023-12-13drivers/ipmi to lib: Fix misspellings & capitalization issuesMartin Roth
Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I926ec4c1c00339209ef656995031026935e52558 Reviewed-on: https://review.coreboot.org/c/coreboot/+/77637 Reviewed-by: Eric Lai <ericllai@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-08-06drivers: Add SPDX license headers to MakefilesMartin Roth
To help identify the licenses of the various files contained in the coreboot source, we've added SPDX headers to the top of all of the .c and .h files. This extends that practice to Makefiles. Any file in the coreboot project without a specific license is bound to the license of the overall coreboot project, GPL Version 2. This patch adds the GPL V2 license identifier to the top of all makefiles in the drivers directory that don't already have an SPDX license line at the top. Signed-off-by: Martin Roth <gaumless@gmail.com> Change-Id: I8442bc18ce228eca88a084660be84bcd1c5de928 Reviewed-on: https://review.coreboot.org/c/coreboot/+/68980 Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com> Reviewed-by: Tim Crawford <tcrawford@system76.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2023-06-01drivers/ocp/vpd: Overwrite Linux payload's kernel command via VPDJohnny Lin
Add a new Kconfig LINUXPAYLOAD_CMDLINE_VPD_OVERWRITE that can overwrite Linux payload's kernel command line from VPD. Currently only overwrite Linux kernel command line 'loglevel' via VPD key 'kernel_log_level'. TESTED=On OCP Delta Lake, with kernel_log_level set to 0, warm reboot time can see about 10 seconds improvement comparing to kernel log level 7. Change-Id: Idf06c7ab9958c940fc3b23d560bb9dade991a6da Signed-off-by: Johnny Lin <johnny_lin@wiwynn.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/75510 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: David Hendricks <david.hendricks@gmail.com>
2023-05-23drivers/ocp/ewl: Enforce MRC when there's EWL type3 errorJohnny Lin
If Fastboot is enabled, the next boot will skip MRC and won't be able to detect MRC error via EWL and still continues booting. Enforce FSP MRC training in the next boot. Change-Id: I9dee0472f8e2602cecf88c6d00dec0bf02b9f7bd Signed-off-by: Johnny Lin <johnny_lin@wiwynn.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/69148 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2023-05-22drivers/ocp/ewl: Add sending Meta's BMC SEL for memory training errorShelly Chang
Add sending Meta's BMC SEL for memory training error occurred in EWL type 3 error. The detail definition of EWL (Enhanced Warning Log) can be found in the specification document -- BIOS Data ACPI Table (BDAT) Interface Specification v4.0 Draft 5: https://uefi.org/sites/default/files/resources/BDAT%20Specification%20v4.0%20Draft5_0.pdf Change-Id: I664e9d3da7910b47260881c0df64159c8dbe2dca Signed-off-by: Shelly Chang <Shelly_Chang@wiwynn.com> Signed-off-by: Johnny Lin <johnny_lin@wiwynn.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/69147 Reviewed-by: Jonathan Zhang <jon.zhixiong.zhang@gmail.com> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-05-12drivers/ocp/ewl: Add EWL driver for EWL type 3 error handlingJohnny Lin
1. Restore the reverted 'commit 059902882ce5 ("drivers/ocp/ewl: Add EWL driver for EWL type 3 error handling")'. 2. Print more EWL type 3 error information when it occurs. Change-Id: Ib83b7653a839d18a065b929127549acd10bce7a7 Signed-off-by: Johnny Lin <johnny_lin@wiwynn.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/69280 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jonathan Zhang <jon.zhixiong.zhang@gmail.com>
2023-02-16drivers/ocp/vpd: Override mainboard_set_smm_log_levelJohnny Lin
VPD variable 'smm_log_level' can be read and passed to SMM for overriding SMM log level. By default it's zero therefore it disables most of the SMM log. When we need to see SMM log we can set this VPD to a larger value to enable it. Implement mainboard_set_smm_log_level() that reads VPD variables for SMM log level. Change-Id: I90d471d1d070d9a0f1a82ca9da8a2c034c9fd574 Signed-off-by: Johnny Lin <johnny_lin@wiwynn.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/71992 Reviewed-by: Marc Jones <marc@marcjonesconsulting.com> Reviewed-by: David Hendricks <david.hendricks@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jonathan Zhang <jonzhang@fb.com>
2023-02-08drivers/ocp, mb/ocp/deltalake: move get_loglevel_from_vpd functionJohnny Lin
Move get_loglevel_from_vpd from mb/ocp/deltalake to driver drivers/ocp/vpd/loglevel_vpd.c. Change-Id: I70af1051f63c527fd8150f5ecbe4765b4aaacd20 Signed-off-by: Johnny Lin <johnny_lin@wiwynn.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/71936 Reviewed-by: David Hendricks <david.hendricks@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2023-01-11drivers/ocp/vpd: add get_cxl_mode_from_vpd()Johnny Lin
cxl_mode VPD variable supports 3 modes: CXL_DISABLED, CXL_SYSTEM_MEMORY and CXL_SPM. Change-Id: Ib3bf85fbe687680db3c11efa908c4fb351be9c44 Signed-off-by: Johnny Lin <johnny_lin@wiwynn.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/71100 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jonathan Zhang <jonzhang@fb.com> Reviewed-by: David Hendricks <david.hendricks@gmail.com>
2022-12-22drivers/ocp: add VPD processing frameworkJonathan Zhang
Add VPD processing framework to be shared by OCP mainboards: * define VPD configuration items in vpd.h. * add helper functions: ** get_bool_from_vpd() ** get_int_from_vpd_range() Change-Id: I705bea348b1611f25ccbd798b77cfee22ec30f0f Signed-off-by: Johnny Lin <johnny_lin@wiwynn.com> Signed-off-by: Tim Chu <Tim.Chu@quantatw.com> Signed-off-by: Marc Jones <marcjones@sysproconsulting.com> Signed-off-by: Jonathan Zhang <jonzhang@meta.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/68784 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: David Hendricks <david.hendricks@gmail.com>
2022-11-22drivers/ocp/dmi: move smbios_ec_revision to ocp folderJonathan Zhang
Move smbios_ec_revision to ocp folder so that all ocp boards share the same function without implementing again. TESTED=Execute "dmidecode -t 0" to check corresponding field. Signed-off-by: Tim Chu <Tim.Chu@quantatw.com> Signed-off-by: Jonzhang Zhang <jonzhang@meta.com> Change-Id: I898662b78d3dbab1861cee6f1b6e148297a5d11b Reviewed-on: https://review.coreboot.org/c/coreboot/+/68785 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Marc Jones <marc@marcjonesconsulting.com> Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-11-04Revert "drivers/ocp/ewl: Add EWL driver for EWL type 3 error handling"Felix Held
This reverts commit 059902882ce56502124375c9395ebe8b49640710. A dependency of the previous patch that added the get_ewl_hob function used by this patch was missing, so this patch needs to be temporary reverted to revert the patch that breaks the build due to the missing dependency. Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: Idb2fa27e75eede1648ddbf82c8bfbeeb2e9220a6 Reviewed-on: https://review.coreboot.org/c/coreboot/+/69228 Reviewed-by: Tim Crawford <tcrawford@system76.com> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com> Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com> Reviewed-by: Jason Glenesk <jason.glenesk@amd.corp-partner.google.com> Tested-by: Patrick Georgi <patrick@coreboot.org> Reviewed-by: Patrick Georgi <patrick@coreboot.org>
2022-11-04drivers/ocp/ewl: Add EWL driver for EWL type 3 error handlingShelly Chang
Add EWL (Enhanced Warning Log) driver which handles Intel EWL HOB and prints EWL type 3 primarily associated with MRC training failures. Change-Id: Ibd5b521bafd457505db4147c5d3fe41364a09045 Signed-off-by: Shelly Chang <Shelly_Chang@wiwynn.com> Signed-off-by: Johnny Lin <johnny_lin@wiwynn.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/69145 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Jonathan Zhang <jonzhang@fb.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-10-22cpu/x86/mp_init: use cb_err as status return type in remaining functionsFelix Held
Using cb_err as return type of mp_run_on_aps, mp_run_on_all_aps, mp_run_on_all_cpus and mp_park_aps clarifies the meaning of the different return values. This patch also adds the types.h include that provides the definition of the cb_err enum and checks the return value of all 4 functions listed above against the enum values instead of either checking if it's non-zero or less than zero to handle the error case. Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: I4b3f03415a041d3ec9cd0e102980e53868b004b0 Reviewed-on: https://review.coreboot.org/c/coreboot/+/58494 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Raul Rangel <rrangel@chromium.org>
2021-01-18drivers/ocp/dmi/Kconfig: Set FRU_DEVICE_ID depend on OCP_DMIElyes HAOUAS
This will remove "CONFIG_FRU_DEVICE_ID=0" from ".config" when unused. Change-Id: Ic50de165c1f3de3886d3cd1ae66853c9fad35ed2 Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/49571 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2020-10-30soc/intel/xeon_sp: Move read_msr_ppin() to common util.cMarc Jones
Move CPX and SKX read_msr_ppin() to common util.c file. Update drivers/ocp/smbios #include to match. Change-Id: I4c4281d2d5ce679f5444a502fa88df04de9f2cd8 Signed-off-by: Marc Jones <marcjones@sysproconsulting.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/46479 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jay Talbott <JayTalbott@sysproconsulting.com> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2020-07-04drivers/ocp/dmi: Add OCP_DMI driver for populating SMBIOS from IPMI FRU dataJohnny Lin
It implements the SMBIOS IPMI FRU mapping table defined in https://www.opencompute.org/documents/facebook-xeon-motherboard-v31 22.3 SMBIOS FRU mapping table. Mainboard needs to configure the correct values for FRU_DEVICE_ID and BMC_KCS_BASE. For type 11 string 1 to 6 are common and implemented in this driver, the rest are project dependent and can be added in the mainboard code. Tested on OCP Tioga Pass. Change-Id: I08c958dfad83216cd12545760a19d205efc2515b Signed-off-by: Johnny Lin <johnny_lin@wiwynn.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/40308 Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com> Reviewed-by: Jonathan Zhang <jonzhang@fb.com> Reviewed-by: Christian Walter <christian.walter@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>