summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Heijligen <thomas.heijligen@secunet.com>2022-11-18 22:53:56 +0100
committerFelix Singer <felixsinger@posteo.net>2022-12-01 11:53:38 +0000
commite7b3ea3f5689b28ebeea6e5ed276d431b4d67eba (patch)
tree3dbce441b7438fe7ae12deb002c522548da74bb0
parentc37b38b7706348e6cd4e45f5f6ceb4041aea72e0 (diff)
downloadflashrom-e7b3ea3f5689b28ebeea6e5ed276d431b4d67eba.tar.gz
flashrom-e7b3ea3f5689b28ebeea6e5ed276d431b4d67eba.tar.bz2
flashrom-e7b3ea3f5689b28ebeea6e5ed276d431b4d67eba.zip
libpayload: Fix compiling bugs
hwaccess_physmap.c: make `void *sys_physmap()` static hwaccess_x86_io.c: Add missing include Original-Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com> Original-Reviewed-on: https://review.coreboot.org/c/flashrom/+/69831 Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Original-Reviewed-by: Angel Pons <th3fanbus@gmail.com> Original-Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Original-Reviewed-by: Nico Huber <nico.h@gmx.de> Original-Reviewed-by: Felix Singer <felixsinger@posteo.net> Change-Id: I5062c5a62b90f7a189488f3f569dc357bd2cb85f Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/flashrom/+/70040 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Anastasia Klimchuk <aklm@chromium.org>
-rw-r--r--hwaccess_physmap.c2
-rw-r--r--hwaccess_x86_io.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/hwaccess_physmap.c b/hwaccess_physmap.c
index 81adf18e9..f95b5f647 100644
--- a/hwaccess_physmap.c
+++ b/hwaccess_physmap.c
@@ -121,7 +121,7 @@ static void sys_physunmap_unaligned(void *virt_addr, size_t len)
#define MEM_DEV ""
-void *sys_physmap(uintptr_t phys_addr, size_t len)
+static void *sys_physmap(uintptr_t phys_addr, size_t len)
{
return (void *)phys_to_virt(phys_addr);
}
diff --git a/hwaccess_x86_io.c b/hwaccess_x86_io.c
index c3ad31396..a883ed418 100644
--- a/hwaccess_x86_io.c
+++ b/hwaccess_x86_io.c
@@ -134,6 +134,8 @@
#endif
#if defined(__LIBPAYLOAD__)
+#include <arch/io.h>
+
#define IO_PORT_PERMISSION USE_DUMMY
#define IO_PORT_FUNCTION USE_LIBC_TARGET_LAST
#endif