1 /* SPDX-License-Identifier: GPL-2.0-only */
3 #include <libpayload-config.h>
4 #include <arch/types.h>
9 /* Use libc version. calling exit() or abort() would cause infinite recursion */
10 __attribute__((noreturn
))
13 __attribute__((noreturn
))
19 #define TEST_SYMBOL(symbol, value) asm(".set " #symbol ", " #value "\n\t.globl " #symbol)
21 #define TEST_REGION(region, size) uint8_t _##region[size]; \
22 TEST_SYMBOL(_e##region, _##region + size); \
23 TEST_SYMBOL(_##region##_size, size)
25 TEST_REGION(heap
, CONFIG_LP_HEAP_SIZE
);
27 uint64_t timer_raw_value(void)
32 uint64_t timer_hz(void)
37 /* Not present in libpayload. Can be used to write to real stdout. */
38 ssize_t
write(int fildes
, const void *buf
, size_t nbyte
);
40 void console_write(const void *buffer
, size_t count
)
42 write(1, buffer
, count
);