@ -31,25 +31,45 @@
; Bootloader API Jump Table
.section .apitable , " ax"
; API function jump table
; Trampolines to actual API implementations if the target address is outside the
; range of a rjmp instruction (can happen with large bootloader sections)
.org 0
BootloaderAPI_ErasePage_Trampoline :
jmp B o o t l o a d e r A P I _ E r a s e P a g e
BootloaderAPI_WritePage_Trampoline :
jmp B o o t l o a d e r A P I _ W r i t e P a g e
BootloaderAPI_FillWord_Trampoline :
jmp B o o t l o a d e r A P I _ F i l l W o r d
BootloaderAPI_ReadSignature_Trampoline :
jmp B o o t l o a d e r A P I _ R e a d S i g n a t u r e
BootloaderAPI_ReadFuse_Trampoline :
jmp B o o t l o a d e r A P I _ R e a d F u s e
BootloaderAPI_ReadLock_Trampoline :
jmp B o o t l o a d e r A P I _ R e a d L o c k
BootloaderAPI_WriteLock_Trampoline :
jmp B o o t l o a d e r A P I _ W r i t e L o c k
BootloaderAPU_UNUSED :
ret
; API function jump table
.org ( 9 6 - 3 2 )
.global BootloaderAPI_JumpTable
BootloaderAPI_JumpTable :
rjmp B o o t l o a d e r A P I _ E r a s e P a g e
rjmp B o o t l o a d e r A P I _ W r i t e P a g e
rjmp B o o t l o a d e r A P I _ F i l l W o r d
rjmp B o o t l o a d e r A P I _ R e a d S i g n a t u r e
rjmp B o o t l o a d e r A P I _ R e a d F u s e
rjmp B o o t l o a d e r A P I _ R e a d L o c k
rjmp B o o t l o a d e r A P I _ W r i t e L o c k
nop ; UNUSED ENTRY
nop ; UNUSED ENTRY
nop ; UNUSED ENTRY
nop ; UNUSED ENTRY
ret
rjmp B o o t l o a d e r A P I _ E r a s e P a g e _ T r a m p o l i n e
rjmp B o o t l o a d e r A P I _ W r i t e P a g e _ T r a m p o l i n e
rjmp B o o t l o a d e r A P I _ F i l l W o r d _ T r a m p o l i n e
rjmp B o o t l o a d e r A P I _ R e a d S i g n a t u r e _ T r a m p o l i n e
rjmp B o o t l o a d e r A P I _ R e a d F u s e _ T r a m p o l i n e
rjmp B o o t l o a d e r A P I _ R e a d L o c k _ T r a m p o l i n e
rjmp B o o t l o a d e r A P I _ W r i t e L o c k _ T r a m p o l i n e
rjmp B o o t l o a d e r A P U _ U N U S E D ; UNUSED ENTRY
rjmp B o o t l o a d e r A P U _ U N U S E D ; UNUSED ENTRY
rjmp B o o t l o a d e r A P U _ U N U S E D ; UNUSED ENTRY
rjmp B o o t l o a d e r A P U _ U N U S E D ; UNUSED ENTRY
rjmp B o o t l o a d e r A P U _ U N U S E D ; UNUSED ENTRY
; Bootloader table signatures and information
.org ( 3 2 - 8 )
.org ( 96 - 8 )
BootloaderAPI_Signatures :
.global BootloaderAPI_Signatures
.long BOOT_START_ADDR ; Start address of the bootloader