summaryrefslogtreecommitdiff
path: root/src/drivers/elog/elog_internal.h
diff options
context:
space:
mode:
authorRicardo Quesada <ricardoq@google.com>2021-07-16 16:42:59 -0700
committerPaul Fagerburg <pfagerburg@chromium.org>2021-08-04 15:15:55 +0000
commitd45e70c124b9904c7a7d13aad32de99206714d7b (patch)
tree7395793fa13be8d08dcf8911293c109002a29d11 /src/drivers/elog/elog_internal.h
parent470ca5714f523517087099317ba08ef5fe532ddc (diff)
Move elog_internal.h to commonlib/bsd/include
Move elog_internal.h to commonlib/bsd/include/bsd/. And rename it from elog_internal.h to elog.h. Since this file will be included from util/ it also converts the "uNN" types into "uintNN_t" types. The two defines that are not used by util/ are moved to drivers/elog/elog.c, the only file that includes them. Move also the function elog_verify_header() from drivers/elog/, to commonlib/bsd/elog.c since this function will be called from util/ as well. The rationale behind moving elog's defines & structs to commonlib/bsd/include is to make them available to util/ tools and/or payloads (should it be needed in the future). The files that are being relicensed to BSD were coded by Duncan Laurie, and he is Ok with the relicense. BUG=b:172210863 Signed-off-by: Ricardo Quesada <ricardoq@google.com> Change-Id: Ia1aefea705ddd417a1d9e978bb18ab6d9a60cad6 Reviewed-on: https://review.coreboot.org/c/coreboot/+/56404 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Diffstat (limited to 'src/drivers/elog/elog_internal.h')
-rw-r--r--src/drivers/elog/elog_internal.h35
1 files changed, 0 insertions, 35 deletions
diff --git a/src/drivers/elog/elog_internal.h b/src/drivers/elog/elog_internal.h
deleted file mode 100644
index 6be482b1f7..0000000000
--- a/src/drivers/elog/elog_internal.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0-only */
-
-#ifndef ELOG_INTERNAL_H_
-#define ELOG_INTERNAL_H_
-
-/* ELOG header */
-struct elog_header {
- u32 magic;
- u8 version;
- u8 header_size;
- u8 reserved[2];
-} __packed;
-
-/* ELOG related constants */
-#define ELOG_SIGNATURE 0x474f4c45 /* 'ELOG' */
-#define ELOG_VERSION 1
-#define ELOG_MIN_AVAILABLE_ENTRIES 2 /* Shrink when this many can't fit */
-#define ELOG_SHRINK_PERCENTAGE 25 /* Percent of total area to remove */
-
-/* SMBIOS event log header */
-struct event_header {
- u8 type;
- u8 length;
- u8 year;
- u8 month;
- u8 day;
- u8 hour;
- u8 minute;
- u8 second;
-} __packed;
-
-/* SMBIOS Type 15 related constants */
-#define ELOG_HEADER_TYPE_OEM 0x88
-
-#endif /* ELOG_INTERNAL_H_ */