__OSPSInit
This commit is contained in:
parent
f61e1c5f0e
commit
144d8eac24
8 changed files with 63 additions and 2 deletions
|
@ -1,7 +1,9 @@
|
|||
build/obj/sdk/msl/runtime/__mem.o
|
||||
build/obj/sdk/trk/__exception.o
|
||||
build/obj/2.o
|
||||
build/obj/sdk/rvl/os/OS.o
|
||||
build/obj/3.o
|
||||
build/obj/sdk/rvl/os/__start.o
|
||||
build/obj/sdk/rvl/os/__ppc_eabi_init.o
|
||||
build/obj/5.o
|
||||
build/obj/6.o
|
||||
build/obj/7.o
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
.init start,.init end,extab start,extab end,extabindex start,extabindex end,.text start,.text end,.ctors start,.ctors end,.dtors start,.dtors end,.rodata start,.rodata end,.data start,.data end,.bss start,.bss end,.sdata start,.sdata end,.sbss start,.sbss end,.sdata2 start,.sdata2 end,.sbss2 start,.sbss2 end,File
|
||||
80004000,80004380,,,,,,,,,,,,,,,,,,,,,,,,,sdk/msl/runtime/__mem.o
|
||||
80004380,800062c0,,,,,,,,,,,,,,,,,,,,,,,,,sdk/trk/__exception.o
|
||||
,,,,,,8001b670,8001b6c4,,,,,,,,,,,,,,,,,,,sdk/rvl/os/OS.o
|
||||
800062c0,80006620,,,,,,,,,,,,,,,,,,,8055c878,8055c879,,,,,sdk/rvl/os/__start.o
|
||||
80006620,80006684,,,,,,,,,,,,,,,,,,,,,,,,,sdk/rvl/os/__ppc_eabi_init.o
|
||||
,,,,,,,,80406540,80406544,,,,,,,,,,,,,,,,,Linker generated symbol file
|
||||
|
|
|
|
@ -6,9 +6,11 @@ Address,SymbolName
|
|||
80015aac,InitMetroTRK_BBA
|
||||
80015d28,__TRKreset
|
||||
800190a0,TRK_InterruptHandler
|
||||
8001a200,PPCMfhid2
|
||||
8001a210,PPCMthid2
|
||||
8001a2c0,__OSFPRInit
|
||||
8001ad80,OSInit
|
||||
8001b670,__OSPSInit
|
||||
8001cab0,ICFlashInvalidate
|
||||
8001cea0,__OSCacheInit
|
||||
80023820,OSResetSystem
|
||||
80028530,__init_user
|
||||
|
|
|
14
include/base.h
Normal file
14
include/base.h
Normal file
|
@ -0,0 +1,14 @@
|
|||
#pragma once
|
||||
|
||||
#include "types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
u32 PPCMfhid2(void);
|
||||
void PPCMthid2(u32 fhid);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
11
include/ic.h
Normal file
11
include/ic.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void ICFlashInvalidate(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
11
include/types.h
Normal file
11
include/types.h
Normal file
|
@ -0,0 +1,11 @@
|
|||
#pragma once
|
||||
|
||||
typedef unsigned char u8;
|
||||
typedef unsigned short u16;
|
||||
typedef unsigned long u32;
|
||||
typedef unsigned long long u64;
|
||||
|
||||
typedef signed char s8;
|
||||
typedef short s16;
|
||||
typedef long s32;
|
||||
typedef long long s64;
|
19
sdk/rvl/os/OS.c
Normal file
19
sdk/rvl/os/OS.c
Normal file
|
@ -0,0 +1,19 @@
|
|||
#include <base.h>
|
||||
#include <types.h>
|
||||
|
||||
void __OSPSInit(void) {
|
||||
PPCMthid2(PPCMfhid2() | 0xA0000000);
|
||||
ICFlashInvalidate();
|
||||
asm {
|
||||
sync;
|
||||
li r3, 0;
|
||||
mtspr 912, r3;
|
||||
mtspr 913, r3;
|
||||
mtspr 914, r3;
|
||||
mtspr 915, r3;
|
||||
mtspr 916, r3;
|
||||
mtspr 917, r3;
|
||||
mtspr 918, r3;
|
||||
mtspr 919, r3;
|
||||
}
|
||||
}
|
|
@ -13,6 +13,7 @@ fn parse_hex(s: &str) -> Result<u32, ParseIntError> {
|
|||
|
||||
const SOURCES: &[(&str, &str)] = &[
|
||||
("sdk/msl/runtime/__mem.c", "msl"),
|
||||
("sdk/rvl/os/OS.c", "sdk"),
|
||||
("sdk/rvl/os/__start.c", "sdk"),
|
||||
("sdk/rvl/os/__ppc_eabi_init.c", "sdk"),
|
||||
];
|
||||
|
|
Loading…
Reference in a new issue