From 0e6e45770293781a19bd92d440bc6da6da642f7f Mon Sep 17 00:00:00 2001 From: Patrick Rudolph Date: Sat, 28 Sep 2019 17:53:24 +0200 Subject: security/memory: Add x86_64 support Fix compiler warning by adding an additional check for the fastpath memset. Change-Id: I9a80438995bafe7e436f3fe2180b8c9574eeff23 Signed-off-by: Patrick Rudolph Reviewed-on: https://review.coreboot.org/c/coreboot/+/35682 Reviewed-by: Arthur Heymans Tested-by: build bot (Jenkins) --- src/security/memory/memory_clear.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/security/memory') diff --git a/src/security/memory/memory_clear.c b/src/security/memory/memory_clear.c index 638c41a929..45bee91036 100644 --- a/src/security/memory/memory_clear.c +++ b/src/security/memory/memory_clear.c @@ -127,7 +127,8 @@ static void clear_memory(void *unused) __func__, range_entry_base(r), range_entry_end(r)); /* Does regular memset work? */ - if (!(range_entry_end(r) >> sizeof(void *) * 8)) { + if (sizeof(resource_t) == sizeof(void *) || + !(range_entry_end(r) >> (sizeof(void *) * 8))) { /* fastpath */ memset((void *)(uintptr_t)range_entry_base(r), 0, range_entry_size(r)); -- cgit v1.2.3