Compare commits

...

2 commits

5 changed files with 14 additions and 12 deletions

View file

@ -70,11 +70,11 @@ SECTIONS
_gint_exch_start = . ;
KEEP(*(.gint.exch))
_gint_exch_size = ABSOLUTE(. - _gint_exch_start);
_gint_exch_end = . ;
_gint_tlbh_start = . ;
KEEP(*(.gint.tlbh))
_gint_tlbh_size = ABSOLUTE(. - _gint_tlbh_start);
_gint_tlbh_end = . ;
*(.text .text.*)
*(C P)

View file

@ -59,11 +59,11 @@ SECTIONS
_gint_exch_start = . ;
KEEP(*(.gint.exch))
_gint_exch_size = ABSOLUTE(. - _gint_exch_start);
_gint_exch_end = . ;
_gint_tlbh_start = . ;
KEEP(*(.gint.tlbh))
_gint_tlbh_size = ABSOLUTE(. - _gint_tlbh_start);
_gint_tlbh_end = . ;
*(.text .text.*)
} > rom

View file

@ -68,12 +68,12 @@ SECTIONS
. = ALIGN(0x10);
_gint_exch_start = . ;
*(.gint.exch)
_gint_exch_size = ABSOLUTE(. - _gint_exch_start);
_gint_exch_end = . ;
. = ALIGN(0x10);
_gint_tlbh_start = . ;
*(.gint.tlbh)
_gint_tlbh_size = ABSOLUTE(. - _gint_tlbh_start);
_gint_tlbh_end = . ;
*(.text .text.*)
} > ram AT> bin

View file

@ -76,9 +76,15 @@ void kinit(void)
#endif
/* Event handler entry points */
extern uint32_t gint_exch_start;
extern uint32_t gint_exch_end;
extern uint32_t gint_tlbh_start;
extern uint32_t gint_tlbh_end;
void *inth_entry = isSH3() ? gint_inth_7705 : gint_inth_7305;
uint32_t exch_size = (uint32_t)&gint_exch_size;
uint32_t tlbh_size = (uint32_t)&gint_tlbh_size;
uint32_t exch_size = \
(uint32_t)&gint_exch_end - (uint32_t)&gint_exch_start;
uint32_t tlbh_size = \
(uint32_t)&gint_tlbh_end - (uint32_t)&gint_tlbh_start;
/* Load the event handler entry points into memory */
memcpy((void *)VBR + 0x100, gint_exch, exch_size);

View file

@ -11,8 +11,4 @@ void gint_tlbh(void);
void gint_inth_7705(void);
void gint_inth_7305(void);
/* Size of exception and TLB handlers */
extern char gint_exch_size;
extern char gint_tlbh_size;
#endif /* GINT_CORE_VBR */