diff --git a/fusee_cpp/program/program_ovl.ld b/fusee_cpp/program/program_ovl.ld
index 24262fe33..e0e27de9f 100644
--- a/fusee_cpp/program/program_ovl.ld
+++ b/fusee_cpp/program/program_ovl.ld
@@ -23,17 +23,17 @@ SECTIONS {
BYTE(0x00);
}
.ovl_mtc_erista {
+ KEEP(*(.text._ZN3ams6nxboot22DoMemoryTrainingEristaEiPv))
+ fusee_mtc_erista.o(.text*);
fusee_mtc_erista.o(SORT(.rodata*));
- fusee_mtc_erista.o(SORT(.data*));
- fusee_mtc_erista.o(SORT(.bss*));
FILL(0x00000000)
. = ORIGIN(ovl) + LENGTH(ovl) - 1;
BYTE(0x00);
}
.ovl_mtc_mariko {
+ KEEP(*(.text._ZN3ams6nxboot22DoMemoryTrainingMarikoEPbiPv))
+ fusee_mtc_mariko.o(.text*);
fusee_mtc_mariko.o(SORT(.rodata*));
- fusee_mtc_mariko.o(SORT(.data*));
- fusee_mtc_mariko.o(SORT(.bss*));
FILL(0x00000000)
. = ORIGIN(ovl) + LENGTH(ovl) - 1;
BYTE(0x00);
diff --git a/fusee_cpp/program/source/mtc/fusee_mtc_mariko.cpp b/fusee_cpp/program/source/mtc/fusee_mtc_mariko.cpp
index 1e5b0d755..faf7fb363 100644
--- a/fusee_cpp/program/source/mtc/fusee_mtc_mariko.cpp
+++ b/fusee_cpp/program/source/mtc/fusee_mtc_mariko.cpp
@@ -74,7 +74,7 @@ namespace ams::nxboot {
EmcDvfsTimingTable *GetEmcDvfsTimingTables(int index, void *mtc_tables_buffer) {
/* Get the compressed table. */
- u8 *cmp_table;
+ const u8 *cmp_table;
size_t cmp_table_size;
switch (index) {
#define HANDLE_CASE(N, TABLE) \
diff --git a/fusee_cpp/program/source/mtc/fusee_mtc_tables_erista.inc b/fusee_cpp/program/source/mtc/fusee_mtc_tables_erista.inc
index 1d45afe2e..d32da8442 100644
--- a/fusee_cpp/program/source/mtc/fusee_mtc_tables_erista.inc
+++ b/fusee_cpp/program/source/mtc/fusee_mtc_tables_erista.inc
@@ -14,7 +14,7 @@
* along with this program. If not, see .
*/
-constinit u8 T210SdevEmcDvfsTableS6gb01[0x2680] = {
+constexpr const u8 T210SdevEmcDvfsTableS6gb01[0x2680] = {
0x07, 0x00, 0x00, 0x00, 0x31, 0x30, 0x5F, 0x32, 0x30, 0x34, 0x30, 0x30, 0x30, 0x5F, 0x4E, 0x6F,
0x43, 0x66, 0x67, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x5F, 0x56, 0x39, 0x2E, 0x38, 0x2E,
0x37, 0x5F, 0x56, 0x31, 0x2E, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -633,7 +633,7 @@ constinit u8 T210SdevEmcDvfsTableS6gb01[0x2680] = {
0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0x18, 0x80, 0x00, 0x00, 0x00, 0x00, 0x9C, 0x04, 0x00, 0x00,
};
-constinit u8 T210SdevEmcDvfsTableH4gb01[0x2680] = {
+constexpr const u8 T210SdevEmcDvfsTableH4gb01[0x2680] = {
0x07, 0x00, 0x00, 0x00, 0x31, 0x30, 0x5F, 0x32, 0x30, 0x34, 0x30, 0x30, 0x30, 0x5F, 0x4E, 0x6F,
0x43, 0x66, 0x67, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x5F, 0x56, 0x39, 0x2E, 0x38, 0x2E,
0x37, 0x5F, 0x56, 0x31, 0x2E, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -1252,7 +1252,7 @@ constinit u8 T210SdevEmcDvfsTableH4gb01[0x2680] = {
0x01, 0x00, 0x00, 0x00, 0x00, 0x80, 0x18, 0x80, 0x00, 0x00, 0x00, 0x00, 0x9C, 0x04, 0x00, 0x00,
};
-constinit u8 T210SdevEmcDvfsTableS4gb01[0x2680] = {
+constexpr const u8 T210SdevEmcDvfsTableS4gb01[0x2680] = {
0x07, 0x00, 0x00, 0x00, 0x31, 0x30, 0x5F, 0x32, 0x30, 0x34, 0x30, 0x30, 0x30, 0x5F, 0x4E, 0x6F,
0x43, 0x66, 0x67, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x5F, 0x56, 0x39, 0x2E, 0x38, 0x2E,
0x37, 0x5F, 0x56, 0x31, 0x2E, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
diff --git a/fusee_cpp/program/source/mtc/fusee_mtc_tables_mariko.inc b/fusee_cpp/program/source/mtc/fusee_mtc_tables_mariko.inc
index a4a50a8c7..445733334 100644
--- a/fusee_cpp/program/source/mtc/fusee_mtc_tables_mariko.inc
+++ b/fusee_cpp/program/source/mtc/fusee_mtc_tables_mariko.inc
@@ -14,7 +14,7 @@
* along with this program. If not, see .
*/
-constinit u8 T210b01SdevEmcDvfsTableM4gb03[0x803] = {
+constexpr const u8 T210b01SdevEmcDvfsTableM4gb03[0x803] = {
0xFF, 0x18, 0x03, 0x00, 0x00, 0x00, 0x30, 0x31, 0x5F, 0x32, 0x30, 0x34, 0x30, 0x30, 0x30, 0x5F,
0x4E, 0x6F, 0x43, 0x66, 0x67, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x5F, 0x56, 0x30, 0x2E,
0x34, 0x2E, 0x32, 0x5F, 0x56, 0x32, 0x2E, 0x30, 0x00, 0x01, 0x00, 0x06, 0x71, 0xE0, 0x1C, 0x03,
@@ -146,7 +146,7 @@ constinit u8 T210b01SdevEmcDvfsTableM4gb03[0x803] = {
0x00, 0x00, 0x00,
};
-constinit u8 T210b01SdevEmcDvfsTableS4gb01[0x7F6] = {
+constexpr const u8 T210b01SdevEmcDvfsTableS4gb01[0x7F6] = {
0xFF, 0x18, 0x03, 0x00, 0x00, 0x00, 0x30, 0x31, 0x5F, 0x32, 0x30, 0x34, 0x30, 0x30, 0x30, 0x5F,
0x4E, 0x6F, 0x43, 0x66, 0x67, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x5F, 0x56, 0x30, 0x2E,
0x33, 0x2E, 0x31, 0x5F, 0x56, 0x32, 0x2E, 0x30, 0x00, 0x01, 0x00, 0x06, 0x71, 0xE0, 0x1C, 0x03,
@@ -277,7 +277,7 @@ constinit u8 T210b01SdevEmcDvfsTableS4gb01[0x7F6] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
-constinit u8 T210b01SdevEmcDvfsTableS4gbY01[0x806] = {
+constexpr const u8 T210b01SdevEmcDvfsTableS4gbY01[0x806] = {
0xFF, 0x18, 0x03, 0x00, 0x00, 0x00, 0x30, 0x31, 0x5F, 0x32, 0x30, 0x34, 0x30, 0x30, 0x30, 0x5F,
0x4E, 0x6F, 0x43, 0x66, 0x67, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x5F, 0x56, 0x30, 0x2E,
0x34, 0x2E, 0x32, 0x5F, 0x56, 0x32, 0x2E, 0x30, 0x00, 0x01, 0x00, 0x06, 0x71, 0xE0, 0x1C, 0x03,
@@ -409,7 +409,7 @@ constinit u8 T210b01SdevEmcDvfsTableS4gbY01[0x806] = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
-constinit u8 T210b01SdevEmcDvfsTableS1y8gbY01[0x804] = {
+constexpr const u8 T210b01SdevEmcDvfsTableS1y8gbY01[0x804] = {
0xFF, 0x18, 0x03, 0x00, 0x00, 0x00, 0x30, 0x31, 0x5F, 0x32, 0x30, 0x34, 0x30, 0x30, 0x30, 0x5F,
0x4E, 0x6F, 0x43, 0x66, 0x67, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x5F, 0x56, 0x30, 0x2E,
0x34, 0x2E, 0x32, 0x5F, 0x56, 0x32, 0x2E, 0x30, 0x00, 0x01, 0x00, 0x06, 0x71, 0xE0, 0x1C, 0x03,
@@ -541,7 +541,7 @@ constinit u8 T210b01SdevEmcDvfsTableS1y8gbY01[0x804] = {
0x00, 0x00, 0x00, 0x00,
};
-constinit u8 T210b01SdevEmcDvfsTableS1y4gbX03[0x805] = {
+constexpr const u8 T210b01SdevEmcDvfsTableS1y4gbX03[0x805] = {
0xFF, 0x18, 0x03, 0x00, 0x00, 0x00, 0x30, 0x31, 0x5F, 0x32, 0x30, 0x34, 0x30, 0x30, 0x30, 0x5F,
0x4E, 0x6F, 0x43, 0x66, 0x67, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x5F, 0x56, 0x30, 0x2E,
0x34, 0x2E, 0x32, 0x5F, 0x56, 0x32, 0x2E, 0x30, 0x00, 0x01, 0x00, 0x06, 0x71, 0xE0, 0x1C, 0x03,
@@ -673,7 +673,7 @@ constinit u8 T210b01SdevEmcDvfsTableS1y4gbX03[0x805] = {
0x00, 0x00, 0x00, 0x00, 0x00,
};
-constinit u8 T210b01SdevEmcDvfsTableH4gb03[0x7FA] = {
+constexpr const u8 T210b01SdevEmcDvfsTableH4gb03[0x7FA] = {
0xFF, 0x18, 0x03, 0x00, 0x00, 0x00, 0x30, 0x31, 0x5F, 0x32, 0x30, 0x34, 0x30, 0x30, 0x30, 0x5F,
0x4E, 0x6F, 0x43, 0x66, 0x67, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x5F, 0x56, 0x30, 0x2E,
0x33, 0x2E, 0x31, 0x5F, 0x56, 0x32, 0x2E, 0x30, 0x00, 0x01, 0x00, 0x06, 0x71, 0xE0, 0x1C, 0x03,
@@ -804,7 +804,7 @@ constinit u8 T210b01SdevEmcDvfsTableH4gb03[0x7FA] = {
0x00, 0x00, 0x9C, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
-constinit u8 T210b01SdevEmcDvfsTableM1y4gb01[0x7FF] = {
+constexpr const u8 T210b01SdevEmcDvfsTableM1y4gb01[0x7FF] = {
0xFF, 0x18, 0x03, 0x00, 0x00, 0x00, 0x30, 0x31, 0x5F, 0x32, 0x30, 0x34, 0x30, 0x30, 0x30, 0x5F,
0x4E, 0x6F, 0x43, 0x66, 0x67, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x5F, 0x56, 0x30, 0x2E,
0x34, 0x2E, 0x32, 0x5F, 0x56, 0x32, 0x2E, 0x30, 0x00, 0x01, 0x00, 0x06, 0x71, 0xE0, 0x1C, 0x03,
@@ -935,7 +935,7 @@ constinit u8 T210b01SdevEmcDvfsTableM1y4gb01[0x7FF] = {
0x50, 0x10, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x9C, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
-constinit u8 T210b01SdevEmcDvfsTableS1y4gb01[0x80A] = {
+constexpr const u8 T210b01SdevEmcDvfsTableS1y4gb01[0x80A] = {
0xFF, 0x18, 0x03, 0x00, 0x00, 0x00, 0x30, 0x31, 0x5F, 0x32, 0x30, 0x34, 0x30, 0x30, 0x30, 0x5F,
0x4E, 0x6F, 0x43, 0x66, 0x67, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x5F, 0x56, 0x30, 0x2E,
0x34, 0x2E, 0x35, 0x5F, 0x56, 0x32, 0x2E, 0x30, 0x00, 0x01, 0x00, 0x06, 0x71, 0xE0, 0x1C, 0x03,
@@ -1067,7 +1067,7 @@ constinit u8 T210b01SdevEmcDvfsTableS1y4gb01[0x80A] = {
0x00, 0x00, 0x9C, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
-constinit u8 T210b01SdevEmcDvfsTableH1y4gb01[0x7FC] = {
+constexpr const u8 T210b01SdevEmcDvfsTableH1y4gb01[0x7FC] = {
0xFF, 0x18, 0x03, 0x00, 0x00, 0x00, 0x30, 0x31, 0x5F, 0x32, 0x30, 0x34, 0x30, 0x30, 0x30, 0x5F,
0x4E, 0x6F, 0x43, 0x66, 0x67, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x5F, 0x56, 0x30, 0x2E,
0x34, 0x2E, 0x35, 0x5F, 0x56, 0x32, 0x2E, 0x30, 0x00, 0x01, 0x00, 0x06, 0x71, 0xE0, 0x1C, 0x03,
@@ -1198,7 +1198,7 @@ constinit u8 T210b01SdevEmcDvfsTableH1y4gb01[0x7FC] = {
0x00, 0x00, 0x00, 0x00, 0x9C, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
-constinit u8 T210b01SdevEmcDvfsTableS4gb03[0x7F5] = {
+constexpr const u8 T210b01SdevEmcDvfsTableS4gb03[0x7F5] = {
0xFF, 0x18, 0x03, 0x00, 0x00, 0x00, 0x30, 0x31, 0x5F, 0x32, 0x30, 0x34, 0x30, 0x30, 0x30, 0x5F,
0x4E, 0x6F, 0x43, 0x66, 0x67, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x5F, 0x56, 0x30, 0x2E,
0x33, 0x2E, 0x31, 0x5F, 0x56, 0x32, 0x2E, 0x30, 0x00, 0x01, 0x00, 0x06, 0x71, 0xE0, 0x1C, 0x03,
@@ -1329,7 +1329,7 @@ constinit u8 T210b01SdevEmcDvfsTableS4gb03[0x7F5] = {
0x00, 0x00, 0x00, 0x00, 0x00,
};
-constinit u8 T210b01SdevEmcDvfsTableS8gb03[0x80F] = {
+constexpr const u8 T210b01SdevEmcDvfsTableS8gb03[0x80F] = {
0xFF, 0x18, 0x03, 0x00, 0x00, 0x00, 0x30, 0x31, 0x5F, 0x32, 0x30, 0x34, 0x30, 0x30, 0x30, 0x5F,
0x4E, 0x6F, 0x43, 0x66, 0x67, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x5F, 0x56, 0x30, 0x2E,
0x34, 0x2E, 0x32, 0x5F, 0x56, 0x32, 0x2E, 0x30, 0x00, 0x01, 0x00, 0x06, 0x71, 0xE0, 0x1C, 0x03,
@@ -1461,7 +1461,7 @@ constinit u8 T210b01SdevEmcDvfsTableS8gb03[0x80F] = {
0x50, 0x10, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x9C, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
};
-constinit u8 T210b01SdevEmcDvfsTableS1y4gbY01[0x802] = {
+constexpr const u8 T210b01SdevEmcDvfsTableS1y4gbY01[0x802] = {
0xFF, 0x18, 0x03, 0x00, 0x00, 0x00, 0x30, 0x31, 0x5F, 0x32, 0x30, 0x34, 0x30, 0x30, 0x30, 0x5F,
0x4E, 0x6F, 0x43, 0x66, 0x67, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x5F, 0x56, 0x30, 0x2E,
0x34, 0x2E, 0x32, 0x5F, 0x56, 0x32, 0x2E, 0x30, 0x00, 0x01, 0x00, 0x06, 0x71, 0xE0, 0x1C, 0x03,
@@ -1593,7 +1593,7 @@ constinit u8 T210b01SdevEmcDvfsTableS1y4gbY01[0x802] = {
0x00, 0x00,
};
-constinit u8 T210b01SdevEmcDvfsTableS1y8gbX03[0x7FD] = {
+constexpr const u8 T210b01SdevEmcDvfsTableS1y8gbX03[0x7FD] = {
0xFF, 0x18, 0x03, 0x00, 0x00, 0x00, 0x30, 0x31, 0x5F, 0x32, 0x30, 0x34, 0x30, 0x30, 0x30, 0x5F,
0x4E, 0x6F, 0x43, 0x66, 0x67, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x5F, 0x56, 0x30, 0x2E,
0x34, 0x2E, 0x32, 0x5F, 0x56, 0x32, 0x2E, 0x30, 0x00, 0x01, 0x00, 0x06, 0x71, 0xE0, 0x1C, 0x03,
diff --git a/fusee_cpp/program/update_mtc_tables.py b/fusee_cpp/program/update_mtc_tables.py
index 059dea75c..d05823d70 100644
--- a/fusee_cpp/program/update_mtc_tables.py
+++ b/fusee_cpp/program/update_mtc_tables.py
@@ -81,7 +81,7 @@ def main(argc, argv):
assert up('