Make the yamon function pointer stuff 64-bit safe. Make the base
unsigned long, and sign extend the address of the function we're calling through.
This commit is contained in:
parent
216d5bbf5f
commit
0fe0f7fd5a
@ -38,7 +38,7 @@
|
||||
#ifndef _MALTA_YAMON_H_
|
||||
#define _MALTA_YAMON_H_
|
||||
|
||||
#define YAMON_FUNCTION_BASE 0x1fc00500
|
||||
#define YAMON_FUNCTION_BASE 0x1fc00500ul
|
||||
|
||||
#define YAMON_PRINT_COUNT_OFS (YAMON_FUNCTION_BASE + 0x04)
|
||||
#define YAMON_EXIT_OFS (YAMON_FUNCTION_BASE + 0x20)
|
||||
@ -53,7 +53,7 @@
|
||||
#define YAMON_GETCHAR_OFS (YAMON_FUNCTION_BASE + 0x50)
|
||||
#define YAMON_SYSCON_READ_OFS (YAMON_FUNCTION_BASE + 0x54)
|
||||
|
||||
#define YAMON_FUNC(ofs) (*(uint32_t *)(MIPS_PHYS_TO_KSEG0(ofs)))
|
||||
#define YAMON_FUNC(ofs) ((long)(*(int32_t *)(MIPS_PHYS_TO_KSEG0(ofs))))
|
||||
|
||||
typedef void (*t_yamon_print_count)(uint32_t port, char *s, uint32_t count);
|
||||
#define YAMON_PRINT_COUNT(s, count) \
|
||||
|
Loading…
Reference in New Issue
Block a user