diff options
Diffstat (limited to 'hdata/test/stubs.c')
-rw-r--r-- | hdata/test/stubs.c | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/hdata/test/stubs.c b/hdata/test/stubs.c index aaecddb..b53703f 100644 --- a/hdata/test/stubs.c +++ b/hdata/test/stubs.c @@ -23,8 +23,6 @@ #include "../../ccan/list/list.c" -unsigned long top_of_ram = 16ULL * 1024 * 1024 * 1024; - void _prlog(int log_level __attribute__((unused)), const char* fmt, ...) __attribute__((format (printf, 2, 3))); #ifndef pr_fmt @@ -102,10 +100,20 @@ STUB(fsp_adjust_lid_side); STUB(backtrace); /* Add HW specific stubs here */ -static void noop_function(void) {} -#define NOOP_STUB(fnname) \ - void fnname(void) __attribute__((weak, alias ("noop_function"))) - +static bool true_stub(void) { return true; } +static bool false_stub(void) { return false; } + +#define TRUE_STUB(fnname) \ + void fnname(void) __attribute__((weak, alias ("true_stub"))) +#define FALSE_STUB(fnname) \ + void fnname(void) __attribute__((weak, alias ("false_stub"))) +#define NOOP_STUB FALSE_STUB + +TRUE_STUB(lock_held_by_me); +NOOP_STUB(lock); +NOOP_STUB(unlock); NOOP_STUB(early_uart_init); NOOP_STUB(mem_reserve_fw); NOOP_STUB(mem_reserve_hwbuf); +NOOP_STUB(add_chip_dev_associativity); + |