These Kconfig options provided a level of configurability that is almost never necessary, so they are being moved into ordinary preprocessor defines in elog_internal.h. The new threshold to trigger shrinking is relative to the number of additional (maximum-size) events that can fit, and the new target post-shrink size is a percentage of the total ELOG area size. BUG=chromium:467820 TEST=Add loop at the end of elog_init() that fills the ELOG area to just below full_threshold with dummy events. Observe successful shrinkage when the next event is logged. BRANCH=None Change-Id: I414c4955a2d819d112ae4f0c7d3571576f732336 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: ce439361e3954a2bf5186292f96936329171cf56 Original-Change-Id: I926097f86262888dcdd47d73fba474bb2e19856a Original-Signed-off-by: Sol Boucher <solb@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/260501 Original-Reviewed-by: Duncan Laurie <dlaurie@chromium.org> Original-Reviewed-by: Stefan Reinauer <reinauer@chromium.org> Reviewed-on: http://review.coreboot.org/9869 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
84 lines
2.6 KiB
Text
84 lines
2.6 KiB
Text
##
|
|
## This file is part of the coreboot project.
|
|
##
|
|
## Copyright (C) 2012 The Chromium OS Authors. All rights reserved.
|
|
##
|
|
## This program is free software; you can redistribute it and/or modify
|
|
## it under the terms of the GNU General Public License as published by
|
|
## the Free Software Foundation; version 2 of the License.
|
|
##
|
|
## This program is distributed in the hope that it will be useful,
|
|
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
## GNU General Public License for more details.
|
|
##
|
|
## You should have received a copy of the GNU General Public License
|
|
## along with this program; if not, write to the Free Software
|
|
## Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
##
|
|
|
|
config ELOG
|
|
depends on SPI_FLASH
|
|
bool "Support for flash based event log"
|
|
default n
|
|
help
|
|
Enable support for flash based event logging.
|
|
|
|
if ELOG
|
|
|
|
config ELOG_DEBUG
|
|
bool "Enable debug output for event logging"
|
|
default n
|
|
|
|
config ELOG_FLASH_BASE
|
|
hex "Event log offset into flash"
|
|
default 0
|
|
help
|
|
Offset into the flash chip for the ELOG block.
|
|
This should be allocated in the FMAP.
|
|
|
|
config ELOG_AREA_SIZE
|
|
hex "Size of Event Log area in flash"
|
|
default 0x1000
|
|
help
|
|
This should be a multiple of flash block size.
|
|
|
|
Default is 4K.
|
|
|
|
config ELOG_CBMEM
|
|
bool "Store a copy of ELOG in CBMEM"
|
|
default n
|
|
help
|
|
This option will have ELOG store a copy of the flash event log
|
|
in a CBMEM region and export that address in SMBIOS to the OS.
|
|
This is useful if the ELOG location is not in memory mapped flash,
|
|
but it means that events added at runtime via the SMI handler
|
|
will not be reflected in the CBMEM copy of the log.
|
|
|
|
endif
|
|
|
|
config ELOG_GSMI
|
|
depends on ELOG && SPI_FLASH_SMM && SMM_TSEG
|
|
bool "SMI interface to write and clear event log"
|
|
default n
|
|
help
|
|
This interface is compatible with the linux kernel driver
|
|
available with CONFIG_GOOGLE_GSMI and can be used to write
|
|
kernel reset/shutdown messages to the event log.
|
|
|
|
config ELOG_BOOT_COUNT
|
|
depends on ELOG
|
|
bool "Maintain a monotonic boot number in CMOS"
|
|
default n
|
|
help
|
|
Store a monotonic boot number in CMOS and provide an interface
|
|
to read the current value and increment the counter. This boot
|
|
counter will be logged as part of the System Boot event.
|
|
|
|
config ELOG_BOOT_COUNT_CMOS_OFFSET
|
|
depends on ELOG && ELOG_BOOT_COUNT && !USE_OPTION_TABLE
|
|
int "Offset in CMOS to store the boot count"
|
|
default 0
|
|
help
|
|
This value must be greater than 16 bytes so as not to interfere
|
|
with the standard RTC region. Requires 8 bytes.
|