mirror of
https://github.com/rvtr/ctr_firmware.git
synced 2025-10-31 07:51:08 -04:00
先頭4KBのデータアボート領域を避ける。
git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-09-30%20-%20paladin.7z/paladin/ctr_firmware@68 b871894f-2f95-9b40-918c-086798483c85
This commit is contained in:
parent
9c96cb77f0
commit
f422af1840
@ -138,9 +138,9 @@ CTR_DEBUGGER ?= $(BROM_DEBUGGER)
|
|||||||
ifeq ($(BROM_TARGET),BROM)
|
ifeq ($(BROM_TARGET),BROM)
|
||||||
ifndef BROM_PROMGEN
|
ifndef BROM_PROMGEN
|
||||||
ifeq ($(CODEGEN_PROC),ARM11)
|
ifeq ($(CODEGEN_PROC),ARM11)
|
||||||
CRT0_O ?= crt0.o crt0_secure.o
|
CRT0_O ?= crt0.o crt0_excp.o crt0_secure.o
|
||||||
else # CODEGEN_PROC==ARM9
|
else # CODEGEN_PROC==ARM9
|
||||||
CRT0_O ?= crt0.o crt0_secure_sp.o
|
CRT0_O ?= crt0.o crt0_excp.o crt0_secure_sp.o
|
||||||
endif # CODEGEN_PROC==ARM9
|
endif # CODEGEN_PROC==ARM9
|
||||||
endif # BROM_PROMGEN
|
endif # BROM_PROMGEN
|
||||||
else # BROM_TARGET
|
else # BROM_TARGET
|
||||||
|
|||||||
@ -29,8 +29,8 @@ BROM_PROC = ARM11
|
|||||||
|
|
||||||
SRCDIR = ../common .
|
SRCDIR = ../common .
|
||||||
|
|
||||||
SRCS = crt0.c crt0_secure.c crt0_scat.c # crt0_app.c
|
SRCS = crt0.c crt0_secure.c crt0_scat.c crt0_excp.c # crt0_app.c
|
||||||
TARGET_OBJ = crt0.o crt0_secure.o crt0_scat.o # crt0_app.o
|
TARGET_OBJ = crt0.o crt0_secure.o crt0_scat.o crt0_excp.o # crt0_app.o
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
|
|||||||
@ -35,6 +35,9 @@ asm void _start( void )
|
|||||||
CODE32 // for _start reference
|
CODE32 // for _start reference
|
||||||
|
|
||||||
INASM_EXTERN( STUPi_StartHandler )
|
INASM_EXTERN( STUPi_StartHandler )
|
||||||
|
INASM_EXTERN( STUPi_SwiHandler )
|
||||||
|
INASM_EXTERN( STUPi_IrqHandler )
|
||||||
|
INASM_EXTERN( STUPi_DbgHandler )
|
||||||
|
|
||||||
b stupStartHandlerVeneer // don't change for NULL access compatibility
|
b stupStartHandlerVeneer // don't change for NULL access compatibility
|
||||||
undef b STUPi_DbgHandler
|
undef b STUPi_DbgHandler
|
||||||
@ -47,8 +50,5 @@ fiq b STUPi_DbgHandler
|
|||||||
|
|
||||||
stupStartHandlerVeneer
|
stupStartHandlerVeneer
|
||||||
b STUPi_StartHandler
|
b STUPi_StartHandler
|
||||||
DCD 0
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#include <../common/crt0_excpHandler.c>
|
|
||||||
|
|
||||||
|
|||||||
@ -29,8 +29,8 @@ BROM_PROC = ARM9
|
|||||||
|
|
||||||
SRCDIR = ../common .
|
SRCDIR = ../common .
|
||||||
|
|
||||||
SRCS = crt0.c crt0_secure_sp.c crt0_scat.c # crt0_app.c
|
SRCS = crt0.c crt0_secure_sp.c crt0_scat.c crt0_excp.c # crt0_app.c
|
||||||
TARGET_OBJ = crt0.o crt0_secure_sp.o crt0_scat.o # crt0_app.o
|
TARGET_OBJ = crt0.o crt0_secure_sp.o crt0_scat.o crt0_excp.o # crt0_app.o
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
|
|||||||
@ -35,6 +35,9 @@ asm void _start( void )
|
|||||||
CODE32 // for _start reference
|
CODE32 // for _start reference
|
||||||
|
|
||||||
INASM_EXTERN( STUPi_StartHandler )
|
INASM_EXTERN( STUPi_StartHandler )
|
||||||
|
INASM_EXTERN( STUPi_SwiHandler )
|
||||||
|
INASM_EXTERN( STUPi_IrqHandler )
|
||||||
|
INASM_EXTERN( STUPi_DbgHandler )
|
||||||
|
|
||||||
b stupStartHandlerVeneer // don't change for NULL access compatibility
|
b stupStartHandlerVeneer // don't change for NULL access compatibility
|
||||||
undef b STUPi_DbgHandler
|
undef b STUPi_DbgHandler
|
||||||
@ -55,6 +58,3 @@ stupStartHandlerVeneer
|
|||||||
DCD |Image$$SVC_RW$$Base|
|
DCD |Image$$SVC_RW$$Base|
|
||||||
DCD |Load$$SVC_RW$$Base|
|
DCD |Load$$SVC_RW$$Base|
|
||||||
}
|
}
|
||||||
|
|
||||||
#include <../common/crt0_excpHandler.c>
|
|
||||||
|
|
||||||
|
|||||||
@ -81,6 +81,8 @@ semi_vector
|
|||||||
|
|
||||||
asm void STUPi_SwiHandler( void )
|
asm void STUPi_SwiHandler( void )
|
||||||
{
|
{
|
||||||
|
INASM_EXTERN( _start )
|
||||||
|
|
||||||
stmfd sp!, {r11, r12, lr} // SVCモード レジスタ退避
|
stmfd sp!, {r11, r12, lr} // SVCモード レジスタ退避
|
||||||
ldrh r12, [lr, #-2] // システムコールNo取得(ハーフワードアクセス対応)
|
ldrh r12, [lr, #-2] // システムコールNo取得(ハーフワードアクセス対応)
|
||||||
mov r12, r12, lsl #1
|
mov r12, r12, lsl #1
|
||||||
@ -93,7 +95,7 @@ asm void STUPi_SwiHandler( void )
|
|||||||
adr r11, SWI_Table // システムコールアドレス 取得
|
adr r11, SWI_Table // システムコールアドレス 取得
|
||||||
ldrh r12, [r11, r12]
|
ldrh r12, [r11, r12]
|
||||||
#ifdef SDK_ARM9
|
#ifdef SDK_ARM9
|
||||||
adr r11, _start // = HW_BIOS
|
ldr r11, =HW_BIOS
|
||||||
orr r12, r12, r11
|
orr r12, r12, r11
|
||||||
#endif // SDK_ARM9
|
#endif // SDK_ARM9
|
||||||
|
|
||||||
@ -35,6 +35,9 @@ extern "C" {
|
|||||||
#define HW_BROM_NML HW_BROM
|
#define HW_BROM_NML HW_BROM
|
||||||
#define HW_BROM_NML_END (HW_BROM_NML + HW_BROM_NML_SIZE)
|
#define HW_BROM_NML_END (HW_BROM_NML + HW_BROM_NML_SIZE)
|
||||||
#define HW_BROM_NML_SIZE 0x8000 // 32KB
|
#define HW_BROM_NML_SIZE 0x8000 // 32KB
|
||||||
|
#define HW_BROM_NML_ABT HW_BROM_NML
|
||||||
|
#define HW_BROM_NML_ABT_END (HW_BROM_NML_ABT + HW_BROM_NML_ABT_SIZE)
|
||||||
|
#define HW_BROM_NML_ABT_SIZE 0x1000 // 4KB
|
||||||
#define HW_BROM_SEC HW_BROM_NML_END
|
#define HW_BROM_SEC HW_BROM_NML_END
|
||||||
#define HW_BROM_SEC_END (HW_BROM_SEC + HW_BROM_SEC_SIZE)
|
#define HW_BROM_SEC_END (HW_BROM_SEC + HW_BROM_SEC_SIZE)
|
||||||
#define HW_BROM_SEC_SIZE 0x8000 // 32KB
|
#define HW_BROM_SEC_SIZE 0x8000 // 32KB
|
||||||
|
|||||||
@ -28,8 +28,9 @@ LOAD_NORMAL HW_BROM_NML HW_BROM_NML_SIZE
|
|||||||
{
|
{
|
||||||
*crt0.*o (.emb_text, +FIRST)
|
*crt0.*o (.emb_text, +FIRST)
|
||||||
}
|
}
|
||||||
NML_RO +0
|
NML_RO HW_BROM_NML_ABT_END
|
||||||
{
|
{
|
||||||
|
*crt0_excp.o (.emb_text)
|
||||||
*libos*.brom*.a (:gdef:OSi_Boot)
|
*libos*.brom*.a (:gdef:OSi_Boot)
|
||||||
*libos*.brom*.a (:gdef:OSi_BootCore)
|
*libos*.brom*.a (:gdef:OSi_BootCore)
|
||||||
*libos*.brom*.a (:gdef:OSi_ClearWorkArea)
|
*libos*.brom*.a (:gdef:OSi_ClearWorkArea)
|
||||||
|
|||||||
@ -27,6 +27,7 @@ LOAD_NORMAL HW_BROM_NML HW_BROM_NML_SIZE
|
|||||||
STUP_ENTRY +0
|
STUP_ENTRY +0
|
||||||
{
|
{
|
||||||
*crt0.*o (.emb_text, +FIRST)
|
*crt0.*o (.emb_text, +FIRST)
|
||||||
|
*crt0_excp.o (.emb_text)
|
||||||
}
|
}
|
||||||
NML_RO +0
|
NML_RO +0
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user