From 41607a4682c75b716e342cfc773926c753fb6086 Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Tue, 9 Jun 2015 13:54:10 -0500 Subject: cbmem: add indicator to hooks if cbmem is being recovered It can be helpful to certain users of the cbmem init hooks to know if recovery was done or not. Therefore, add this as a parameter to the hooks. Change-Id: I049fc191059cfdb8095986d3dc4eee9e25cf5452 Signed-off-by: Aaron Durbin Reviewed-on: http://review.coreboot.org/10480 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- src/include/cbmem.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/include/cbmem.h') diff --git a/src/include/cbmem.h b/src/include/cbmem.h index 55b04b4106..341296cec1 100644 --- a/src/include/cbmem.h +++ b/src/include/cbmem.h @@ -113,8 +113,9 @@ void *cbmem_add(u32 id, u64 size); /* Find a cbmem entry of a given id. These return NULL on failure. */ void *cbmem_find(u32 id); -typedef void (* const cbmem_init_hook_t)(void); -void cbmem_run_init_hooks(void); +/* Indicate to each hook if cbmem is being recovered or not. */ +typedef void (* const cbmem_init_hook_t)(int is_recovery); +void cbmem_run_init_hooks(int is_recovery); void cbmem_fail_resume(void); #ifndef __PRE_RAM__ -- cgit v1.2.3