aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/elog/elog_internal.h
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@chromium.org>2012-10-10 14:34:49 -0700
committerRonald G. Minnich <rminnich@gmail.com>2012-11-12 17:09:39 +0100
commit215f27856399b1e4cfe30268fad61bf821af3c19 (patch)
tree9179097ffc1a39aac4d110296e586a83b958ee40 /src/drivers/elog/elog_internal.h
parent23b0053586974e0db70349a272d8cc09167fb4cb (diff)
ELOG: Support for non-memory mapped flash
If the event log is stored in flash that is not memory mapped then it must use the SPI controller to read from the flash device instead of relying on memory accesses. In addition a new CBMEM ID is added to keep an resident copy of the ELOG around if needed. The use of CBMEM for this is guarded by a new CONFIG_ELOG_CBMEM config option. This CBMEM buffer is created and filled late in the process when the SMBIOS table is being created because CBMEM is not functional when ELOG is first initialized. The downside to using CBMEM is that events added via the SMI handler at runtime are not reflected in the CBMEM copy because I don't want to let the SMM handler write to memory outside the TSEG region. In reality the only time we add runtime events is at kernel shutdown so the impact is limited. Test: 1) Test with CONFIG_ELOG_CBMEM enabled to ensure the event log is operational and SMBIOS points to address in CBMEM. The test should involve at least on reboot to ensure that the kernel is able to write events as well. > mosys -l smbios info log | grep ^address address | 0xacedd000 > mosys eventlog list 0 | 2012-10-10 14:02:46 | Log area cleared | 4096 1 | 2012-10-10 14:02:46 | System boot | 478 2 | 2012-10-10 14:02:46 | System Reset 3 | 2012-10-10 14:03:33 | Kernel Event | Clean Shutdown 4 | 2012-10-10 14:03:34 | System boot | 479 5 | 2012-10-10 14:03:34 | System Reset 2) Test with CONFIG_ELOG_CBMEM disabled to ensure the event log is operational and SMBIOS points to memory mapped flash. The test should involve at least on reboot to ensure that the kernel is able to write events as well. > mosys -l smbios info log | grep ^address address | 0xffbf0000 > mosys eventlog list 0 | 2012-10-10 14:33:17 | Log area cleared | 4096 1 | 2012-10-10 14:33:18 | System boot | 480 2 | 2012-10-10 14:33:18 | System Reset 3 | 2012-10-10 14:33:35 | Kernel Event | Clean Shutdown 4 | 2012-10-10 14:33:36 | System boot | 481 5 | 2012-10-10 14:33:36 | System Reset Change-Id: I87755d5291ce209c1e647792227c433dc966615d Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: http://review.coreboot.org/1776 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src/drivers/elog/elog_internal.h')
-rw-r--r--src/drivers/elog/elog_internal.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/drivers/elog/elog_internal.h b/src/drivers/elog/elog_internal.h
index 6d9a0d4bb5..f6aa051007 100644
--- a/src/drivers/elog/elog_internal.h
+++ b/src/drivers/elog/elog_internal.h
@@ -78,8 +78,9 @@ struct elog_descriptor {
elog_header_state header_state;
elog_event_buffer_state event_buffer_state;
struct elog_header *staging_header;
- void *backing_store;
+ void *backing_store;
u8 *data;
+ u32 flash_base;
u16 total_size;
u16 data_size;
u16 next_event_offset;