coreboot-kgpe-d16/src/drivers
Julius Werner e6cf3c6f78 TPM: Reduce buffer size to fix stack overflow
The TPM driver by default allocates a 4K transfer buffer on the stack,
which leads to lots of fun on boards with 2K or 3K stack sizes. On
RK3288 this ends up writing over random memory sections which dependent
on the memlayout of the day might contain timestamp data (no big deal)
or page tables (-> bad time).

This patch fixes the problem by reducing the buffer size to slightly
above 1K, which still seems to work as far as I can tell. There was
already some really odd code that #undef'ed this value and redefined it
with the lower number in one .c file (unfortunately not the one with the
buffer declaration), with no explanation whatsoever... I'm removing that
and just assume the smaller value will be fine for everything.

BRANCH=veyron
BUG=None
TEST=Booted Pinky and Falco.

Change-Id: I440a5662b41cbd8b7becab3113262e1140b7f763
Signed-off-by: Stefan Reinauer <reinauer@chromium.org>
Original-Commit-Id: 3d3288041b6629b7623b9d58816e782e72836b81
Original-Change-Id: Idf80f44cbfb9617c56b64a5c88ebedf7fcb4ec71
Original-Signed-off-by: Julius Werner <jwerner@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/236976
Original-Reviewed-by: David Hendricks <dhendrix@chromium.org>
Reviewed-on: http://review.coreboot.org/9481
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2015-04-10 20:06:23 +02:00
..
ams rtc: Add an RTC driver for the AS3722 PMIC. 2014-12-30 22:11:18 +01:00
ati x86: Change MMIO addr in readN(addr)/writeN(addr, val) to pointer 2015-02-15 08:50:22 +01:00
dec {arch,cpu,drivers,ec}: Don't hide pointers behind typedefs 2014-10-27 23:40:05 +01:00
elog elog: Hide elog_flash_offset_to_address() from SMM 2015-04-10 12:01:48 +02:00
emulation {arch,cpu,drivers,ec}: Don't hide pointers behind typedefs 2014-10-27 23:40:05 +01:00
generic x86: Change MMIO addr in readN(addr)/writeN(addr, val) to pointer 2015-02-15 08:50:22 +01:00
gic drivers: add GIC support 2015-03-28 07:05:03 +01:00
i2c TPM: Reduce buffer size to fix stack overflow 2015-04-10 20:06:23 +02:00
ics drivers: Use DEVICE_NOOP macro over dummy symbol 2014-11-01 21:14:07 +01:00
intel cbfs: correct types used for accessing files 2015-04-01 22:51:10 +02:00
ipmi Get rid of drivers class 2012-11-27 22:00:49 +01:00
lenovo acpigen: Use implicit length patching in acpigen_write_resourcetemplate_footer 2014-11-19 20:56:59 +01:00
maxim i2c: Replace the i2c API. 2014-12-16 00:02:43 +01:00
net drivers/net/ne2k.c: Fix regression 2014-11-22 15:25:09 +01:00
parade i2c: Replace the i2c API. 2014-12-16 00:02:43 +01:00
pc80 tpm: Remove error message for unknown resource type 2015-04-10 20:04:01 +02:00
ricoh kconfig: drop intermittend forwarder files 2015-04-07 17:40:28 +02:00
sil Get rid of drivers class 2012-11-27 22:00:49 +01:00
spi verstage should include the CBFS SPI wrapper, when configured 2015-03-20 16:04:52 +01:00
ti rtc: Add an RTC driver for the TI TPS65913 PMIC. 2015-04-10 12:01:55 +02:00
trident drivers: Trivial - drop trailing blank lines at EOF 2014-07-08 13:51:47 +02:00
uart OxPCIe952: Fix read8/write8 argument 2015-03-14 00:10:52 +01:00
usb x86: Change MMIO addr in readN(addr)/writeN(addr, val) to pointer 2015-02-15 08:50:22 +01:00
xgi drivers/xgi: Avoid double-free 2015-02-23 20:33:38 +01:00
xpowers drivers/xpowers/axp209: Adapt to new I²C API 2015-02-20 23:20:56 +01:00
Makefile.inc drivers: add GIC support 2015-03-28 07:05:03 +01:00