chrome-ec/board
Vadim Bendebury a733e02fd4 cr50: add a function to read TPM NVMEM locations
The cr50 code might need access to certain variables stored in the TPM
NVMEM. In particular the upcoming FWMP support will require reading
the NVMEM FWMP space.

This patch adds a generic function which allows to access TPM NVMEM
spaces. The implementation was borrowed from NV_REad.c in the tpm2
tree, the only difference being that the location, if present, is read
unconditionally, without checking access controls.

The API accepts the NVMEM index in Chrome OS scope and maps it into
TPM2 specification's NVMEM index space based at HR_NV_INDEX. The
definitions are included straight from the tpm2 tree.

BRANCH=none
BUG=chrome-os-partner:62489, chrome-os-partner:62205
TEST=this code is not yet even being compiled, tested with the next
      patch.

Change-Id: I8bcfd8637c192249780634491f30e4a28229984f
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/457823
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
(cherry picked from commit 61f61b368e)
Reviewed-on: https://chromium-review.googlesource.com/459225
2017-03-24 16:53:14 +00:00
..
bds Remove Makefile symlinks under board directory 2016-07-09 01:40:47 -07:00
big cleanup: Remove charge_state_v1 2017-02-06 14:50:32 -08:00
chell pd: Move PD_DEFAULT_STATE to a common define in usb_pd.h 2017-01-26 16:10:30 +00:00
cr50 cr50: add a function to read TPM NVMEM locations 2017-03-24 16:53:14 +00:00
dingdong rwsig: Add support for rwsig image types 2017-02-17 04:09:37 -08:00
discovery Remove Makefile symlinks under board directory 2016-07-09 01:40:47 -07:00
discovery-stm32f072 Remove Makefile symlinks under board directory 2016-07-09 01:40:47 -07:00
elm pd: Move PD_DEFAULT_STATE to a common define in usb_pd.h 2017-01-26 16:10:30 +00:00
eve eve: Add support for anx3429 tcpc low power mode 2017-02-20 14:28:02 -08:00
eve_fp Add eve_fp board 2017-02-17 01:47:29 -08:00
glados pd: Move PD_DEFAULT_STATE to a common define in usb_pd.h 2017-01-26 16:10:30 +00:00
glados_pd cleanup: DECLARE_CONSOLE_COMMAND only needs 4 args 2016-08-24 16:30:10 +00:00
hadoken g: CONFIG_FLASH should be optional 2016-10-02 15:19:21 -07:00
hammer hammer: Switch to CONFIG_RWSIG_TYPE_RWSIG 2017-02-22 06:31:41 -08:00
hoho rwsig: Add support for rwsig image types 2017-02-17 04:09:37 -08:00
honeybuns rwsig: Add support for rwsig image types 2017-02-17 04:09:37 -08:00
host pd: support gotoMin and giveBack 2017-01-26 18:43:52 -08:00
it83xx_evb pd: Move PD_DEFAULT_STATE to a common define in usb_pd.h 2017-01-26 16:10:30 +00:00
jerry jerry: Increase HC task stack size. 2017-02-10 19:02:58 -08:00
kevin kevin / gru: Add BC1.2 charge ramp 2017-02-14 17:28:15 -08:00
llama Remove Makefile symlinks under board directory 2016-07-09 01:40:47 -07:00
lucid rwsig: Add support for rwsig image types 2017-02-17 04:09:37 -08:00
npcx_evb npcx: flash: Use common code for SPI flash protect reg translation 2016-12-01 19:59:09 -08:00
npcx_evb_arm npcx: flash: Use common code for SPI flash protect reg translation 2016-12-01 19:59:09 -08:00
nucleo-f072rb eCTS: Add nested interrupt test (Low->High) 2016-11-09 23:26:30 -08:00
oak pd: Move PD_DEFAULT_STATE to a common define in usb_pd.h 2017-01-26 16:10:30 +00:00
pdeval-stm32f072 pd: Move PD_DEFAULT_STATE to a common define in usb_pd.h 2017-01-26 16:10:30 +00:00
pit Remove Makefile symlinks under board directory 2016-07-09 01:40:47 -07:00
plankton Revert "version: Store image size data in version struct" 2017-02-01 06:36:18 +00:00
polyberry polyberry: add initial board build 2016-10-18 22:15:52 -07:00
poppy poppy: fix accel/gyro rotation matrix 2017-02-18 03:10:59 -08:00
pyro pyro: Open interrupt gate for trackpad 2017-02-18 23:56:00 -08:00
reef motion: Add opt3001 as a motion sensor 2017-02-16 18:03:59 -08:00
rowan rowan: enable CONFIG_CHARGE_MANAGER_EXTERNAL_POWER_LIMIT 2017-02-09 20:48:44 -08:00
ryu pd: Move PD_DEFAULT_STATE to a common define in usb_pd.h 2017-01-26 16:10:30 +00:00
samus smart_battery: Cleanup smart battery & SB users code 2017-01-02 16:16:59 -08:00
samus_pd charge_ramp: Specify port number in board_is_vbus_too_low() 2017-02-02 19:09:52 -08:00
servo_micro cr50: Have INAs and I2Cm enabled when rdd is attached 2017-02-06 14:50:31 -08:00
servo_v4 cr50: Have INAs and I2Cm enabled when rdd is attached 2017-02-06 14:50:31 -08:00
snappy snappy: Open interrupt gate for trackpad 2017-02-21 08:49:38 -08:00
snoball Remove Makefile symlinks under board directory 2016-07-09 01:40:47 -07:00
stm32f446e-eval sweetberry: add dwc usb support 2016-09-01 22:56:22 -07:00
stm32l476g-eval eCTS: Add nested interrupt test (Low->High) 2016-11-09 23:26:30 -08:00
strago pd: Move PD_DEFAULT_STATE to a common define in usb_pd.h 2017-01-26 16:10:30 +00:00
sweetberry sweetberry: add usb power logging interface 2016-11-11 17:20:19 -08:00
twinkie pd: Move PD_DEFAULT_STATE to a common define in usb_pd.h 2017-01-26 16:10:30 +00:00
wheatley pd: Move PD_DEFAULT_STATE to a common define in usb_pd.h 2017-01-26 16:10:30 +00:00
zinger rwsig: Add support for rwsig image types 2017-02-17 04:09:37 -08:00
OWNERS Add OWNERS files 2014-04-02 19:58:53 +00:00
chell_pd chell: Add EC/PD configuration for chell board 2015-10-12 13:15:48 -07:00
gru gru: Initial mainboard commit 2016-05-04 16:15:02 -07:00
minimuffin zinger: minimuffin: add board support for minimuffin 2014-10-02 20:51:10 +00:00
oak_pd oak_pd: change oak_pd to be a sym link to glados_pd 2015-11-04 07:08:35 -08:00