mirror of
https://github.com/rvtr/TwlIPL.git
synced 2025-10-31 06:01:12 -04:00
libraries_sysmenuにreloc_infoライブラリ追加。
再配置情報関係のデータ定義や関数をそちらに移動。 git-svn-id: file:///Users/lillianskinner/Downloads/platinum/twl/TwlIPL/trunk@384 b08762b0-b915-fc4b-9d8c-17b2551a87ff
This commit is contained in:
parent
228c1533fe
commit
57a883ac6e
@ -56,6 +56,7 @@ Autoload WRAM
|
|||||||
libboot_sp$(LIBSUFFIX).a \
|
libboot_sp$(LIBSUFFIX).a \
|
||||||
libreboot_sp$(LIBSUFFIX).a \
|
libreboot_sp$(LIBSUFFIX).a \
|
||||||
libcardboot_sp$(LIBSUFFIX).a \
|
libcardboot_sp$(LIBSUFFIX).a \
|
||||||
|
libreloc_info_sp$(LIBSUFFIX).a
|
||||||
|
|
||||||
Library libsdio_hcd_twl$(LIBSUFFIX).a \
|
Library libsdio_hcd_twl$(LIBSUFFIX).a \
|
||||||
libsdio_busdriver$(LIBSUFFIX).a \
|
libsdio_busdriver$(LIBSUFFIX).a \
|
||||||
|
|||||||
@ -22,7 +22,7 @@ include $(TWL_IPL_RED_ROOT)/build/buildtools/commondefs
|
|||||||
|
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
SUBDIRS = sysmenu settings mb_loader acsign boot hotsw
|
SUBDIRS = reloc_info sysmenu settings mb_loader acsign boot hotsw
|
||||||
|
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
49
build/libraries_sysmenu/reloc_info/ARM7/Makefile
Normal file
49
build/libraries_sysmenu/reloc_info/ARM7/Makefile
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
#! make -f
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
# Project: TwlIPL
|
||||||
|
# File: Makefile
|
||||||
|
#
|
||||||
|
# Copyright 2007 Nintendo. All rights reserved.
|
||||||
|
#
|
||||||
|
# These coded instructions, statements, and computer programs contain
|
||||||
|
# proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||||
|
# Company Ltd., and are protected by Federal copyright law. They may
|
||||||
|
# not be disclosed to third parties or copied or duplicated in any form,
|
||||||
|
# in whole or in part, without the prior written consent of Nintendo.
|
||||||
|
#
|
||||||
|
# $Date:: 2007-09-27#$
|
||||||
|
# $Rev: 1203 $
|
||||||
|
# $Author: yada $
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
SUBDIRS =
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
TARGET_FIRM = SYSTEMMENU
|
||||||
|
TARGET_PLATFORM = TWL
|
||||||
|
TWL_ARCHGEN = LIMITED
|
||||||
|
TWL_PROC = ARM7
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
SRCDIR = ../common/src
|
||||||
|
|
||||||
|
SRCS = reloc_info.c
|
||||||
|
|
||||||
|
TARGET_LIB = libreloc_info_sp$(TWL_LIBSUFFIX).a
|
||||||
|
|
||||||
|
|
||||||
|
include $(TWL_IPL_RED_ROOT)/build/buildtools/commondefs
|
||||||
|
|
||||||
|
INSTALL_TARGETS = $(TARGETS)
|
||||||
|
INSTALL_DIR = $(SYSMENU_INSTALL_LIBDIR)
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
do-build: $(TARGETS)
|
||||||
|
|
||||||
|
include $(TWL_IPL_RED_ROOT)/build/buildtools/modulerules
|
||||||
|
|
||||||
|
|
||||||
|
#===== End of Makefile =====
|
||||||
|
|
||||||
49
build/libraries_sysmenu/reloc_info/ARM9/Makefile
Normal file
49
build/libraries_sysmenu/reloc_info/ARM9/Makefile
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
#! make -f
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
# Project: TwlIPL
|
||||||
|
# File: Makefile
|
||||||
|
#
|
||||||
|
# Copyright 2007 Nintendo. All rights reserved.
|
||||||
|
#
|
||||||
|
# These coded instructions, statements, and computer programs contain
|
||||||
|
# proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||||
|
# Company Ltd., and are protected by Federal copyright law. They may
|
||||||
|
# not be disclosed to third parties or copied or duplicated in any form,
|
||||||
|
# in whole or in part, without the prior written consent of Nintendo.
|
||||||
|
#
|
||||||
|
# $Date:: 2007-09-27#$
|
||||||
|
# $Rev: 1203 $
|
||||||
|
# $Author: yada $
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
SUBDIRS =
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
TARGET_FIRM = SYSTEMMENU
|
||||||
|
TARGET_PLATFORM = TWL
|
||||||
|
TWL_ARCHGEN = LIMITED
|
||||||
|
TWL_PROC = ARM9
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
SRCDIR = ../common/src
|
||||||
|
|
||||||
|
SRCS = reloc_info.c
|
||||||
|
|
||||||
|
TARGET_LIB = libreloc_info$(TWL_LIBSUFFIX).a
|
||||||
|
|
||||||
|
|
||||||
|
include $(TWL_IPL_RED_ROOT)/build/buildtools/commondefs
|
||||||
|
|
||||||
|
INSTALL_TARGETS = $(TARGETS)
|
||||||
|
INSTALL_DIR = $(SYSMENU_INSTALL_LIBDIR)
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
do-build: $(TARGETS)
|
||||||
|
|
||||||
|
include $(TWL_IPL_RED_ROOT)/build/buildtools/modulerules
|
||||||
|
|
||||||
|
|
||||||
|
#===== End of Makefile =====
|
||||||
|
|
||||||
30
build/libraries_sysmenu/reloc_info/Makefile
Normal file
30
build/libraries_sysmenu/reloc_info/Makefile
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
#! make -f
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
# Project: TwlIPL
|
||||||
|
# File: Makefile
|
||||||
|
#
|
||||||
|
# Copyright 2007 Nintendo. All rights reserved.
|
||||||
|
#
|
||||||
|
# These coded instructions, statements, and computer programs contain
|
||||||
|
# proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||||
|
# Company Ltd., and are protected by Federal copyright law. They may
|
||||||
|
# not be disclosed to third parties or copied or duplicated in any form,
|
||||||
|
# in whole or in part, without the prior written consent of Nintendo.
|
||||||
|
#
|
||||||
|
# $Date:: 2007-09-27#$
|
||||||
|
# $Rev: 1203 $
|
||||||
|
# $Author: yada $
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
TARGET_FIRM = SYSTEMMENU
|
||||||
|
SUBDIRS = ARM7 ARM9
|
||||||
|
|
||||||
|
include $(TWL_IPL_RED_ROOT)/build/buildtools/commondefs
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
do-build: $(TARGETS)
|
||||||
|
|
||||||
|
include $(TWL_IPL_RED_ROOT)/build/buildtools/modulerules
|
||||||
|
|
||||||
|
#===== End of Makefile =====
|
||||||
145
build/libraries_sysmenu/reloc_info/common/src/reloc_info.c
Normal file
145
build/libraries_sysmenu/reloc_info/common/src/reloc_info.c
Normal file
@ -0,0 +1,145 @@
|
|||||||
|
/*---------------------------------------------------------------------------*
|
||||||
|
Project: TwlIPL
|
||||||
|
File: reloc_info.c
|
||||||
|
|
||||||
|
Copyright 2007 Nintendo. All rights reserved.
|
||||||
|
|
||||||
|
These coded instructions, statements, and computer programs contain
|
||||||
|
proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||||
|
Company Ltd., and are protected by Federal copyright law. They may
|
||||||
|
not be disclosed to third parties or copied or duplicated in any form,
|
||||||
|
in whole or in part, without the prior written consent of Nintendo.
|
||||||
|
|
||||||
|
$Date:: 2007-12-12#$
|
||||||
|
$Rev: 355 $
|
||||||
|
$Author: yosiokat $
|
||||||
|
*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#include <sysmenu/sysmenu_lib/common/sysmenu_work.h>
|
||||||
|
|
||||||
|
// const data------------------------------------------------------------------
|
||||||
|
|
||||||
|
typedef struct RomSegmentRange {
|
||||||
|
u32 start;
|
||||||
|
u32 end;
|
||||||
|
}RomSegmentRange;
|
||||||
|
|
||||||
|
static RomSegmentRange romSegmentRange[RELOCATE_INFO_NUM] = {
|
||||||
|
{ SYSM_TWL_ARM9_LOAD_MMEM, SYSM_TWL_ARM9_LOAD_MMEM_END },
|
||||||
|
{ SYSM_TWL_ARM7_LOAD_MMEM, SYSM_TWL_ARM7_LOAD_MMEM_END },
|
||||||
|
{ SYSM_TWL_ARM9_LTD_LOAD_MMEM, SYSM_TWL_ARM9_LTD_LOAD_MMEM_END },
|
||||||
|
{ SYSM_TWL_ARM7_LTD_LOAD_MMEM, SYSM_TWL_ARM7_LTD_LOAD_MMEM_END },
|
||||||
|
};
|
||||||
|
|
||||||
|
static RomSegmentRange romSegmentRangeNitro[RELOCATE_INFO_NUM] = {
|
||||||
|
{ SYSM_NTR_ARM9_LOAD_MMEM, SYSM_NTR_ARM9_LOAD_MMEM_END },
|
||||||
|
{ SYSM_NTR_ARM7_LOAD_MMEM, SYSM_NTR_ARM7_LOAD_MMEM_END },
|
||||||
|
{ SYSM_TWL_ARM9_LTD_LOAD_MMEM, SYSM_TWL_ARM9_LTD_LOAD_MMEM_END },
|
||||||
|
{ SYSM_TWL_ARM7_LTD_LOAD_MMEM, SYSM_TWL_ARM7_LTD_LOAD_MMEM_END },
|
||||||
|
};
|
||||||
|
|
||||||
|
static u32 load_region_check_list[RELOCATE_INFO_NUM][RELOCATE_INFO_NUM * 2 - 1] =
|
||||||
|
{
|
||||||
|
{SYSM_NTR_ARM7_LOAD_MMEM, SYSM_NTR_ARM7_LOAD_MMEM_END,
|
||||||
|
SYSM_TWL_ARM9_LTD_LOAD_MMEM, SYSM_TWL_ARM9_LTD_LOAD_MMEM_END,
|
||||||
|
SYSM_TWL_ARM7_LTD_LOAD_MMEM, SYSM_TWL_ARM7_LTD_LOAD_MMEM_END,
|
||||||
|
NULL },
|
||||||
|
{SYSM_NTR_ARM9_LOAD_MMEM, SYSM_NTR_ARM9_LOAD_MMEM_END,
|
||||||
|
SYSM_TWL_ARM9_LTD_LOAD_MMEM, SYSM_TWL_ARM9_LTD_LOAD_MMEM_END,
|
||||||
|
SYSM_TWL_ARM7_LTD_LOAD_MMEM, SYSM_TWL_ARM7_LTD_LOAD_MMEM_END,
|
||||||
|
NULL },
|
||||||
|
{SYSM_NTR_ARM9_LOAD_MMEM, SYSM_NTR_ARM9_LOAD_MMEM_END,
|
||||||
|
SYSM_NTR_ARM7_LOAD_MMEM, SYSM_NTR_ARM7_LOAD_MMEM_END,
|
||||||
|
SYSM_TWL_ARM7_LTD_LOAD_MMEM, SYSM_TWL_ARM7_LTD_LOAD_MMEM_END,
|
||||||
|
NULL },
|
||||||
|
{SYSM_NTR_ARM9_LOAD_MMEM, SYSM_NTR_ARM9_LOAD_MMEM_END,
|
||||||
|
SYSM_NTR_ARM7_LOAD_MMEM, SYSM_NTR_ARM7_LOAD_MMEM_END,
|
||||||
|
SYSM_TWL_ARM9_LTD_LOAD_MMEM, SYSM_TWL_ARM9_LTD_LOAD_MMEM_END,
|
||||||
|
NULL },
|
||||||
|
};
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
//
|
||||||
|
// アプリ起動
|
||||||
|
//
|
||||||
|
// ============================================================================
|
||||||
|
|
||||||
|
// ROMのロード先領域をチェックし、再配置の必要があればロード先アドレスを変更し、再配置情報を*infoにセットする。
|
||||||
|
// ロード先領域が被ってはいけない領域のリストcheck_destは{開始, 終了, 開始2, 終了2, ……, NULL}の形式。
|
||||||
|
// 再配置の有り無しに関わらずロード可能ならばTRUE、ロード不可能ならばFALSEを返す
|
||||||
|
// 再配置が必要ない場合、再配置情報のsrc,dest,lengthにはそれぞれNULLが代入される。
|
||||||
|
static BOOL SYSMi_CheckLoadRegionAndSetRelocateInfoEx
|
||||||
|
( u32 *dest, u32 length, RomSegmentRange default_region, u32 *check_dest, Relocate_Info *info )
|
||||||
|
{
|
||||||
|
// 再配置情報が残っている可能性大なのでクリアしておく
|
||||||
|
MI_CpuClearFast( info, sizeof(Relocate_Info) );
|
||||||
|
|
||||||
|
if( default_region.end - default_region.start < length ) return FALSE;// サイズオーバー
|
||||||
|
if( !( default_region.start <= *dest && *dest + length <= default_region.end ) )
|
||||||
|
{
|
||||||
|
// 再配置の必要あり
|
||||||
|
while( *check_dest != NULL )
|
||||||
|
{
|
||||||
|
if( check_dest[0] < *dest + length && *dest < check_dest[1] ) return FALSE;// チェック領域に被ったらNG
|
||||||
|
check_dest += 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ここまで来ていれば再配置可能
|
||||||
|
// 後方コピーフラグOFF
|
||||||
|
info->rev = FALSE;
|
||||||
|
if( default_region.start < *dest + length && *dest + length <= default_region.end )
|
||||||
|
{
|
||||||
|
// デフォルト配置領域の先頭部に、再配置先の後部が被っている
|
||||||
|
// ポストクリア情報
|
||||||
|
info->post_clear_addr = *dest + length;
|
||||||
|
info->post_clear_length = default_region.end - (*dest + length);
|
||||||
|
}
|
||||||
|
else if( default_region.start <= *dest && *dest < default_region.end )
|
||||||
|
{
|
||||||
|
// デフォルト配置領域の後部に、再配置先の先頭部が被っている
|
||||||
|
// ポストクリア情報
|
||||||
|
info->post_clear_addr = default_region.start;
|
||||||
|
info->post_clear_length = *dest - default_region.start;
|
||||||
|
if( *dest < default_region.start + length )
|
||||||
|
{
|
||||||
|
// 更に、デフォルト配置領域にロードしたデータの最後尾と再配置先の先頭部が被っている
|
||||||
|
// 後方コピーフラグON
|
||||||
|
info->rev = TRUE;
|
||||||
|
}
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
// まったく被っていない
|
||||||
|
// ポストクリア情報
|
||||||
|
info->post_clear_addr = default_region.start;
|
||||||
|
info->post_clear_length = default_region.end - default_region.start;
|
||||||
|
}
|
||||||
|
info->src = default_region.start;
|
||||||
|
info->dest = *dest;
|
||||||
|
info->length = length;
|
||||||
|
*dest = default_region.start;
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
// 再配置の必要なし
|
||||||
|
info->src = NULL;
|
||||||
|
info->dest = NULL;
|
||||||
|
info->length = NULL;
|
||||||
|
info->post_clear_addr = NULL;
|
||||||
|
info->post_clear_length = NULL;
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
// SYSMi_CheckLoadRegionAndSetRelocateInfoExのラッパー関数
|
||||||
|
BOOL SYSM_CheckLoadRegionAndSetRelocateInfo( RomSegmentName seg, u32 *dest, u32 length, Relocate_Info *info, BOOL isTwlApp)
|
||||||
|
{
|
||||||
|
RomSegmentRange *rsr;
|
||||||
|
if( isTwlApp )
|
||||||
|
{
|
||||||
|
rsr = romSegmentRange;
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
//NTR専用
|
||||||
|
rsr = romSegmentRangeNitro;
|
||||||
|
}
|
||||||
|
return SYSMi_CheckLoadRegionAndSetRelocateInfoEx(dest, length, rsr[seg], load_region_check_list[seg], info);
|
||||||
|
}
|
||||||
@ -517,83 +517,6 @@ BOOL SYSM_IsValidTSD( void )
|
|||||||
//
|
//
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
// ROMのロード先領域をチェックし、再配置の必要があればロード先アドレスを変更し、再配置情報を*infoにセットする。
|
|
||||||
// ロード先領域が被ってはいけない領域のリストcheck_destは{開始, 終了, 開始2, 終了2, ……, NULL}の形式。
|
|
||||||
// 再配置の有り無しに関わらずロード可能ならばTRUE、ロード不可能ならばFALSEを返す
|
|
||||||
// 再配置が必要ない場合、再配置情報のsrc,dest,lengthにはそれぞれNULLが代入される。
|
|
||||||
static BOOL SYSMi_CheckLoadRegionAndSetRelocateInfoEx
|
|
||||||
( u32 *dest, u32 length, RomSegmentRange default_region, u32 *check_dest, Relocate_Info *info )
|
|
||||||
{
|
|
||||||
if( default_region.end - default_region.start < length ) return FALSE;// サイズオーバー
|
|
||||||
if( !( default_region.start <= *dest && *dest + length <= default_region.end ) )
|
|
||||||
{
|
|
||||||
// 再配置の必要あり
|
|
||||||
while( *check_dest != NULL )
|
|
||||||
{
|
|
||||||
if( check_dest[0] < *dest + length && *dest < check_dest[1] ) return FALSE;// チェック領域に被ったらNG
|
|
||||||
check_dest += 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
// ここまで来ていれば再配置可能
|
|
||||||
// 後方コピーフラグOFF
|
|
||||||
info->rev = FALSE;
|
|
||||||
if( default_region.start < *dest + length && *dest + length <= default_region.end )
|
|
||||||
{
|
|
||||||
// デフォルト配置領域の先頭部に、再配置先の後部が被っている
|
|
||||||
// ポストクリア情報
|
|
||||||
info->post_clear_addr = *dest + length;
|
|
||||||
info->post_clear_length = default_region.end - (*dest + length);
|
|
||||||
}
|
|
||||||
else if( default_region.start <= *dest && *dest < default_region.end )
|
|
||||||
{
|
|
||||||
// デフォルト配置領域の後部に、再配置先の先頭部が被っている
|
|
||||||
// ポストクリア情報
|
|
||||||
info->post_clear_addr = default_region.start;
|
|
||||||
info->post_clear_length = *dest - default_region.start;
|
|
||||||
if( *dest < default_region.start + length )
|
|
||||||
{
|
|
||||||
// 更に、デフォルト配置領域にロードしたデータの最後尾と再配置先の先頭部が被っている
|
|
||||||
// 後方コピーフラグON
|
|
||||||
info->rev = TRUE;
|
|
||||||
}
|
|
||||||
}else
|
|
||||||
{
|
|
||||||
// まったく被っていない
|
|
||||||
// ポストクリア情報
|
|
||||||
info->post_clear_addr = default_region.start;
|
|
||||||
info->post_clear_length = default_region.end - default_region.start;
|
|
||||||
}
|
|
||||||
info->src = default_region.start;
|
|
||||||
info->dest = *dest;
|
|
||||||
info->length = length;
|
|
||||||
*dest = default_region.start;
|
|
||||||
}else
|
|
||||||
{
|
|
||||||
// 再配置の必要なし
|
|
||||||
info->src = NULL;
|
|
||||||
info->dest = NULL;
|
|
||||||
info->length = NULL;
|
|
||||||
info->post_clear_addr = NULL;
|
|
||||||
info->post_clear_length = NULL;
|
|
||||||
}
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
// SYSMi_CheckLoadRegionAndSetRelocateInfoExのラッパー関数
|
|
||||||
BOOL SYSM_CheckLoadRegionAndSetRelocateInfo( RomSegmentName seg, u32 *dest, u32 length, Relocate_Info *info, BOOL isTwlApp)
|
|
||||||
{
|
|
||||||
RomSegmentRange *rsr;
|
|
||||||
if( isTwlApp )
|
|
||||||
{
|
|
||||||
rsr = romSegmentRange;
|
|
||||||
}else
|
|
||||||
{
|
|
||||||
//NTR専用
|
|
||||||
rsr = romSegmentRangeNitro;
|
|
||||||
}
|
|
||||||
return SYSMi_CheckLoadRegionAndSetRelocateInfoEx(dest, length, rsr[seg], load_region_check_list[seg], info);
|
|
||||||
}
|
|
||||||
|
|
||||||
// TWLアプリのみ対応、NTRはまだ
|
// TWLアプリのみ対応、NTRはまだ
|
||||||
static void SYSMi_LoadTitleThreadFunc( TitleProperty *pBootTitle )
|
static void SYSMi_LoadTitleThreadFunc( TitleProperty *pBootTitle )
|
||||||
{
|
{
|
||||||
@ -695,8 +618,6 @@ OS_TPrintf("RebootSystem failed: logo CRC error\n");
|
|||||||
source [region_arm7_twl] = *(const u32*)&header[0x1D0];
|
source [region_arm7_twl] = *(const u32*)&header[0x1D0];
|
||||||
length [region_arm7_twl] = *(const u32*)&header[0x1DC];
|
length [region_arm7_twl] = *(const u32*)&header[0x1DC];
|
||||||
destaddr[region_arm7_twl] = *(const u32*)&header[0x1D8];
|
destaddr[region_arm7_twl] = *(const u32*)&header[0x1D8];
|
||||||
|
|
||||||
MI_CpuClearFast( (void *)SYSMi_GetWork()->romRelocateInfo, RELOCATE_INFO_NUM * sizeof(Relocate_Info) );
|
|
||||||
|
|
||||||
// 領域読み込み先のチェック及び再配置情報データの作成
|
// 領域読み込み先のチェック及び再配置情報データの作成
|
||||||
for( i=0; i<RELOCATE_INFO_NUM; i++ )
|
for( i=0; i<RELOCATE_INFO_NUM; i++ )
|
||||||
|
|||||||
@ -17,6 +17,7 @@
|
|||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
|
|
||||||
SUBDIRS = \
|
SUBDIRS = \
|
||||||
|
../../../libraries_sysmenu/reloc_info \
|
||||||
../../../libraries_sysmenu/sysmenu \
|
../../../libraries_sysmenu/sysmenu \
|
||||||
../../../libraries_sysmenu/settings \
|
../../../libraries_sysmenu/settings \
|
||||||
../../../libraries_sysmenu/boot \
|
../../../libraries_sysmenu/boot \
|
||||||
@ -52,7 +53,8 @@ LINCLUDES = $(MISC_DIR)/include \
|
|||||||
$(SRCDIR)/$(LOGO_DIR)
|
$(SRCDIR)/$(LOGO_DIR)
|
||||||
|
|
||||||
LLIBRARIES += libnam$(TWL_LIBSUFFIX).a \
|
LLIBRARIES += libnam$(TWL_LIBSUFFIX).a \
|
||||||
libese$(TWL_LIBSUFFIX).a
|
libese$(TWL_LIBSUFFIX).a \
|
||||||
|
libreloc_info$(TWL_LIBSUFFIX).a
|
||||||
|
|
||||||
ADDRESS_DTCM = 0x0e000000
|
ADDRESS_DTCM = 0x0e000000
|
||||||
|
|
||||||
|
|||||||
60
include/sysmenu/reloc_info/common/reloc_info.h
Normal file
60
include/sysmenu/reloc_info/common/reloc_info.h
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
/*---------------------------------------------------------------------------*
|
||||||
|
Project: TwlIPL
|
||||||
|
File: reloc_info.h
|
||||||
|
|
||||||
|
Copyright 2007 Nintendo. All rights reserved.
|
||||||
|
|
||||||
|
These coded instructions, statements, and computer programs contain
|
||||||
|
proprietary information of Nintendo of America Inc. and/or Nintendo
|
||||||
|
Company Ltd., and are protected by Federal copyright law. They may
|
||||||
|
not be disclosed to third parties or copied or duplicated in any form,
|
||||||
|
in whole or in part, without the prior written consent of Nintendo.
|
||||||
|
|
||||||
|
$Date:: 2007-12-12#$
|
||||||
|
$Rev: 352 $
|
||||||
|
$Author: yoshida_teruhisa $
|
||||||
|
*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
|
#ifndef __SYSMENU_RELOC_INFO_H__
|
||||||
|
#define __SYSMENU_RELOC_INFO_H__
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
// データ型定義
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
|
// 再配置情報データ構造体
|
||||||
|
typedef struct Relocate_Info
|
||||||
|
{
|
||||||
|
u32 src;
|
||||||
|
u32 dest;
|
||||||
|
u32 length;
|
||||||
|
u32 post_clear_addr;
|
||||||
|
u32 post_clear_length;
|
||||||
|
BOOL rev;
|
||||||
|
}Relocate_Info;
|
||||||
|
|
||||||
|
// ROMセグメント名
|
||||||
|
typedef enum RomSegmentName {
|
||||||
|
ARM9_STATIC = 0,
|
||||||
|
ARM7_STATIC = 1,
|
||||||
|
ARM9_LTD_STATIC = 2,
|
||||||
|
ARM7_LTD_STATIC = 3
|
||||||
|
}RomSegmentName;
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
// 関数宣言
|
||||||
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
|
// ロード領域のチェック及び再配置情報の生成
|
||||||
|
BOOL SYSM_CheckLoadRegionAndSetRelocateInfo( RomSegmentName seg, u32 *dest, u32 length, Relocate_Info *info, BOOL isTwlApp );
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // __SYSMENU_RELOC_INFO_H__
|
||||||
|
|
||||||
@ -24,6 +24,7 @@
|
|||||||
#include <sysmenu/banner.h>
|
#include <sysmenu/banner.h>
|
||||||
#include <sysmenu/settings.h>
|
#include <sysmenu/settings.h>
|
||||||
#include <sysmenu/sysmenu_lib/common/sysmenu_work.h>
|
#include <sysmenu/sysmenu_lib/common/sysmenu_work.h>
|
||||||
|
#include <sysmenu/reloc_info/common/reloc_info.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -68,14 +69,6 @@ typedef enum AuthResult {
|
|||||||
AUTH_RESULT_ENTRY_ADDRESS_ERROR = 5
|
AUTH_RESULT_ENTRY_ADDRESS_ERROR = 5
|
||||||
}AuthResult;
|
}AuthResult;
|
||||||
|
|
||||||
// ROMセグメント名
|
|
||||||
typedef enum RomSegmentName {
|
|
||||||
ARM9_STATIC = 0,
|
|
||||||
ARM7_STATIC = 1,
|
|
||||||
ARM9_LTD_STATIC = 2,
|
|
||||||
ARM7_LTD_STATIC = 3
|
|
||||||
}RomSegmentName;
|
|
||||||
|
|
||||||
|
|
||||||
// global variable------------------------------------------------------
|
// global variable------------------------------------------------------
|
||||||
extern void *(*SYSM_Alloc)( u32 size ); // ライブラリ内部使用
|
extern void *(*SYSM_Alloc)( u32 size ); // ライブラリ内部使用
|
||||||
@ -93,7 +86,6 @@ extern int SYSM_GetCardTitleList( TitleProperty *pTitleList_Card ); //
|
|||||||
extern int SYSM_GetNandTitleList( TitleProperty *pTitleList_Nand, int size ); // NAND アプリタイトルリストの取得
|
extern int SYSM_GetNandTitleList( TitleProperty *pTitleList_Nand, int size ); // NAND アプリタイトルリストの取得
|
||||||
|
|
||||||
// アプリ起動
|
// アプリ起動
|
||||||
BOOL SYSM_CheckLoadRegionAndSetRelocateInfo( RomSegmentName seg, u32 *dest, u32 length, Relocate_Info *info, BOOL isTwlApp ); //
|
|
||||||
extern void SYSM_StartLoadTitle( TitleProperty *pBootTitle ); // 指定したTitlePropertyを別スレッドでロード開始
|
extern void SYSM_StartLoadTitle( TitleProperty *pBootTitle ); // 指定したTitlePropertyを別スレッドでロード開始
|
||||||
extern BOOL SYSM_IsLoadTitleFinished( TitleProperty *pBootTitle ); // SYSM_StartLoadTitleで起動したスレッドが終了したかどうかを確認
|
extern BOOL SYSM_IsLoadTitleFinished( TitleProperty *pBootTitle ); // SYSM_StartLoadTitleで起動したスレッドが終了したかどうかを確認
|
||||||
extern AuthResult SYSM_AuthenticateTitle( TitleProperty *pBootTitle ); // 指定したTitlePropertyを認証してブート
|
extern AuthResult SYSM_AuthenticateTitle( TitleProperty *pBootTitle ); // 指定したTitlePropertyを認証してブート
|
||||||
|
|||||||
@ -22,6 +22,7 @@
|
|||||||
#include <twl/nam.h>
|
#include <twl/nam.h>
|
||||||
|
|
||||||
#include <sysmenu/memorymap.h>
|
#include <sysmenu/memorymap.h>
|
||||||
|
#include <sysmenu/reloc_info/common/reloc_info.h>
|
||||||
//#include <sysmenu/reset_param/ARM9/reset_param.h>
|
//#include <sysmenu/reset_param/ARM9/reset_param.h>
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
@ -48,17 +49,6 @@ typedef struct TitleID_HiLo {
|
|||||||
// データ型定義
|
// データ型定義
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
// 再配置情報データ構造体
|
|
||||||
typedef struct Relocate_Info
|
|
||||||
{
|
|
||||||
u32 src;
|
|
||||||
u32 dest;
|
|
||||||
u32 length;
|
|
||||||
u32 post_clear_addr;
|
|
||||||
u32 post_clear_length;
|
|
||||||
BOOL rev;
|
|
||||||
}Relocate_Info;
|
|
||||||
|
|
||||||
// SYSM共有ワーク構造体
|
// SYSM共有ワーク構造体
|
||||||
typedef struct SYSM_work {
|
typedef struct SYSM_work {
|
||||||
Relocate_Info romRelocateInfo[RELOCATE_INFO_NUM]; // ROM再配置情報(arm9,arm7それぞれltdとflxで最大4つ)
|
Relocate_Info romRelocateInfo[RELOCATE_INFO_NUM]; // ROM再配置情報(arm9,arm7それぞれltdとflxで最大4つ)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user