elog: Hide elog_flash_offset_to_address() from SMM
Change-Id: Iaef9d4755f07ca03ca823831c3272183b5d6aed1 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Original-Commit-Id: 7c3db3d5c8e00b6c273ae240da137062597749aa Original-Change-Id: I5e38966fe06aa3302a7c1b536f5ffd8bb22d4947 Original-Signed-off-by: Furquan Shaikh <furquan@google.com> Original-Reviewed-on: https://chromium-review.googlesource.com/229413 Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org> Original-Commit-Queue: Furquan Shaikh <furquan@chromium.org> Original-Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-on: http://review.coreboot.org/9450 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
committed by
Patrick Georgi
parent
fd2f030543
commit
7f4221c178
@ -112,21 +112,6 @@ static inline u32 elog_flash_address_to_offset(u8 *address)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Convert a flash offset into a memory mapped flash address
|
|
||||||
*/
|
|
||||||
static inline u8* elog_flash_offset_to_address(u32 offset)
|
|
||||||
{
|
|
||||||
u32 rom_size;
|
|
||||||
|
|
||||||
if (!elog_spi)
|
|
||||||
return NULL;
|
|
||||||
|
|
||||||
rom_size = get_rom_size();
|
|
||||||
|
|
||||||
return (u8*)((u32)~0UL - rom_size + 1 + offset);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Pointer to an event log header in the event data area
|
* Pointer to an event log header in the event data area
|
||||||
*/
|
*/
|
||||||
@ -452,6 +437,23 @@ static int elog_shrink(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifndef __SMM__
|
#ifndef __SMM__
|
||||||
|
#if IS_ENABLED(CONFIG_ARCH_X86)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Convert a flash offset into a memory mapped flash address
|
||||||
|
*/
|
||||||
|
static inline u8 *elog_flash_offset_to_address(u32 offset)
|
||||||
|
{
|
||||||
|
u32 rom_size;
|
||||||
|
|
||||||
|
if (!elog_spi)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
rom_size = get_rom_size();
|
||||||
|
|
||||||
|
return (u8 *)((u32)~0UL - rom_size + 1 + offset);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Fill out SMBIOS Type 15 table entry so the
|
* Fill out SMBIOS Type 15 table entry so the
|
||||||
* event log can be discovered at runtime.
|
* event log can be discovered at runtime.
|
||||||
@ -492,6 +494,7 @@ int elog_smbios_write_type15(unsigned long *current, int handle)
|
|||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Clear the entire event log
|
* Clear the entire event log
|
||||||
|
Reference in New Issue
Block a user