summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/drivers/elog/elog.c33
1 files changed, 18 insertions, 15 deletions
diff --git a/src/drivers/elog/elog.c b/src/drivers/elog/elog.c
index c96a923b93..f6b0006db8 100644
--- a/src/drivers/elog/elog.c
+++ b/src/drivers/elog/elog.c
@@ -113,21 +113,6 @@ static inline u32 elog_flash_address_to_offset(u8 *address)
}
/*
- * 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
*/
static inline struct event_header*
@@ -452,6 +437,23 @@ static int elog_shrink(void)
}
#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
* event log can be discovered at runtime.
@@ -492,6 +494,7 @@ int elog_smbios_write_type15(unsigned long *current, int handle)
return len;
}
#endif
+#endif
/*
* Clear the entire event log