diff options
author | Felix Held <felix-coreboot@felixheld.de> | 2022-11-04 19:09:20 +0100 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-11-04 18:46:53 +0000 |
commit | c8f25e0c0551821554b96c449b6323de8a14a030 (patch) | |
tree | ac2fd31643cfa67e6f7b42737cf01ec72c3fc318 | |
parent | 0925bdaeb2f0d32d8890c9b0fafbb5fed9c9c4a3 (diff) |
Revert "drivers/ocp/ewl: Add EWL driver for EWL type 3 error handling"
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>
-rw-r--r-- | src/drivers/ocp/ewl/Kconfig | 5 | ||||
-rw-r--r-- | src/drivers/ocp/ewl/Makefile.inc | 1 | ||||
-rw-r--r-- | src/drivers/ocp/ewl/ewl.c | 58 | ||||
-rw-r--r-- | src/drivers/ocp/ewl/ocp_ewl.h | 10 |
4 files changed, 0 insertions, 74 deletions
diff --git a/src/drivers/ocp/ewl/Kconfig b/src/drivers/ocp/ewl/Kconfig deleted file mode 100644 index 3c3b82dedc..0000000000 --- a/src/drivers/ocp/ewl/Kconfig +++ /dev/null @@ -1,5 +0,0 @@ -config OCP_EWL - bool - default n - help - It implements checking FSP Enhanced Warning Log Hob. diff --git a/src/drivers/ocp/ewl/Makefile.inc b/src/drivers/ocp/ewl/Makefile.inc deleted file mode 100644 index 43112e94f1..0000000000 --- a/src/drivers/ocp/ewl/Makefile.inc +++ /dev/null @@ -1 +0,0 @@ -romstage-$(CONFIG_OCP_EWL) += ewl.c diff --git a/src/drivers/ocp/ewl/ewl.c b/src/drivers/ocp/ewl/ewl.c deleted file mode 100644 index d70a23f135..0000000000 --- a/src/drivers/ocp/ewl/ewl.c +++ /dev/null @@ -1,58 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ - -#include <soc/soc_util.h> -#include <lib.h> -#include "ocp_ewl.h" - -static void process_ewl_type3(EWL_ENTRY_HEADER *header, EWL_ENTRY_MEMORY_LOCATION memory_location) -{ - /* Treat warning as type 3, collect basic information and print to serial log */ - EWL_ENTRY_TYPE3 *basic_warning; - basic_warning = (EWL_ENTRY_TYPE3 *)header; - printk(BIOS_ERR, "Major Warning Code = 0x%02x, Minor Warning Code = 0x%02x,\n", - basic_warning->Context.MajorWarningCode, - basic_warning->Context.MinorWarningCode); - printk(BIOS_ERR, "Major Checkpoint: 0x%02x\n", basic_warning->Context.MajorCheckpoint); - printk(BIOS_ERR, "Minor Checkpoint: 0x%02x\n", basic_warning->Context.MinorCheckpoint); - - if (memory_location.Socket != 0xff) - printk(BIOS_ERR, "Socket %d\n", memory_location.Socket); - if (memory_location.Channel != 0xff) - printk(BIOS_ERR, "Channel %d\n", memory_location.Channel); - if (memory_location.Dimm != 0xff) - printk(BIOS_ERR, "Dimm %d\n", memory_location.Dimm); - if (memory_location.Rank != 0xff) - printk(BIOS_ERR, "Rank %d\n", memory_location.Rank); -} - -void get_ewl(void) -{ - const EWL_PRIVATE_DATA *hob = get_ewl_hob(); - int offset = 0; - bool type3_flag = 0; - EWL_ENTRY_HEADER *warning_header; - printk(BIOS_DEBUG, "Number of EWL entries %d\n", hob->numEntries); - while (offset < hob->status.Header.FreeOffset) { - warning_header = (EWL_ENTRY_HEADER *) &(hob->status.Buffer[offset]); - if (warning_header->Type == EwlType3) { - printk(BIOS_ERR, "EWL type: %d\n", warning_header->Type); - if (warning_header->Size != sizeof(EWL_ENTRY_TYPE3)) { - printk(BIOS_ERR, "EWL type3 size mismatch!\n"); - return; - } - EWL_ENTRY_TYPE3 *type3; - type3 = (EWL_ENTRY_TYPE3 *)warning_header; - process_ewl_type3(warning_header, type3->MemoryLocation); - type3_flag = 1; - } else { - printk(BIOS_DEBUG, "EWL type: %d size:%d severity level:%d\n", - warning_header->Type, - warning_header->Size, - warning_header->Severity); - hexdump(&(hob->status.Buffer[offset]), warning_header->Size); - } - offset += warning_header->Size; - } - if (type3_flag) - die("Memory Training Error!\n"); -} diff --git a/src/drivers/ocp/ewl/ocp_ewl.h b/src/drivers/ocp/ewl/ocp_ewl.h deleted file mode 100644 index 38d5286d36..0000000000 --- a/src/drivers/ocp/ewl/ocp_ewl.h +++ /dev/null @@ -1,10 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ - -#ifndef __OCP_EWL_H -#define __OCP_EWL_H - -#include <soc/soc_util.h> - -void get_ewl(void); - -#endif |