hello jeff666,
thanks for the idea, I searching in the forum how to implent. Should it be added to boot.c? how?
jeff666, what do think bout using the s5is code as a template for the g9(as v3rtex suggested)?
I was looking to the s5is boot.c, it implements a complete sub_ff810000, but from my ida's dump ff810000, looks like this:
ROM:FF810000 ; Segment type: Pure code
ROM:FF810000 AREA ROM, CODE, READWRITE, ALIGN=0
ROM:FF810000 ; ORG 0xFF810000
ROM:FF810000 ; START OF FUNCTION CHUNK FOR sub_FF82C7E4
ROM:FF810000 CODE32
ROM:FF810000
ROM:FF810000 loc_FF810000 ; CODE XREF: sub_FF82C7E4+E4j
ROM:FF810000 ; DATA XREF: ROM:off_FF823788o ...
ROM:FF810000 B loc_FF81000C
ROM:FF810000 ; END OF FUNCTION CHUNK FOR sub_FF82C7E4
ROM:FF810000 ; ---------------------------------------------------------------------------
ROM:FF810004 aGaonisoy DCB "gaonisoy"
ROM:FF81000C ; ---------------------------------------------------------------------------
ROM:FF81000C ; START OF FUNCTION CHUNK FOR sub_FF82C7E4
ROM:FF81000C
ROM:FF81000C loc_FF81000C ; CODE XREF: sub_FF82C7E4:loc_FF810000j
ROM:FF81000C LDR R1, =0xC0410000
ROM:FF810010 MOV R0, #0
ROM:FF810014 STR R0, [R1]
ROM:FF810018 MOV R1, #0x78
ROM:FF81001C MCR p15, 0, R1,c1,c0
ROM:FF810020 MOV R1, #0
ROM:FF810024 MCR p15, 0, R1,c7,c10, 4
ROM:FF810028 MCR p15, 0, R1,c7,c5
ROM:FF81002C MCR p15, 0, R1,c7,c6
ROM:FF810030 MOV R0, #0x3D
ROM:FF810034 MCR p15, 0, R0,c6,c0
ROM:FF810038 MOV R0, #0xC000002F
ROM:FF81003C MCR p15, 0, R0,c6,c1
ROM:FF810040 MOV R0, #0x33
ROM:FF810044 MCR p15, 0, R0,c6,c2
ROM:FF810048 LDR R0, =0x10000033
ROM:FF81004C MCR p15, 0, R0,c6,c3
ROM:FF810050 MOV R0, #0x40000017
ROM:FF810054 MCR p15, 0, R0,c6,c4
ROM:FF810058 LDR R0, =0xFF80002D
ROM:FF81005C MCR p15, 0, R0,c6,c5
ROM:FF810060 MOV R0, #0x34
ROM:FF810064 MCR p15, 0, R0,c2,c0
ROM:FF810068 MOV R0, #0x34
ROM:FF81006C MCR p15, 0, R0,c2,c0, 1
ROM:FF810070 MOV R0, #0x34
ROM:FF810074 MCR p15, 0, R0,c3,c0
ROM:FF810078 LDR R0, =0x3333330
ROM:FF81007C MCR p15, 0, R0,c5,c0, 2
ROM:FF810080 LDR R0, =0x3333330
ROM:FF810084 MCR p15, 0, R0,c5,c0, 3
ROM:FF810088 MRC p15, 0, R0,c1,c0
ROM:FF81008C ORR R0, R0, #0x1000
ROM:FF810090 ORR R0, R0, #4
ROM:FF810094 ORR R0, R0, #1
ROM:FF810098 MCR p15, 0, R0,c1,c0
ROM:FF81009C MOV R1, #0x40000006
ROM:FF8100A0 MCR p15, 0, R1,c9,c1
ROM:FF8100A4 MOV R1, #6
ROM:FF8100A8 MCR p15, 0, R1,c9,c1, 1
ROM:FF8100AC MRC p15, 0, R1,c1,c0
ROM:FF8100B0 ORR R1, R1, #0x50000
ROM:FF8100B4 MCR p15, 0, R1,c1,c0
ROM:FF8100B8 LDR R2, =0xC0200000
ROM:FF8100BC MOV R1, #1
ROM:FF8100C0 STR R1, [R2,#0x10C]
ROM:FF8100C4 MOV R1, #0xFF
ROM:FF8100C8 STR R1, [R2,#0xC]
ROM:FF8100CC STR R1, [R2,#0x1C]
ROM:FF8100D0 STR R1, [R2,#0x2C]
ROM:FF8100D4 STR R1, [R2,#0x3C]
ROM:FF8100D8 STR R1, [R2,#0x4C]
ROM:FF8100DC STR R1, [R2,#0x5C]
ROM:FF8100E0 STR R1, [R2,#0x6C]
ROM:FF8100E4 STR R1, [R2,#0x7C]
ROM:FF8100E8 STR R1, [R2,#0x8C]
ROM:FF8100EC STR R1, [R2,#0x9C]
ROM:FF8100F0 STR R1, [R2,#0xAC]
ROM:FF8100F4 STR R1, [R2,#0xBC]
ROM:FF8100F8 STR R1, [R2,#0xCC]
ROM:FF8100FC STR R1, [R2,#0xDC]
ROM:FF810100 STR R1, [R2,#0xEC]
ROM:FF810104 STR R1, [R2,#0xFC]
ROM:FF810108 LDR R1, =0xC0400008
ROM:FF81010C LDR R2, =0x430005
ROM:FF810110 STR R2, [R1]
ROM:FF810114 MOV R1, #1
ROM:FF810118 LDR R2, =0xC0243100
ROM:FF81011C STR R2, [R1]
ROM:FF810120 LDR R2, =0xC0242010
ROM:FF810124 LDR R1, [R2]
ROM:FF810128 ORR R1, R1, #1
ROM:FF81012C STR R1, [R2]
ROM:FF810130 LDR R0, =unk_FFB2E3F4
ROM:FF810134 LDR R1, =0x1900
ROM:FF810138 LDR R3, =0x140E4
ROM:FF81013C
ROM:FF81013C loc_FF81013C ; CODE XREF: sub_FF82C7E4-1C69Cj
ROM:FF81013C CMP R1, R3
ROM:FF810140 LDRCC R2, [R0],#4
ROM:FF810144 STRCC R2, [R1],#4
ROM:FF810148 BCC loc_FF81013C
ROM:FF81014C LDR R1, =0xB0B68
ROM:FF810150 MOV R2, #0
ROM:FF810154
ROM:FF810154 loc_FF810154 ; CODE XREF: sub_FF82C7E4-1C688j
ROM:FF810154 CMP R3, R1
ROM:FF810158 STRCC R2, [R3],#4
ROM:FF81015C BCC loc_FF810154
ROM:FF810160 B loc_FF8101A4
ROM:FF810160 ; END OF FUNCTION CHUNK FOR sub_FF82C7E4