diff options
Diffstat (limited to 'arch/sandbox/cpu')
-rw-r--r-- | arch/sandbox/cpu/cache.c | 1 | ||||
-rw-r--r-- | arch/sandbox/cpu/cpu.c | 9 | ||||
-rw-r--r-- | arch/sandbox/cpu/os.c | 17 | ||||
-rw-r--r-- | arch/sandbox/cpu/sdl.c | 2 | ||||
-rw-r--r-- | arch/sandbox/cpu/spl.c | 1 | ||||
-rw-r--r-- | arch/sandbox/cpu/start.c | 2 | ||||
-rw-r--r-- | arch/sandbox/cpu/state.c | 3 |
7 files changed, 28 insertions, 7 deletions
diff --git a/arch/sandbox/cpu/cache.c b/arch/sandbox/cpu/cache.c index 46c62c0b446..c8a5e64214b 100644 --- a/arch/sandbox/cpu/cache.c +++ b/arch/sandbox/cpu/cache.c @@ -3,7 +3,6 @@ * Copyright 2020, Heinrich Schuchardt <xypron.glpk@gmx.de> */ -#include <common.h> #include <cpu_func.h> #include <asm/state.h> diff --git a/arch/sandbox/cpu/cpu.c b/arch/sandbox/cpu/cpu.c index a1c5c7c4311..0ed85b354cf 100644 --- a/arch/sandbox/cpu/cpu.c +++ b/arch/sandbox/cpu/cpu.c @@ -5,7 +5,6 @@ #define LOG_CATEGORY LOGC_SANDBOX -#include <common.h> #include <bootstage.h> #include <cpu_func.h> #include <errno.h> @@ -286,6 +285,14 @@ void sandbox_set_enable_pci_map(int enable) enable_pci_map = enable; } +void dcache_enable(void) +{ +} + +void dcache_disable(void) +{ +} + int dcache_status(void) { return 1; diff --git a/arch/sandbox/cpu/os.c b/arch/sandbox/cpu/os.c index 95c26d855ab..cbae5109e85 100644 --- a/arch/sandbox/cpu/os.c +++ b/arch/sandbox/cpu/os.c @@ -287,6 +287,23 @@ int os_persistent_file(char *buf, int maxsize, const char *fname) return 0; } +int os_mktemp(char *fname, off_t size) +{ + int fd; + + fd = mkostemp(fname, O_CLOEXEC); + if (fd < 0) + return -errno; + + if (unlink(fname) < 0) + return -errno; + + if (ftruncate(fd, size)) + return -errno; + + return fd; +} + /* Restore tty state when we exit */ static struct termios orig_term; static bool term_setup; diff --git a/arch/sandbox/cpu/sdl.c b/arch/sandbox/cpu/sdl.c index 590e406517b..ed84646bdab 100644 --- a/arch/sandbox/cpu/sdl.c +++ b/arch/sandbox/cpu/sdl.c @@ -72,7 +72,7 @@ static struct sdl_info { static void sandbox_sdl_poll_events(void) { /* - * We don't want to include common.h in this file since it uses + * We don't want to include cpu_func.h in this file since it uses * system headers. So add a declation here. */ extern void reset_cpu(void); diff --git a/arch/sandbox/cpu/spl.c b/arch/sandbox/cpu/spl.c index 16b76627983..9ad9da686c6 100644 --- a/arch/sandbox/cpu/spl.c +++ b/arch/sandbox/cpu/spl.c @@ -3,7 +3,6 @@ * Copyright (c) 2016 Google, Inc */ -#include <common.h> #include <dm.h> #include <hang.h> #include <handoff.h> diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c index 2589c2eba73..dce80416529 100644 --- a/arch/sandbox/cpu/start.c +++ b/arch/sandbox/cpu/start.c @@ -3,7 +3,7 @@ * Copyright (c) 2011-2012 The Chromium OS Authors. */ -#include <common.h> +#include <config.h> #include <cli.h> #include <command.h> #include <efi_loader.h> diff --git a/arch/sandbox/cpu/state.c b/arch/sandbox/cpu/state.c index e38bb248b7f..a9ca79e76d2 100644 --- a/arch/sandbox/cpu/state.c +++ b/arch/sandbox/cpu/state.c @@ -3,9 +3,8 @@ * Copyright (c) 2011-2012 The Chromium OS Authors. */ -#include <common.h> -#include <autoboot.h> #include <bloblist.h> +#include <config.h> #include <errno.h> #include <fdtdec.h> #include <log.h> |