先頭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:
nakasima 2008-12-03 02:14:41 +00:00
parent 9c96cb77f0
commit f422af1840
9 changed files with 21 additions and 14 deletions

View File

@ -138,9 +138,9 @@ CTR_DEBUGGER ?= $(BROM_DEBUGGER)
ifeq ($(BROM_TARGET),BROM)
ifndef BROM_PROMGEN
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
CRT0_O ?= crt0.o crt0_secure_sp.o
CRT0_O ?= crt0.o crt0_excp.o crt0_secure_sp.o
endif # CODEGEN_PROC==ARM9
endif # BROM_PROMGEN
else # BROM_TARGET

View File

@ -29,8 +29,8 @@ BROM_PROC = ARM11
SRCDIR = ../common .
SRCS = crt0.c crt0_secure.c crt0_scat.c # crt0_app.c
TARGET_OBJ = crt0.o crt0_secure.o crt0_scat.o # crt0_app.o
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_excp.o # crt0_app.o
#----------------------------------------------------------------------------

View File

@ -35,6 +35,9 @@ asm void _start( void )
CODE32 // for _start reference
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
undef b STUPi_DbgHandler
@ -47,8 +50,5 @@ fiq b STUPi_DbgHandler
stupStartHandlerVeneer
b STUPi_StartHandler
DCD 0
}
#include <../common/crt0_excpHandler.c>

View File

@ -29,8 +29,8 @@ BROM_PROC = ARM9
SRCDIR = ../common .
SRCS = crt0.c crt0_secure_sp.c crt0_scat.c # crt0_app.c
TARGET_OBJ = crt0.o crt0_secure_sp.o crt0_scat.o # crt0_app.o
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_excp.o # crt0_app.o
#----------------------------------------------------------------------------

View File

@ -35,6 +35,9 @@ asm void _start( void )
CODE32 // for _start reference
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
undef b STUPi_DbgHandler
@ -55,6 +58,3 @@ stupStartHandlerVeneer
DCD |Image$$SVC_RW$$Base|
DCD |Load$$SVC_RW$$Base|
}
#include <../common/crt0_excpHandler.c>

View File

@ -81,6 +81,8 @@ semi_vector
asm void STUPi_SwiHandler( void )
{
INASM_EXTERN( _start )
stmfd sp!, {r11, r12, lr} // SVCモード レジスタ退避
ldrh r12, [lr, #-2] // システムコールNo取得ハーフワードアクセス対応
mov r12, r12, lsl #1
@ -93,7 +95,7 @@ asm void STUPi_SwiHandler( void )
adr r11, SWI_Table // システムコールアドレス 取得
ldrh r12, [r11, r12]
#ifdef SDK_ARM9
adr r11, _start // = HW_BIOS
ldr r11, =HW_BIOS
orr r12, r12, r11
#endif // SDK_ARM9

View File

@ -35,6 +35,9 @@ extern "C" {
#define HW_BROM_NML HW_BROM
#define HW_BROM_NML_END (HW_BROM_NML + HW_BROM_NML_SIZE)
#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_END (HW_BROM_SEC + HW_BROM_SEC_SIZE)
#define HW_BROM_SEC_SIZE 0x8000 // 32KB

View File

@ -28,8 +28,9 @@ LOAD_NORMAL HW_BROM_NML HW_BROM_NML_SIZE
{
*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_BootCore)
*libos*.brom*.a (:gdef:OSi_ClearWorkArea)

View File

@ -27,6 +27,7 @@ LOAD_NORMAL HW_BROM_NML HW_BROM_NML_SIZE
STUP_ENTRY +0
{
*crt0.*o (.emb_text, +FIRST)
*crt0_excp.o (.emb_text)
}
NML_RO +0
{