difos/target/linux/realtek/image/rt-loader/include/globals.h
Markus Stockhausen 978d24ce40 realtek: rt-loader bootbase device enhancement
Until now the rt-loader only works on U-Boot driven devices where the
environment (e.g. coprocessor) is usually setup properly. Devices like
the ZyXEL GS1920 series use BootBase as start environment and skip
some of the basic initialization steps. rt-loader will fail in these
cases. Take care about the CP0 registers.

Additionally enhance the documentation of the printf implementation.
It was optimized during the different revisions of the initial PR.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19253
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-06-29 17:41:20 +02:00

24 lines
489 B
C

/*
* rt-loader header
* (c) 2025 Markus Stockhausen
*/
#ifndef _GLOBALS_H_
#define _GLOBALS_H_
#define KSEG0 0x80000000
#define STACK_SIZE 0x10000
#define HEAP_SIZE 0x40000
#define MEMORY_ALIGNMENT 32
#define CP0_COUNT $9
#define CP0_COMPARE $11
#define CP0_STATUS $12
#define CP0_CAUSE $13
#define CP0_WATCHLO $18
#define CP0_WATCHHI $19
#define printf(fmt, ...) npf_pprintf(board_putchar, NULL, fmt, ##__VA_ARGS__)
#define snprintf npf_snprintf
#endif // _GLOBALS_H_