Skip to content

Commit 3006f47

Browse files
authored
Add Aromas Memory Map
1 parent ec300e2 commit 3006f47

File tree

1 file changed

+82
-0
lines changed

1 file changed

+82
-0
lines changed

memorymap.txt

+82
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
payload.elf maps memory on the main core: 0x00800000 - 0x01000000
2+
[0x00800000 - 0x01000000: empty]
3+
4+
PayloadLoaderPayload will get loaded to: 0x00FD0000
5+
[0x00800000 to 0x00FD0000 : empty]
6+
[0x00FD0000 to 0x00FFF000 : PayloadLoaderPayload]
7+
[0x00FFF000 to 0x01000000 : empty]
8+
9+
CustomRPXLoader will get loaded to: 0x00800000
10+
[0x00800000 to 0x00800000 + sizeof(CustomRPXLoader)) : CustomRPXLoader]
11+
[0x00FD0000 to 0x00FFF000 : PayloadLoaderPayload]
12+
[0x00FFF000 to 0x01000000 : empty]
13+
14+
CustomRPXLoader will copy the BATSetupHook to 0x00FFF000
15+
[0x00800000 to 0x00800000 + sizeof(CustomRPXLoader) : CustomRPXLoader]
16+
[endof(CustomRPXLoader) to 0x00FD0000 : empty]
17+
[0x00FD0000 to 0x00FFF000 : PayloadLoaderPayload]
18+
[0x00FFF000 to 0x01000000 : BATSetupHook]
19+
20+
The EnvironmentLoader (payload.rpx ) will to be loaded to be right before 0x00FD0000
21+
[0x00800000 to 0x00800000 + sizeof(CustomRPXLoader) : CustomRPXLoader]
22+
[(0x00FD0000 - sizeof(EnvironmentLoader)) to 0x00FD0000 : EnvironmentLoader]
23+
[0x00FD0000 to 0x00FFF000 : PayloadLoaderPayload]
24+
[0x00FFF000 to 0x01000000 : BATSetupHook]
25+
26+
The EnvironmentLoader is responsible for exiting. This means it can safely overwrite the CustomRPXLoader and PayloadLoaderPayload
27+
[0x00800000 to startof(EnvironmentLoader)) : empty]
28+
[startof(EnvironmentLoader) to 0x00FD0000 : EnvironmentLoader]
29+
[0x00FD0000 to 0x00FFF000 : empty]
30+
[0x00FFF000 to 0x01000000 : BATSetupHook]
31+
32+
The EnvironmentLoader with use the memory region from the start (0x00800000) to itself (startof(EnvironmentLoader)) to load the setup modules (one at a time).
33+
Each module is loaded to the **end** of this region (startof(currentModule) = (0x00FD0000 - sizeof(EnvironmentLoader) - sizeof(currentModule))
34+
[0x00800000 to startof(currentModule) : empty]
35+
[startof(EnvironmentLoader) - sizeof(currentModule) to startof(EnvironmentLoader) : current setup module (aligned to the end)]
36+
[(0x00FD0000 - sizeof(EnvironmentLoader)) to 0x00FD0000 : EnvironmentLoader]
37+
[0x00FD0000 to 0x00FFF000 : empty]
38+
[0x00FFF000 to 0x01000000 : BATSetupHook]
39+
40+
When the WUMSLoader gets loaded by the EnvironmentLoader (current setup module is now shown as WUMSLoader), it'll copy it's "wumsrelocator" to 0x00800000.
41+
[0x00800000 to 0x00800000 + sizeof(wumsrelocator) : wumsrelocator]
42+
[endof(wumsrelocator) to startof(WUMSLoader) : empty]
43+
[sizeof(WUMSLoader) to startof(EnvironmentLoader) : WUMSLoader (current setup module) (aligned to the end)]
44+
[(0x00FD0000 - sizeof(EnvironmentLoader)) to 0x00FD0000 : EnvironmentLoader]
45+
[0x00FD0000 to 0x00FFF000 : empty]
46+
[0x00FFF000 to 0x01000000 : BATSetupHook]
47+
48+
The WUMSLoader will also load the "Aroma Modules" (these are different than the setup modules!) into the region between the wumsrelocator and WUMSLoader.
49+
[0x00800000 to 0x00800000 + sizeof(wumsrelocator) : wumsrelocator]
50+
[endof(wumsrelocator) to startof(WUMSLoader) : Aroma Modules]
51+
[sizeof(WUMSLoader) to startof(EnvironmentLoader) : WUMSLoader (current setup module) (aligned to the end)]
52+
[(0x00FD0000 - sizeof(EnvironmentLoader)) to 0x00FD0000 : EnvironmentLoader]
53+
[0x00FD0000 to 0x00FFF000 : empty]
54+
[0x00FFF000 to 0x01000000 : BATSetupHook]
55+
56+
The WUMSLoader will also load the Wiiu Plugin Backend, it's plugins will get loaded to Aromas custom memory:
57+
[0x00800000 to 0x00800000 + sizeof(wumsrelocator) : wumsrelocator]
58+
[endof(wumsrelocator) to startof(WUMSLoader) : Aroma Modules]
59+
[sizeof(WUMSLoader) to startof(EnvironmentLoader) : WUMSLoader (current setup module) (aligned to the end)]
60+
[(0x00FD0000 - sizeof(EnvironmentLoader)) to 0x00FD0000 : EnvironmentLoader]
61+
[0x00FD0000 to 0x00FFF000 : empty]
62+
[0x00FFF000 to 0x01000000 : BATSetupHook]
63+
[0x8XXXXXXX to 0xXXXXXXXX : Aromas Plugins, Aromas Heap]
64+
65+
66+
Now the EnvironmentLoader can't use that region at the start anymore to load it's setup modules. Instead we use the custom memory from Aroma to load any further setup modules (e.g. the AutobootModule)
67+
[0x00800000 to 0x00800000 + sizeof(wumsrelocator) : wumsrelocator]
68+
[endof(wumsrelocator) to endof(wumsrelocator)+ sizeof(AromaModules) : Aroma Modules]
69+
[endof(AromaModules) to startof(EnvironmentLoader) : empty] // This is where the WUMSLoader was
70+
[(0x00FD0000 - sizeof(EnvironmentLoader)) to 0x00FD0000 : EnvironmentLoader]
71+
[0x00FD0000 to 0x00FFF000 : empty] // This is where the PayloadLoaderPayload was
72+
[0x00FFF000 to 0x01000000 : BATSetupHook]
73+
[0x8XXXXXXX to 0x8XXXXXXX : Aromas Plugins, Aromas Heap, current setup module (in aroma custom memory]
74+
75+
The memory region where the WUMSLoader, EnvironmentLoader and PayloadLoaderPayload were loaded can't be used for Aroma.
76+
[0x00800000 to 0x00800000 + sizeof(wumsrelocator) : wumsrelocator]
77+
[endof(wumsrelocator) to endof(wumsrelocator)+ sizeof(AromaModules) : Aroma Modules]
78+
[endof(AromaModules) to startof(WUMSLoader) : empty] // This is where the WUMSLoader was
79+
[endof(WUMSLoader) to endof(EnvironmentLoader) : empty] // This is where the EnvironmentLoader was
80+
[0x00FD0000 to 0x00FFF000 : empty] // This is where the PayloadLoaderPayload was
81+
[0x00FFF000 to 0x01000000 : BATSetupHook]
82+
[0x8XXXXXXX to 0x8XXXXXXX : Aromas Plugins, Aromas Heap, current setup module (in aroma custom memory]

0 commit comments

Comments
 (0)