From 349a16ce3964585d003a8b456e39a425d6102797 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Sun, 22 Aug 2021 02:32:05 -0700 Subject: [PATCH] fusee_cpp: implement SDRAM initialization --- fusee_cpp/program/program_ovl.ld | 4 + .../bin/sdram_params_erista_0.bin | Bin 0 -> 1896 bytes .../bin/sdram_params_erista_1.bin | Bin 0 -> 1896 bytes .../bin/sdram_params_erista_2.bin | Bin 0 -> 1896 bytes .../bin/sdram_params_erista_3.bin | Bin 0 -> 1896 bytes .../bin/sdram_params_erista_4.bin | Bin 0 -> 1896 bytes .../bin/sdram_params_erista_5.bin | Bin 0 -> 1896 bytes .../bin/sdram_params_erista_6.bin | Bin 0 -> 1896 bytes .../bin/sdram_params_mariko_0.bin | Bin 0 -> 2104 bytes .../bin/sdram_params_mariko_1.bin | Bin 0 -> 2104 bytes .../bin/sdram_params_mariko_10.bin | Bin 0 -> 2104 bytes .../bin/sdram_params_mariko_11.bin | Bin 0 -> 2104 bytes .../bin/sdram_params_mariko_12.bin | Bin 0 -> 2104 bytes .../bin/sdram_params_mariko_2.bin | Bin 0 -> 2104 bytes .../bin/sdram_params_mariko_3.bin | Bin 0 -> 2104 bytes .../bin/sdram_params_mariko_4.bin | Bin 0 -> 2104 bytes .../bin/sdram_params_mariko_5.bin | Bin 0 -> 2104 bytes .../bin/sdram_params_mariko_6.bin | Bin 0 -> 2104 bytes .../bin/sdram_params_mariko_7.bin | Bin 0 -> 2104 bytes .../bin/sdram_params_mariko_8.bin | Bin 0 -> 2104 bytes .../bin/sdram_params_mariko_9.bin | Bin 0 -> 2104 bytes .../sdram_params/lz/sdram_params_erista_0.lz4 | Bin 0 -> 940 bytes .../sdram_params/lz/sdram_params_erista_1.lz4 | Bin 0 -> 940 bytes .../sdram_params/lz/sdram_params_erista_2.lz4 | Bin 0 -> 940 bytes .../sdram_params/lz/sdram_params_erista_3.lz4 | Bin 0 -> 944 bytes .../sdram_params/lz/sdram_params_erista_4.lz4 | Bin 0 -> 940 bytes .../sdram_params/lz/sdram_params_erista_5.lz4 | Bin 0 -> 944 bytes .../sdram_params/lz/sdram_params_erista_6.lz4 | Bin 0 -> 947 bytes .../sdram_params/lz/sdram_params_mariko_0.lz4 | Bin 0 -> 937 bytes .../sdram_params/lz/sdram_params_mariko_1.lz4 | Bin 0 -> 938 bytes .../lz/sdram_params_mariko_10.lz4 | Bin 0 -> 955 bytes .../lz/sdram_params_mariko_11.lz4 | Bin 0 -> 950 bytes .../lz/sdram_params_mariko_12.lz4 | Bin 0 -> 950 bytes .../sdram_params/lz/sdram_params_mariko_2.lz4 | Bin 0 -> 947 bytes .../sdram_params/lz/sdram_params_mariko_3.lz4 | Bin 0 -> 938 bytes .../sdram_params/lz/sdram_params_mariko_4.lz4 | Bin 0 -> 948 bytes .../sdram_params/lz/sdram_params_mariko_5.lz4 | Bin 0 -> 952 bytes .../sdram_params/lz/sdram_params_mariko_6.lz4 | Bin 0 -> 947 bytes .../sdram_params/lz/sdram_params_mariko_7.lz4 | Bin 0 -> 948 bytes .../sdram_params/lz/sdram_params_mariko_8.lz4 | Bin 0 -> 951 bytes .../sdram_params/lz/sdram_params_mariko_9.lz4 | Bin 0 -> 954 bytes fusee_cpp/program/source/fusee_main.cpp | 4 + fusee_cpp/program/source/fusee_sdram.cpp | 970 +++++++++++++ fusee_cpp/program/source/fusee_sdram.hpp | 23 + .../program/source/fusee_sdram_params.inc | 1267 +++++++++++++++++ fusee_cpp/program/source/fusee_uncompress.cpp | 103 ++ fusee_cpp/program/source/fusee_uncompress.hpp | 23 + fusee_cpp/program/update_sdram_params.py | 65 + .../exosphere/br/impl/br_common_types.hpp | 28 + .../exosphere/br/impl/br_erista_types.hpp | 479 +++++++ .../exosphere/br/impl/br_mariko_types.hpp | 531 +++++++ .../include/exosphere/pmic_setup.hpp | 2 + .../source/libc/libgcc_thumb_case.arch.arm.s | 20 + .../libexosphere/source/pmic/pmic_api.cpp | 12 + .../include/vapours/tegra/tegra_ahb_arbc.hpp | 3 + .../include/vapours/tegra/tegra_clkrst.hpp | 12 + .../include/vapours/tegra/tegra_emc.hpp | 534 ++++++- .../include/vapours/tegra/tegra_mc.hpp | 20 + .../include/vapours/tegra/tegra_pmc.hpp | 5 + 59 files changed, 4088 insertions(+), 17 deletions(-) create mode 100644 fusee_cpp/program/sdram_params/bin/sdram_params_erista_0.bin create mode 100644 fusee_cpp/program/sdram_params/bin/sdram_params_erista_1.bin create mode 100644 fusee_cpp/program/sdram_params/bin/sdram_params_erista_2.bin create mode 100644 fusee_cpp/program/sdram_params/bin/sdram_params_erista_3.bin create mode 100644 fusee_cpp/program/sdram_params/bin/sdram_params_erista_4.bin create mode 100644 fusee_cpp/program/sdram_params/bin/sdram_params_erista_5.bin create mode 100644 fusee_cpp/program/sdram_params/bin/sdram_params_erista_6.bin create mode 100644 fusee_cpp/program/sdram_params/bin/sdram_params_mariko_0.bin create mode 100644 fusee_cpp/program/sdram_params/bin/sdram_params_mariko_1.bin create mode 100644 fusee_cpp/program/sdram_params/bin/sdram_params_mariko_10.bin create mode 100644 fusee_cpp/program/sdram_params/bin/sdram_params_mariko_11.bin create mode 100644 fusee_cpp/program/sdram_params/bin/sdram_params_mariko_12.bin create mode 100644 fusee_cpp/program/sdram_params/bin/sdram_params_mariko_2.bin create mode 100644 fusee_cpp/program/sdram_params/bin/sdram_params_mariko_3.bin create mode 100644 fusee_cpp/program/sdram_params/bin/sdram_params_mariko_4.bin create mode 100644 fusee_cpp/program/sdram_params/bin/sdram_params_mariko_5.bin create mode 100644 fusee_cpp/program/sdram_params/bin/sdram_params_mariko_6.bin create mode 100644 fusee_cpp/program/sdram_params/bin/sdram_params_mariko_7.bin create mode 100644 fusee_cpp/program/sdram_params/bin/sdram_params_mariko_8.bin create mode 100644 fusee_cpp/program/sdram_params/bin/sdram_params_mariko_9.bin create mode 100644 fusee_cpp/program/sdram_params/lz/sdram_params_erista_0.lz4 create mode 100644 fusee_cpp/program/sdram_params/lz/sdram_params_erista_1.lz4 create mode 100644 fusee_cpp/program/sdram_params/lz/sdram_params_erista_2.lz4 create mode 100644 fusee_cpp/program/sdram_params/lz/sdram_params_erista_3.lz4 create mode 100644 fusee_cpp/program/sdram_params/lz/sdram_params_erista_4.lz4 create mode 100644 fusee_cpp/program/sdram_params/lz/sdram_params_erista_5.lz4 create mode 100644 fusee_cpp/program/sdram_params/lz/sdram_params_erista_6.lz4 create mode 100644 fusee_cpp/program/sdram_params/lz/sdram_params_mariko_0.lz4 create mode 100644 fusee_cpp/program/sdram_params/lz/sdram_params_mariko_1.lz4 create mode 100644 fusee_cpp/program/sdram_params/lz/sdram_params_mariko_10.lz4 create mode 100644 fusee_cpp/program/sdram_params/lz/sdram_params_mariko_11.lz4 create mode 100644 fusee_cpp/program/sdram_params/lz/sdram_params_mariko_12.lz4 create mode 100644 fusee_cpp/program/sdram_params/lz/sdram_params_mariko_2.lz4 create mode 100644 fusee_cpp/program/sdram_params/lz/sdram_params_mariko_3.lz4 create mode 100644 fusee_cpp/program/sdram_params/lz/sdram_params_mariko_4.lz4 create mode 100644 fusee_cpp/program/sdram_params/lz/sdram_params_mariko_5.lz4 create mode 100644 fusee_cpp/program/sdram_params/lz/sdram_params_mariko_6.lz4 create mode 100644 fusee_cpp/program/sdram_params/lz/sdram_params_mariko_7.lz4 create mode 100644 fusee_cpp/program/sdram_params/lz/sdram_params_mariko_8.lz4 create mode 100644 fusee_cpp/program/sdram_params/lz/sdram_params_mariko_9.lz4 create mode 100644 fusee_cpp/program/source/fusee_sdram.cpp create mode 100644 fusee_cpp/program/source/fusee_sdram.hpp create mode 100644 fusee_cpp/program/source/fusee_sdram_params.inc create mode 100644 fusee_cpp/program/source/fusee_uncompress.cpp create mode 100644 fusee_cpp/program/source/fusee_uncompress.hpp create mode 100644 fusee_cpp/program/update_sdram_params.py create mode 100644 libraries/libexosphere/include/exosphere/br/impl/br_common_types.hpp diff --git a/fusee_cpp/program/program_ovl.ld b/fusee_cpp/program/program_ovl.ld index acda8eb77..d6b1ef5f8 100644 --- a/fusee_cpp/program/program_ovl.ld +++ b/fusee_cpp/program/program_ovl.ld @@ -10,9 +10,13 @@ SECTIONS { OVERLAY : NOCROSSREFS { .ovl_sein { fusee_secure_initialize.o(.text*); + fusee_sdram.o(.text*); fusee_secure_initialize.o(.rodata*); + fusee_sdram.o(.rodata*); fusee_secure_initialize.o(.data*); + fusee_sdram.o(.data*); fusee_secure_initialize.o(.bss*); + fusee_sdram.o(.bss*); FILL(0x00000000) . = ORIGIN(ovl) + LENGTH(ovl) - 1; BYTE(0x00); diff --git a/fusee_cpp/program/sdram_params/bin/sdram_params_erista_0.bin b/fusee_cpp/program/sdram_params/bin/sdram_params_erista_0.bin new file mode 100644 index 0000000000000000000000000000000000000000..ef0c9d9f11211b6f568a4131fe45a224214b52da GIT binary patch literal 1896 zcmbVMJ8Tm{5S{zjKA&xTPE3SIVq1xATtpBVqXY1JgnU zbO@nPkcJ`!R0u($G!%3cP*6}HDx@HV{&;Wi<8$H!iFbOtv$Hd^v$MNrh=>M`ffE$| zfgA6%1sgWz8*M?WUu=K;DGOU&8c^t+eNA*^2-hvj*9-fXM9#-V?m)kt%gZaTk3SbN zjPGlv4+bdq0P9;`lo!akP6Hp@g6_)(da?j!zzR4B21r6Mg8}*!NIQg9GUrNQJVM4J zI7fZ37RU6XKQ^c4&?(S{dV*`P;sa>&;1C$ds;>S5YtSpp=9mzbn zuc$l%$IQ~zM<0%1LN?Q8Y&fnPiIMS2C1#B#?Q*J+Nmr|eK0GpRn2A`tQqk?yXvRt> z3*~CnD#sH~nWMP)w!jn(De7Q`sjee^GYK9+TUTd6%boN!+5O97tpT+rSLN4>u%690 zDw&j7xu6W7XPugy=iPZFwwXiEaX^T>BDmi)Vhs9G=N-_P>AEYkfez{r58Z^4`Hyf; z*RMN`c13HRM~A;f&v!(@xdrX>{gsSuu3>g<GEYGfn??@pxbx-xy~rqo(T#d&s?t76_dhw~~qw$vQ&esh6n z&4W7gZSxE`=6es`I<}*0x*=w4eKDI2{>w#JsC}vTOCPnl4%Ni(@J*jwfBWMzf0iM- zbD_!?x&@*F#q?5TzYXoQN>k~h_X!GaFKCq*ZSD>=xxIea-LKH~>yxLf_KOJJOu3t9 SKffK^WM;zi`_*I6Tf4tGu7^Yb literal 0 HcmV?d00001 diff --git a/fusee_cpp/program/sdram_params/bin/sdram_params_erista_1.bin b/fusee_cpp/program/sdram_params/bin/sdram_params_erista_1.bin new file mode 100644 index 0000000000000000000000000000000000000000..58d368ac8a3a52a2e26dd7526ebf276dc30d9c62 GIT binary patch literal 1896 zcmbVMJ8Tm{5S{zjKA&xTPE3SIVq1xATtpBVqX@6EK^lq_P$2|~(ooP*KtVx)sE~pb`s2O5kAF#!c&E2JJ3BMGGrN0+h-ly#I6>hb zxcN?7v|(eu(H6DprRK+$$c=d zPI&~5sg-MwKAgaWY$wgga8x&9Bjcq~#2Ss;#Y8TZESC*^cx2o#W07d7q}z$nl$DI< zisiCZjK-dFkK*F%fhiicsDmkPb$w~cK%cN0jeSX)T2=~uDw)j=S)Ogi^6L;r+Ap8P zmZKOKwj)+X+_anKB<(Z<_bVwHWoud-)0F67Oj;bT$b@K95LzH$A^ZGTp_Tqq&?`PN zKHg)Vaf8^(;Xj)!PRvm!(H$VrPs(9rGYK9;TUBR4%iZ)9+55|4tpT+rSLN4@u%7iO zDjAnqnNtSPvrcu+^X|M7+svTnI3UD55!`PYF$Vpp^A2dtbltVtKnHb*hi**C{6{!v zt2dllv!vA)O4^<4Rjn~!bH;DaYiFtpG&=XVs2Do?!Z3QW7e`JF=Cjxd*LGd^UgAr% z&Rtm+c6e12$8o%e)#1p0(v*J^4ilIZ$!O~0(#o#06&$Pg!tKyFgT+nBG>|_o11@!}QU4pP*uTL94{hW_hR{`gQ6<56`=2N@O|L_S<2fvfk(6 YDQ1f8eeUG9i<`_$cz(aS47zLg7Yp@=zW@LL literal 0 HcmV?d00001 diff --git a/fusee_cpp/program/sdram_params/bin/sdram_params_erista_2.bin b/fusee_cpp/program/sdram_params/bin/sdram_params_erista_2.bin new file mode 100644 index 0000000000000000000000000000000000000000..ef0c9d9f11211b6f568a4131fe45a224214b52da GIT binary patch literal 1896 zcmbVMJ8Tm{5S{zjKA&xTPE3SIVq1xATtpBVqXY1JgnU zbO@nPkcJ`!R0u($G!%3cP*6}HDx@HV{&;Wi<8$H!iFbOtv$Hd^v$MNrh=>M`ffE$| zfgA6%1sgWz8*M?WUu=K;DGOU&8c^t+eNA*^2-hvj*9-fXM9#-V?m)kt%gZaTk3SbN zjPGlv4+bdq0P9;`lo!akP6Hp@g6_)(da?j!zzR4B21r6Mg8}*!NIQg9GUrNQJVM4J zI7fZ37RU6XKQ^c4&?(S{dV*`P;sa>&;1C$ds;>S5YtSpp=9mzbn zuc$l%$IQ~zM<0%1LN?Q8Y&fnPiIMS2C1#B#?Q*J+Nmr|eK0GpRn2A`tQqk?yXvRt> z3*~CnD#sH~nWMP)w!jn(De7Q`sjee^GYK9+TUTd6%boN!+5O97tpT+rSLN4>u%690 zDw&j7xu6W7XPugy=iPZFwwXiEaX^T>BDmi)Vhs9G=N-_P>AEYkfez{r58Z^4`Hyf; z*RMN`c13HRM~A;f&v!(@xdrX>{gsSuu3>g<GEYGfn??@pxbx-xy~rqo(T#d&s?t76_dhw~~qw$vQ&esh6n z&4W7gZSxE`=6es`I<}*0x*=w4eKDI2{>w#JsC}vTOCPnl4%Ni(@J*jwfBWMzf0iM- zbD_!?x&@*F#q?5TzYXoQN>k~h_X!GaFKCq*ZSD>=xxIea-LKH~>yxLf_KOJJOu3t9 SKffK^WM;zi`_*I6Tf4tGu7^Yb literal 0 HcmV?d00001 diff --git a/fusee_cpp/program/sdram_params/bin/sdram_params_erista_3.bin b/fusee_cpp/program/sdram_params/bin/sdram_params_erista_3.bin new file mode 100644 index 0000000000000000000000000000000000000000..8e7de31e4ef383e3b5975b5edbcd0c1055bfa8fd GIT binary patch literal 1896 zcmbVMJ!n%=6h7}K$<0e*UfNj1wn=D{n4xHiks>-otQAqHg496=2c=HZ292A>RVQ^5 zkviDLp@U8$+S0|r%|QnT2XPWA)cyH=_q~^&Hm%_IIQO1=?)ks>K1)Ol&=_cf%s+7B zow49R$9`ih7}bl-k3VH$t4R$4v$d~|iPVPY<>l*z{YxU}BO-So-%iWRE3c0~7qP7G zYjyxS$oBy8mG9*Ra;{P#0820f-oi}Efl{CnXb==44#o}_m=hrC!L{bOR{%x3i2exf zQ69$Pns&5Dae5Dv26ZSW7=s-jz?cOMfkIyQH3+Z_E=F%Q;7 zp8DiRz@(P0KKgJB3)xKCk>RLm#YVnIl z@3Bw6p>J*QpF;Of)sbr8xY{ zue-Ho$*9ejjN8|$Mq{q#j^COyPF3frbmnnUQ`kqynBf+ z(K@qI3K?E8#C2W&VRhN@pEMPm1a^5Ck}>qf<;tmZ6dbGn=^ zyXRq_`L=lmT=Tt$?;hothG~f%Szk=2!~b#~8oDn1ercnNYf()6Zolc1>u-O2=FhT? z&R$y-Fr5ZbfM)usa^8k!Qm3iq-S-IsmKTni?H=w9)mdIY>~5Fq*!9U%R{ME`Y^K=B Tv!C4#W->G3+x_ZM=r#y zKXBunwrIn~e4{OD)r-xKKV@;dOAQLWHCRVSw&8hs`8s!CS>!@Y$nKBg1{Lrw`+YF%Lo}sUw*O z_Z5|g;h0{&`sl-POvsjF#)jg$kr*B?m15RN(k`Y((@wc;=tINfhM9=POC{Y-jifCn zIa(~2tzta!lsSrrZyQX}kfIKznd;iol7T*DH5&UInp##GecH+81}xt;Yw?Vt*e{>N zmLpIVwqjORyo{IOJnb|C_sbEDvNbKPX-d35AuW!VWkR$m2rUq>u>1U2p_Tbl&?^D5 z0p4Stal_ck;Xj)kPRvy&(H$VvPs$XIviFz6T77CwuF9_)?RwVZ zsAN)RWlkAD&pOpP&%5(VY%`0V&(iskl__gT-WsYD2q^aN}Fw4V`tfnq5M|Pd9;8^`9$GhwUngXQzZnE;E`f~d6 zgN0@=v!nAiz0I`%-vB!TRU^X@9h9Qy$@Hb0QfV9$_t`laRCTq^k~h_X!GaFKm?lG2YnPMl; TUVgi{$;^cB_p8gGyLNv8Ty}?6 literal 0 HcmV?d00001 diff --git a/fusee_cpp/program/sdram_params/bin/sdram_params_erista_5.bin b/fusee_cpp/program/sdram_params/bin/sdram_params_erista_5.bin new file mode 100644 index 0000000000000000000000000000000000000000..714e55d3abd53ea42debe0b484f4e4ecf217508d GIT binary patch literal 1896 zcmbVMJ!n%=6h7}K$;(S(UfMK>ZIjR@F+-u628-wru~tN(3Q`9h9F#gq8#HbjSDn;N zMCxD{hYmW4XiFCdHwPUY9K=beQ1|Ee-S?BEO)L04zIV?(fA^mA?tO-cXy6z)LE#^` z@lIQ`;bXqh7PZ>N*2kZ+xILr}h2GxZz(9s@-GY3*a9~;Fd_?39^gFq-vikb?a}mS% zzHa(pf7K3ErJ z`coc(kXpX_=)*BgWGiV#hNHR>8yPQ`Bi3l#E+z7*WTj&0!z1H{8H+^AW!+AUrmSQ< zU#e8BQZ)9I>xzqK8%)u#MIB6Wt7}V32F8TdZ0<|a)v{6;Q^{;LXL-IE%kM*&X-Gba zEmN2mw<1&n*iQc`>Qx^Z zAMasj-XOOM_|Ml6zQTa|a=i%xeN85DCJ#$pjzF3U&%$o{s_gv?iI>@1HHTR*!hSZQ z=ww{xx!Y!#JTX|vVkcbNb=`Z3 zFVO~fWm(wa6-^w+@h(Q;z2EZ~qxMpFluUUq|Tm_VLm(gQR_NcWw1^-1mJ z%;g6QE#IlJ_3v=$dYb8QEA$r-T1;0Txx4y1$H3#kHv>eusDZQLN{CL U?6Y6oE@3h|;l=&xap>*cUrRrS%K!iX literal 0 HcmV?d00001 diff --git a/fusee_cpp/program/sdram_params/bin/sdram_params_erista_6.bin b/fusee_cpp/program/sdram_params/bin/sdram_params_erista_6.bin new file mode 100644 index 0000000000000000000000000000000000000000..47b48007a972fa239fb39f9d3acad602a4d8cdfb GIT binary patch literal 1896 zcmbVMJ!n%=6h7}K$;(S(UfMK>ZIjR@Aw!{>28%yK#99%BDo7o4a8T+bZP2)BTy;`6 z5vhn>96IPEqAe~CZVoy)IEa%_q3+M`yYDASn^y39oO{nbfA`#T&wYl7XrM9B1et%} z+FNbWhK>1JThwajTOWVQ;#QYB1bTaK0~0BP>lWnexqZtbXCorFAm2_aE32=LJ{2*H z@9U-y1}O9Z`&(X=XUMrm10Ots?(+s_QXZ579R`hp0>r_X!2)vvL_365Jat7-w2K&z zppNojFRtlFe;iKfFe%W6a)NuX;sY47pd2XRRbBlJ)*)v+Qg9B=v}ODt<`M8D%1F$E z=ORyg@*`kU%a<#NOtjoYO}K9#Ig41IWH+%RL2Xt}K0iP4mm zjOR<0idBln9&=xD@oj-A8dB6jDWlvP_6J4WoI-)&J$9vduVkqP&9UH4An zOSHkPEDIT4(!_Bb?_qWM@t-uUUWEv>BKt)$nrd9G>;^|q#Xcr^fN>GrT_;|BRC_UV z@!mqq*KC{I4R>SB$2Y+4f~t`b6TCZ-lIzOMh3isn9unutX(j}{bq4oUbZn_QUVn3g z?wSX6=G*2SaLxD5HLH!|=$dYb8F}7Jr-T1;0UGbfe82Qjhig+z{0`sr@egl)eCE$G zL`N5je5O+%3Q$ZhRnFVcN~$!Kyt|(u;PHY{vE9S%T!Y8!hu!`19lt(#%38mOkj<7l UdG_<$!A)i-JilK(2EDcW3-|K@_~xyP2JxnVp;6J%fleW{Eil zC4LSmS^a&=#YH`BTx4v(f0O-x96S{>BiSxGlZ!S5NBFM%gf93 zg8MR#G=j1u9zr8szKIN$V1b!to?(tK72>RzYQQqdgdeAtI_8cskNPsl60n)k5U~aT zf7sRf7$a97Gs4820(`KRzpV~5v}1@l%*^_Ff~Dy%u**8~fiPhXa*&DqD(6|&LD)dl zfo~1#c@9i(U41l#rqEu>jO3!a5zCKODiLcWo+u{^=~T69=(+r;Va6iSN<~j3N77a* zUMN?qRyi7bD!0!i7a77ZN$YSm%rujBCMFD)$xf@)x6x{)I+m5*;JJ-#Hrw%h`z^l@ zK^j3H`TI`t*xsvH{Vd%KCgGqjgdCVu8!A_6n}lOWILH( zwtiwC?r^-yE7iYvm3Ws0sT0yor0mnQK(lm#=2_0uoZMd=+Jo#hI{Yc|U!hN~iB)s* zAJJXa(}JEhquk9nEzydD8MZ4a&(CX0nCP(VtuI*|3U$Wegfoa(Y12xkyZL4*7{kHG zraLJ$t$wL3=Ihr*qg~M&YZdMGwYs*x+7P3+R<+ss8k`m$mnHqsK;X>Da~D`V#Xdh! z9ONpnw(Gk0il0w4y%|3F4Ix$BfnG2uBCm?T2iQc%abXxu`Q}Xu!C|W@9JtYa5wAU| zznZ!7V67c;`6sI2DnRY<=}PK`#s5x=sO-8lbNL3<)=!gob`f8}dtxo}-rFKU zH9-#c2ng>VY-j@-0v$vN)+)%b$p%3MGRNqpE4*vgMY;I z`*+_y6~e#5?i@VBkU0XwI5d>n6Kz~{AE-YBFXn*AyV+(C7m9&;cwC_y*P~9_*_TWW Y=gQqWd&Mcg{c>*1i~Ih^MDO1H28zyoEC2ui literal 0 HcmV?d00001 diff --git a/fusee_cpp/program/sdram_params/bin/sdram_params_mariko_1.bin b/fusee_cpp/program/sdram_params/bin/sdram_params_mariko_1.bin new file mode 100644 index 0000000000000000000000000000000000000000..5e605d6b619c2014d23c3863686d21c7074cce8a GIT binary patch literal 2104 zcmdT^J!lkB5T5uLpuhTgG@Wrb1e06fgRS74}=MGkbO+#k8+-69fS=; z9r)IyUgSV)^Xj81G=+9eJvEe8wM=o;byLQ0Hdo1)EVEkG)S=?2re{)V*Hv@*VaqVH zrAoDGRMMHJa{GMpks%44lnz(Jw3xI#F`=={cUr9@>#dgAF$`;+=hki8?gYL)M%afq zji8VGeJ6SB?7Bt|OTU0g_$eCQB$E{A#w-b4r*v;7nA@Z=QYP8e3;JR5*Ox~eukg!J zPaMD29yl;g8KH#FA@b)qZ(i z_OBfDL)w~Y?q-%2Y1zY=`xZ%A#cRsx=&42KXK z{-o5D`lYs5s9zV2wyQK&UFG(*y0W&?5TmzNl)3sUoX$V4NQR-Yz?qZhF17@UGu>P6 z<0`PW@B8=4pHDS|89w<9AywRgZqO(tuZqA2I7G*BVHi#M=08gU9$R(c!Hw>VZ0$+? z)$ElAtL=o#KT!o&0n!hCLKGR19!XU*_}^&|ReYajFW;cr+G!HcF5oM8PmGJa_m0R> zO^}B@0+Ra&8`^+|KnKwdjQNT&R8>(m(o-+j3I)E05@ozm9bYH%5yKUPrwq!^_#ZLz z{@u4vrR1-0Zw{VG$Q-d@92!dPiZ(8K2-KfI5c7w~yLK~=qaK9hCE9LEQI!6Wx3F8zMA(oB#j- literal 0 HcmV?d00001 diff --git a/fusee_cpp/program/sdram_params/bin/sdram_params_mariko_10.bin b/fusee_cpp/program/sdram_params/bin/sdram_params_mariko_10.bin new file mode 100644 index 0000000000000000000000000000000000000000..efbfe1fa2cd32f483d52c397dd71f94808dd6c7b GIT binary patch literal 2104 zcmdT^J5Ll*6h1pMyF2@mfnAZnvO7z5Hw&TQp&>pJ)_~wMKw_ZUgaTq=Vhkk2O4rIQ zD15X;FviNlKR^Mc(Zs^W(!yR7tSlVAZ)WbWz(Qjz{3hR=bM8Io+!0 z%6|f_-c`j`$pDU%moIbOTOzYzkp{*aVs~)b(>*D&z5VX}rI#X_{&m-A!gv!HXPC$| zJ1ehHmm#LHq*JV?)I@XNB040Q15@AyuoqN_K{1p8nE>gB)UM9CGvH}o_COLg7-=Hc zAn4C=wLWd;ItAj;?i_>*`fx4(TI?I>TMmDO4H7S*J$@QA4crunKm&2N&hb5BjiIz&yc%nC% ziiw#kmt)0&W z9fCBLe8l-iVcUBpvmMfD<0Sn;y4;tfgs7X7Vi|@+(ow0?-jYEHjls3<)gy`1=lkq> z+fQ5TKZFPHS9x9aFJ2aIAtC7_8Pxc+T#*^MB~y5=;xTc6BqEL*ugJ-dg@(_#YjV{z ztfL5OT8*HZF|0pVrx(VRbo=M6#0^%M{)$jfgz9lRu?HFFj)f{!XLEBVu<77q(;0KM zg@V3x#~7I_%&!_9i|3|S=Zy|)WqD$(P+eXs3@y;<+Vi4IKQs{RIk)eE5l^u%r}G)? zf@?dD^Cg(aHs&5%X8*{G zH@C0fU3&uapTfcsNcoP(M;1`JlA3Pf-)V{z9Y-b??n!0kyjUAIcnaK!c@uYUTXCsa z-uJ>db$`4wb#E+)vRMw=Q4qJRg*07^@avVfHhhOJ@_ci5_?*OH9CqM$8I>QwKVss; zuWz4!^H*3O@Oo%}j-JhMa|8oJ)VS4_SmTH8!^^8IKjxUohn>|RE{O0HFXFhk+?(efzobo#?rv|;ajRO;{Yxf7`27Uhk literal 0 HcmV?d00001 diff --git a/fusee_cpp/program/sdram_params/bin/sdram_params_mariko_11.bin b/fusee_cpp/program/sdram_params/bin/sdram_params_mariko_11.bin new file mode 100644 index 0000000000000000000000000000000000000000..551d62210a3a1ece75ae0b7e105ed94febf64d5b GIT binary patch literal 2104 zcmdT^J!lkB5T5nZM?v7JZBB6H-`jngO}L~H3upP>%$qkeZ{EClYY>sf7-oz@ z_)kc8`eh@fDG7eA_W2G#MfInHEP{ zT%^}rmobD9lqc~766tazGMEEJhRrz77-A?&vS6wS^E3l?99qg)>tmb<_#ktT!-z+K zJwULBUhR)LVjTOw*}`WXX^d?2Too52P_~MU}3~C6R~)uqNmbB zwv|a1%hjq?jwfEo>+{G%geaM$bvPS_&7ke^af5lf(`p@CYqc^R%d*#aZ7r9}cYNC( zE2u*lM$jid-x;1eyA`X4xtGNv>@Lq8ELyziFDId79!eBX7=TO?Q2bj{fr8A-3ET zyY|U`*}rqxTl^B^T+Jjc(2@%qu9M<2i+7YVQDIrzfHOOiRFA_5JqTZ^(}qoNeRCn4 z!yuq_Z$e61{c2mx*KdhNyP`E#D%!o9b!~OIAx7>lYqRwg7+rc+mIz!!hMtps7ixUL znd&X&I1B9UdEUd)m$OZOg}c2Wq=>%nMh3;?QxQ0TLv#`khN&q>{5p@%Q{9*6lA j_x!r#N!tg4sp(vKFVAj%%I+Ya8}|5BYYgGLQ<*t4g literal 0 HcmV?d00001 diff --git a/fusee_cpp/program/sdram_params/bin/sdram_params_mariko_12.bin b/fusee_cpp/program/sdram_params/bin/sdram_params_mariko_12.bin new file mode 100644 index 0000000000000000000000000000000000000000..15c983197c0b98538bc45a86a190e5c7d1579828 GIT binary patch literal 2104 zcmdT^J8u&~5T1M3K0hwr5aUFN6Ca6f8I&S177-6Aj`9)$DT#zafh1Qx0g%gq(KzS>D!r|otd4TojrqyG{!Jv z6vBT(y4%;_RDqB@uSlPl`ZtIcV?=G%x5+t%WncC=(bm@Hy9+OgbmPm88KKDt!Oyff z(&8e$;<}6>jG#P;$B;;uBay)z7-HCrbBsZTq9hBZnlMi@V8@}QjJ00I@qiC72RV#* z1lR)vd+62vm?KtKpyz{!1fL8exKxc+1kMWNk{85@Y}MxroMF2}6FWU7=NvNM&6p$`;B3^Ngnm&}2&Jw9$QPq&-RuC-<})3z*ojn~$4xqREV z?Y4qCgkc1I;Paj4xwBigx|w@fEW%DR=r$KmgKW)^Find0B*?{lgGNc4U{lwxM}|*d z9CqC7Pe(s_fbOxqiYvvx81h{CwCtAsL6m-)X8D_@Ihv;_9y9XhY}RzvSLx_4&mCgR zJ+W)A?3evJhrPuwG0xRY(gH2Hu;Dr>F0*(`DH9czwGBA4BT4l*jL?Jdl{#(M^wu{Q z!Z{2ATK6WTq}8sp#C+|hsJF^meWk43y;0Lvm+NBW&ayUJTY=HVrzMHNHDu^H*>|DF z7o4e{Vve)G-k#?@D1JKA@K?Co>q3g?`%Yv~OgQC0Zw1%B%OaAyF@fP$zw%7J-;!K=Ea8)U{_uV%CS4kZ;aB0GLgti8Jn!clpATd}N5(^ETF+?|3x^~3M zPiKr^jFknwp@3MK*jZ?4VQHcX_TxEkJ`7}`(Z;hmb3gCh``)|n-8Do+1N*^YD*p-e zMpq46C1d!0Nxm+2Z-^|UMAqP66Ym&@13i!;TU(nSFTN7djc+?<0uu=^&a{weVL@J_ zE+b6iNNV+&inFpDh>vI1WLefWaA3SSP z??s@qapUO(iz2(Wnd(XFMoaHNrINDxGTCyj=-7jUhThXVV3;kbbfuzabA66wXNu*) zL93i@d7-Y)7oQoDFh#=_bZHIJ#r!^93uI+irz*h|{?8 z3FkWv+uN;J?T~&O2RTnO$KP5BxP06gx$t1qEx;Y1)=6)9s`lw$4FT_!6a@9`t zUiPmX)I<4dX;d>K^RlQ+)U5&5SUcak+(VcHR)9*O9Ua}skfPWiNc(_i15k8Mr} zvF?v6O{-q5yK~iB?pVE|jjdF)dpE1v>e84yaCb?YsjhI+rDtWuFfn$l_PeHP~%pcqRvJS5#)`mFy@fR2ZdT37e@q25OG*saWAgP gK4tqrvdEk*@9nc$Tr}^XoE;A0e(W3At83Ez2OIu%hyVZp literal 0 HcmV?d00001 diff --git a/fusee_cpp/program/sdram_params/bin/sdram_params_mariko_3.bin b/fusee_cpp/program/sdram_params/bin/sdram_params_mariko_3.bin new file mode 100644 index 0000000000000000000000000000000000000000..5e605d6b619c2014d23c3863686d21c7074cce8a GIT binary patch literal 2104 zcmdT^J!lkB5T5uLpuhTgG@Wrb1e06fgRS74}=MGkbO+#k8+-69fS=; z9r)IyUgSV)^Xj81G=+9eJvEe8wM=o;byLQ0Hdo1)EVEkG)S=?2re{)V*Hv@*VaqVH zrAoDGRMMHJa{GMpks%44lnz(Jw3xI#F`=={cUr9@>#dgAF$`;+=hki8?gYL)M%afq zji8VGeJ6SB?7Bt|OTU0g_$eCQB$E{A#w-b4r*v;7nA@Z=QYP8e3;JR5*Ox~eukg!J zPaMD29yl;g8KH#FA@b)qZ(i z_OBfDL)w~Y?q-%2Y1zY=`xZ%A#cRsx=&42KXK z{-o5D`lYs5s9zV2wyQK&UFG(*y0W&?5TmzNl)3sUoX$V4NQR-Yz?qZhF17@UGu>P6 z<0`PW@B8=4pHDS|89w<9AywRgZqO(tuZqA2I7G*BVHi#M=08gU9$R(c!Hw>VZ0$+? z)$ElAtL=o#KT!o&0n!hCLKGR19!XU*_}^&|ReYajFW;cr+G!HcF5oM8PmGJa_m0R> zO^}B@0+Ra&8`^+|KnKwdjQNT&R8>(m(o-+j3I)E05@ozm9bYH%5yKUPrwq!^_#ZLz z{@u4vrR1-0Zw{VG$Q-d@92!dPiZ(8K2-KfI5c7w~yLK~=qaK9hCE9LEQI!6Wx3F8zMA(oB#j- literal 0 HcmV?d00001 diff --git a/fusee_cpp/program/sdram_params/bin/sdram_params_mariko_4.bin b/fusee_cpp/program/sdram_params/bin/sdram_params_mariko_4.bin new file mode 100644 index 0000000000000000000000000000000000000000..c709ad13a2c124c8ec6194f446402523c5ddb947 GIT binary patch literal 2104 zcmdT^J7`o<5S{ng-M2sUV&Wzwo82|pT~9boT zg`ZBuM8wJ>y`)I666`Frw6GKuV*fnnzE57lCXHA)k8@}4+?ly^=gxhGh-kndFihb; zA>HYnM5;tcu3MC^OMM$6i!qTF^erhJ=dvezTx4r&^W()=BD(Qy$BfWKgy?5lh_tvU zuThr~hOs3l_7h5?t5L)NCkj9oI1dZ}0VN@r!2~=F&<>%M%(WiigwOlINhKg20rw!$ zp88;a&Kc_%fJ3V_Fh#WCUjDT@lvs{lpbyCTathq^H`sy9cm!2kBku+nKZtn&GC>`| zJb2cqoQGp}I8Q?xJWzAkUNqQjj}Z(wrNVdDGOsj6$A0*IE%PhWWnUi^$!kAGvmxZRiz9vV1Idn)??a5tx zRKM)sIqWUG#5k&%lm%IGXoEThTxIc2QYI^`YU^{bBPr-{8nFlIt906+>8@`sgmW7B zwC;{8NvmIN+Vk~W_E@u`jjdF)dpGOa>hhR9baz>st*_AN(zCLH?;0}poa(z!;|Zmy zu3|T`;NGt5J}iDYJL#>U^T%u@@(r{jLt^Tw*gQZ<&*0dd($s;>i zdtQG#bN%s3Gh*^jL>pNU@)Ms=c~Bq+TsJKIJ1vp2>&ncv+frLSC-%$BJO%E=x`Mke z*(s^n-g}{6^!|c-V?ihrEC=Ta0Jp4bx*=xl&1y#n-l3u*M`nlTBrbiBf!}2meue*t z=@0L}e=hJ>=$uyl5?P~VlvIpRF+z!{wxuQ?x=&u*VCMTA;`tyq8Ty4Dp5S>L=2zJB iYm=vJ9|#sq=gNC|w(|?@4)VES&+o^+g}u5))qeo(T7DS- literal 0 HcmV?d00001 diff --git a/fusee_cpp/program/sdram_params/bin/sdram_params_mariko_5.bin b/fusee_cpp/program/sdram_params/bin/sdram_params_mariko_5.bin new file mode 100644 index 0000000000000000000000000000000000000000..694f938ae2ecc8d7dd64f5ddc1db2ed9e0858ad0 GIT binary patch literal 2104 zcmdT^J4_T&6utA=-PvWA9Rz{!*&ShbgN6cDBJq;|aRH4cKw_{kn^!rm0;7^i*Rmm-^+8y_#c648xs+hz9Q)YAi=L*aLP3dIr)A7TAW)d?ZbrqwD~gKg@X^I!PPJ zeehf3dLIIF>o=cHuqd*VH50u_-AMHfmdgpNKb0#n5~E1`RWnNS4cbrlmh; zWz&UHrDBzmsTb<_Jn@(z4pX!yb_3=>*%}=+AX}RCdh2Svo^4uIZWVK@9UYxb-?z;Q z>JX)|ifX2@O1ibmb4iEWyaY)^^H@wyC)HV#+UuSXVNUmS4U z{BK9E1~?gD1^!`PrT)dMTk_}`cFSIb_DfQeX>bZ9xQR(rGc9wn;L-^aqUk;PY> zsrF(AcEPnh&wE(>a%R$>LFbRzO646m2!l!!z0m~1Ag#Z8m literal 0 HcmV?d00001 diff --git a/fusee_cpp/program/sdram_params/bin/sdram_params_mariko_6.bin b/fusee_cpp/program/sdram_params/bin/sdram_params_mariko_6.bin new file mode 100644 index 0000000000000000000000000000000000000000..7c8b336a74f648af2a8459dc26e7c98cb6568d21 GIT binary patch literal 2104 zcmdT^J7`o<5S{ng-M2sUV&Wzwo82|pT~9boT zg`ZBuM8wJ>y`)I666`Frw6GKuV*fnnzE57lCXHA)k8@}4+?ly^=gxhGh-kndFihb; zA>HYnM5;tcu3MC^OMM$6i!qTF^erhJ=dvezTx4r&^W()=BD(Qy$BfWKgy?5lh_tvU zuThr~hOs3l_7h5?t5L)NCkj9oI1dZ}0VN@r!2~=F&<>%M%(WiigwOlINhKg20rw!$ zp88;a&Kc{NugAedqE80!uhpT%a`XayK+cy_;HJO94rIn7sNx!VH^A83m-%1tK^?(7 zc-E+#hhui*#?uKFMRqf0tUsb%tS0+spzTnK-S76 z3*~CnD#sHq)b+XIGD4J0(OSp`$O5uGI%_Pe}oi=E?>zfPVoCZFv zyW>jI>Q|fgeEpU^)~sk_D;4eD&APU_JZ2BwUDjsnD>ShKxO@`YzOXLTRe2 z*o`c>x9hqOi(k%8dMoJsF}6fudY$`AMIj(82|tP literal 0 HcmV?d00001 diff --git a/fusee_cpp/program/sdram_params/bin/sdram_params_mariko_7.bin b/fusee_cpp/program/sdram_params/bin/sdram_params_mariko_7.bin new file mode 100644 index 0000000000000000000000000000000000000000..a020967139c626e6b869fde90ebb385826f67cdc GIT binary patch literal 2104 zcmdT^J4_T&6utA=-Pzq4c93-;u*5{baG(cLWP5w-KRBgTwoVE^O1CMj4}^0H`nF<&xfRsjP?=f zJa-X+&gPA$lPrqt*=C|IsT--{V6~dC`qP<8w&d7DLx$d095l>SB3Z5KnQXsf+38Yc zXvnH0Q!mu#^TlU|W|*R3i#q6Vt2<+324vP+Uhc4$mu<_k930)T^Z9}m%c#Q z`GoVGhVAWDtxiZk$3f2147r2iY1FM5aZOW_U8!JfQ$|Faz|;l?0UM_;4|t8-Z%;qj zg8OPlkXNaH@hYJ5S=B8ElSKY$nZ+|Lb22Yec-!jBIqX(Bn z2lY_CdJ@%4%YrN^6Lo8Vb=Hsl^G-4*D@;2g)FTn~I43a&^aqUu_sWxsjhM! zyWrZs?>{VmIa3ct(Cy={QrY+IU`Rq;6_*F_L{9L+0Cn}opQRP>c?dYm)L4PlzHA>6EJGxN17DTgCTf=Gtu;UOg-B%S+ra#;wcv_MV%OVORBl z3Xi@Y<5dnw7KG)X&2rGj6@#tonr?`hc(aoZnZ7ec+o=yc_S-~IVAEyp&rM@5rGm!92QsFk886} f*=b1@nRAu>eYT5>=C#VXks$8Jfr0(HHoN}-f>w5> literal 0 HcmV?d00001 diff --git a/fusee_cpp/program/sdram_params/bin/sdram_params_mariko_8.bin b/fusee_cpp/program/sdram_params/bin/sdram_params_mariko_8.bin new file mode 100644 index 0000000000000000000000000000000000000000..c6b98433ff059cf983100a6377218f9c6e87855f GIT binary patch literal 2104 zcmdT^Jxmlq6n^`2cYDX3w+I4(ISfm5H5&mKK&Knqa?v-|Wt^5TG#@zRfr9XWn}=^XAQ3B4Pl2z#xVH zgiNn%99tzK^8J#0o$p=~nM;T?VQ)(LD5nEC;369v>mSd*5;3iBTXu}bV#GMxL8iGm zd5yXZF^wx7;y$4yrW!>oaH0t0fU`g^peYT()(UtFKtH5bGUqyhV)S2rDfJ3V}Fh%s?TH&>Nlvs`~pd082=m z_n~E;yMVyl+Ks1UEQ)Mr?L<$~v{HrsYBk~XrZbh6VlF!{V3|FIe#=fJlGUo2Y3a>5 z*>tfoFyK^@sTb<{eDRqfPPQ0L>;}jIvN=3#fwwdl7mutgE@qpKlUu>uN_%@pGw^M7 z!a780T=|6aoq}H8t~#yYex8%`Gc36ySurR(lj7R8B->KrQD2imF-GC)1@*|{^rgPC zm;YThPwb)l@Yi{j_!mQ$BJsntg;z>w!gYQ8|ici zY1JQ9l2O0faA)eb+>u7r7+IFRGqyk9Gnwyq`f2Si-@qL-Rc3W!8XT*JZnWw;=I9G7@ zWj7-=H+V0M)Az?aBUlC&MC&XE^%Q_v(=aWu6K|IDdAvhKC63%3o|E{D!w$kOqwp*G zM_l;u{`==5e}&#jt`nbAYHUzBB7KMwx4JJi_|QWN@@g%NIUw>u$9NPMMFc_+aZp@w jCvKm8%I2PATAi-!>~p_3?YEat4+e2Rc1`TmHE#X`fX#k8 literal 0 HcmV?d00001 diff --git a/fusee_cpp/program/sdram_params/bin/sdram_params_mariko_9.bin b/fusee_cpp/program/sdram_params/bin/sdram_params_mariko_9.bin new file mode 100644 index 0000000000000000000000000000000000000000..ade1cfc1edfe9e8d55aaa27daf985843a0e57da1 GIT binary patch literal 2104 zcmdT^J4{ny6h8OS_O`vX7pbLz(q5q@Xc(Y25+4aA7SLz{BnAi5#6iPm3{m2wbt6tb zHe&>1oE+E<1H{S1%|S;8M-xqOzkc6;9~1&Cy7=9kd*0{&@A=Pv4H3~m1E3KK{|WSV zp@FTEB6wa|zRvfqiOj`BR$yNd_bA=I>~oQgjrEV`Uy10(w=J^+6CGflX`#~GoV-R~ zMp?#@yf{x(zjW$=5l{&{13C-p2ZcyNFhd1A4PqQhE1A9?(6NB`ffFt$-a%Z4U_9;N z`qWwL2nZjod|(QU;ab75wkfe41yC<2AIK?iGgx2?GV76OqK`ZWV*Rk@Imjg1NZ~$0 zncrPRVrK2e(+M_3wrw-k7uStMaj;sAS^ddWC0)wcLqmq%R~$6VL@Zvd>Zx>p#sDw+PjTzu+tJOMUw_3JkSs5EXJD1B_er%T&^dTza z$R~W?Dd_HY)#?KGvUD;|GvtogqEWV*;+UqyyA!@|O-4i;M`#;Pz{b~?2i$h{x2x9z zoCt7VMfi1<_!qB&WHB?GmfZ;L7o{mvpcy=qGL5t6X=LOe`>-7T6fh}SwI)~XQFF6< zWxpTF)`+8$?kFv zyWrZM=RGWcIoTA@~?FVYm($Ao&ZH4l*v`kan*EQw~FUU^V)40UOFSr%gfv_{MHqmz3Zf8*ikc} z(!=v(zN!JvhOiyf*$(QsV$gM6(+x3WZM_!bY7PDdIw&{1Pl6f(uw#M(uLO1dhO zp{Af>M{%XNP_qybO+|x}MN9nwMeM|EvM4Acslf-KKC%@KQKwASBp+LJE z8&|%a`3#Wq_LgGa862t-9%n8yhsDdh(>M!k!xt`msc^HxY&k}q;m5F<9i%P%Yy{u9 zKpBfQK1nIQ9m7`^MZw3W1z(q;mYApn#grTPzQ7j)#t7homPoz~f2)n6+2O|#ih2S5 z15BhD>K2%Oz0C4+>t{Z={^%*(i}qcmM^i$k%j5OBHit7#n62d8i3ur2%i~g|b*f$$ zPWEulxS2{gF=4_~`jf&I#YhHpmGv905F@vV-}@^olBZeI?GCv${Ax^&_2k?j7%?&8 zyjd2VVcdX&qvvUDUzLI>r)vPh;0`!K-7n zp7(D}Lh^hF&^T+0bPSvg04maZaz2#oJQWd za9@LN)0eFje=LJ}oG1Yijkjn3dK=e_VT(?)G;3d!*)`=K>r%nKPe+ia9}krJ&Nr%PFG|h!EA`u3HWPi+ z_-gj0cb8XV($6P%le>Mw;$Pex&UZ-n%e2Bhi7-hpyLcW^_hHyipM_nbYvwtwZOuA} z>}}y*AZ0iWG_7Il*gdO2M*|n2 zKsPR5zVgk~r+}2V))n(kVSkPA2y>Yk%wJ+p^9-;7U%2q4!p$nP6&MYMAH(K0k+tv( z3daq*@)gY2*=7_!kKrqelHj;$!`Bt41!gKkK2J7r@ZBK43>ZUz3tAxg0{rz3N@kOP zM=0qz`1dlCW~eO~7poO+KwiiM!FRtMqV2$ZTb_(a`2V&I$9?f;%=Q#c*X* zs;tg58p6pRC>S?a4adezn8|)TxK1(BZTgx!z)1^6VGY0amzE?S^QPAuaO?QRn1ag@ zHwcDIjJRkPMRy;r!@=Qmw6d#B5viAY*C`>1?p_5h`eqtdDP;UC5{nmC5rd9AP4qH1 zQK2?cPrQHXA|m)jg8lg#20eiq&oRCjU=S8T8JS%%f%|Y66O8+LZ$j7Mm7!~qfLjbs z0;f>4F5Fk4JM?)w!)fI(i(_RVqR}=@iMcg6s>nT6@U~GX@c>Kmv=o=7dLi+?5E^6w~wP5cM8_{p3m51-fdU z0+PCQ5ZPP8Jx|K8YAnpZ@-{&T5)w*pEP38XI;d@d`ZA!u5G3DY-_9TM?4uh$-o8=& z9pgLcHuQcofM8+`UJNn2>_T+}=@z^Pp(fuLYJaA^NtBLO+v-c0arB>oIyw_#5{^gE RBQxM_!bY7PDdIw&{1Pl6f(uw#M(uLO1dhO zp{Af>M{%XNP_qybO+|x}MN9nwMeM|EvM4Acslf-KKC%@KQKwASBp+LJE z8&|%a`3#Wq_LgGa862t-9%n8yhsDdh(>M!k!xt`msc^HxY&k}q;m5F<9i%P%Yy{u9 zKpBfQK1nIQ9m7`^MZw3W1z(q;mYApn#grTPzQ7j)#t7homPoz~f2)n6+2O|#ih2S5 z15BhD>K2%Oz0C4+>t{Z={^%*(i}qcmM^i$k%j5OBHit7#n62d8i3ur2%i~g|b*f$$ zPWEulxS2{gF=4_~`jf&I#YhHpmGv905F@vV-}@^olBZeI?GCv${Ax^&_2k?j7%?&8 zyjd2VVcdX&qvvUDUzLI>r)vPh;0`!K-7n zp7(D}Lh^hF&^T+0bPSvg04maZaz2#oJQWd za9@LN)0eFje=LJ}oG1Yijkjn3dK=e_VT(?)G;3d!*)`=K>r%nKPe+ia9}krJ&Nr%PFG|h!EA`u3HWPi+ z_-gj0cb8XV($6P%le>Mw;$Pex&UZ-n%e2Bhi7-hpyLcW^_hHyipM_nbYvwtwZOuA} z>}}y*AZ0icL6;Fx>H3t#VR5U0#v{Wl7VmHktheE{&?Lnc3;wjLSc<>;Mzc}#C@6CI^`FP*= z`w~b1#29A8#LIzy^_ickZoyKWk1HN$KONCn%X3H_^3_pg=Y$9#p zXCwH=13>_?%3%NH+jSw?T{ z3BMXJ!<*NbV)~`h>YZ_;EPnAw4M53il<#B*E0&Sw!7OVLy8gcAl=7 z=h@qubr9J*!aYaIpr|=_>K}QRAOr~sr8gEm?-M;(-39tGpg$4xe!$?)@AAx38$aFM zs{Dqron#w&pBX?fz6LLbm|1e6+JbZw-eXV`ZwM_!bY7PDdIw&{1Pl6f(uw#M(uLO1dhO zp{Af>M{%XNP_qybO+|x}MN9nwMeM|EvM4Acslf-KKC%@KQKwASBp+LJE z8&|%a`3#Wq_LgGa862t-9%n8yhsDdh(>M!k!xt`msc^HxY&k}q;m5F<9i%P%Yy{u9 zKpBfQK1nIQ9m7`^MZw3W1z(q;mYApn#grTPzQ7j)#t7homPoz~f2)n6+2O|#ih2S5 z15BhD>K2%Oz0C4+>t{Z={^%*(i}qcmM^i$k%j5OBHit7#n62d8i3ur2%i~g|b*f$$ zPWEulxS2{gF=4_~`jf&I#YhHpmGv905F@vV-}@^olBZeI?GCv${Ax^&_2k?j7%?&8 zyjd2VVcdX&qvvUDUzLI>r)vPh;0`!K-7n zp7(D}Lh^hF&^T+0bPSvg04maZaz2#oJQWd za9@LN)0eFje=LJ}oG1Yijkjn3dK=e_VT(?)G;3d!*)`=K>r%nKPe+ia9}krJ&Nr%PFG|h!EA`u3HWPi+ z_-gj0cb8XV($6P%le>Mw;$Pex&UZ-nOIP8ZM3^L)T|AGd`!MXM&!V(M*UWQV+nRL{ z+1tXsK+14zICE+s?+}C_A))m4isyZ-hpYQQUk3Cyg5D1p-uqLYdt&>iJG+%XFu9iu zpbwcL1XG*vVu<-w7pg5tH{m@3HT~vD>vQc*qjGjF8wI`d6R&iTV!T)wk5A_RP}8pXdkJ=&(yf&}2;Y)>^RaVO|8Vo;#O>H1);b#<% z76o-fKl|@PLyXnH$6{tB@Dnq_NHgfP?jwADoBH)7NNWKVvt%s7?`2X*c zo`L@WD`|$>WZt_IxKiOJWL8eRf92qD+-=@-mEN5YGFcgEG_={1a)NX<vAZ%N zRZ=G!4dJBsWQ?1t2BV`UNF+bbtx<@0i@xSAaN>fIS;en|g$2oG+AJ;(xpiDMCgbvp zo6i?bh%jsBMZbV+aIpV0E#K27i`a|3YZQ@0f2Rr;12X}u6cT_r^Zae%W@G8q}F@(5olgw0NvzN6s9h$J_G(_C5JQpx|=WIi_Vqtw;P? zo)z9e6vy$o^vy)~ZCo~nr}G@wW$iOEy{xhaijv1>FJhW0OF!(C>N{Vll07RmZ-7$2 zyk%3(58Gc%Jp1naQb_tpd?&s$Ak6;G$KfRp=zf`0xGNFFF(zhDqq+DH>?cpb&e3J_ zG!WITgQmSD+%u#MO4`EwBX1LgAR(dj`hw?ur1P~+&_L$t59FioQP}=Xo_cKk$J;lm z*U{RJx1e{KA>{Y2!V4j$mRzWwAl-rYFx1$a#qMX?8$;<(wX42_X<={_>d<6>F*qJU R4^M_;Xl-GfM32`R_zz;XtG56E literal 0 HcmV?d00001 diff --git a/fusee_cpp/program/sdram_params/lz/sdram_params_erista_6.lz4 b/fusee_cpp/program/sdram_params/lz/sdram_params_erista_6.lz4 new file mode 100644 index 0000000000000000000000000000000000000000..6658a61293d07121a1c3482d29af441da363195f GIT binary patch literal 947 zcmW+!TWDNW6kYo~X3osq$vrc7UbT~%F}V|_aADf%U}GETs4*%EnP6<<1F29+zshu| zsi4?V{L&vE`4ACJeFP;RE%gD4*opNc9|gq-?T11?#IHb8qJP41$8%Ziea_i;arWBF zK>{Gg7$YK1NB-5Pzo%Z3_v$O^QEPsA^Dp#5Y_|DG3`!jioe~^5SH;b_yH$JkbWt>$|NmUn z^9YVHk!Gly91rdlzEx%k(yJ%mzIp(64q(?)dVfsFczL{D*Jd=43{#b~H!&f_{_?m~ zaUHAIMKU#-HeR9Gwyx8h$h;%{`^P zT&`duL>aRrdU;$&5{J*w%C0sUIN$l#X+RRay)HZq%`~i1hy`&BEIwXE1UkZP4j#sq zVbQB&wSoV4O*9BWhG2iVimWeCuaZNZp8aUc(h*cs|c?U)DY;Q!6TSq#${4R%4DshQ8fvHAsG;iuSzJ>;a{I ze$^%#@3uahe)^52<%sm-?zX!SE6FAg>24WUxFZodhv|hgX!P%e{oqm9MY>`h zV{vOXiH5x;ymO=sikeNw=F6}*e-eU(gwmh%eg8e3ukHdvnWI0D8+?QO&TsPc1J}O$ zbF16V?%+E72x4~GgX#*>ZTLr_CSNIZKGOaqipMJ*^*Kxv!zZAQ&xDvn U(kJM#nP?KtZA_8q^3Z|*05zkkLI3~& literal 0 HcmV?d00001 diff --git a/fusee_cpp/program/sdram_params/lz/sdram_params_mariko_0.lz4 b/fusee_cpp/program/sdram_params/lz/sdram_params_mariko_0.lz4 new file mode 100644 index 0000000000000000000000000000000000000000..c2e27cdd6700079e5f25126a3d7f281ad0bc10d7 GIT binary patch literal 937 zcmWktU1%It6#mY=cXnrIXLs&qHj{04v%8(lE-NmyyDm1Zfs9R>Sd4Vr#s+F5wJ1@L zl7D3+Gj&3Jm=lJcOTpt`34a3pL>ch zFv=vu_)VEWx7)?HZ0PGbhMR7{HEp1T69eq( zH{li=n5nX!P<*ujmyZny4NT!gmfc1PMnLjI$TiZD1vqrM!2aC~&xW>MgM0_>y)F}T zaElr9XP~CxzQTkCLp=qDTrP15GAn1k8ttcN4Q$!UC?vbuL zr6H-3Mxs^|R(ddF+Np9-ubV+4dHq)!i4jBmtUx_33M2C;{g+*BwIu85-t264X?E7` znPz5*_m(`*>ow8LnUBT1#zRw|^La>&v-CW|{J}Rv51tC U4#Dszn#0)j)I(;3x;)Ro{|`~6rvLx| literal 0 HcmV?d00001 diff --git a/fusee_cpp/program/sdram_params/lz/sdram_params_mariko_1.lz4 b/fusee_cpp/program/sdram_params/lz/sdram_params_mariko_1.lz4 new file mode 100644 index 0000000000000000000000000000000000000000..9bf1a22c06f41662197efd0e863943192a1f51f8 GIT binary patch literal 938 zcmWktVQ3Ub6#m}K?A_kp-tAoWvUi%x?RnWdPI{nsJ!-UptWAt9P4TR$fojBxk`_vc z!G``2-4+T*&5yK-h)7La3qpUi;6D)>DgEb<(o#|=#r_bXAS9`Q{#;*X_-5X`H}k!j z_uj;i0Ekg#G>OIQJrNZ{UWIvl8pl5VJi2owi(F5kUg@(T6#i%Hg9pFd8~F+l@}Gx_ zP#9&BVf?C0pxf=@YhLc%k24w`^l}7w0j^Y7EA!C|;{apu8m3b`D-Ac@fNR=73C9Yo z>NnvIG%#IZIidJy5iV~l2n|f)SeDgB2}VHjL&!DKkp(z(waEIN49|wPUWa@S?!zt< zvvZ3X^QWPv;J(U)217jqyId}D2r?_DzZmVO%?6&^${0upnJf*}YKA$OvVwFuW7q3a z43vhXN*ak;O<3u{jA^IJLA`DUiR8_nXe34q@uLFuI4F$FAM{^#wbha=r+YIq*`=8o zyJwo2CAKYjp4V%lnKK`Yd5uS~@bVmm&ueDx0}MIXOA$%T!v@*-#vF%M3JEt^!ub_6 zLHnGy37Y=0q2O05k+W41y9s?C-xR*HC0ds~j&d4>A`+Wo42QUnVFHJ7kVpGI`5CtO z4FNmny$hTKPGPhF?;6K-itdF8zETQDa5O4{Q%ZA~`W}|bog_}8^F(Ho?D?*uJg!hx z#kYSrLcw+&wQtA!ZeT;Vrxx|$_Bq{ItWjsSMjxGR)57tN9=dRx4z*_kwBGnKP_PMZ zA5Y7ODhFLZ&kPswSscfg{k2!Zr!weh3(g~mmW1(=tZMPMba(Zue0W793Fjk(Ts@Ie zk3Z3=#?|(B<0n3!U1XNYs@4kQSjT!EZWqiBfIGBG8p5LG`&N$ss0ix^Z-w4$EV?W=2 z@_RXL?AeI7VC*onpr?i}n=tg^ztXuSV07RdfEvE!g)-p`^RFp~>MqPZSbYa-bRys{ WWH|(*I?)`)j%S?35$bY511|syMWuWI literal 0 HcmV?d00001 diff --git a/fusee_cpp/program/sdram_params/lz/sdram_params_mariko_10.lz4 b/fusee_cpp/program/sdram_params/lz/sdram_params_mariko_10.lz4 new file mode 100644 index 0000000000000000000000000000000000000000..f5df3c449f6d565c8249dd5946fe764d88c4a69b GIT binary patch literal 955 zcmWktU1(HC6#mZ4+}+u`clXZj-R!Q(Ci~O7VYLfp{UK2Uxix9DZNyDYU1*J@qDX0x zG#2TD)a!$|U>;%>DJ7VQEeL&RXGS)z)54}Ck@G)o3ob#QT zbIwGN0EkgzG>OFq_6o{EGV5`hA;!?T~WjfBW?| z&Qu!#DfQr@(OY+1`+Vlrch6mBnyH#G3KMvY$2lA-@%V(QQY$=>@S_M5oik`G?15Q+ z4dyfYT2F!RU~DwZkko5bpzo+)aes32W#cFCvmha%tlJB&i~0S?mm4(Bb*FjdBfNp0 z4PVWT|M2g_U;ay4`@(Ia1ZNXlbQ<)?D$6D;bM7zcE(=(@;O>PQ`6wUAm^;EBXdqB` gptob~4XCk6pMR6>60F)}a|BzK^GJ&tvSXa#>gcsWVlxvZngo}w1F~S z@_A~|gge~8LY3{5;;kjP?B)v%%)!l<;2UoN9k}*Air6W(0EaG?*c@UMZD{LR$k*ZC z?lN-(*J4U<5w7UNJ4ng3$5%)!WQo%(2Mkain*WGiDhC1kohTCW@CNX81Y zm7F~`CdF`hRI0R*s@H{;9m$z?rV@^gnPDn@^?RC3kU)H`Ks^o&BljEqo$t3=lI?77 zX(_+4v}E^8Gq=HO8=hC}HPI}Xcg3p4HY_}~LeZnTS$Gqp4#p`aiB;Gj8+~&IS}CO5 zG-8djTWEp~I4@E`oT2X&f?73p_NwAB!oWLMMd0j-*7+ibIt#yq)UKGuQLfXN#W5V= z*1kzWj#q+)fL$oQ0xSZrVaiAG5@5{Jw^54kl)-VFh)dwS(hBCkf~5+J#F=#N%Y1fQ zc;w*%)l_o*#&HV&7gYOta^MPfbbEeXA8Ws%JL`4oEZ6DnGi_Qs+0motPSVl#a){P* zABPGy!5!dk6LIy38+gp{EF9wBJKBP?4bhS?o{%*y{*dneLFGjkM4E6m zM#KV&mAd=B&NMEzznFRT!{v2mnX757FoTD9=;4Jjmn*binhLuTVUl2GVFit~gV5KW zhyI+tG3QuCRX(ht$EDdPpME6YU}>`M2GXbTiy$GPjL+5_2dmGZ7&K^_6HcotM0^>8 zJE1x?{lm@szg8UMaQwI^!`{O_GY@)T1hNT3um35XYXU|G&LOCY_ll8BITQSMDv|mU g=9B2Z3^g?y@<*~9f>E1oPGH|(oW@D&vZ{gq0JBD?vH$=8 literal 0 HcmV?d00001 diff --git a/fusee_cpp/program/sdram_params/lz/sdram_params_mariko_12.lz4 b/fusee_cpp/program/sdram_params/lz/sdram_params_mariko_12.lz4 new file mode 100644 index 0000000000000000000000000000000000000000..a0ac152f2ad029a923ac0037e99d61bdc44d2067 GIT binary patch literal 950 zcmWktQD_`R82FZMT@jZe9z`CuDMDc)Lw%Wl5Vz%1N+3BK_b(1vT@qllei3vlRsiOm5<(T293g?t_E z?G7_Xa4n|v7T}5=+=EPMC@6jvpZPa7${dW`=82Cc`)Q|+N47EsQ$nW8Bej}g4rQz` zJDjseN2M4nk4Tj^Qni|}vO_u3&J2g6qh^>&U;dUR5+o2`DNvUK!^r(Yf98A5rer(Y zU0lqsFD}|$)6A{&+PdczyA3o7=3TL(u>}iHEmQQUW)|MWh=VbTNn!;y$VShchE@tG zH;q{1^d=ghea?$i5U1#-LQt*5&Td6KM(BIzvIv}A(L7t^P-o$nklGPbILvhlGdO}n z+}bxN$ni>07qAP(SAYfJHB9;_UI2_a`X);8oiaFzV{r+bS6as0m#|b}fjE=SeVNa0 z36DISqpC`-UO!6V|AJ~=P4->Fwr=_9Q-bbGBv?WG#MeX2#P$J=`3%yBy0S_;v8 z?&DCwCb)gvZ6K~3as!VU-o*z=lAI0hJRLodVOv{pwji1k#uKut#c$Hx+poOnoJbQ+ z$B0-!u~K*6*O~hH))&*Sez>&8EVEUu6{hhJ4?Vn4=5mSlN>gD+B1{rY&o86Cx*z(= z^U$Bu*XAs%sKSTU^_Vn!+qsrhfS6{?Gq9#=-b;QHH&XJ!T&CzzAdmhF<$!I#&dYHk<=ckJJ^(O(*rDrqHZHDRX*T@-4 z&fJ`%wRZVGT_=~z>joNG{X{Gnti#5e=P7zs)7g(O=wX<;B(VSoZ2mYf3!K1M0r_iyHBGmo1fME}BRE>b=`J@kqDV~Ng{`u)#J%*M$xM1( zSeN7#s;crlbrQ}?i0LAP?i4|2@#3BHKq_;T?0t?0Q7+s1~s4$+jbcFC#{e@TCPugXPN!~nh( zq|}qoOsamhb$jB&FXxvyf2wMX!USI8We!s%em1Bnq*mCJ2;&$NGv`rX+zWH#U6wU| z(o?LU3hz@lO1NvpGA>xGN|szUY4EoYBqWse6TKT%iX|6s7{Xm z`rz3gWzX8*-6=|Nwy;fSK+ml}Hei{hf24Oqz-q(W2Q~6(K9UJDgEb<(o#|=#r_bXAS9`Q{#;*X_-5X`H}k!j z_uj;i0Ekg#G>OIQJrNZ{UWIvl8pl5VJi2owi(F5kUg@(T6#i%Hg9pFd8~F+l@}Gx_ zP#9&BVf?C0pxf=@YhLc%k24w`^l}7w0j^Y7EA!C|;{apu8m3b`D-Ac@fNR=73C9Yo z>NnvIG%#IZIidJy5iV~l2n|f)SeDgB2}VHjL&!DKkp(z(waEIN49|wPUWa@S?!zt< zvvZ3X^QWPv;J(U)217jqyId}D2r?_DzZmVO%?6&^${0upnJf*}YKA$OvVwFuW7q3a z43vhXN*ak;O<3u{jA^IJLA`DUiR8_nXe34q@uLFuI4F$FAM{^#wbha=r+YIq*`=8o zyJwo2CAKYjp4V%lnKK`Yd5uS~@bVmm&ueDx0}MIXOA$%T!v@*-#vF%M3JEt^!ub_6 zLHnGy37Y=0q2O05k+W41y9s?C-xR*HC0ds~j&d4>A`+Wo42QUnVFHJ7kVpGI`5CtO z4FNmny$hTKPGPhF?;6K-itdF8zETQDa5O4{Q%ZA~`W}|bog_}8^F(Ho?D?*uJg!hx z#kYSrLcw+&wQtA!ZeT;Vrxx|$_Bq{ItWjsSMjxGR)57tN9=dRx4z*_kwBGnKP_PMZ zA5Y7ODhFLZ&kPswSscfg{k2!Zr!weh3(g~mmW1(=tZMPMba(Zue0W793Fjk(Ts@Ie zk3Z3=#?|(B<0n3!U1XNYs@4kQSjT!EZWqiBfIGBG8p5LG`&N$ss0ix^Z-w4$EV?W=2 z@_RXL?AeI7VC*onpr?i}n=tg^ztXuSV07RdfEvE!g)-p`^RFp~>MqPZSbYa-bRys{ WWH|(*I?)`)j%S?35$bY511|syMWuWI literal 0 HcmV?d00001 diff --git a/fusee_cpp/program/sdram_params/lz/sdram_params_mariko_4.lz4 b/fusee_cpp/program/sdram_params/lz/sdram_params_mariko_4.lz4 new file mode 100644 index 0000000000000000000000000000000000000000..9262ace6fc683eb862e9046ff9be29f235a1f577 GIT binary patch literal 948 zcmWktQD_ub6g~I7H@ma5vpX-D&F-3PcGk^oSlb1&+oeVgWNczojJRqv&>Bgl5(*{6 zU_(DjoqiOSnvb-Kh)7MT1;GzX{S(26UxFWEDG@~ULj*xE(Lg_^*BQ>d`|i8%+&A~! z7eN9bMww9~HZQhCm=AasWUxk26wY{wLD&BNueoY25Hj-=Ub6kzxyzkysO9a?}x=kx6EW@K$>YcJ%NaPPI4 zn3G$~n3;x}fV-0k4TgFHPPtUzLZp_be;Mwg^(x-m%IJv+887rzDu&scu>52(W%u_> z(NpM?DsIFo6=5ZNQ>L9L`u+W;AB$hUOG6PNh`$u5%|&6P{-t;6m3m#Woor7{r5C5B z?6zs97I|$klgYMgsCAgn#hk`NSoma?g7+1(<7@Oe7@&|O=3s+tteB(FN+IUP5o(-X zMh&#hIZV*>)MjD4aw&8+N@5G4^SjH!b2dc%Y?kYsL@tlmx){N3en&8dJ=n!x`!;zg zUh%2|c1QMe;5cvs!#QLxaAhaxRuJPuC2$aj!aP`1n#IHoSgPYVv5d}3nT~Vj>xwcs zM`aaVy?K!Q5B=1*8g09THQkt4(0dxEbaSCX&6x^)`&EPHk2Q7QnParOG2^4Y?^j>J zCb*qEEFmoIa=i>Qe2<@^C_3w{ej2=zep6d;9zxV5jE`kmi)Yf^+@&(XIT0tE4iRww zgi1aCQ75YB8-I>|@$<|Avy7LuRv5)wyv^W1fuBpXS(*y#5`Gk6baEEe`R&kG_CsHz zzs+&*5ja^@4@i53_@8rzEk1NzXZ$1{3lb8__+#F2F!vd)C$Obaz4D!t>2I@M@tynn< aH9Y3?HL@InQ68%eV$&Peafn*n)WHAp%cZ#h literal 0 HcmV?d00001 diff --git a/fusee_cpp/program/sdram_params/lz/sdram_params_mariko_5.lz4 b/fusee_cpp/program/sdram_params/lz/sdram_params_mariko_5.lz4 new file mode 100644 index 0000000000000000000000000000000000000000..5185b6350dfd39927a850edb9630625d67e8e1cc GIT binary patch literal 952 zcmWktQD|I66g_ul-tODC@9mr9ZFaZGX5VJ>Hmtf}c3o`R2J&jtv|^-NnN2%KgLue_+6Q7-)`f3-VPtYf<_K{ErL7;PbzGc_^QJ=$mqX}nG~-|!%NrTnKn?w zsXVKCOn7}Y%#>M9D85>N$7Xq+|1?_0Vn&&uwM&C4@{C2dh=X>`z%iy5!hH zLsIk=2c=3HiE33?>3+wwQ>9>N$P5z6Yxik1Mhx+j0(Cek4Chb!H?z@bNS4!`xw*{h z+??GpO=p$QRgkc|y<99k(Pyd)xx zv+JmX_Pg&8G(EJrFn*;RxqD^NBzP|oy3bz|zPl$H7YcBZM!tZ=t~icy9AzBic^DIL zz9!${6aTz`-BoxOm<8U)SRRGToZTt|xO0Mn7d_Ry5%0f>9o?K-(Z`w}>DEe>T8mZs^us1CPq*~oxoJAuTnx~7 z^V>kd=CHeYSwmDl?D<({_zYjhaeTqwdOdt1gO;}7K7eRQ7_Z2R7Jo}`phsoHiy}!l z8zJN#ij;cvg-+EjHE)f-_toMGvrJaBR{Z2`Y-jOyk;hdUkfy?}L=eXqpE-lt@&V}U zZ$aOrpUp{d2<)t;ho!wi{N}u2ix-{Oom{{lf`o)Jepq&0EWLr8U!x;jcDktoL|4$W z6R7zkzutZPu#`3qMK6mY>^N6o(pBd9pT?o3e|0x fuVUjg)YwG8U&(R_MrEQtf_=|&a7L-kjSc({nUbac literal 0 HcmV?d00001 diff --git a/fusee_cpp/program/sdram_params/lz/sdram_params_mariko_6.lz4 b/fusee_cpp/program/sdram_params/lz/sdram_params_mariko_6.lz4 new file mode 100644 index 0000000000000000000000000000000000000000..dec50df95c87d5b6c9cbf56f4f3a8ce15013a8c6 GIT binary patch literal 947 zcmWktQD_uL82P*U^Cupkn}CC{!wa11NMA{$rmzcW(YZ{w*Nn zqq~Ywm|&_g{Gm+t?{x4T4@dXnltvzUJ%T(7S1LRx^VSSwA7khu=2F}%4L4nfYuZ2w z#|u2wZ^9j{W3Iw>Lh;rjTy`r64a~sJ7Ev%h2HJ4#M-;MCWC0FcD6%=g$lK7?VaN~Q z-t91R2-jjtZyv7b!QIc4217jsAG%)RP-Hevem&7o+jTs*l`)tQGFcj~)eLheWd-SS z#vU1wVz4wURnkb*YQjnnWlTF&4n{`IAd$TCD~-p9A%0SzE{BDYxljLQd(Ea~JKbGa z$gV9c*j>}itnu2K=jFQ%G;-!cv8=HP3$HCv_`GK3KEkkrQHn@n88*m9&zyo*3JEuf zNaM@~8lXMSG0KV4bX&o%Rw8GoB3>f&eR@Us&W>oF%X6U9C=`*{7Lz#0brRD!gah2# zx5&@%ieDG7bNP3HdEk9a6p+6N7_;tGgxMcqsoXqq9-YTBo8A;2 zc{op16<@n~gn}1xYF&%>T*j7e&93T0tq*m3wMOm58hvuQMJp%Tdid-KI@nqa(0uco zK*1)secY`hsvK~Aj~PD0mvJ1Q^B=q(K9NCNTW~fZni9qj zSw4|c55Lf<`i0gHQ}2DXxXLUuRjn1K@C?s9yj|jQnRZK4VOt`IV@%C0p}w*g`s!QI z*Xd_-hBZ{-!|Hle+CAbI7Ytjx5M5vL6#f(>B$V;}isNAU4dnegO>(~Jx(X0oLjP8v zPEP)I>+!v^W9*M!7A4p_*kxuxPYho+VCdCBbm#J>@KpQ->uD{0}d9rj`Hz literal 0 HcmV?d00001 diff --git a/fusee_cpp/program/sdram_params/lz/sdram_params_mariko_7.lz4 b/fusee_cpp/program/sdram_params/lz/sdram_params_mariko_7.lz4 new file mode 100644 index 0000000000000000000000000000000000000000..3e1bbe7ee36ecd91eb031b5b2bcfb1d1a36044dd GIT binary patch literal 948 zcmWktU1(fI6#mZ4+}+u`clXX_HoMzovv=Lx4Qsn#c3o}S26AiCR58%4#s)MgEv*DW zN(?pjLF^VP1pAWO;zOx6{(;~_^|cmE@kJpIf)DjYTBH;Np@|LHx9f3+Z|2O*Ip3K% z=S&O`ucAD*D2@aCeso|R=sLhE6spy}0Tfpi{$-upw{QM3{uv}L#J#axPKWnj|{SnUC2 zyjtX~ehoX=z+9E(gksYYEUOiT0cK#cB@~^vfex&9pCVT3xqwesN-PdA3LcF6BIHTf zJ6&duU|pun&%=rh*aJ-IC@6jw`+S16GDjn`e&X^(KW#Vg*i+76Ldax!xL$YkP|6L{ zm5etsBE?{NSgNFxsMm#?9?EDhRS8E%beKq9`;o?D#1P*p5Qjl9GVkG^>_)34Sx)PP zg{-%*;AyQh>^0-%^99{RGpFx~C4)`4c=ilMkLx=37KVL{Qja8-;DJ1Rp{HP!Lc%7? zcxN3=&|d!)%HcHqpb*rmJ%6Vvo+k92yCwpEN3_ltIM8VnOGs>sNgU!niD?|hK_0zZ z6lC}$Xb5<@!t201a2yjw6s`i!EPWLv_(mxl!O;><^*EgoMPl|_xGFbKoJs$I%%(Sm zb535Onu>4SJVN3B1=YS0@9kmBv}ae$;r5%Rvr?zdVx8VS-KOPZ9W#9P7#(UahG@O? zaj4)CY#&c+=v5EeAkPf%dfV_f)~5G@I3kE|K-hqO=it9*1x4B=Bj zO5M9)QjII^uczMlXmN$@XKKbMOyLn8bv7y!-CE@7(w9 zJuij?K#U5bPHbN4h^P?qEX-n!;@HQ-{k_XT+W% z_Z1;O%2dPnU6~x;ZsU8N4sF9xjU4n+1bG^sR9G$XR)?{j(SH$BDIS%Em#)DxZJ>yQ zd3N=f@cL?)DzlwXytM$2!}3A{6F8V*w^4)1;pTN7{ zW@1imF=KWHY7*WKCNvZj--$E+i=`r$!dagAX0(UaYj|xdqc0(3vN%w!8fJgW3eqLV z9vqaSuQ(u8(nwUR!b#Esx0s}6FC?bhD*dQA#<`}e6NO(y^ z8mE>~2W@o^5Hvlqxix;J9Jw21@dly$^DDx4H$>xH0WQ+W7m!#NdohOHj6MAC#5kO< z$#;0guL;;)g%5!vz{eQPqi~UHJ4ru>2|iQ``>;PMfZIx;n7j!~bsZsYr29-}lAQU5 zqAbo+Ma9={?W5p-MK!O*TQ6fxHzybLp5}4gTBuTMwo0EJYtsDTmL52Ln07a312o?I zHc+q$UN;X*h{`)XKg$ef@MRpw=ls=o!sjw*X$$THh=zpmmaJ&;SbCd#R5m;>l7v$c zLRL_u)RQlCs&=7yee9#JW*3-cqN26pE5E|4EIugmcbPUzQ(;{qh+~XRokVSZ8}!xp zp?{>G%n9%jI9W{(Nppqr^eg2J)+P(DJ9!j;2oe&?_+j34G50QVevNi<&uLBth%TXL zEl@MNe!27P&r;gh5xpsjus5*D%z&O7zO2L03ooR5RlsP$-3~Q;HW$i-JIs%#6sj9A fw_xQE)aZD?FUfKVMrFJ{j7=|da7L)jx(5CO0z{^a literal 0 HcmV?d00001 diff --git a/fusee_cpp/program/sdram_params/lz/sdram_params_mariko_9.lz4 b/fusee_cpp/program/sdram_params/lz/sdram_params_mariko_9.lz4 new file mode 100644 index 0000000000000000000000000000000000000000..93b6869f769cd47d120e9584b9f9ac3b666a86da GIT binary patch literal 954 zcmWktQD{_06g_ul-tO$%_x8=^ZFbjWvv0e38@BC2v)gTr8pyN87-_(@Mgy&pNLzv+ z5`(6Gl)8l$LWPo6>4(^wRt2FSw!cL%(w`RmDEN{76pM%;2qrbq{=HsjILw_p_ueye z@0}PD05PhJ2C?|fvgj5g-bFcVP#g#N^I+d9(6NAJC{!vveJCs|{L41CZ{PZT^gBSv zzwatSVT?nK;18wQzSF_?ydB&Ws#AK{u6&1pj41&$-JY@U}$rd=VbfC=`*{6q6XoUdBG2yD z0N)By>cOWbRlnG}G5+2c^GobMRW(NObD!Z^4pSu_8`Kn1D{M-Hag6bqQ>ZWQfVuKE zw>Ey(Q($)HsT(CyYgC}$NOhD?Z3TmD(%_*GBqWq|ZPD|v@D}nxo%V3mX+f#ad?XXz2>+jQq;5jL ehPA^`V-q2NCfg%e)rrOkwmr?m9i #include "fusee_secure_initialize.hpp" +#include "fusee_sdram.hpp" namespace ams::nxboot { @@ -22,6 +23,9 @@ namespace ams::nxboot { /* Perform secure hardware initialization. */ SecureInitialize(true); + /* Initialize Sdram. */ + InitializeSdram(); + /* TODO */ AMS_INFINITE_LOOP(); } diff --git a/fusee_cpp/program/source/fusee_sdram.cpp b/fusee_cpp/program/source/fusee_sdram.cpp new file mode 100644 index 000000000..377e7e4c2 --- /dev/null +++ b/fusee_cpp/program/source/fusee_sdram.cpp @@ -0,0 +1,970 @@ +/* + * Copyright (c) 2018-2020 Atmosphère-NX + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include +#include "fusee_sdram.hpp" +#include "fusee_uncompress.hpp" + +namespace ams::nxboot { + + namespace { + + template + struct SdramParamsImpl; + + template<> struct SdramParamsImpl { using Type = br::erista::BootSdramParams; }; + template<> struct SdramParamsImpl { using Type = br::mariko::BootSdramParams; }; + + template + using BootSdramParams = SdramParamsImpl::Type; + + constexpr inline const uintptr_t CLKRST = secmon::MemoryRegionPhysicalDeviceClkRst.GetAddress(); + constexpr inline const uintptr_t PMC = secmon::MemoryRegionPhysicalDevicePmc.GetAddress(); + constexpr inline const uintptr_t APB = secmon::MemoryRegionPhysicalDeviceApbMisc.GetAddress(); + constexpr inline const uintptr_t MC = secmon::MemoryRegionPhysicalDeviceMemoryController.GetAddress(); + constexpr inline const uintptr_t EMC = EMC_ADDRESS(0); + constexpr inline const uintptr_t AHB = AHB_ARBC(0); + + #include "fusee_sdram_params.inc" + + void *GetSdramParams(fuse::SocType soc_type) { + /* Get DRAM Id. */ + const auto dram_id = fuse::GetDramId(); + + /* Extract to work buffer. */ + void *sdram_params_work_buffer = reinterpret_cast(0x4003D000); + + if (soc_type == fuse::SocType_Erista) { + #define HANDLE_DRAM_CASE(_DRAM_ID_, _INDEX_) \ + case _DRAM_ID_: \ + Uncompress(sdram_params_work_buffer, sizeof(BootSdramParams), SdramParamsErista##_INDEX_, sizeof(SdramParamsErista##_INDEX_)); \ + break; + switch (dram_id) { + HANDLE_DRAM_CASE(0, 0) + HANDLE_DRAM_CASE(1, 1) + HANDLE_DRAM_CASE(2, 2) + HANDLE_DRAM_CASE(3, 3) + HANDLE_DRAM_CASE(4, 4) + HANDLE_DRAM_CASE(5, 5) + HANDLE_DRAM_CASE(6, 6) + default: + AMS_ABORT("Invalid DRAM id"); + } + #undef HANDLE_DRAM_CASE + + return static_cast *>(sdram_params_work_buffer); + } else /* if (soc_type == fuse::SocType_Mariko) */ { + #define HANDLE_DRAM_CASE(_DRAM_ID_, _INDEX_) \ + case _DRAM_ID_: \ + Uncompress(sdram_params_work_buffer, sizeof(BootSdramParams), SdramParamsMariko##_INDEX_, sizeof(SdramParamsMariko##_INDEX_)); \ + break; + switch (dram_id) { + HANDLE_DRAM_CASE( 3, 12) + HANDLE_DRAM_CASE( 7, 0) + HANDLE_DRAM_CASE( 8, 1) + HANDLE_DRAM_CASE( 9, 2) + HANDLE_DRAM_CASE(10, 3) + HANDLE_DRAM_CASE(11, 4) + HANDLE_DRAM_CASE(12, 1) + HANDLE_DRAM_CASE(13, 2) + HANDLE_DRAM_CASE(14, 3) + HANDLE_DRAM_CASE(15, 4) + HANDLE_DRAM_CASE(16, 5) + HANDLE_DRAM_CASE(17, 6) + HANDLE_DRAM_CASE(18, 7) + HANDLE_DRAM_CASE(19, 6) + HANDLE_DRAM_CASE(20, 8) + HANDLE_DRAM_CASE(21, 9) + HANDLE_DRAM_CASE(22, 10) + HANDLE_DRAM_CASE(23, 7) + HANDLE_DRAM_CASE(24, 6) + HANDLE_DRAM_CASE(25, 11) + HANDLE_DRAM_CASE(26, 11) + HANDLE_DRAM_CASE(27, 11) + HANDLE_DRAM_CASE(28, 7) + default: + AMS_ABORT("Invalid DRAM id"); + } + #undef HANDLE_DRAM_CASE + + return static_cast *>(sdram_params_work_buffer); + } + } + + template + void SpareWrite(u32 reg, u32 value) { + if (reg) { + if constexpr (SocType == fuse::SocType_Erista) { + reg::Write(reinterpret_cast(reg), value); + } else if constexpr (SocType == fuse::SocType_Mariko) { + /* TODO: Validate the write. */ + reg::Write(reinterpret_cast(reg), value); + } + } + } + + template + void InitializeSdramImpl(BootSdramParams *params) { + /* Perform initial soc-specific setup. */ + if constexpr (SocType == fuse::SocType_Erista) { + /* Enable sel_dpd on unused pins. */ + reg::Write(PMC + APBDEV_PMC_IO_DPD3_REQ, (((params->EmcPmcScratch1 & 0x3FFFFFFF) | 0x80000000) ^ 0xFFFF) & 0xC000FFFF); + util::WaitMicroSeconds(params->PmcIoDpd3ReqWait); + + /* Disable e_dpd_vttgen. */ + u32 dpd4 = (params->EmcPmcScratch2 & 0x3FFFFFFF) | 0x80000000; + reg::Write(PMC + APBDEV_PMC_IO_DPD4_REQ, (dpd4 ^ 0x3FFF0000) & 0xFFFF0000); + util::WaitMicroSeconds(params->PmcIoDpd4ReqWait); + + /* Disable e_dpd_bg. */ + reg::Write(PMC + APBDEV_PMC_IO_DPD4_REQ, (dpd4 ^ 0x0000FFFF) & 0xC000FFFF); + util::WaitMicroSeconds(params->PmcIoDpd4ReqWait); + + reg::Write(PMC + APBDEV_PMC_WEAK_BIAS, 0); + util::WaitMicroSeconds(1); + + /* Enable memory clock. */ + { + /* Initialize pllm. */ + { + reg::Write(CLKRST + CLK_RST_CONTROLLER_PLLM_MISC1, params->PllMSetupControl); + reg::Write(CLKRST + CLK_RST_CONTROLLER_PLLM_MISC2, 0); + + reg::Write(CLKRST + CLK_RST_CONTROLLER_PLLM_BASE, CLK_RST_REG_BITS_ENUM (PLLM_BASE_PLLM_ENABLE, DISABLE), + CLK_RST_REG_BITS_VALUE(PLLM_BASE_PLLM_DIVP, params->PllMPostDivider), + CLK_RST_REG_BITS_VALUE(PLLM_BASE_PLLM_DIVN, params->PllMFeedbackDivider), + CLK_RST_REG_BITS_VALUE(PLLM_BASE_PLLM_DIVM, params->PllMInputDivider)); + + + reg::Write(CLKRST + CLK_RST_CONTROLLER_PLLM_BASE, CLK_RST_REG_BITS_ENUM (PLLM_BASE_PLLM_ENABLE, ENABLE), + CLK_RST_REG_BITS_VALUE(PLLM_BASE_PLLM_DIVP, params->PllMPostDivider), + CLK_RST_REG_BITS_VALUE(PLLM_BASE_PLLM_DIVN, params->PllMFeedbackDivider), + CLK_RST_REG_BITS_VALUE(PLLM_BASE_PLLM_DIVM, params->PllMInputDivider)); + + /* Wait 300us ffor stability. */ + const auto stable_time = util::GetMicroSeconds() + 300; + while (true) { + if (reg::HasValue(CLKRST + CLK_RST_CONTROLLER_PLLM_BASE, CLK_RST_REG_BITS_ENUM(PLLM_BASE_PLLM_LOCK, LOCK))) { + util::WaitMicroSeconds(10); + break; + } + + if (util::GetMicroSeconds() >= stable_time) { + break; + } + } + } + + /* Set CLK_SOURCE_EMC, using McEmcmArbMisc0 as MC_EMC_SAME_FREQ. */ + reg::Write(CLKRST + CLK_RST_CONTROLLER_CLK_SOURCE_EMC, (params->EmcClockSource & ~0x10000) | ((params->McEmemArbMisc0 >> 11) & 0x10000)); + + if (params->EmcClockSourceDll) { + reg::Write(CLKRST + CLK_RST_CONTROLLER_CLK_SOURCE_EMC_DLL, params->EmcClockSourceDll); + } + + if (params->ClearClk2Mc1) { + reg::Write(CLKRST + CLK_RST_CONTROLLER_CLK_ENB_W_CLR, CLK_RST_REG_BITS_ENUM(CLK_ENB_W_CLK_ENB_MC1, ENABLE)); + } + + /* Enable EMC/Mem. */ + reg::Write(CLKRST + CLK_RST_CONTROLLER_CLK_ENB_H_SET, CLK_RST_REG_BITS_ENUM(CLK_ENB_H_CLK_ENB_EMC, ENABLE), + CLK_RST_REG_BITS_ENUM(CLK_ENB_H_CLK_ENB_MEM, ENABLE)); + + /* Enable EMC DLL. */ + reg::Write(CLKRST + CLK_RST_CONTROLLER_CLK_ENB_X_SET, CLK_RST_REG_BITS_ENUM(CLK_ENB_X_CLK_ENB_EMC_DLL, ENABLE)); + } + + /* Clear reset for MEM/EMC. */ + reg::Write(CLKRST + CLK_RST_CONTROLLER_RST_DEV_H_CLR, CLK_RST_REG_BITS_ENUM(RST_DEV_H_EMC_RST, ENABLE), + CLK_RST_REG_BITS_ENUM(RST_DEV_H_MEM_RST, ENABLE)); + + /* Set pad macros. */ + reg::Write(EMC + EMC_PMACRO_VTTGEN_CTRL_0, params->EmcPmacroVttgenCtrl0); + reg::Write(EMC + EMC_PMACRO_VTTGEN_CTRL_1, params->EmcPmacroVttgenCtrl1); + reg::Write(EMC + EMC_PMACRO_VTTGEN_CTRL_2, params->EmcPmacroVttgenCtrl2); + + reg::Write(EMC + EMC_TIMING_CONTROL, 1); + util::WaitMicroSeconds(1); + + /* Select EMC write mux. */ + reg::Write(EMC + EMC_DBG, params->EmcDbg | reg::EncodeValue(EMC_REG_BITS_VALUE(DBG_WRITE_MUX, params->EmcDbgWriteMux))); + + /* Patch 2. */ + SpareWrite(params->EmcBctSpare2, params->EmcBctSpare3); + } else if constexpr (SocType == fuse::SocType_Mariko) { + /* Patch 1 */ + SpareWrite(params->EmcBctSpare0, params->EmcBctSpare1); + + if (params->ClkRstControllerPllmMisc2OverrideEnable) { + reg::Write(CLKRST + CLK_RST_CONTROLLER_PLLM_MISC2, params->ClkRstControllerPllmMisc2Override); + } + + /* Enable sel_dpd on unused pins. */ + { + u32 val = (~params->EmcPmcScratch1 & 0x00000FFF) << 18; + val |= ((~params->EmcPmcScratch1 & 0x00001000) << 19) | ((~params->EmcPmcScratch1 & 0x00008000) << 15); + reg::Write(PMC + APBDEV_PMC_WEAK_BIAS, val); + } + + reg::Write(PMC + APBDEV_PMC_IO_DPD3_REQ, 0x80000000 | (~params->EmcPmcScratch1 & 0x00009FFF)); + util::WaitMicroSeconds(params->PmcIoDpd3ReqWait); + + /* Disable e_dpd_vttgen. */ + reg::Write(PMC + APBDEV_PMC_IO_DPD4_REQ, 0x80000000 | (~params->EmcPmcScratch2 & 0x3FFF0000)); + util::WaitMicroSeconds(params->PmcIoDpd4ReqWait); + + /* Disable e_dpd_bg. */ + reg::Write(PMC + APBDEV_PMC_IO_DPD4_REQ, 0x80000000 | (~params->EmcPmcScratch2 & 0x00001FFF)); + util::WaitMicroSeconds(1); + } + + /* Common phase 1. */ + + /* Program CMD mapping. */ + reg::Write(EMC + EMC_FBIO_CFG7, params->EmcFbioCfg7); + + reg::Write(EMC + EMC_CMD_MAPPING_CMD0_0, params->EmcCmdMappingCmd0_0); + reg::Write(EMC + EMC_CMD_MAPPING_CMD0_1, params->EmcCmdMappingCmd0_1); + reg::Write(EMC + EMC_CMD_MAPPING_CMD0_2, params->EmcCmdMappingCmd0_2); + reg::Write(EMC + EMC_CMD_MAPPING_CMD1_0, params->EmcCmdMappingCmd1_0); + reg::Write(EMC + EMC_CMD_MAPPING_CMD1_1, params->EmcCmdMappingCmd1_1); + reg::Write(EMC + EMC_CMD_MAPPING_CMD1_2, params->EmcCmdMappingCmd1_2); + reg::Write(EMC + EMC_CMD_MAPPING_CMD2_0, params->EmcCmdMappingCmd2_0); + reg::Write(EMC + EMC_CMD_MAPPING_CMD2_1, params->EmcCmdMappingCmd2_1); + reg::Write(EMC + EMC_CMD_MAPPING_CMD2_2, params->EmcCmdMappingCmd2_2); + reg::Write(EMC + EMC_CMD_MAPPING_CMD3_0, params->EmcCmdMappingCmd3_0); + reg::Write(EMC + EMC_CMD_MAPPING_CMD3_1, params->EmcCmdMappingCmd3_1); + reg::Write(EMC + EMC_CMD_MAPPING_CMD3_2, params->EmcCmdMappingCmd3_2); + reg::Write(EMC + EMC_CMD_MAPPING_BYTE, params->EmcCmdMappingByte); + + /* Program brick mapping. */ + reg::Write(EMC + EMC_PMACRO_BRICK_MAPPING_0, params->EmcPmacroBrickMapping0); + reg::Write(EMC + EMC_PMACRO_BRICK_MAPPING_1, params->EmcPmacroBrickMapping1); + reg::Write(EMC + EMC_PMACRO_BRICK_MAPPING_2, params->EmcPmacroBrickMapping2); + + /* Specific phase 2. */ + if constexpr (SocType == fuse::SocType_Erista) { + reg::Write(EMC + EMC_PMACRO_BRICK_CTRL_RFU1, (params->EmcPmacroBrickCtrlRfu1 | ~0x01120112) & 0x1FFF1FFF); + } else if constexpr (SocType == fuse::SocType_Mariko) { + /* Set pad macros. */ + reg::Write(EMC + EMC_PMACRO_VTTGEN_CTRL_0, params->EmcPmacroVttgenCtrl0); + reg::Write(EMC + EMC_PMACRO_VTTGEN_CTRL_1, params->EmcPmacroVttgenCtrl1); + reg::Write(EMC + EMC_PMACRO_VTTGEN_CTRL_2, params->EmcPmacroVttgenCtrl2); + + /* Set pad macro bias. */ + reg::Write(EMC + EMC_PMACRO_BG_BIAS_CTRL_0, params->EmcPmacroBgBiasCtrl0); + + SpareWrite(params->EmcBctSpareSecure0, params->EmcBctSpareSecure1); + SpareWrite(params->EmcBctSpareSecure2, params->EmcBctSpareSecure3); + SpareWrite(params->EmcBctSpareSecure4, params->EmcBctSpareSecure5); + + /* Trigger timing update. */ + reg::Write(EMC + EMC_TIMING_CONTROL, 1); + util::WaitMicroSeconds(params->PmcVddpSelWait + 2); + + /* Set clock sources. */ + reg::Write(CLKRST + CLK_RST_CONTROLLER_CLK_SOURCE_EMC, params->EmcClockSource); + reg::Write(CLKRST + CLK_RST_CONTROLLER_CLK_SOURCE_EMC_DLL, params->EmcClockSourceDll); + + /* Select EMC write mux. */ + reg::Write(EMC + EMC_DBG, params->EmcDbg | reg::EncodeValue(EMC_REG_BITS_VALUE(DBG_WRITE_MUX, params->EmcDbgWriteMux))); + + /* Patch 2. */ + SpareWrite(params->EmcBctSpare2, params->EmcBctSpare3); + } + + /* Common phase 2. */ + reg::Write(EMC + EMC_CONFIG_SAMPLE_DELAY, params->EmcConfigSampleDelay); + reg::Write(EMC + EMC_FBIO_CFG8, params->EmcFbioCfg8); + + /* Program swizzle registers. */ + reg::Write(EMC + EMC_SWIZZLE_RANK0_BYTE0, params->EmcSwizzleRank0Byte0); + reg::Write(EMC + EMC_SWIZZLE_RANK0_BYTE1, params->EmcSwizzleRank0Byte1); + reg::Write(EMC + EMC_SWIZZLE_RANK0_BYTE2, params->EmcSwizzleRank0Byte2); + reg::Write(EMC + EMC_SWIZZLE_RANK0_BYTE3, params->EmcSwizzleRank0Byte3); + reg::Write(EMC + EMC_SWIZZLE_RANK1_BYTE0, params->EmcSwizzleRank1Byte0); + reg::Write(EMC + EMC_SWIZZLE_RANK1_BYTE1, params->EmcSwizzleRank1Byte1); + reg::Write(EMC + EMC_SWIZZLE_RANK1_BYTE2, params->EmcSwizzleRank1Byte2); + reg::Write(EMC + EMC_SWIZZLE_RANK1_BYTE3, params->EmcSwizzleRank1Byte3); + + /* Patch 3. */ + SpareWrite(params->EmcBctSpare6, params->EmcBctSpare7); + + /* Program pad controls. */ + reg::Write(EMC + EMC_XM2COMPPADCTRL, params->EmcXm2CompPadCtrl); + reg::Write(EMC + EMC_XM2COMPPADCTRL2, params->EmcXm2CompPadCtrl2); + reg::Write(EMC + EMC_XM2COMPPADCTRL3, params->EmcXm2CompPadCtrl3); + + /* Program autocal controls with shadowed register fields. */ + reg::Write(EMC + EMC_AUTO_CAL_CONFIG2, params->EmcAutoCalConfig2); + reg::Write(EMC + EMC_AUTO_CAL_CONFIG3, params->EmcAutoCalConfig3); + reg::Write(EMC + EMC_AUTO_CAL_CONFIG4, params->EmcAutoCalConfig4); + reg::Write(EMC + EMC_AUTO_CAL_CONFIG5, params->EmcAutoCalConfig5); + reg::Write(EMC + EMC_AUTO_CAL_CONFIG6, params->EmcAutoCalConfig6); + reg::Write(EMC + EMC_AUTO_CAL_CONFIG7, params->EmcAutoCalConfig7); + reg::Write(EMC + EMC_AUTO_CAL_CONFIG8, params->EmcAutoCalConfig8); + + reg::Write(EMC + EMC_PMACRO_RX_TERM, params->EmcPmacroRxTerm); + reg::Write(EMC + EMC_PMACRO_DQ_TX_DRV, params->EmcPmacroDqTxDrv); + reg::Write(EMC + EMC_PMACRO_CA_TX_DRV, params->EmcPmacroCaTxDrv); + reg::Write(EMC + EMC_PMACRO_CMD_TX_DRV, params->EmcPmacroCmdTxDrv); + reg::Write(EMC + EMC_PMACRO_AUTOCAL_CFG_COMMON, params->EmcPmacroAutocalCfgCommon); + reg::Write(EMC + EMC_AUTO_CAL_CHANNEL, params->EmcAutoCalChannel); + reg::Write(EMC + EMC_PMACRO_ZCTRL, params->EmcPmacroZctrl); + + if constexpr (SocType == fuse::SocType_Erista) { + reg::Write(EMC + EMC_DLL_CFG_0, params->EmcDllCfg0); + reg::Write(EMC + EMC_DLL_CFG_1, params->EmcDllCfg1); + } else if constexpr (SocType == fuse::SocType_Mariko) { + reg::Write(EMC + EMC_PMACRO_DLL_CFG_0, params->EmcPmacroDllCfg0); + reg::Write(EMC + EMC_PMACRO_DLL_CFG_1, params->EmcPmacroDllCfg1); + } + + reg::Write(EMC + EMC_CFG_DIG_DLL_1, params->EmcCfgDigDll_1); + + reg::Write(EMC + EMC_DATA_BRLSHFT_0, params->EmcDataBrlshft0); + reg::Write(EMC + EMC_DATA_BRLSHFT_1, params->EmcDataBrlshft1); + reg::Write(EMC + EMC_DQS_BRLSHFT_0, params->EmcDqsBrlshft0); + reg::Write(EMC + EMC_DQS_BRLSHFT_1, params->EmcDqsBrlshft1); + reg::Write(EMC + EMC_CMD_BRLSHFT_0, params->EmcCmdBrlshft0); + reg::Write(EMC + EMC_CMD_BRLSHFT_1, params->EmcCmdBrlshft1); + reg::Write(EMC + EMC_CMD_BRLSHFT_2, params->EmcCmdBrlshft2); + reg::Write(EMC + EMC_CMD_BRLSHFT_3, params->EmcCmdBrlshft3); + reg::Write(EMC + EMC_QUSE_BRLSHFT_0, params->EmcQuseBrlshft0); + reg::Write(EMC + EMC_QUSE_BRLSHFT_1, params->EmcQuseBrlshft1); + reg::Write(EMC + EMC_QUSE_BRLSHFT_2, params->EmcQuseBrlshft2); + reg::Write(EMC + EMC_QUSE_BRLSHFT_3, params->EmcQuseBrlshft3); + + if constexpr (SocType == fuse::SocType_Erista) { + reg::Write(EMC + EMC_PMACRO_BRICK_CTRL_RFU1, (params->EmcPmacroBrickCtrlRfu1 | ~0x01BF01BF) & 0x1FFF1FFF); + } else if constexpr (SocType == fuse::SocType_Mariko) { + reg::Write(EMC + EMC_PMACRO_BRICK_CTRL_RFU1, params->EmcPmacroBrickCtrlRfu1); + } + + reg::Write(EMC + EMC_PMACRO_PAD_CFG_CTRL, params->EmcPmacroPadCfgCtrl); + reg::Write(EMC + EMC_PMACRO_CMD_BRICK_CTRL_FDPD, params->EmcPmacroCmdBrickCtrlFdpd); + + if constexpr (SocType == fuse::SocType_Erista) { + reg::Write(EMC + EMC_PMACRO_BRICK_CTRL_RFU2, params->EmcPmacroBrickCtrlRfu2 & 0xFF7FFF7F); + } else if constexpr (SocType == fuse::SocType_Mariko) { + reg::Write(EMC + EMC_PMACRO_BRICK_CTRL_RFU2, params->EmcPmacroBrickCtrlRfu2); + } + + reg::Write(EMC + EMC_PMACRO_DATA_BRICK_CTRL_FDPD, params->EmcPmacroDataBrickCtrlFdpd); + + if constexpr (SocType == fuse::SocType_Erista) { + reg::Write(EMC + EMC_PMACRO_BG_BIAS_CTRL_0, params->EmcPmacroBgBiasCtrl0); + } + + reg::Write(EMC + EMC_PMACRO_DATA_PAD_RX_CTRL, params->EmcPmacroDataPadRxCtrl); + reg::Write(EMC + EMC_PMACRO_CMD_PAD_RX_CTRL, params->EmcPmacroCmdPadRxCtrl); + reg::Write(EMC + EMC_PMACRO_DATA_PAD_TX_CTRL, params->EmcPmacroDataPadTxCtrl); + reg::Write(EMC + EMC_PMACRO_DATA_RX_TERM_MODE, params->EmcPmacroDataRxTermMode); + reg::Write(EMC + EMC_PMACRO_CMD_RX_TERM_MODE, params->EmcPmacroCmdRxTermMode); + + if constexpr (SocType == fuse::SocType_Erista) { + reg::Write(EMC + EMC_PMACRO_CMD_PAD_TX_CTRL, params->EmcPmacroCmdPadTxCtrl); + } else if constexpr (SocType == fuse::SocType_Mariko) { + reg::Write(EMC + EMC_PMACRO_CMD_PAD_TX_CTRL, params->EmcPmacroCmdPadTxCtrl & 0xEFFFFFFF); + } + + reg::Write(EMC + EMC_CFG_3, params->EmcCfg3); + + reg::Write(EMC + EMC_PMACRO_TX_PWRD_0, params->EmcPmacroTxPwrd0); + reg::Write(EMC + EMC_PMACRO_TX_PWRD_1, params->EmcPmacroTxPwrd1); + reg::Write(EMC + EMC_PMACRO_TX_PWRD_2, params->EmcPmacroTxPwrd2); + reg::Write(EMC + EMC_PMACRO_TX_PWRD_3, params->EmcPmacroTxPwrd3); + reg::Write(EMC + EMC_PMACRO_TX_PWRD_4, params->EmcPmacroTxPwrd4); + reg::Write(EMC + EMC_PMACRO_TX_PWRD_5, params->EmcPmacroTxPwrd5); + + reg::Write(EMC + EMC_PMACRO_TX_SEL_CLK_SRC_0, params->EmcPmacroTxSelClkSrc0); + reg::Write(EMC + EMC_PMACRO_TX_SEL_CLK_SRC_1, params->EmcPmacroTxSelClkSrc1); + reg::Write(EMC + EMC_PMACRO_TX_SEL_CLK_SRC_2, params->EmcPmacroTxSelClkSrc2); + reg::Write(EMC + EMC_PMACRO_TX_SEL_CLK_SRC_3, params->EmcPmacroTxSelClkSrc3); + reg::Write(EMC + EMC_PMACRO_TX_SEL_CLK_SRC_4, params->EmcPmacroTxSelClkSrc4); + reg::Write(EMC + EMC_PMACRO_TX_SEL_CLK_SRC_5, params->EmcPmacroTxSelClkSrc5); + + if constexpr (SocType == fuse::SocType_Mariko) { + reg::Write(EMC + EMC_PMACRO_PERBIT_FGCG_CTRL_0, params->EmcPmacroPerbitFgcgCtrl0); + reg::Write(EMC + EMC_PMACRO_PERBIT_FGCG_CTRL_1, params->EmcPmacroPerbitFgcgCtrl1); + reg::Write(EMC + EMC_PMACRO_PERBIT_FGCG_CTRL_2, params->EmcPmacroPerbitFgcgCtrl2); + reg::Write(EMC + EMC_PMACRO_PERBIT_FGCG_CTRL_3, params->EmcPmacroPerbitFgcgCtrl3); + reg::Write(EMC + EMC_PMACRO_PERBIT_FGCG_CTRL_4, params->EmcPmacroPerbitFgcgCtrl4); + reg::Write(EMC + EMC_PMACRO_PERBIT_FGCG_CTRL_5, params->EmcPmacroPerbitFgcgCtrl5); + + reg::Write(EMC + EMC_PMACRO_PERBIT_RFU_CTRL_0, params->EmcPmacroPerbitRfuCtrl0); + reg::Write(EMC + EMC_PMACRO_PERBIT_RFU_CTRL_1, params->EmcPmacroPerbitRfuCtrl1); + reg::Write(EMC + EMC_PMACRO_PERBIT_RFU_CTRL_2, params->EmcPmacroPerbitRfuCtrl2); + reg::Write(EMC + EMC_PMACRO_PERBIT_RFU_CTRL_3, params->EmcPmacroPerbitRfuCtrl3); + reg::Write(EMC + EMC_PMACRO_PERBIT_RFU_CTRL_4, params->EmcPmacroPerbitRfuCtrl4); + reg::Write(EMC + EMC_PMACRO_PERBIT_RFU_CTRL_5, params->EmcPmacroPerbitRfuCtrl5); + + reg::Write(EMC + EMC_PMACRO_PERBIT_RFU1_CTRL_0, params->EmcPmacroPerbitRfu1Ctrl0); + reg::Write(EMC + EMC_PMACRO_PERBIT_RFU1_CTRL_1, params->EmcPmacroPerbitRfu1Ctrl1); + reg::Write(EMC + EMC_PMACRO_PERBIT_RFU1_CTRL_2, params->EmcPmacroPerbitRfu1Ctrl2); + reg::Write(EMC + EMC_PMACRO_PERBIT_RFU1_CTRL_3, params->EmcPmacroPerbitRfu1Ctrl3); + reg::Write(EMC + EMC_PMACRO_PERBIT_RFU1_CTRL_4, params->EmcPmacroPerbitRfu1Ctrl4); + reg::Write(EMC + EMC_PMACRO_PERBIT_RFU1_CTRL_5, params->EmcPmacroPerbitRfu1Ctrl5); + + reg::Write(EMC + EMC_PMACRO_DATA_PI_CTRL, params->EmcPmacroDataPiCtrl); + reg::Write(EMC + EMC_PMACRO_CMD_PI_CTRL, params->EmcPmacroCmdPiCtrl); + } + + reg::Write(EMC + EMC_PMACRO_DDLL_BYPASS, params->EmcPmacroDdllBypass); + reg::Write(EMC + EMC_PMACRO_DDLL_PWRD_0, params->EmcPmacroDdllPwrd0); + reg::Write(EMC + EMC_PMACRO_DDLL_PWRD_1, params->EmcPmacroDdllPwrd1); + reg::Write(EMC + EMC_PMACRO_DDLL_PWRD_2, params->EmcPmacroDdllPwrd2); + reg::Write(EMC + EMC_PMACRO_CMD_CTRL_0, params->EmcPmacroCmdCtrl0); + reg::Write(EMC + EMC_PMACRO_CMD_CTRL_1, params->EmcPmacroCmdCtrl1); + reg::Write(EMC + EMC_PMACRO_CMD_CTRL_2, params->EmcPmacroCmdCtrl2); + reg::Write(EMC + EMC_PMACRO_IB_VREF_DQ_0, params->EmcPmacroIbVrefDq_0); + reg::Write(EMC + EMC_PMACRO_IB_VREF_DQ_1, params->EmcPmacroIbVrefDq_1); + reg::Write(EMC + EMC_PMACRO_IB_VREF_DQS_0, params->EmcPmacroIbVrefDqs_0); + reg::Write(EMC + EMC_PMACRO_IB_VREF_DQS_1, params->EmcPmacroIbVrefDqs_1); + reg::Write(EMC + EMC_PMACRO_IB_RXRT, params->EmcPmacroIbRxrt); + + reg::Write(EMC + EMC_PMACRO_QUSE_DDLL_RANK0_0, params->EmcPmacroQuseDdllRank0_0); + reg::Write(EMC + EMC_PMACRO_QUSE_DDLL_RANK0_1, params->EmcPmacroQuseDdllRank0_1); + reg::Write(EMC + EMC_PMACRO_QUSE_DDLL_RANK0_2, params->EmcPmacroQuseDdllRank0_2); + reg::Write(EMC + EMC_PMACRO_QUSE_DDLL_RANK0_3, params->EmcPmacroQuseDdllRank0_3); + reg::Write(EMC + EMC_PMACRO_QUSE_DDLL_RANK0_4, params->EmcPmacroQuseDdllRank0_4); + reg::Write(EMC + EMC_PMACRO_QUSE_DDLL_RANK0_5, params->EmcPmacroQuseDdllRank0_5); + reg::Write(EMC + EMC_PMACRO_QUSE_DDLL_RANK1_0, params->EmcPmacroQuseDdllRank1_0); + reg::Write(EMC + EMC_PMACRO_QUSE_DDLL_RANK1_1, params->EmcPmacroQuseDdllRank1_1); + reg::Write(EMC + EMC_PMACRO_QUSE_DDLL_RANK1_2, params->EmcPmacroQuseDdllRank1_2); + reg::Write(EMC + EMC_PMACRO_QUSE_DDLL_RANK1_3, params->EmcPmacroQuseDdllRank1_3); + reg::Write(EMC + EMC_PMACRO_QUSE_DDLL_RANK1_4, params->EmcPmacroQuseDdllRank1_4); + reg::Write(EMC + EMC_PMACRO_QUSE_DDLL_RANK1_5, params->EmcPmacroQuseDdllRank1_5); + + if constexpr (SocType == fuse::SocType_Erista) { + reg::Write(EMC + EMC_PMACRO_BRICK_CTRL_RFU1, params->EmcPmacroBrickCtrlRfu1); + } + + reg::Write(EMC + EMC_PMACRO_OB_DDLL_LONG_DQ_RANK0_0, params->EmcPmacroObDdllLongDqRank0_0); + reg::Write(EMC + EMC_PMACRO_OB_DDLL_LONG_DQ_RANK0_1, params->EmcPmacroObDdllLongDqRank0_1); + reg::Write(EMC + EMC_PMACRO_OB_DDLL_LONG_DQ_RANK0_2, params->EmcPmacroObDdllLongDqRank0_2); + reg::Write(EMC + EMC_PMACRO_OB_DDLL_LONG_DQ_RANK0_3, params->EmcPmacroObDdllLongDqRank0_3); + reg::Write(EMC + EMC_PMACRO_OB_DDLL_LONG_DQ_RANK0_4, params->EmcPmacroObDdllLongDqRank0_4); + reg::Write(EMC + EMC_PMACRO_OB_DDLL_LONG_DQ_RANK0_5, params->EmcPmacroObDdllLongDqRank0_5); + reg::Write(EMC + EMC_PMACRO_OB_DDLL_LONG_DQ_RANK1_0, params->EmcPmacroObDdllLongDqRank1_0); + reg::Write(EMC + EMC_PMACRO_OB_DDLL_LONG_DQ_RANK1_1, params->EmcPmacroObDdllLongDqRank1_1); + reg::Write(EMC + EMC_PMACRO_OB_DDLL_LONG_DQ_RANK1_2, params->EmcPmacroObDdllLongDqRank1_2); + reg::Write(EMC + EMC_PMACRO_OB_DDLL_LONG_DQ_RANK1_3, params->EmcPmacroObDdllLongDqRank1_3); + reg::Write(EMC + EMC_PMACRO_OB_DDLL_LONG_DQ_RANK1_4, params->EmcPmacroObDdllLongDqRank1_4); + reg::Write(EMC + EMC_PMACRO_OB_DDLL_LONG_DQ_RANK1_5, params->EmcPmacroObDdllLongDqRank1_5); + reg::Write(EMC + EMC_PMACRO_OB_DDLL_LONG_DQS_RANK0_0, params->EmcPmacroObDdllLongDqsRank0_0); + reg::Write(EMC + EMC_PMACRO_OB_DDLL_LONG_DQS_RANK0_1, params->EmcPmacroObDdllLongDqsRank0_1); + reg::Write(EMC + EMC_PMACRO_OB_DDLL_LONG_DQS_RANK0_2, params->EmcPmacroObDdllLongDqsRank0_2); + reg::Write(EMC + EMC_PMACRO_OB_DDLL_LONG_DQS_RANK0_3, params->EmcPmacroObDdllLongDqsRank0_3); + reg::Write(EMC + EMC_PMACRO_OB_DDLL_LONG_DQS_RANK0_4, params->EmcPmacroObDdllLongDqsRank0_4); + reg::Write(EMC + EMC_PMACRO_OB_DDLL_LONG_DQS_RANK0_5, params->EmcPmacroObDdllLongDqsRank0_5); + reg::Write(EMC + EMC_PMACRO_OB_DDLL_LONG_DQS_RANK1_0, params->EmcPmacroObDdllLongDqsRank1_0); + reg::Write(EMC + EMC_PMACRO_OB_DDLL_LONG_DQS_RANK1_1, params->EmcPmacroObDdllLongDqsRank1_1); + reg::Write(EMC + EMC_PMACRO_OB_DDLL_LONG_DQS_RANK1_2, params->EmcPmacroObDdllLongDqsRank1_2); + reg::Write(EMC + EMC_PMACRO_OB_DDLL_LONG_DQS_RANK1_3, params->EmcPmacroObDdllLongDqsRank1_3); + reg::Write(EMC + EMC_PMACRO_OB_DDLL_LONG_DQS_RANK1_4, params->EmcPmacroObDdllLongDqsRank1_4); + reg::Write(EMC + EMC_PMACRO_OB_DDLL_LONG_DQS_RANK1_5, params->EmcPmacroObDdllLongDqsRank1_5); + reg::Write(EMC + EMC_PMACRO_IB_DDLL_LONG_DQS_RANK0_0, params->EmcPmacroIbDdllLongDqsRank0_0); + reg::Write(EMC + EMC_PMACRO_IB_DDLL_LONG_DQS_RANK0_1, params->EmcPmacroIbDdllLongDqsRank0_1); + reg::Write(EMC + EMC_PMACRO_IB_DDLL_LONG_DQS_RANK0_2, params->EmcPmacroIbDdllLongDqsRank0_2); + reg::Write(EMC + EMC_PMACRO_IB_DDLL_LONG_DQS_RANK0_3, params->EmcPmacroIbDdllLongDqsRank0_3); + reg::Write(EMC + EMC_PMACRO_IB_DDLL_LONG_DQS_RANK1_0, params->EmcPmacroIbDdllLongDqsRank1_0); + reg::Write(EMC + EMC_PMACRO_IB_DDLL_LONG_DQS_RANK1_1, params->EmcPmacroIbDdllLongDqsRank1_1); + reg::Write(EMC + EMC_PMACRO_IB_DDLL_LONG_DQS_RANK1_2, params->EmcPmacroIbDdllLongDqsRank1_2); + reg::Write(EMC + EMC_PMACRO_IB_DDLL_LONG_DQS_RANK1_3, params->EmcPmacroIbDdllLongDqsRank1_3); + + reg::Write(EMC + EMC_PMACRO_DDLL_LONG_CMD_0, params->EmcPmacroDdllLongCmd_0); + reg::Write(EMC + EMC_PMACRO_DDLL_LONG_CMD_1, params->EmcPmacroDdllLongCmd_1); + reg::Write(EMC + EMC_PMACRO_DDLL_LONG_CMD_2, params->EmcPmacroDdllLongCmd_2); + reg::Write(EMC + EMC_PMACRO_DDLL_LONG_CMD_3, params->EmcPmacroDdllLongCmd_3); + reg::Write(EMC + EMC_PMACRO_DDLL_LONG_CMD_4, params->EmcPmacroDdllLongCmd_4); + reg::Write(EMC + EMC_PMACRO_DDLL_SHORT_CMD_0, params->EmcPmacroDdllShortCmd_0); + reg::Write(EMC + EMC_PMACRO_DDLL_SHORT_CMD_1, params->EmcPmacroDdllShortCmd_1); + reg::Write(EMC + EMC_PMACRO_DDLL_SHORT_CMD_2, params->EmcPmacroDdllShortCmd_2); + + if constexpr (SocType == fuse::SocType_Erista) { + reg::Write(EMC + EMC_PMACRO_COMMON_PAD_TX_CTRL, (params->EmcPmacroCommonPadTxCtrl | ~0x1) & 0xF); + } else if constexpr (SocType == fuse::SocType_Mariko) { + reg::Write(EMC + EMC_PMACRO_DDLL_PERIODIC_OFFSET, params->EmcPmacroDdllPeriodicOffset); + } + + if constexpr (SocType == fuse::SocType_Erista) { + SpareWrite(params->EmcBctSpare4, params->EmcBctSpare5); + } else if constexpr (SocType == fuse::SocType_Mariko) { + SpareWrite(params->EmcBctSpare4, params->EmcBctSpare5); + SpareWrite(params->EmcBctSpareSecure6, params->EmcBctSpareSecure7); + SpareWrite(params->EmcBctSpareSecure8, params->EmcBctSpareSecure9); + SpareWrite(params->EmcBctSpareSecure10, params->EmcBctSpareSecure11); + } + + reg::Write(EMC + EMC_TIMING_CONTROL, 1); + + /* Initialize MC VPR settings. */ + reg::Write(MC + MC_VIDEO_PROTECT_BOM, params->McVideoProtectBom); + reg::Write(MC + MC_VIDEO_PROTECT_BOM_ADR_HI, params->McVideoProtectBomAdrHi); + reg::Write(MC + MC_VIDEO_PROTECT_SIZE_MB, params->McVideoProtectSizeMb); + reg::Write(MC + MC_VIDEO_PROTECT_VPR_OVERRIDE, params->McVideoProtectVprOverride); + reg::Write(MC + MC_VIDEO_PROTECT_VPR_OVERRIDE1, params->McVideoProtectVprOverride1); + reg::Write(MC + MC_VIDEO_PROTECT_GPU_OVERRIDE_0, params->McVideoProtectGpuOverride0); + reg::Write(MC + MC_VIDEO_PROTECT_GPU_OVERRIDE_1, params->McVideoProtectGpuOverride1); + + /* Program SDRAM geometry parameters. */ + reg::Write(MC + MC_EMEM_ADR_CFG, params->McEmemAdrCfg); + reg::Write(MC + MC_EMEM_ADR_CFG_DEV0, params->McEmemAdrCfgDev0); + reg::Write(MC + MC_EMEM_ADR_CFG_DEV1, params->McEmemAdrCfgDev1); + reg::Write(MC + MC_EMEM_ADR_CFG_CHANNEL_MASK, params->McEmemAdrCfgChannelMask); + + /* Program bank swizzling. */ + reg::Write(MC + MC_EMEM_ADR_CFG_BANK_MASK_0, params->McEmemAdrCfgBankMask0); + reg::Write(MC + MC_EMEM_ADR_CFG_BANK_MASK_1, params->McEmemAdrCfgBankMask1); + reg::Write(MC + MC_EMEM_ADR_CFG_BANK_MASK_2, params->McEmemAdrCfgBankMask2); + + /* Program external memory aperture (base and size). */ + reg::Write(MC + MC_EMEM_CFG, params->McEmemCfg); + + /* Program SEC carveout (base and size). */ + reg::Write(MC + MC_SEC_CARVEOUT_BOM, params->McSecCarveoutBom); + reg::Write(MC + MC_SEC_CARVEOUT_ADR_HI, params->McSecCarveoutAdrHi); + reg::Write(MC + MC_SEC_CARVEOUT_SIZE_MB, params->McSecCarveoutSizeMb); + + /* Program MTS carveout (base and size). */ + reg::Write(MC + MC_MTS_CARVEOUT_BOM, params->McMtsCarveoutBom); + reg::Write(MC + MC_MTS_CARVEOUT_ADR_HI, params->McMtsCarveoutAdrHi); + reg::Write(MC + MC_MTS_CARVEOUT_SIZE_MB, params->McMtsCarveoutSizeMb); + + /* Program the memory arbiter. */ + reg::Write(MC + MC_EMEM_ARB_CFG, params->McEmemArbCfg); + reg::Write(MC + MC_EMEM_ARB_OUTSTANDING_REQ, params->McEmemArbOutstandingReq); + reg::Write(MC + MC_EMEM_ARB_REFPB_HP_CTRL, params->McEmemArbRefpbHpCtrl); + reg::Write(MC + MC_EMEM_ARB_REFPB_BANK_CTRL, params->McEmemArbRefpbBankCtrl); + reg::Write(MC + MC_EMEM_ARB_TIMING_RCD, params->McEmemArbTimingRcd); + reg::Write(MC + MC_EMEM_ARB_TIMING_RP, params->McEmemArbTimingRp); + reg::Write(MC + MC_EMEM_ARB_TIMING_RC, params->McEmemArbTimingRc); + reg::Write(MC + MC_EMEM_ARB_TIMING_RAS, params->McEmemArbTimingRas); + reg::Write(MC + MC_EMEM_ARB_TIMING_FAW, params->McEmemArbTimingFaw); + reg::Write(MC + MC_EMEM_ARB_TIMING_RRD, params->McEmemArbTimingRrd); + reg::Write(MC + MC_EMEM_ARB_TIMING_RAP2PRE, params->McEmemArbTimingRap2Pre); + reg::Write(MC + MC_EMEM_ARB_TIMING_WAP2PRE, params->McEmemArbTimingWap2Pre); + reg::Write(MC + MC_EMEM_ARB_TIMING_R2R, params->McEmemArbTimingR2R); + reg::Write(MC + MC_EMEM_ARB_TIMING_W2W, params->McEmemArbTimingW2W); + reg::Write(MC + MC_EMEM_ARB_TIMING_CCDMW, params->McEmemArbTimingCcdmw); + reg::Write(MC + MC_EMEM_ARB_TIMING_R2W, params->McEmemArbTimingR2W); + reg::Write(MC + MC_EMEM_ARB_TIMING_W2R, params->McEmemArbTimingW2R); + reg::Write(MC + MC_EMEM_ARB_TIMING_RFCPB, params->McEmemArbTimingRFCPB); + reg::Write(MC + MC_EMEM_ARB_DA_TURNS, params->McEmemArbDaTurns); + reg::Write(MC + MC_EMEM_ARB_DA_COVERS, params->McEmemArbDaCovers); + reg::Write(MC + MC_EMEM_ARB_MISC0, params->McEmemArbMisc0); + reg::Write(MC + MC_EMEM_ARB_MISC1, params->McEmemArbMisc1); + reg::Write(MC + MC_EMEM_ARB_MISC2, params->McEmemArbMisc2); + reg::Write(MC + MC_EMEM_ARB_RING1_THROTTLE, params->McEmemArbRing1Throttle); + reg::Write(MC + MC_EMEM_ARB_OVERRIDE, params->McEmemArbOverride); + reg::Write(MC + MC_EMEM_ARB_OVERRIDE_1, params->McEmemArbOverride1); + reg::Write(MC + MC_EMEM_ARB_RSV, params->McEmemArbRsv); + reg::Write(MC + MC_DA_CONFIG0, params->McDaCfg0); + + /* Trigger MC timing update. */ + reg::Write(MC + MC_TIMING_CONTROL, 1); + + /* Program second-level clock enable overrides. */ + reg::Write(MC + MC_CLKEN_OVERRIDE, params->McClkenOverride); + + /* Program statistics gathering. */ + reg::Write(MC + MC_STAT_CONTROL, params->McStatControl); + + /* Program SDRAM geometry parameters. */ + reg::Write(EMC + EMC_ADR_CFG, params->EmcAdrCfg); + + /* Program second-level clock enable overrides. */ + reg::Write(EMC + EMC_CLKEN_OVERRIDE, params->EmcClkenOverride); + + /* Program EMC pad auto calibration. */ + reg::Write(EMC + EMC_PMACRO_AUTOCAL_CFG_0, params->EmcPmacroAutocalCfg0); + reg::Write(EMC + EMC_PMACRO_AUTOCAL_CFG_1, params->EmcPmacroAutocalCfg1); + reg::Write(EMC + EMC_PMACRO_AUTOCAL_CFG_2, params->EmcPmacroAutocalCfg2); + + reg::Write(EMC + EMC_AUTO_CAL_VREF_SEL_0, params->EmcAutoCalVrefSel0); + reg::Write(EMC + EMC_AUTO_CAL_VREF_SEL_1, params->EmcAutoCalVrefSel1); + + reg::Write(EMC + EMC_AUTO_CAL_INTERVAL, params->EmcAutoCalInterval); + reg::Write(EMC + EMC_AUTO_CAL_CONFIG, params->EmcAutoCalConfig); + util::WaitMicroSeconds(params->EmcAutoCalWait); + + /* Patch 5. */ + if constexpr (SocType == fuse::SocType_Erista) { + SpareWrite(params->EmcBctSpare8, params->EmcBctSpare9); + } else if constexpr (SocType == fuse::SocType_Mariko) { + SpareWrite(params->EmcBctSpare8, params->EmcBctSpare9); + reg::Write(EMC + EMC_AUTO_CAL_CONFIG9, params->EmcAutoCalConfig9); + } + + /* Program EMC timing configuration. */ + reg::Write(EMC + EMC_CFG_2, params->EmcCfg2); + reg::Write(EMC + EMC_CFG_PIPE, params->EmcCfgPipe); + reg::Write(EMC + EMC_CFG_PIPE_1, params->EmcCfgPipe1); + reg::Write(EMC + EMC_CFG_PIPE_2, params->EmcCfgPipe2); + reg::Write(EMC + EMC_CMDQ, params->EmcCmdQ); + reg::Write(EMC + EMC_MC2EMCQ, params->EmcMc2EmcQ); + reg::Write(EMC + EMC_MRS_WAIT_CNT, params->EmcMrsWaitCnt); + reg::Write(EMC + EMC_MRS_WAIT_CNT2, params->EmcMrsWaitCnt2); + reg::Write(EMC + EMC_FBIO_CFG5, params->EmcFbioCfg5); + reg::Write(EMC + EMC_RC, params->EmcRc); + reg::Write(EMC + EMC_RFC, params->EmcRfc); + reg::Write(EMC + EMC_RFCPB, params->EmcRfcPb); + reg::Write(EMC + EMC_REFCTRL2, params->EmcRefctrl2); + reg::Write(EMC + EMC_RFC_SLR, params->EmcRfcSlr); + reg::Write(EMC + EMC_RAS, params->EmcRas); + reg::Write(EMC + EMC_RP, params->EmcRp); + reg::Write(EMC + EMC_TPPD, params->EmcTppd); + + if constexpr (SocType == fuse::SocType_Mariko) { + reg::Write(EMC + EMC_TRTM, params->EmcTrtm); + reg::Write(EMC + EMC_TWTM, params->EmcTwtm); + reg::Write(EMC + EMC_TRATM, params->EmcTratm); + reg::Write(EMC + EMC_TWATM, params->EmcTwatm); + reg::Write(EMC + EMC_TR2REF, params->EmcTr2ref); + } + + reg::Write(EMC + EMC_R2R, params->EmcR2r); + reg::Write(EMC + EMC_W2W, params->EmcW2w); + reg::Write(EMC + EMC_R2W, params->EmcR2w); + reg::Write(EMC + EMC_W2R, params->EmcW2r); + reg::Write(EMC + EMC_R2P, params->EmcR2p); + reg::Write(EMC + EMC_W2P, params->EmcW2p); + reg::Write(EMC + EMC_CCDMW, params->EmcCcdmw); + reg::Write(EMC + EMC_RD_RCD, params->EmcRdRcd); + reg::Write(EMC + EMC_WR_RCD, params->EmcWrRcd); + reg::Write(EMC + EMC_RRD, params->EmcRrd); + reg::Write(EMC + EMC_REXT, params->EmcRext); + reg::Write(EMC + EMC_WEXT, params->EmcWext); + reg::Write(EMC + EMC_WDV, params->EmcWdv); + reg::Write(EMC + EMC_WDV_CHK, params->EmcWdvChk); + reg::Write(EMC + EMC_WSV, params->EmcWsv); + reg::Write(EMC + EMC_WEV, params->EmcWev); + reg::Write(EMC + EMC_WDV_MASK, params->EmcWdvMask); + reg::Write(EMC + EMC_WS_DURATION, params->EmcWsDuration); + reg::Write(EMC + EMC_WE_DURATION, params->EmcWeDuration); + reg::Write(EMC + EMC_QUSE, params->EmcQUse); + reg::Write(EMC + EMC_QUSE_WIDTH, params->EmcQuseWidth); + reg::Write(EMC + EMC_IBDLY, params->EmcIbdly); + reg::Write(EMC + EMC_OBDLY, params->EmcObdly); + reg::Write(EMC + EMC_EINPUT, params->EmcEInput); + reg::Write(EMC + EMC_EINPUT_DURATION, params->EmcEInputDuration); + reg::Write(EMC + EMC_PUTERM_EXTRA, params->EmcPutermExtra); + reg::Write(EMC + EMC_PUTERM_WIDTH, params->EmcPutermWidth); + + if constexpr (SocType == fuse::SocType_Erista) { + reg::Write(EMC + EMC_PMACRO_COMMON_PAD_TX_CTRL, params->EmcPmacroCommonPadTxCtrl); + } + + reg::Write(EMC + EMC_DBG, params->EmcDbg); + reg::Write(EMC + EMC_QRST, params->EmcQRst); + reg::Write(EMC + EMC_ISSUE_QRST, 1); + reg::Write(EMC + EMC_ISSUE_QRST, 0); + reg::Write(EMC + EMC_QSAFE, params->EmcQSafe); + reg::Write(EMC + EMC_RDV, params->EmcRdv); + reg::Write(EMC + EMC_RDV_MASK, params->EmcRdvMask); + reg::Write(EMC + EMC_RDV_EARLY, params->EmcRdvEarly); + reg::Write(EMC + EMC_RDV_EARLY_MASK, params->EmcRdvEarlyMask); + reg::Write(EMC + EMC_QPOP, params->EmcQpop); + reg::Write(EMC + EMC_REFRESH, params->EmcRefresh); + reg::Write(EMC + EMC_BURST_REFRESH_NUM, params->EmcBurstRefreshNum); + reg::Write(EMC + EMC_PRE_REFRESH_REQ_CNT, params->EmcPreRefreshReqCnt); + reg::Write(EMC + EMC_PDEX2WR, params->EmcPdEx2Wr); + reg::Write(EMC + EMC_PDEX2RD, params->EmcPdEx2Rd); + reg::Write(EMC + EMC_PCHG2PDEN, params->EmcPChg2Pden); + reg::Write(EMC + EMC_ACT2PDEN, params->EmcAct2Pden); + reg::Write(EMC + EMC_AR2PDEN, params->EmcAr2Pden); + reg::Write(EMC + EMC_RW2PDEN, params->EmcRw2Pden); + reg::Write(EMC + EMC_CKE2PDEN, params->EmcCke2Pden); + reg::Write(EMC + EMC_PDEX2CKE, params->EmcPdex2Cke); + reg::Write(EMC + EMC_PDEX2MRR, params->EmcPdex2Mrr); + reg::Write(EMC + EMC_TXSR, params->EmcTxsr); + reg::Write(EMC + EMC_TXSRDLL, params->EmcTxsrDll); + reg::Write(EMC + EMC_TCKE, params->EmcTcke); + reg::Write(EMC + EMC_TCKESR, params->EmcTckesr); + reg::Write(EMC + EMC_TPD, params->EmcTpd); + reg::Write(EMC + EMC_TFAW, params->EmcTfaw); + reg::Write(EMC + EMC_TRPAB, params->EmcTrpab); + reg::Write(EMC + EMC_TCLKSTABLE, params->EmcTClkStable); + reg::Write(EMC + EMC_TCLKSTOP, params->EmcTClkStop); + reg::Write(EMC + EMC_TREFBW, params->EmcTRefBw); + reg::Write(EMC + EMC_ODT_WRITE, params->EmcOdtWrite); + reg::Write(EMC + EMC_CFG_DIG_DLL, params->EmcCfgDigDll); + reg::Write(EMC + EMC_CFG_DIG_DLL_PERIOD, params->EmcCfgDigDllPeriod); + + /* Lock bit written later for CFG_ADR_EN. */ + reg::Write(EMC + EMC_FBIO_SPARE, params->EmcFbioSpare & 0xFFFFFFFD); + reg::Write(EMC + EMC_CFG_RSV, params->EmcCfgRsv); + reg::Write(EMC + EMC_PMC_SCRATCH1, params->EmcPmcScratch1); + reg::Write(EMC + EMC_PMC_SCRATCH2, params->EmcPmcScratch2); + reg::Write(EMC + EMC_PMC_SCRATCH3, params->EmcPmcScratch3); + reg::Write(EMC + EMC_ACPD_CONTROL, params->EmcAcpdControl); + reg::Write(EMC + EMC_TXDSRVTTGEN, params->EmcTxdsrvttgen); + + if constexpr (SocType == fuse::SocType_Mariko) { + reg::Write(EMC + EMC_PMACRO_DSR_VTTGEN_CTRL_0, params->EmcPmacroDsrVttgenCtrl0); + } + + /* Set pipe bypass enable bits before sending any DRAM commands. */ + reg::Write(EMC + EMC_CFG, (params->EmcCfg * 0xE) | 0x03C00000); + + /* Perform bootrom patch. */ + if constexpr (SocType == fuse::SocType_Erista) { + if (params->BootRomPatchControl & 0x80000000) { + reg::Write(APB + ((params->BootRomPatchControl & 0x3FFFFFFF) << 2), params->BootRomPatchData); + reg::Write(MC + MC_TIMING_CONTROL, 1); + } + } else if constexpr (SocType == fuse::SocType_Mariko) { + if (params->BootRomPatchControl) { + SpareWrite(params->BootRomPatchControl, params->BootRomPatchData); + reg::Write(MC + MC_TIMING_CONTROL, 1); + } + + SpareWrite(params->EmcBctSpareSecure12, params->EmcBctSpareSecure13); + SpareWrite(params->EmcBctSpareSecure14, params->EmcBctSpareSecure15); + SpareWrite(params->EmcBctSpareSecure16, params->EmcBctSpareSecure17); + } + + /* Release SEL_DPD_CMD. */ + reg::Write(PMC + APBDEV_PMC_IO_DPD3_REQ, ((params->EmcPmcScratch1 & 0x3FFFFFFF) | 0x40000000) & 0xCFFF0000); + util::WaitMicroSeconds(params->PmcIoDpd3ReqWait); + + if constexpr (SocType == fuse::SocType_Erista) { + if (params->EmcAutoCalInterval == 0) { + reg::Write(EMC + EMC_AUTO_CAL_CONFIG, params->EmcAutoCalConfig | 0x200); + } + + reg::Write(EMC + EMC_PMACRO_BRICK_CTRL_RFU2, params->EmcPmacroBrickCtrlRfu2); + } else if constexpr (SocType == fuse::SocType_Mariko) { + reg::Write(EMC + EMC_PMACRO_CMD_PAD_TX_CTRL, params->EmcPmacroCmdPadTxCtrl); + } + + /* ZQ CAL setup */ + if (params->EmcZcalWarmColdBootEnables & 1) { + if (params->MemoryType == br::BootMemoryType_Ddr3) { + reg::Write(EMC + EMC_ZCAL_WAIT_CNT, params->EmcZcalWaitCnt << 3); + } else if (params->MemoryType == br::BootMemoryType_LpDdr4) { + reg::Write(EMC + EMC_ZCAL_WAIT_CNT, params->EmcZcalWaitCnt); + reg::Write(EMC + EMC_ZCAL_MRW_CMD, params->EmcZcalMrwCmd); + } + } + + /* Trigger timing update. */ + reg::Write(EMC + EMC_TIMING_CONTROL, 1); + util::WaitMicroSeconds(params->EmcTimingControlWait); + + /* Deassert HOLD_CKE_LOW. */ + if constexpr (SocType == fuse::SocType_Erista) { + reg::ClearBits(PMC + APBDEV_PMC_DDR_CNTRL, ~0xFFF8007F); + } else if constexpr (SocType == fuse::SocType_Mariko) { + reg::ClearBits(PMC + APBDEV_PMC_DDR_CNTRL, ~0xFF78007F); + } + + util::WaitMicroSeconds(params->PmcDdrCntrlWait); + + /* Set clock enable signal. */ + const u32 pin_gpio_cfg = (params->EmcPinGpioEn << 16) | (params->EmcPinGpio << 12); + if (params->MemoryType == br::BootMemoryType_Ddr3 || params->MemoryType == br::BootMemoryType_LpDdr4) { + reg::Write(EMC + EMC_PIN, pin_gpio_cfg); + reg::Read(EMC + EMC_PIN); + util::WaitMicroSeconds(200 + params->EmcPinExtraWait); + + reg::Write(EMC + EMC_PIN, pin_gpio_cfg | 0x100); + reg::Read(EMC + EMC_PIN); + + const u32 wait = params->MemoryType == br::BootMemoryType_Ddr3 ? 500 : 2000; + util::WaitMicroSeconds(wait + params->EmcPinExtraWait); + } + + /* Set clock enable signal. */ + reg::Write(EMC + EMC_PIN, pin_gpio_cfg | 0x101); + reg::Read(EMC + EMC_PIN); + util::WaitMicroSeconds(params->EmcPinProgramWait); + + /* Send NOP */ + if (params->MemoryType != br::BootMemoryType_LpDdr4) { + reg::Write(EMC + EMC_NOP, (params->EmcDevSelect << 30) | 1); + } + + /* On coldboot with LPDDR2/3, wait 200us after asserting CKE high. */ + if (params->MemoryType != br::BootMemoryType_LpDdr2) { + util::WaitMicroSeconds(200 + params->EmcPinExtraWait); + } + + /* Init ZQ calibration. */ + if (params->MemoryType == br::BootMemoryType_LpDdr4) { + SpareWrite(params->EmcBctSpare10, params->EmcBctSpare11); + + reg::Write(EMC + EMC_MRW2, params->EmcMrw2); + reg::Write(EMC + EMC_MRW, params->EmcMrw1); + reg::Write(EMC + EMC_MRW3, params->EmcMrw3); + reg::Write(EMC + EMC_MRW4, params->EmcMrw4); + reg::Write(EMC + EMC_MRW6, params->EmcMrw6); + reg::Write(EMC + EMC_MRW14, params->EmcMrw14); + + reg::Write(EMC + EMC_MRW8, params->EmcMrw8); + reg::Write(EMC + EMC_MRW12, params->EmcMrw12); + reg::Write(EMC + EMC_MRW9, params->EmcMrw9); + reg::Write(EMC + EMC_MRW13, params->EmcMrw13); + + if (params->EmcZcalWarmColdBootEnables & 1) { + /* Issue ZQCAL start, device 0. */ + reg::Write(EMC + EMC_ZQ_CAL, params->EmcZcalInitDev0); + util::WaitMicroSeconds(params->EmcZcalInitWait); + + /* Issue ZQCAL latch. */ + reg::Write(EMC + EMC_ZQ_CAL, params->EmcZcalInitDev0 ^ 0x3); + + /* Do the same for device 1. */ + if ((params->EmcDevSelect & 2) == 0) { + reg::Write(EMC + EMC_ZQ_CAL, params->EmcZcalInitDev1); + util::WaitMicroSeconds(params->EmcZcalInitWait); + + reg::Write(EMC + EMC_ZQ_CAL, params->EmcZcalInitDev1 ^ 0x3); + } + } + } + + /* Patches 10-12. */ + if constexpr (SocType == fuse::SocType_Mariko) { + SpareWrite(params->EmcBctSpareSecure18, params->EmcBctSpareSecure19); + SpareWrite(params->EmcBctSpareSecure20, params->EmcBctSpareSecure21); + SpareWrite(params->EmcBctSpareSecure22, params->EmcBctSpareSecure23); + } + + /* Set package and DPD pad control. */ + reg::Write(PMC + APBDEV_PMC_DDR_CFG, params->PmcDdrCfg); + + /* Start periodic ZQ calibration. */ + if (params->MemoryType == br::BootMemoryType_LpDdr2 || params->MemoryType == br::BootMemoryType_Ddr3 || params->MemoryType == br::BootMemoryType_LpDdr4) { + reg::Write(EMC + EMC_ZCAL_INTERVAL, params->EmcZcalInterval); + reg::Write(EMC + EMC_ZCAL_WAIT_CNT, params->EmcZcalWaitCnt); + reg::Write(EMC + EMC_ZCAL_MRW_CMD, params->EmcZcalMrwCmd); + } + + SpareWrite(params->EmcBctSpare12, params->EmcBctSpare13); + + /* Trigger timing update. */ + reg::Write(EMC + EMC_TIMING_CONTROL, 1); + + if (params->EmcExtraRefreshNum) { + reg::Write(EMC + EMC_REF, (params->EmcDevSelect << 30) | (((1 << params->EmcExtraRefreshNum) - 1) << 8) | 3); + } + + /* Enable refresh. */ + reg::Write(EMC + EMC_REFCTRL, params->EmcDevSelect | 0x80000000); + + reg::Write(EMC + EMC_DYN_SELF_REF_CONTROL, params->EmcDynSelfRefControl); + + if constexpr (SocType == fuse::SocType_Erista) { + reg::Write(EMC + EMC_CFG_UPDATE, params->EmcCfgUpdate); + } + + reg::Write(EMC + EMC_CFG, params->EmcCfg); + reg::Write(EMC + EMC_FDPD_CTRL_DQ, params->EmcFdpdCtrlDq); + reg::Write(EMC + EMC_FDPD_CTRL_CMD, params->EmcFdpdCtrlCmd); + reg::Write(EMC + EMC_SEL_DPD_CTRL, params->EmcSelDpdCtrl); + + /* Write addr swizzle lock bit. */ + reg::Write(EMC + EMC_FBIO_SPARE, params->EmcFbioSpare | 2); + + /* Trigger timing update. */ + reg::Write(EMC + EMC_TIMING_CONTROL, 1); + + if constexpr (SocType == fuse::SocType_Mariko) { + reg::Write(EMC + EMC_CFG_UPDATE, params->EmcCfgUpdate); + } + + /* Enable EMC pipe clock gating. */ + reg::Write(EMC + EMC_CFG_PIPE_CLK, params->EmcCfgPipeClk); + + /* Depending on freqency, enable CMD/CLK fdpd. */ + reg::Write(EMC + EMC_FDPD_CTRL_CMD_NO_RAMP, params->EmcFdpdCtrlCmdNoRamp); + + if constexpr (SocType == fuse::SocType_Erista) { + reg::ReadWrite(AHB + AHB_ARBITRATION_XBAR_CTRL, AHB_REG_BITS_VALUE(ARBITRATION_XBAR_CTRL_MEM_INIT_DONE, params->AhbArbitrationXbarCtrlMemInitDone)); + } + + if constexpr (SocType == fuse::SocType_Mariko) { + reg::Write(MC + MC_UNTRANSLATED_REGION_CHECK, params->McUntranslatedRegionCheck); + } + + /* Lock carveouts. */ + reg::Write(MC + MC_VIDEO_PROTECT_REG_CTRL, params->McVideoProtectWriteAccess); + reg::Write(MC + MC_SEC_CARVEOUT_REG_CTRL, params->McSecCarveoutProtectWriteAccess); + reg::Write(MC + MC_MTS_CARVEOUT_REG_CTRL, params->McMtsCarveoutRegCtrl); + + reg::Write(MC + MC_EMEM_CFG_ACCESS_CTRL, 1); + + if constexpr (SocType == fuse::SocType_Mariko) { + reg::ReadWrite(AHB + AHB_ARBITRATION_XBAR_CTRL, AHB_REG_BITS_VALUE(ARBITRATION_XBAR_CTRL_MEM_INIT_DONE, params->AhbArbitrationXbarCtrlMemInitDone)); + } + } + + template + void SaveSdramParamsToScratch(BootSdramParams *params) { + /* TODO */ + } + + template + void InitializeSdram(void *generic_params) { + /* Get converted parameters. */ + auto *sdram_params = static_cast *>(generic_params); + + /* Enable VDD Memory */ + pmic::EnableVddMemory(SocType); + + /* Set VDDP select. */ + reg::Write(PMC + APBDEV_PMC_VDDP_SEL, sdram_params->PmcVddpSel); + util::WaitMicroSeconds(sdram_params->PmcVddpSelWait); + + /* If Erista, Set DDR pad voltage. */ + if constexpr (SocType == fuse::SocType_Erista) { + reg::Write(PMC + APBDEV_PMC_DDR_PWR, reg::Read(PMC + APBDEV_PMC_DDR_PWR)); + } + + /* Turn on MEM IO power. */ + reg::Write(PMC + APBDEV_PMC_NO_IOPOWER, sdram_params->PmcNoIoPower); + reg::Write(PMC + APBDEV_PMC_REG_SHORT, sdram_params->PmcRegShort); + reg::Write(PMC + APBDEV_PMC_DDR_CNTRL, sdram_params->PmcDdrCntrl); + + /* Apply patch 1. */ + *reinterpret_cast(sdram_params->EmcBctSpare0) = sdram_params->EmcBctSpare1; + + /* Do main init. */ + InitializeSdramImpl(sdram_params); + + /* Save parameters to scratch. */ + SaveSdramParamsToScratch(sdram_params); + } + + } + + void InitializeSdram() { + /* Get soc type. */ + const auto soc_type = fuse::GetSocType(); + + /* Get Sdram params. */ + void *sdram_params = GetSdramParams(soc_type); + + /* Perform SoC-specific init. */ + if (soc_type == fuse::SocType_Erista) { + InitializeSdram(sdram_params); + } else /* if (soc_type == fuse::SocType_Mariko) */ { + InitializeSdram(sdram_params); + } + } + +} diff --git a/fusee_cpp/program/source/fusee_sdram.hpp b/fusee_cpp/program/source/fusee_sdram.hpp new file mode 100644 index 000000000..5e8fb74c1 --- /dev/null +++ b/fusee_cpp/program/source/fusee_sdram.hpp @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2018-2020 Atmosphère-NX + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include +#pragma once + +namespace ams::nxboot { + + void InitializeSdram(); + +} \ No newline at end of file diff --git a/fusee_cpp/program/source/fusee_sdram_params.inc b/fusee_cpp/program/source/fusee_sdram_params.inc new file mode 100644 index 000000000..6fbf35e83 --- /dev/null +++ b/fusee_cpp/program/source/fusee_sdram_params.inc @@ -0,0 +1,1267 @@ +/* + * Copyright (c) 2018-2020 AtmosphÃre-NX + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +constexpr inline const u8 SdramParamsErista0[0x3AC] = { + 0xFF, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x2C, 0x01, + 0x00, 0x01, 0x00, 0x0E, 0xFC, 0x05, 0x68, 0xBC, 0x01, 0x70, 0x0A, 0x00, 0x00, 0x00, 0x04, 0xB4, + 0x01, 0x70, 0x01, 0x32, 0x54, 0x76, 0xC8, 0xE6, 0x00, 0x70, 0x24, 0x00, 0xC8, 0x34, 0x00, 0x00, + 0x00, 0x02, 0x80, 0x18, 0x40, 0x00, 0x00, 0x00, 0x40, 0x18, 0x00, 0xFF, 0x01, 0xFF, 0xFF, 0x1F, + 0x00, 0xD8, 0x51, 0x1A, 0xA0, 0x00, 0x00, 0x50, 0x05, 0x00, 0x00, 0x77, 0x00, 0x04, 0x00, 0x01, + 0xD3, 0xA6, 0xA6, 0xAF, 0xB3, 0x3C, 0x9E, 0x00, 0x00, 0x03, 0x03, 0xE0, 0xC1, 0x04, 0x01, 0x00, + 0x00, 0x3C, 0x00, 0x19, 0x1F, 0x01, 0x00, 0x42, 0x00, 0x00, 0x04, 0x08, 0x46, 0x00, 0x57, 0xA1, + 0x01, 0x00, 0x00, 0x32, 0x64, 0x00, 0x00, 0xC3, 0x00, 0x13, 0x02, 0x0C, 0x00, 0x13, 0x03, 0x04, + 0x00, 0xD7, 0x1E, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x13, 0x2C, + 0x00, 0x10, 0x09, 0xC8, 0x00, 0x07, 0x10, 0x00, 0x13, 0x0B, 0x28, 0x00, 0x13, 0x08, 0x0C, 0x00, + 0x00, 0x1C, 0x00, 0x57, 0x20, 0x00, 0x00, 0x00, 0x06, 0x04, 0x00, 0x13, 0x03, 0x2C, 0x00, 0x13, + 0x04, 0x10, 0x00, 0x17, 0x02, 0x10, 0x00, 0x13, 0x08, 0x40, 0x00, 0x13, 0x05, 0x1C, 0x00, 0x04, + 0x58, 0x00, 0x13, 0x02, 0x18, 0x00, 0x04, 0x64, 0x00, 0x00, 0xA6, 0x00, 0xB5, 0x12, 0x00, 0x00, + 0x00, 0x14, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x0C, 0x00, 0x01, 0x58, 0x01, 0x03, 0x61, 0x00, + 0x13, 0xC1, 0x50, 0x00, 0x17, 0x08, 0xC8, 0x00, 0x13, 0x03, 0x28, 0x00, 0x17, 0x05, 0x54, 0x00, + 0x13, 0x27, 0x04, 0x00, 0x13, 0x05, 0x04, 0x00, 0x13, 0x04, 0xD8, 0x00, 0x08, 0x0C, 0x00, 0xA0, + 0x1C, 0x03, 0x00, 0x00, 0x0D, 0xA0, 0x60, 0x91, 0xBF, 0x3B, 0x5A, 0x00, 0xF1, 0x28, 0xF3, 0x0C, + 0x04, 0x05, 0x1B, 0x06, 0x02, 0x03, 0x07, 0x1C, 0x23, 0x25, 0x25, 0x05, 0x08, 0x1D, 0x09, 0x0A, + 0x24, 0x0B, 0x1E, 0x0D, 0x0C, 0x26, 0x26, 0x03, 0x02, 0x1B, 0x1C, 0x23, 0x03, 0x04, 0x07, 0x05, + 0x06, 0x25, 0x25, 0x02, 0x0A, 0x0B, 0x1D, 0x0D, 0x08, 0x0C, 0x09, 0x1E, 0x24, 0x26, 0x26, 0x08, + 0x24, 0x06, 0x07, 0x9A, 0x12, 0xC1, 0x01, 0x2C, 0x00, 0xFF, 0xEC, 0x01, 0xB0, 0x04, 0x00, 0x01, + 0x08, 0x00, 0x00, 0x02, 0x08, 0x00, 0x00, 0x0D, 0xAB, 0x00, 0xD0, 0xC0, 0x71, 0x71, 0x03, 0x08, + 0x00, 0x00, 0x0B, 0x08, 0x72, 0x72, 0x0E, 0x0C, 0x20, 0x00, 0xC2, 0x08, 0x08, 0x0D, 0x0C, 0x00, + 0x00, 0x0D, 0x0C, 0x14, 0x14, 0x16, 0x08, 0x2C, 0x00, 0x2C, 0x11, 0x08, 0x67, 0x02, 0x70, 0x15, + 0x00, 0xCC, 0x00, 0x0A, 0x00, 0x33, 0x6E, 0x01, 0x94, 0xF3, 0x05, 0x08, 0x11, 0x00, 0xFF, 0x0F, + 0xFF, 0x0F, 0xCC, 0x01, 0x80, 0x01, 0x03, 0x00, 0x70, 0x00, 0x0C, 0x00, 0x01, 0x0C, 0x00, 0xC0, + 0x08, 0x44, 0x00, 0x10, 0x04, 0x04, 0x00, 0x06, 0x13, 0x07, 0x00, 0x80, 0x10, 0x00, 0xA2, 0xA0, + 0x00, 0x2C, 0x00, 0x01, 0x37, 0x00, 0x00, 0x00, 0x80, 0x48, 0x00, 0xD3, 0x08, 0x00, 0x04, 0x00, + 0x1F, 0x22, 0x20, 0x80, 0x0F, 0xF4, 0x20, 0x02, 0x28, 0x01, 0x00, 0x13, 0x11, 0x01, 0x00, 0x10, + 0xBE, 0xBF, 0x00, 0x12, 0x0F, 0x02, 0x00, 0x1F, 0x00, 0x01, 0x00, 0x2C, 0x7F, 0x14, 0x00, 0x12, + 0x00, 0x10, 0x00, 0x14, 0x18, 0x00, 0x06, 0xF3, 0x02, 0x30, 0x00, 0x2E, 0x00, 0x33, 0x00, 0x30, + 0x00, 0x33, 0x00, 0x35, 0x00, 0x30, 0x00, 0x32, 0x00, 0x05, 0x20, 0x00, 0x0F, 0x18, 0x00, 0x05, + 0x1F, 0x28, 0x02, 0x00, 0x0C, 0x11, 0x14, 0x5A, 0x00, 0x00, 0x5C, 0x00, 0x11, 0x10, 0x0C, 0x00, + 0x0C, 0x7A, 0x00, 0x05, 0x50, 0x01, 0xA4, 0x40, 0x06, 0x00, 0xCC, 0x00, 0x09, 0x00, 0x4F, 0x00, + 0x51, 0x18, 0x00, 0x00, 0x28, 0x01, 0x23, 0x40, 0x01, 0x3C, 0x02, 0x54, 0xAB, 0x00, 0x0A, 0x04, + 0x11, 0x58, 0x01, 0x03, 0x04, 0x00, 0x0F, 0xEC, 0x00, 0x0D, 0x17, 0x02, 0x0C, 0x00, 0x17, 0x03, + 0x60, 0x03, 0x02, 0xA1, 0x01, 0x7B, 0x22, 0x04, 0xFF, 0xFF, 0xAF, 0x4F, 0x01, 0x28, 0x00, 0x00, + 0x01, 0x00, 0x32, 0x8B, 0xFF, 0x07, 0x84, 0x00, 0xF0, 0x10, 0x32, 0x54, 0x76, 0x10, 0x47, 0x32, + 0x65, 0x10, 0x34, 0x76, 0x25, 0x01, 0x34, 0x67, 0x25, 0x01, 0x75, 0x64, 0x32, 0x01, 0x72, 0x56, + 0x34, 0x10, 0x23, 0x74, 0x56, 0x01, 0x45, 0x32, 0x67, 0x24, 0x00, 0x31, 0x49, 0x92, 0x24, 0x04, + 0x00, 0x0C, 0x01, 0x00, 0x13, 0x1B, 0x04, 0x00, 0x0C, 0x94, 0x00, 0x80, 0x2F, 0x41, 0x13, 0x1F, + 0x14, 0x00, 0x01, 0x00, 0x7C, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x7F, 0x0B, 0xD7, 0x06, 0x40, 0x82, + 0x00, 0xB2, 0x08, 0x08, 0x03, 0x00, 0x00, 0x5C, 0x01, 0x00, 0x10, 0x10, 0x10, 0x59, 0x03, 0x0B, + 0x94, 0x04, 0x13, 0x37, 0x72, 0x01, 0x12, 0x10, 0x8D, 0x01, 0x31, 0x00, 0x11, 0x01, 0xB9, 0x02, + 0x00, 0x1F, 0x00, 0x13, 0x0A, 0xA9, 0x04, 0x17, 0x10, 0x77, 0x03, 0x05, 0x12, 0x00, 0x00, 0x04, + 0x04, 0xCF, 0x81, 0x10, 0x09, 0x28, 0x93, 0x32, 0xA5, 0x44, 0x5B, 0x8A, 0x67, 0x76, 0x2C, 0x01, + 0x05, 0x53, 0xFF, 0xEF, 0xFF, 0xEF, 0xC0, 0x01, 0x00, 0x57, 0xDC, 0xDC, 0xDC, 0xDC, 0x0A, 0x01, + 0x00, 0x01, 0x24, 0x01, 0x21, 0x03, 0x07, 0x04, 0x00, 0xF1, 0x03, 0x00, 0x24, 0xFF, 0xFF, 0x00, + 0x44, 0x57, 0x6E, 0x00, 0x28, 0x72, 0x39, 0x00, 0x10, 0x9C, 0x4B, 0x00, 0x10, 0x58, 0x01, 0xB2, + 0x08, 0x4C, 0x00, 0x00, 0x80, 0x20, 0x10, 0x0A, 0x00, 0x28, 0x10, 0xE0, 0x02, 0x0C, 0x74, 0x01, + 0x04, 0x08, 0x00, 0x17, 0x05, 0x10, 0x00, 0x17, 0x04, 0xEC, 0x03, 0xE4, 0x01, 0x00, 0x02, 0x02, + 0x01, 0x02, 0x03, 0x00, 0x04, 0x05, 0xC3, 0x71, 0x0F, 0x0F, 0x98, 0x05, 0x15, 0x1F, 0xF3, 0x00, + 0x00, 0xC0, 0x03, 0x14, 0x01, 0xDD, 0x00, 0x14, 0x80, 0xB6, 0x00, 0x15, 0xF0, 0xD4, 0x03, 0x68, + 0x43, 0xC3, 0xBA, 0xE4, 0xD3, 0x1E, 0xD2, 0x00, 0x2F, 0xF0, 0xFF, 0xEC, 0x00, 0x05, 0x19, 0x08, + 0x0E, 0x00, 0x14, 0x30, 0xAB, 0x00, 0x0F, 0x2C, 0x00, 0x02, 0x4F, 0x76, 0x0C, 0x00, 0x04, 0x50, + 0x02, 0x01, 0x05, 0x34, 0x00, 0x0F, 0x3A, 0x00, 0x04, 0x38, 0x7E, 0x16, 0x40, 0x9F, 0x05, 0x0F, + 0x38, 0x00, 0x17, 0x3F, 0x1E, 0x40, 0x04, 0xA8, 0x00, 0x08, 0x2F, 0x00, 0xC0, 0x55, 0x00, 0x04, + 0x3F, 0x46, 0x24, 0x00, 0x38, 0x00, 0x0A, 0x0F, 0x01, 0x00, 0x05, 0x22, 0x46, 0x2C, 0x38, 0x00, + 0x2F, 0xEC, 0x00, 0x3C, 0x01, 0x02, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, +}; + +constexpr inline const u8 SdramParamsErista1[0x3AC] = { + 0xFF, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x2C, 0x01, + 0x00, 0x01, 0x00, 0x0E, 0xFC, 0x05, 0x68, 0xBC, 0x01, 0x70, 0x0A, 0x00, 0x00, 0x00, 0x04, 0xB4, + 0x01, 0x70, 0x01, 0x32, 0x54, 0x76, 0xC8, 0xE6, 0x00, 0x70, 0x24, 0x00, 0xC8, 0x34, 0x00, 0x00, + 0x00, 0x02, 0x80, 0x18, 0x40, 0x00, 0x00, 0x00, 0x40, 0x18, 0x00, 0xFF, 0x01, 0xFF, 0xFF, 0x1F, + 0x00, 0xD8, 0x51, 0x1A, 0xA0, 0x00, 0x00, 0x50, 0x05, 0x00, 0x00, 0x77, 0x00, 0x04, 0x00, 0x01, + 0xD3, 0xA6, 0xA6, 0xAF, 0xB3, 0x3C, 0x9E, 0x00, 0x00, 0x03, 0x03, 0xE0, 0xC1, 0x04, 0x01, 0x00, + 0x00, 0x3C, 0x00, 0x19, 0x1F, 0x01, 0x00, 0x42, 0x00, 0x00, 0x04, 0x08, 0x46, 0x00, 0x57, 0xA1, + 0x01, 0x00, 0x00, 0x32, 0x64, 0x00, 0x00, 0xC3, 0x00, 0x13, 0x02, 0x0C, 0x00, 0x13, 0x03, 0x04, + 0x00, 0xD7, 0x1E, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x13, 0x2C, + 0x00, 0x10, 0x09, 0xC8, 0x00, 0x07, 0x10, 0x00, 0x13, 0x0D, 0x04, 0x00, 0x53, 0x08, 0x00, 0x00, + 0x00, 0x0B, 0x1C, 0x00, 0x57, 0x20, 0x00, 0x00, 0x00, 0x06, 0x04, 0x00, 0x13, 0x03, 0x2C, 0x00, + 0x13, 0x04, 0x10, 0x00, 0x17, 0x02, 0x10, 0x00, 0x13, 0x08, 0x40, 0x00, 0x13, 0x05, 0x1C, 0x00, + 0x04, 0x58, 0x00, 0x13, 0x02, 0x18, 0x00, 0x03, 0x5F, 0x01, 0x10, 0x80, 0x0A, 0x00, 0xB5, 0x12, + 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x0C, 0x00, 0x01, 0x58, 0x01, 0x03, + 0x61, 0x00, 0x13, 0xC1, 0x50, 0x00, 0x17, 0x08, 0xC8, 0x00, 0x13, 0x03, 0x28, 0x00, 0x17, 0x05, + 0x54, 0x00, 0x13, 0x27, 0x04, 0x00, 0x13, 0x05, 0x04, 0x00, 0x13, 0x04, 0xD8, 0x00, 0x08, 0x0C, + 0x00, 0xA0, 0x1C, 0x03, 0x00, 0x00, 0x0D, 0xA0, 0x60, 0x91, 0xBF, 0x3B, 0x5A, 0x00, 0xF1, 0x28, + 0xF3, 0x0C, 0x04, 0x05, 0x1B, 0x06, 0x02, 0x03, 0x07, 0x1C, 0x23, 0x25, 0x25, 0x05, 0x08, 0x1D, + 0x09, 0x0A, 0x24, 0x0B, 0x1E, 0x0D, 0x0C, 0x26, 0x26, 0x03, 0x02, 0x1B, 0x1C, 0x23, 0x03, 0x04, + 0x07, 0x05, 0x06, 0x25, 0x25, 0x02, 0x0A, 0x0B, 0x1D, 0x0D, 0x08, 0x0C, 0x09, 0x1E, 0x24, 0x26, + 0x26, 0x08, 0x24, 0x06, 0x07, 0x9A, 0x12, 0xC1, 0x01, 0x2C, 0x00, 0xFF, 0xEC, 0x01, 0xB0, 0x04, + 0x00, 0x01, 0x08, 0x00, 0x00, 0x02, 0x08, 0x00, 0x00, 0x0D, 0xAB, 0x00, 0xD0, 0xC0, 0x71, 0x71, + 0x03, 0x08, 0x00, 0x00, 0x0B, 0x08, 0x72, 0x72, 0x0E, 0x0C, 0x20, 0x00, 0xC2, 0x08, 0x08, 0x0D, + 0x0C, 0x00, 0x00, 0x0D, 0x0C, 0x14, 0x14, 0x16, 0x08, 0x2C, 0x00, 0x2C, 0x11, 0x08, 0x67, 0x02, + 0x70, 0x15, 0x00, 0xCC, 0x00, 0x0A, 0x00, 0x33, 0x6E, 0x01, 0x94, 0xF3, 0x05, 0x08, 0x11, 0x00, + 0xFF, 0x0F, 0xFF, 0x0F, 0xCC, 0x01, 0x80, 0x01, 0x03, 0x00, 0x70, 0x00, 0x0C, 0x00, 0x01, 0x0C, + 0x00, 0xC0, 0x08, 0x44, 0x00, 0x10, 0x04, 0x04, 0x00, 0x06, 0x13, 0x07, 0x00, 0x80, 0x10, 0x00, + 0x62, 0xA0, 0x00, 0x2C, 0x00, 0x01, 0x37, 0x52, 0x01, 0x01, 0x6C, 0x00, 0xC3, 0x00, 0x04, 0x00, + 0x1F, 0x22, 0x20, 0x80, 0x0F, 0xF4, 0x20, 0x02, 0x28, 0x01, 0x00, 0x13, 0x11, 0x01, 0x00, 0x10, + 0xBE, 0xBF, 0x00, 0x12, 0x0F, 0x02, 0x00, 0x1F, 0x00, 0x01, 0x00, 0x2C, 0x7F, 0x14, 0x00, 0x12, + 0x00, 0x10, 0x00, 0x14, 0x18, 0x00, 0x06, 0xF3, 0x02, 0x30, 0x00, 0x2E, 0x00, 0x33, 0x00, 0x30, + 0x00, 0x33, 0x00, 0x35, 0x00, 0x30, 0x00, 0x32, 0x00, 0x05, 0x20, 0x00, 0x0F, 0x18, 0x00, 0x05, + 0x1F, 0x28, 0x02, 0x00, 0x0C, 0x11, 0x14, 0x5A, 0x00, 0x00, 0x5C, 0x00, 0x11, 0x10, 0x0C, 0x00, + 0x0C, 0x7A, 0x00, 0x05, 0x50, 0x01, 0xA4, 0x40, 0x06, 0x00, 0xCC, 0x00, 0x09, 0x00, 0x4F, 0x00, + 0x51, 0x18, 0x00, 0x00, 0x28, 0x01, 0x23, 0x40, 0x01, 0x3C, 0x02, 0x54, 0xAB, 0x00, 0x0A, 0x04, + 0x11, 0x58, 0x01, 0x03, 0x04, 0x00, 0x0F, 0xEC, 0x00, 0x0D, 0x17, 0x02, 0x0C, 0x00, 0x17, 0x03, + 0x60, 0x03, 0x02, 0xA1, 0x01, 0x7B, 0x22, 0x04, 0xFF, 0xFF, 0xAF, 0x4F, 0x01, 0x28, 0x00, 0x00, + 0x01, 0x00, 0x32, 0x8B, 0xFF, 0x07, 0x84, 0x00, 0xF0, 0x10, 0x32, 0x54, 0x76, 0x10, 0x47, 0x32, + 0x65, 0x10, 0x34, 0x76, 0x25, 0x01, 0x34, 0x67, 0x25, 0x01, 0x75, 0x64, 0x32, 0x01, 0x72, 0x56, + 0x34, 0x10, 0x23, 0x74, 0x56, 0x01, 0x45, 0x32, 0x67, 0x24, 0x00, 0x31, 0x49, 0x92, 0x24, 0x04, + 0x00, 0x0C, 0x01, 0x00, 0x13, 0x1B, 0x04, 0x00, 0x0C, 0x94, 0x00, 0x80, 0x2F, 0x41, 0x13, 0x1F, + 0x14, 0x00, 0x01, 0x00, 0x7C, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x7F, 0x0B, 0xD7, 0x06, 0x40, 0x82, + 0x00, 0xB2, 0x08, 0x08, 0x03, 0x00, 0x00, 0x5C, 0x01, 0x00, 0x10, 0x10, 0x10, 0x59, 0x03, 0x0B, + 0x94, 0x04, 0x13, 0x37, 0x72, 0x01, 0x21, 0x10, 0x02, 0x8D, 0x01, 0x31, 0x00, 0x11, 0x01, 0xB9, + 0x02, 0x00, 0x1F, 0x00, 0x13, 0x0A, 0xA9, 0x04, 0x17, 0x10, 0x77, 0x03, 0x05, 0x12, 0x00, 0x00, + 0x04, 0x04, 0xCF, 0x81, 0x10, 0x09, 0x28, 0x93, 0x32, 0xA5, 0x44, 0x5B, 0x8A, 0x67, 0x76, 0x2C, + 0x01, 0x05, 0x53, 0xFF, 0xEF, 0xFF, 0xEF, 0xC0, 0x01, 0x00, 0x57, 0xDC, 0xDC, 0xDC, 0xDC, 0x0A, + 0x01, 0x00, 0x01, 0x24, 0x01, 0x21, 0x03, 0x07, 0x04, 0x00, 0xF1, 0x03, 0x00, 0x24, 0xFF, 0xFF, + 0x00, 0x44, 0x57, 0x6E, 0x00, 0x28, 0x72, 0x39, 0x00, 0x10, 0x9C, 0x4B, 0x00, 0x10, 0x58, 0x01, + 0xB2, 0x08, 0x4C, 0x00, 0x00, 0x80, 0x20, 0x10, 0x0A, 0x00, 0x28, 0x10, 0xE0, 0x02, 0x0C, 0x74, + 0x01, 0x04, 0x08, 0x00, 0x17, 0x05, 0x10, 0x00, 0x08, 0xF8, 0x03, 0xE4, 0x01, 0x00, 0x02, 0x02, + 0x01, 0x02, 0x03, 0x00, 0x04, 0x05, 0xC3, 0x71, 0x0F, 0x0F, 0x98, 0x05, 0x14, 0x1F, 0xD8, 0x00, + 0x01, 0xC0, 0x03, 0x14, 0x01, 0xDD, 0x00, 0x14, 0x80, 0xB6, 0x00, 0x15, 0xF0, 0xD4, 0x03, 0x68, + 0x43, 0xC3, 0xBA, 0xE4, 0xD3, 0x1E, 0xD2, 0x00, 0x2F, 0xF0, 0xFF, 0xEC, 0x00, 0x05, 0x19, 0x08, + 0x0E, 0x00, 0x14, 0x30, 0xAB, 0x00, 0x0F, 0x2C, 0x00, 0x02, 0x4F, 0x76, 0x0C, 0x00, 0x04, 0x50, + 0x02, 0x01, 0x05, 0x34, 0x00, 0x0F, 0x3A, 0x00, 0x04, 0x38, 0x7E, 0x16, 0x40, 0x9F, 0x05, 0x0F, + 0x38, 0x00, 0x17, 0x3F, 0x1E, 0x40, 0x04, 0xA8, 0x00, 0x08, 0x2F, 0x00, 0xC0, 0x55, 0x00, 0x04, + 0x3F, 0x46, 0x24, 0x00, 0x38, 0x00, 0x0A, 0x0F, 0x01, 0x00, 0x05, 0x22, 0x46, 0x2C, 0x38, 0x00, + 0x2F, 0xEC, 0x00, 0x3C, 0x01, 0x02, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, +}; + +constexpr inline const u8 SdramParamsErista2[0x3AC] = { + 0xFF, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x2C, 0x01, + 0x00, 0x01, 0x00, 0x0E, 0xFC, 0x05, 0x68, 0xBC, 0x01, 0x70, 0x0A, 0x00, 0x00, 0x00, 0x04, 0xB4, + 0x01, 0x70, 0x01, 0x32, 0x54, 0x76, 0xC8, 0xE6, 0x00, 0x70, 0x24, 0x00, 0xC8, 0x34, 0x00, 0x00, + 0x00, 0x02, 0x80, 0x18, 0x40, 0x00, 0x00, 0x00, 0x40, 0x18, 0x00, 0xFF, 0x01, 0xFF, 0xFF, 0x1F, + 0x00, 0xD8, 0x51, 0x1A, 0xA0, 0x00, 0x00, 0x50, 0x05, 0x00, 0x00, 0x77, 0x00, 0x04, 0x00, 0x01, + 0xD3, 0xA6, 0xA6, 0xAF, 0xB3, 0x3C, 0x9E, 0x00, 0x00, 0x03, 0x03, 0xE0, 0xC1, 0x04, 0x01, 0x00, + 0x00, 0x3C, 0x00, 0x19, 0x1F, 0x01, 0x00, 0x42, 0x00, 0x00, 0x04, 0x08, 0x46, 0x00, 0x57, 0xA1, + 0x01, 0x00, 0x00, 0x32, 0x64, 0x00, 0x00, 0xC3, 0x00, 0x13, 0x02, 0x0C, 0x00, 0x13, 0x03, 0x04, + 0x00, 0xD7, 0x1E, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x13, 0x2C, + 0x00, 0x10, 0x09, 0xC8, 0x00, 0x07, 0x10, 0x00, 0x13, 0x0B, 0x28, 0x00, 0x13, 0x08, 0x0C, 0x00, + 0x00, 0x1C, 0x00, 0x57, 0x20, 0x00, 0x00, 0x00, 0x06, 0x04, 0x00, 0x13, 0x03, 0x2C, 0x00, 0x13, + 0x04, 0x10, 0x00, 0x17, 0x02, 0x10, 0x00, 0x13, 0x08, 0x40, 0x00, 0x13, 0x05, 0x1C, 0x00, 0x04, + 0x58, 0x00, 0x13, 0x02, 0x18, 0x00, 0x04, 0x64, 0x00, 0x00, 0xA6, 0x00, 0xB5, 0x12, 0x00, 0x00, + 0x00, 0x14, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x0C, 0x00, 0x01, 0x58, 0x01, 0x03, 0x61, 0x00, + 0x13, 0xC1, 0x50, 0x00, 0x17, 0x08, 0xC8, 0x00, 0x13, 0x03, 0x28, 0x00, 0x17, 0x05, 0x54, 0x00, + 0x13, 0x27, 0x04, 0x00, 0x13, 0x05, 0x04, 0x00, 0x13, 0x04, 0xD8, 0x00, 0x08, 0x0C, 0x00, 0xA0, + 0x1C, 0x03, 0x00, 0x00, 0x0D, 0xA0, 0x60, 0x91, 0xBF, 0x3B, 0x5A, 0x00, 0xF1, 0x28, 0xF3, 0x0C, + 0x04, 0x05, 0x1B, 0x06, 0x02, 0x03, 0x07, 0x1C, 0x23, 0x25, 0x25, 0x05, 0x08, 0x1D, 0x09, 0x0A, + 0x24, 0x0B, 0x1E, 0x0D, 0x0C, 0x26, 0x26, 0x03, 0x02, 0x1B, 0x1C, 0x23, 0x03, 0x04, 0x07, 0x05, + 0x06, 0x25, 0x25, 0x02, 0x0A, 0x0B, 0x1D, 0x0D, 0x08, 0x0C, 0x09, 0x1E, 0x24, 0x26, 0x26, 0x08, + 0x24, 0x06, 0x07, 0x9A, 0x12, 0xC1, 0x01, 0x2C, 0x00, 0xFF, 0xEC, 0x01, 0xB0, 0x04, 0x00, 0x01, + 0x08, 0x00, 0x00, 0x02, 0x08, 0x00, 0x00, 0x0D, 0xAB, 0x00, 0xD0, 0xC0, 0x71, 0x71, 0x03, 0x08, + 0x00, 0x00, 0x0B, 0x08, 0x72, 0x72, 0x0E, 0x0C, 0x20, 0x00, 0xC2, 0x08, 0x08, 0x0D, 0x0C, 0x00, + 0x00, 0x0D, 0x0C, 0x14, 0x14, 0x16, 0x08, 0x2C, 0x00, 0x2C, 0x11, 0x08, 0x67, 0x02, 0x70, 0x15, + 0x00, 0xCC, 0x00, 0x0A, 0x00, 0x33, 0x6E, 0x01, 0x94, 0xF3, 0x05, 0x08, 0x11, 0x00, 0xFF, 0x0F, + 0xFF, 0x0F, 0xCC, 0x01, 0x80, 0x01, 0x03, 0x00, 0x70, 0x00, 0x0C, 0x00, 0x01, 0x0C, 0x00, 0xC0, + 0x08, 0x44, 0x00, 0x10, 0x04, 0x04, 0x00, 0x06, 0x13, 0x07, 0x00, 0x80, 0x10, 0x00, 0xA2, 0xA0, + 0x00, 0x2C, 0x00, 0x01, 0x37, 0x00, 0x00, 0x00, 0x80, 0x48, 0x00, 0xD3, 0x08, 0x00, 0x04, 0x00, + 0x1F, 0x22, 0x20, 0x80, 0x0F, 0xF4, 0x20, 0x02, 0x28, 0x01, 0x00, 0x13, 0x11, 0x01, 0x00, 0x10, + 0xBE, 0xBF, 0x00, 0x12, 0x0F, 0x02, 0x00, 0x1F, 0x00, 0x01, 0x00, 0x2C, 0x7F, 0x14, 0x00, 0x12, + 0x00, 0x10, 0x00, 0x14, 0x18, 0x00, 0x06, 0xF3, 0x02, 0x30, 0x00, 0x2E, 0x00, 0x33, 0x00, 0x30, + 0x00, 0x33, 0x00, 0x35, 0x00, 0x30, 0x00, 0x32, 0x00, 0x05, 0x20, 0x00, 0x0F, 0x18, 0x00, 0x05, + 0x1F, 0x28, 0x02, 0x00, 0x0C, 0x11, 0x14, 0x5A, 0x00, 0x00, 0x5C, 0x00, 0x11, 0x10, 0x0C, 0x00, + 0x0C, 0x7A, 0x00, 0x05, 0x50, 0x01, 0xA4, 0x40, 0x06, 0x00, 0xCC, 0x00, 0x09, 0x00, 0x4F, 0x00, + 0x51, 0x18, 0x00, 0x00, 0x28, 0x01, 0x23, 0x40, 0x01, 0x3C, 0x02, 0x54, 0xAB, 0x00, 0x0A, 0x04, + 0x11, 0x58, 0x01, 0x03, 0x04, 0x00, 0x0F, 0xEC, 0x00, 0x0D, 0x17, 0x02, 0x0C, 0x00, 0x17, 0x03, + 0x60, 0x03, 0x02, 0xA1, 0x01, 0x7B, 0x22, 0x04, 0xFF, 0xFF, 0xAF, 0x4F, 0x01, 0x28, 0x00, 0x00, + 0x01, 0x00, 0x32, 0x8B, 0xFF, 0x07, 0x84, 0x00, 0xF0, 0x10, 0x32, 0x54, 0x76, 0x10, 0x47, 0x32, + 0x65, 0x10, 0x34, 0x76, 0x25, 0x01, 0x34, 0x67, 0x25, 0x01, 0x75, 0x64, 0x32, 0x01, 0x72, 0x56, + 0x34, 0x10, 0x23, 0x74, 0x56, 0x01, 0x45, 0x32, 0x67, 0x24, 0x00, 0x31, 0x49, 0x92, 0x24, 0x04, + 0x00, 0x0C, 0x01, 0x00, 0x13, 0x1B, 0x04, 0x00, 0x0C, 0x94, 0x00, 0x80, 0x2F, 0x41, 0x13, 0x1F, + 0x14, 0x00, 0x01, 0x00, 0x7C, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x7F, 0x0B, 0xD7, 0x06, 0x40, 0x82, + 0x00, 0xB2, 0x08, 0x08, 0x03, 0x00, 0x00, 0x5C, 0x01, 0x00, 0x10, 0x10, 0x10, 0x59, 0x03, 0x0B, + 0x94, 0x04, 0x13, 0x37, 0x72, 0x01, 0x12, 0x10, 0x8D, 0x01, 0x31, 0x00, 0x11, 0x01, 0xB9, 0x02, + 0x00, 0x1F, 0x00, 0x13, 0x0A, 0xA9, 0x04, 0x17, 0x10, 0x77, 0x03, 0x05, 0x12, 0x00, 0x00, 0x04, + 0x04, 0xCF, 0x81, 0x10, 0x09, 0x28, 0x93, 0x32, 0xA5, 0x44, 0x5B, 0x8A, 0x67, 0x76, 0x2C, 0x01, + 0x05, 0x53, 0xFF, 0xEF, 0xFF, 0xEF, 0xC0, 0x01, 0x00, 0x57, 0xDC, 0xDC, 0xDC, 0xDC, 0x0A, 0x01, + 0x00, 0x01, 0x24, 0x01, 0x21, 0x03, 0x07, 0x04, 0x00, 0xF1, 0x03, 0x00, 0x24, 0xFF, 0xFF, 0x00, + 0x44, 0x57, 0x6E, 0x00, 0x28, 0x72, 0x39, 0x00, 0x10, 0x9C, 0x4B, 0x00, 0x10, 0x58, 0x01, 0xB2, + 0x08, 0x4C, 0x00, 0x00, 0x80, 0x20, 0x10, 0x0A, 0x00, 0x28, 0x10, 0xE0, 0x02, 0x0C, 0x74, 0x01, + 0x04, 0x08, 0x00, 0x17, 0x05, 0x10, 0x00, 0x17, 0x04, 0xEC, 0x03, 0xE4, 0x01, 0x00, 0x02, 0x02, + 0x01, 0x02, 0x03, 0x00, 0x04, 0x05, 0xC3, 0x71, 0x0F, 0x0F, 0x98, 0x05, 0x15, 0x1F, 0xF3, 0x00, + 0x00, 0xC0, 0x03, 0x14, 0x01, 0xDD, 0x00, 0x14, 0x80, 0xB6, 0x00, 0x15, 0xF0, 0xD4, 0x03, 0x68, + 0x43, 0xC3, 0xBA, 0xE4, 0xD3, 0x1E, 0xD2, 0x00, 0x2F, 0xF0, 0xFF, 0xEC, 0x00, 0x05, 0x19, 0x08, + 0x0E, 0x00, 0x14, 0x30, 0xAB, 0x00, 0x0F, 0x2C, 0x00, 0x02, 0x4F, 0x76, 0x0C, 0x00, 0x04, 0x50, + 0x02, 0x01, 0x05, 0x34, 0x00, 0x0F, 0x3A, 0x00, 0x04, 0x38, 0x7E, 0x16, 0x40, 0x9F, 0x05, 0x0F, + 0x38, 0x00, 0x17, 0x3F, 0x1E, 0x40, 0x04, 0xA8, 0x00, 0x08, 0x2F, 0x00, 0xC0, 0x55, 0x00, 0x04, + 0x3F, 0x46, 0x24, 0x00, 0x38, 0x00, 0x0A, 0x0F, 0x01, 0x00, 0x05, 0x22, 0x46, 0x2C, 0x38, 0x00, + 0x2F, 0xEC, 0x00, 0x3C, 0x01, 0x02, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, +}; + +constexpr inline const u8 SdramParamsErista3[0x3B0] = { + 0xFF, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x2C, 0x01, + 0x00, 0x01, 0x00, 0x0E, 0xFC, 0x05, 0x68, 0xBC, 0x01, 0x70, 0x0A, 0x00, 0x00, 0x00, 0x04, 0xB4, + 0x01, 0x70, 0x01, 0x32, 0x54, 0x76, 0xC8, 0xE6, 0x00, 0x70, 0x24, 0x00, 0xC8, 0x34, 0x00, 0x00, + 0x00, 0x02, 0x80, 0x18, 0x40, 0x00, 0x00, 0x00, 0x40, 0x18, 0x00, 0xFF, 0x01, 0xFF, 0xFF, 0x1F, + 0x00, 0xD8, 0x51, 0x1A, 0xA0, 0x00, 0x00, 0x50, 0x05, 0x00, 0x00, 0x77, 0x00, 0x04, 0x00, 0x01, + 0xD3, 0xA6, 0xA6, 0xAF, 0xB3, 0x3C, 0x9E, 0x00, 0x00, 0x03, 0x03, 0xE0, 0xC1, 0x04, 0x01, 0x00, + 0x00, 0x3C, 0x00, 0x19, 0x1F, 0x01, 0x00, 0x42, 0x00, 0x00, 0x04, 0x08, 0x46, 0x00, 0x57, 0xA1, + 0x01, 0x00, 0x00, 0x32, 0x64, 0x00, 0x00, 0xC3, 0x00, 0x13, 0x02, 0x0C, 0x00, 0x13, 0x03, 0x04, + 0x00, 0xD7, 0x1E, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x13, 0x2C, + 0x00, 0x10, 0x09, 0xC8, 0x00, 0x07, 0x10, 0x00, 0x13, 0x0B, 0x28, 0x00, 0x13, 0x08, 0x0C, 0x00, + 0x00, 0x1C, 0x00, 0x57, 0x20, 0x00, 0x00, 0x00, 0x06, 0x04, 0x00, 0x13, 0x03, 0x2C, 0x00, 0x13, + 0x04, 0x10, 0x00, 0x17, 0x02, 0x10, 0x00, 0x13, 0x08, 0x40, 0x00, 0x13, 0x05, 0x1C, 0x00, 0x04, + 0x58, 0x00, 0x13, 0x02, 0x18, 0x00, 0x04, 0x64, 0x00, 0x00, 0xA6, 0x00, 0xB5, 0x12, 0x00, 0x00, + 0x00, 0x14, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x0C, 0x00, 0x01, 0x58, 0x01, 0x03, 0x61, 0x00, + 0x13, 0xC1, 0x50, 0x00, 0x17, 0x08, 0xC8, 0x00, 0x13, 0x03, 0x2C, 0x00, 0x17, 0x05, 0x54, 0x00, + 0x13, 0x27, 0x04, 0x00, 0x13, 0x05, 0x04, 0x00, 0x13, 0x04, 0xD8, 0x00, 0x13, 0x05, 0x30, 0x00, + 0x00, 0x0C, 0x00, 0xA0, 0x1C, 0x03, 0x00, 0x00, 0x0D, 0xA0, 0x60, 0x91, 0xBF, 0x3B, 0x5A, 0x00, + 0xF1, 0x28, 0xF3, 0x0C, 0x04, 0x05, 0x1B, 0x06, 0x02, 0x03, 0x07, 0x1C, 0x23, 0x25, 0x25, 0x05, + 0x08, 0x1D, 0x09, 0x0A, 0x24, 0x0B, 0x1E, 0x0D, 0x0C, 0x26, 0x26, 0x03, 0x02, 0x1B, 0x1C, 0x23, + 0x03, 0x04, 0x07, 0x05, 0x06, 0x25, 0x25, 0x02, 0x0A, 0x0B, 0x1D, 0x0D, 0x08, 0x0C, 0x09, 0x1E, + 0x24, 0x26, 0x26, 0x08, 0x24, 0x06, 0x07, 0x9A, 0x12, 0xC1, 0x01, 0x2C, 0x00, 0xFF, 0xEC, 0x01, + 0xB0, 0x04, 0x00, 0x01, 0x08, 0x00, 0x00, 0x02, 0x08, 0x00, 0x00, 0x0D, 0xAB, 0x00, 0xD0, 0xC0, + 0x71, 0x71, 0x03, 0x08, 0x00, 0x00, 0x0B, 0x08, 0x72, 0x72, 0x0E, 0x0C, 0x20, 0x00, 0xC2, 0x08, + 0x08, 0x0D, 0x0C, 0x00, 0x00, 0x0D, 0x0C, 0x14, 0x14, 0x16, 0x08, 0x2C, 0x00, 0x2C, 0x11, 0x08, + 0x67, 0x02, 0x70, 0x15, 0x00, 0xCC, 0x00, 0x0A, 0x00, 0x33, 0x6E, 0x01, 0x94, 0xF3, 0x05, 0x08, + 0x11, 0x00, 0xFF, 0x0F, 0xFF, 0x0F, 0xCC, 0x01, 0x80, 0x01, 0x03, 0x00, 0x70, 0x00, 0x0C, 0x00, + 0x01, 0x0C, 0x00, 0xC0, 0x08, 0x44, 0x00, 0x10, 0x04, 0x04, 0x00, 0x06, 0x13, 0x07, 0x00, 0x80, + 0x10, 0x00, 0xA2, 0xA0, 0x00, 0x2C, 0x00, 0x01, 0x37, 0x00, 0x00, 0x00, 0x80, 0x48, 0x00, 0xD3, + 0x08, 0x00, 0x04, 0x00, 0x1F, 0x22, 0x20, 0x80, 0x0F, 0xF4, 0x20, 0x02, 0x28, 0x01, 0x00, 0x13, + 0x11, 0x01, 0x00, 0x10, 0xBE, 0xBF, 0x00, 0x12, 0x0F, 0x02, 0x00, 0x1F, 0x00, 0x01, 0x00, 0x2C, + 0x7F, 0x14, 0x00, 0x12, 0x00, 0x10, 0x00, 0x14, 0x18, 0x00, 0x06, 0xF3, 0x02, 0x30, 0x00, 0x2E, + 0x00, 0x33, 0x00, 0x30, 0x00, 0x33, 0x00, 0x35, 0x00, 0x30, 0x00, 0x32, 0x00, 0x05, 0x20, 0x00, + 0x0F, 0x18, 0x00, 0x05, 0x1F, 0x28, 0x02, 0x00, 0x0C, 0x11, 0x14, 0x5A, 0x00, 0x00, 0x5C, 0x00, + 0x11, 0x10, 0x0C, 0x00, 0x0C, 0x7A, 0x00, 0x05, 0x50, 0x01, 0xA4, 0x40, 0x06, 0x00, 0xCC, 0x00, + 0x09, 0x00, 0x4F, 0x00, 0x51, 0x18, 0x00, 0x00, 0x28, 0x01, 0x23, 0x40, 0x01, 0x0C, 0x02, 0x54, + 0xAB, 0x00, 0x0A, 0x04, 0x11, 0x58, 0x01, 0x03, 0x04, 0x00, 0x0F, 0xEC, 0x00, 0x0D, 0x17, 0x02, + 0x0C, 0x00, 0x17, 0x03, 0x60, 0x03, 0x02, 0xA1, 0x01, 0x7B, 0x22, 0x04, 0xFF, 0xFF, 0xAF, 0x4F, + 0x01, 0x28, 0x00, 0x00, 0x01, 0x00, 0x32, 0x8B, 0xFF, 0x07, 0x84, 0x00, 0xF0, 0x10, 0x32, 0x54, + 0x76, 0x10, 0x47, 0x32, 0x65, 0x10, 0x34, 0x76, 0x25, 0x01, 0x34, 0x67, 0x25, 0x01, 0x75, 0x64, + 0x32, 0x01, 0x72, 0x56, 0x34, 0x10, 0x23, 0x74, 0x56, 0x01, 0x45, 0x32, 0x67, 0x24, 0x00, 0x31, + 0x49, 0x92, 0x24, 0x04, 0x00, 0x0C, 0x01, 0x00, 0x13, 0x12, 0x04, 0x00, 0x0C, 0x94, 0x00, 0x80, + 0x2F, 0x41, 0x13, 0x1F, 0x14, 0x00, 0x01, 0x00, 0x7C, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x7F, 0x0B, + 0xD7, 0x06, 0x40, 0x82, 0x00, 0xB2, 0x08, 0x08, 0x03, 0x00, 0x00, 0x5C, 0x01, 0x00, 0x10, 0x10, + 0x10, 0x59, 0x03, 0x0B, 0x94, 0x04, 0x13, 0x37, 0x72, 0x01, 0x12, 0x10, 0x8D, 0x01, 0x31, 0x00, + 0x11, 0x01, 0xB9, 0x02, 0x00, 0x1F, 0x00, 0x13, 0x0A, 0xA9, 0x04, 0x17, 0x10, 0x77, 0x03, 0x05, + 0x12, 0x00, 0x00, 0x04, 0x04, 0xCF, 0x81, 0x10, 0x09, 0x28, 0x93, 0x32, 0xA5, 0x44, 0x5B, 0x8A, + 0x67, 0x76, 0x2C, 0x01, 0x05, 0x53, 0xFF, 0xEF, 0xFF, 0xEF, 0xC0, 0x01, 0x00, 0x57, 0xDC, 0xDC, + 0xDC, 0xDC, 0x0A, 0x01, 0x00, 0x01, 0x24, 0x01, 0x21, 0x03, 0x07, 0x04, 0x00, 0xF1, 0x03, 0x00, + 0x24, 0xFF, 0xFF, 0x00, 0x44, 0x57, 0x6E, 0x00, 0x28, 0x72, 0x39, 0x00, 0x10, 0x9C, 0x4B, 0x00, + 0x10, 0x58, 0x01, 0xB2, 0x08, 0x4C, 0x00, 0x00, 0x80, 0x20, 0x10, 0x0A, 0x00, 0x28, 0x10, 0xE0, + 0x02, 0x0C, 0x74, 0x01, 0x04, 0x08, 0x00, 0x17, 0x05, 0x10, 0x00, 0x17, 0x04, 0xF8, 0x03, 0xE4, + 0x01, 0x00, 0x02, 0x02, 0x01, 0x02, 0x03, 0x00, 0x04, 0x05, 0xC3, 0x71, 0x0F, 0x0F, 0x98, 0x05, + 0x15, 0x1F, 0xF3, 0x00, 0x00, 0xC0, 0x03, 0x14, 0x01, 0xDD, 0x00, 0x14, 0x80, 0xB6, 0x00, 0x15, + 0xF0, 0xD4, 0x03, 0x68, 0x43, 0xC3, 0xBA, 0xE4, 0xD3, 0x1E, 0xD2, 0x00, 0x2F, 0xF0, 0xFF, 0xEC, + 0x00, 0x05, 0x19, 0x08, 0x0E, 0x00, 0x14, 0x30, 0xAB, 0x00, 0x0F, 0x2C, 0x00, 0x02, 0x4F, 0x76, + 0x0C, 0x00, 0x04, 0x50, 0x02, 0x01, 0x05, 0x34, 0x00, 0x0F, 0x3A, 0x00, 0x04, 0x38, 0x7E, 0x16, + 0x40, 0x9F, 0x05, 0x0F, 0x38, 0x00, 0x17, 0x3F, 0x1E, 0x40, 0x04, 0xA8, 0x00, 0x08, 0x2F, 0x00, + 0xC0, 0x55, 0x00, 0x04, 0x3F, 0x46, 0x24, 0x00, 0x38, 0x00, 0x0A, 0x0F, 0x01, 0x00, 0x05, 0x22, + 0x46, 0x2C, 0x38, 0x00, 0x2F, 0xEC, 0x00, 0x3C, 0x01, 0x02, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, +}; + +constexpr inline const u8 SdramParamsErista4[0x3AC] = { + 0xFF, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x2C, 0x01, + 0x00, 0x01, 0x00, 0x0E, 0xFC, 0x05, 0x68, 0xBC, 0x01, 0x70, 0x0A, 0x00, 0x00, 0x00, 0x04, 0xB4, + 0x01, 0x70, 0x01, 0x32, 0x54, 0x76, 0xC8, 0xE6, 0x00, 0x70, 0x24, 0x00, 0xC8, 0x34, 0x00, 0x00, + 0x00, 0x02, 0x80, 0x18, 0x40, 0x00, 0x00, 0x00, 0x40, 0x18, 0x00, 0xFF, 0x01, 0xFF, 0xFF, 0x1F, + 0x00, 0xD8, 0x51, 0x1A, 0xA0, 0x00, 0x00, 0x50, 0x05, 0x00, 0x00, 0x77, 0x00, 0x04, 0x00, 0x01, + 0xD3, 0xA6, 0xA6, 0xAF, 0xB3, 0x3C, 0x9E, 0x00, 0x00, 0x03, 0x03, 0xE0, 0xC1, 0x04, 0x01, 0x00, + 0x00, 0x3C, 0x00, 0x19, 0x1F, 0x01, 0x00, 0x42, 0x00, 0x00, 0x04, 0x08, 0x46, 0x00, 0x57, 0xA1, + 0x01, 0x00, 0x00, 0x32, 0x64, 0x00, 0x00, 0xC3, 0x00, 0x13, 0x02, 0x0C, 0x00, 0x13, 0x03, 0x04, + 0x00, 0xD7, 0x1E, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x13, 0x2C, + 0x00, 0x10, 0x09, 0xC8, 0x00, 0x07, 0x10, 0x00, 0x13, 0x0B, 0x28, 0x00, 0x13, 0x08, 0x0C, 0x00, + 0x00, 0x1C, 0x00, 0x57, 0x20, 0x00, 0x00, 0x00, 0x06, 0x04, 0x00, 0x13, 0x03, 0x2C, 0x00, 0x13, + 0x04, 0x10, 0x00, 0x17, 0x02, 0x10, 0x00, 0x13, 0x08, 0x40, 0x00, 0x13, 0x05, 0x1C, 0x00, 0x04, + 0x58, 0x00, 0x13, 0x02, 0x18, 0x00, 0x04, 0x64, 0x00, 0x00, 0xA6, 0x00, 0xB5, 0x12, 0x00, 0x00, + 0x00, 0x14, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x0C, 0x00, 0x01, 0x58, 0x01, 0x03, 0x61, 0x00, + 0x13, 0xC1, 0x50, 0x00, 0x17, 0x08, 0xC8, 0x00, 0x13, 0x03, 0x28, 0x00, 0x17, 0x05, 0x54, 0x00, + 0x13, 0x27, 0x04, 0x00, 0x13, 0x05, 0x04, 0x00, 0x13, 0x04, 0xD8, 0x00, 0x08, 0x0C, 0x00, 0xA0, + 0x1C, 0x03, 0x00, 0x00, 0x0D, 0xA0, 0x60, 0x91, 0xBF, 0x3B, 0x5A, 0x00, 0xF1, 0x28, 0xF3, 0x0C, + 0x04, 0x05, 0x1B, 0x06, 0x02, 0x03, 0x07, 0x1C, 0x23, 0x25, 0x25, 0x05, 0x08, 0x1D, 0x09, 0x0A, + 0x24, 0x0B, 0x1E, 0x0D, 0x0C, 0x26, 0x26, 0x03, 0x02, 0x1B, 0x1C, 0x23, 0x03, 0x04, 0x07, 0x05, + 0x06, 0x25, 0x25, 0x02, 0x0A, 0x0B, 0x1D, 0x0D, 0x08, 0x0C, 0x09, 0x1E, 0x24, 0x26, 0x26, 0x08, + 0x24, 0x06, 0x07, 0x9A, 0x12, 0xC1, 0x01, 0x2C, 0x00, 0xFF, 0xEC, 0x01, 0xB0, 0x04, 0x00, 0x01, + 0x08, 0x00, 0x00, 0x02, 0x08, 0x00, 0x00, 0x0D, 0xAB, 0x00, 0xD0, 0xC0, 0x71, 0x71, 0x03, 0x08, + 0x00, 0x00, 0x0B, 0x08, 0x72, 0x72, 0x0E, 0x0C, 0x20, 0x00, 0xC2, 0x08, 0x08, 0x0D, 0x0C, 0x00, + 0x00, 0x0D, 0x0C, 0x14, 0x14, 0x16, 0x08, 0x2C, 0x00, 0x2C, 0x11, 0x08, 0x67, 0x02, 0x70, 0x15, + 0x00, 0xCC, 0x00, 0x0A, 0x00, 0x33, 0x6E, 0x01, 0x94, 0xF3, 0x05, 0x08, 0x11, 0x00, 0xFF, 0x0F, + 0xFF, 0x0F, 0xCC, 0x01, 0x80, 0x01, 0x03, 0x00, 0x70, 0x00, 0x0C, 0x00, 0x01, 0x0C, 0x00, 0xC0, + 0x08, 0x44, 0x00, 0x10, 0x04, 0x04, 0x00, 0x06, 0x13, 0x07, 0x00, 0x80, 0x10, 0x00, 0xA2, 0xA0, + 0x00, 0x2C, 0x00, 0x01, 0x37, 0x00, 0x00, 0x00, 0x80, 0x48, 0x00, 0xD3, 0x08, 0x00, 0x04, 0x00, + 0x1F, 0x22, 0x20, 0x80, 0x0F, 0xF4, 0x20, 0x02, 0x28, 0x01, 0x00, 0x13, 0x11, 0x01, 0x00, 0x10, + 0xBE, 0xBF, 0x00, 0x12, 0x0F, 0x02, 0x00, 0x1F, 0x00, 0x01, 0x00, 0x2C, 0x7F, 0x14, 0x00, 0x12, + 0x00, 0x10, 0x00, 0x14, 0x18, 0x00, 0x06, 0xF3, 0x02, 0x30, 0x00, 0x2E, 0x00, 0x33, 0x00, 0x30, + 0x00, 0x33, 0x00, 0x35, 0x00, 0x30, 0x00, 0x32, 0x00, 0x05, 0x20, 0x00, 0x0F, 0x18, 0x00, 0x05, + 0x1F, 0x28, 0x02, 0x00, 0x0C, 0x11, 0x14, 0x5A, 0x00, 0x00, 0x5C, 0x00, 0x11, 0x10, 0x0C, 0x00, + 0x0C, 0x7A, 0x00, 0x05, 0x50, 0x01, 0xA4, 0x40, 0x06, 0x00, 0xCC, 0x00, 0x09, 0x00, 0x4F, 0x00, + 0x51, 0x18, 0x00, 0x00, 0x28, 0x01, 0x23, 0x40, 0x01, 0x3C, 0x02, 0x54, 0xAB, 0x00, 0x0A, 0x04, + 0x11, 0x58, 0x01, 0x03, 0x04, 0x00, 0x0F, 0xEC, 0x00, 0x0D, 0x17, 0x02, 0x0C, 0x00, 0x17, 0x03, + 0x60, 0x03, 0x02, 0xA1, 0x01, 0x7B, 0x22, 0x04, 0xFF, 0xFF, 0xAF, 0x4F, 0x01, 0x28, 0x00, 0x00, + 0x01, 0x00, 0x32, 0x8B, 0xFF, 0x07, 0x84, 0x00, 0xF0, 0x10, 0x32, 0x54, 0x76, 0x10, 0x47, 0x32, + 0x65, 0x10, 0x34, 0x76, 0x25, 0x01, 0x34, 0x67, 0x25, 0x01, 0x75, 0x64, 0x32, 0x01, 0x72, 0x56, + 0x34, 0x10, 0x23, 0x74, 0x56, 0x01, 0x45, 0x32, 0x67, 0x24, 0x00, 0x31, 0x49, 0x92, 0x24, 0x04, + 0x00, 0x0C, 0x01, 0x00, 0x13, 0x1B, 0x04, 0x00, 0x0C, 0x94, 0x00, 0x80, 0x2F, 0x41, 0x13, 0x1F, + 0x14, 0x00, 0x01, 0x00, 0x7C, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x7F, 0x0B, 0xD7, 0x06, 0x40, 0x82, + 0x00, 0xB2, 0x08, 0x08, 0x03, 0x00, 0x00, 0x5C, 0x01, 0x00, 0x10, 0x10, 0x10, 0x59, 0x03, 0x0B, + 0x94, 0x04, 0x13, 0x37, 0x72, 0x01, 0x12, 0x10, 0x8D, 0x01, 0x31, 0x00, 0x11, 0x01, 0xB9, 0x02, + 0x00, 0x1F, 0x00, 0x13, 0x0A, 0xA9, 0x04, 0x17, 0x10, 0x77, 0x03, 0x05, 0x12, 0x00, 0x00, 0x04, + 0x04, 0xCF, 0x81, 0x10, 0x09, 0x28, 0x93, 0x32, 0xA5, 0x44, 0x5B, 0x8A, 0x67, 0x76, 0x2C, 0x01, + 0x05, 0x53, 0xFF, 0xEF, 0xFF, 0xEF, 0xC0, 0x01, 0x00, 0x57, 0xDC, 0xDC, 0xDC, 0xDC, 0x0A, 0x01, + 0x00, 0x01, 0x24, 0x01, 0x21, 0x03, 0x0C, 0x04, 0x00, 0xF1, 0x03, 0x00, 0x24, 0xFF, 0xFF, 0x00, + 0x44, 0x57, 0x6E, 0x00, 0x28, 0x72, 0x39, 0x00, 0x10, 0x9C, 0x4B, 0x00, 0x18, 0x58, 0x01, 0xB2, + 0x08, 0x4C, 0x00, 0x00, 0x80, 0x20, 0x10, 0x0A, 0x00, 0x28, 0x10, 0xE0, 0x02, 0x0C, 0x74, 0x01, + 0x04, 0x08, 0x00, 0x17, 0x05, 0x10, 0x00, 0x17, 0x04, 0xEC, 0x03, 0xE4, 0x01, 0x00, 0x02, 0x02, + 0x01, 0x02, 0x03, 0x00, 0x04, 0x05, 0xC3, 0x71, 0x0F, 0x0F, 0x98, 0x05, 0x15, 0x1F, 0xF3, 0x00, + 0x00, 0xC0, 0x03, 0x14, 0x01, 0xDD, 0x00, 0x14, 0x80, 0xB6, 0x00, 0x15, 0xF0, 0xD4, 0x03, 0x68, + 0x43, 0xC3, 0xBA, 0xE4, 0xD3, 0x1E, 0xD2, 0x00, 0x2F, 0xF0, 0xFF, 0xEC, 0x00, 0x05, 0x19, 0x08, + 0x0E, 0x00, 0x14, 0x30, 0xAB, 0x00, 0x0F, 0x2C, 0x00, 0x02, 0x4F, 0x76, 0x0C, 0x00, 0x04, 0x50, + 0x02, 0x01, 0x05, 0x34, 0x00, 0x0F, 0x3A, 0x00, 0x04, 0x38, 0x7E, 0x16, 0x40, 0x9F, 0x05, 0x0F, + 0x38, 0x00, 0x17, 0x3F, 0x1E, 0x40, 0x04, 0xA8, 0x00, 0x08, 0x2F, 0x00, 0xC0, 0x55, 0x00, 0x04, + 0x3F, 0x46, 0x24, 0x00, 0x38, 0x00, 0x0A, 0x0F, 0x01, 0x00, 0x05, 0x22, 0x46, 0x2C, 0x38, 0x00, + 0x2F, 0xEC, 0x00, 0x3C, 0x01, 0x02, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, +}; + +constexpr inline const u8 SdramParamsErista5[0x3B0] = { + 0xFF, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x2C, 0x01, + 0x00, 0x01, 0x00, 0x0E, 0xFC, 0x05, 0x68, 0xBC, 0x01, 0x70, 0x0A, 0x00, 0x00, 0x00, 0x04, 0xB4, + 0x01, 0x70, 0x01, 0x32, 0x54, 0x76, 0xC8, 0xE6, 0x00, 0x70, 0x24, 0x00, 0xC8, 0x34, 0x00, 0x00, + 0x00, 0x02, 0x80, 0x18, 0x40, 0x00, 0x00, 0x00, 0x40, 0x18, 0x00, 0xFF, 0x01, 0xFF, 0xFF, 0x1F, + 0x00, 0xD8, 0x51, 0x1A, 0xA0, 0x00, 0x00, 0x50, 0x05, 0x00, 0x00, 0x77, 0x00, 0x04, 0x00, 0x01, + 0xD3, 0xA6, 0xA6, 0xAF, 0xB3, 0x3C, 0x9E, 0x00, 0x00, 0x03, 0x03, 0xE0, 0xC1, 0x04, 0x01, 0x00, + 0x00, 0x3C, 0x00, 0x19, 0x1F, 0x01, 0x00, 0x42, 0x00, 0x00, 0x04, 0x08, 0x46, 0x00, 0x57, 0xA1, + 0x01, 0x00, 0x00, 0x32, 0x64, 0x00, 0x00, 0xC3, 0x00, 0x13, 0x02, 0x0C, 0x00, 0x13, 0x03, 0x04, + 0x00, 0xD7, 0x1E, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x25, 0x00, 0x00, 0x00, 0x13, 0x2C, + 0x00, 0x10, 0x09, 0xC8, 0x00, 0x07, 0x10, 0x00, 0x13, 0x0D, 0x04, 0x00, 0x53, 0x08, 0x00, 0x00, + 0x00, 0x0B, 0x1C, 0x00, 0x57, 0x20, 0x00, 0x00, 0x00, 0x06, 0x04, 0x00, 0x13, 0x03, 0x2C, 0x00, + 0x13, 0x04, 0x10, 0x00, 0x17, 0x02, 0x10, 0x00, 0x13, 0x08, 0x40, 0x00, 0x13, 0x05, 0x1C, 0x00, + 0x04, 0x58, 0x00, 0x13, 0x02, 0x18, 0x00, 0x03, 0x5F, 0x01, 0x10, 0x80, 0x0A, 0x00, 0xB5, 0x12, + 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x0C, 0x00, 0x01, 0x58, 0x01, 0x03, + 0x61, 0x00, 0x13, 0xC1, 0x50, 0x00, 0x17, 0x08, 0xC8, 0x00, 0x13, 0x03, 0x2C, 0x00, 0x17, 0x05, + 0x54, 0x00, 0x13, 0x27, 0x04, 0x00, 0x13, 0x05, 0x04, 0x00, 0x13, 0x04, 0xD8, 0x00, 0x13, 0x05, + 0x30, 0x00, 0x00, 0x0C, 0x00, 0xA0, 0x1C, 0x03, 0x00, 0x00, 0x0D, 0xA0, 0x60, 0x91, 0xBF, 0x3B, + 0x5A, 0x00, 0xF1, 0x28, 0xF3, 0x0C, 0x04, 0x05, 0x1B, 0x06, 0x02, 0x03, 0x07, 0x1C, 0x23, 0x25, + 0x25, 0x05, 0x08, 0x1D, 0x09, 0x0A, 0x24, 0x0B, 0x1E, 0x0D, 0x0C, 0x26, 0x26, 0x03, 0x02, 0x1B, + 0x1C, 0x23, 0x03, 0x04, 0x07, 0x05, 0x06, 0x25, 0x25, 0x02, 0x0A, 0x0B, 0x1D, 0x0D, 0x08, 0x0C, + 0x09, 0x1E, 0x24, 0x26, 0x26, 0x08, 0x24, 0x06, 0x07, 0x9A, 0x12, 0xC1, 0x01, 0x2C, 0x00, 0xFF, + 0xEC, 0x01, 0xB0, 0x04, 0x00, 0x01, 0x08, 0x00, 0x00, 0x02, 0x08, 0x00, 0x00, 0x0D, 0xAB, 0x00, + 0xD0, 0xC0, 0x71, 0x71, 0x03, 0x08, 0x00, 0x00, 0x0B, 0x08, 0x72, 0x72, 0x0E, 0x0C, 0x20, 0x00, + 0xC2, 0x08, 0x08, 0x0D, 0x0C, 0x00, 0x00, 0x0D, 0x0C, 0x14, 0x14, 0x16, 0x08, 0x2C, 0x00, 0x2C, + 0x11, 0x08, 0x67, 0x02, 0x70, 0x15, 0x00, 0xCC, 0x00, 0x0A, 0x00, 0x33, 0x6E, 0x01, 0x94, 0xF3, + 0x05, 0x08, 0x11, 0x00, 0xFF, 0x0F, 0xFF, 0x0F, 0xCC, 0x01, 0x80, 0x01, 0x03, 0x00, 0x70, 0x00, + 0x0C, 0x00, 0x01, 0x0C, 0x00, 0xC0, 0x08, 0x44, 0x00, 0x10, 0x04, 0x04, 0x00, 0x06, 0x13, 0x07, + 0x00, 0x80, 0x10, 0x00, 0x62, 0xA0, 0x00, 0x2C, 0x00, 0x01, 0x37, 0x52, 0x01, 0x01, 0x6C, 0x00, + 0xC3, 0x00, 0x04, 0x00, 0x1F, 0x22, 0x20, 0x80, 0x0F, 0xF4, 0x20, 0x02, 0x28, 0x01, 0x00, 0x13, + 0x11, 0x01, 0x00, 0x10, 0xBE, 0xBF, 0x00, 0x12, 0x0F, 0x02, 0x00, 0x1F, 0x00, 0x01, 0x00, 0x2C, + 0x7F, 0x15, 0x00, 0x12, 0x00, 0x12, 0x00, 0x16, 0x18, 0x00, 0x06, 0xF5, 0x00, 0x32, 0x00, 0x2F, + 0x00, 0x32, 0x00, 0x31, 0x00, 0x34, 0x00, 0x36, 0x00, 0x2F, 0x00, 0x33, 0x0C, 0x02, 0x0F, 0x18, + 0x00, 0x05, 0x1F, 0x28, 0x02, 0x00, 0x0C, 0x13, 0x15, 0x5A, 0x00, 0x02, 0x5E, 0x00, 0x3B, 0x16, + 0x00, 0x15, 0x78, 0x00, 0x05, 0x50, 0x01, 0xA4, 0x40, 0x06, 0x00, 0xCC, 0x00, 0x09, 0x00, 0x4F, + 0x00, 0x51, 0x18, 0x00, 0x00, 0x28, 0x01, 0x23, 0x40, 0x01, 0x0C, 0x02, 0x54, 0xAB, 0x00, 0x0A, + 0x04, 0x11, 0x58, 0x01, 0x03, 0x04, 0x00, 0x0F, 0xEC, 0x00, 0x0D, 0x17, 0x02, 0x0C, 0x00, 0x17, + 0x03, 0x60, 0x03, 0x02, 0xA1, 0x01, 0x7B, 0x22, 0x04, 0xFF, 0xFF, 0xAF, 0x4F, 0x01, 0x28, 0x00, + 0x00, 0x01, 0x00, 0x32, 0x8B, 0xFF, 0x07, 0x84, 0x00, 0xF0, 0x10, 0x32, 0x54, 0x76, 0x10, 0x47, + 0x32, 0x65, 0x10, 0x34, 0x76, 0x25, 0x01, 0x34, 0x67, 0x25, 0x01, 0x75, 0x64, 0x32, 0x01, 0x72, + 0x56, 0x34, 0x10, 0x23, 0x74, 0x56, 0x01, 0x45, 0x32, 0x67, 0x24, 0x00, 0x31, 0x49, 0x92, 0x24, + 0x04, 0x00, 0x0C, 0x01, 0x00, 0x13, 0x12, 0x04, 0x00, 0x0C, 0x94, 0x00, 0x80, 0x2F, 0x41, 0x13, + 0x1F, 0x14, 0x00, 0x01, 0x00, 0x7C, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x7F, 0x0B, 0xD7, 0x06, 0x40, + 0x82, 0x00, 0xB2, 0x08, 0x08, 0x03, 0x00, 0x00, 0x5C, 0x01, 0x00, 0x10, 0x10, 0x10, 0x59, 0x03, + 0x0B, 0x94, 0x04, 0x11, 0x37, 0x16, 0x03, 0x30, 0x00, 0x00, 0x10, 0xAD, 0x00, 0x51, 0x30, 0x00, + 0x00, 0x11, 0x01, 0xB9, 0x02, 0x00, 0x1F, 0x00, 0x13, 0x0A, 0xA9, 0x04, 0x17, 0x10, 0x77, 0x03, + 0x05, 0x12, 0x00, 0x00, 0x04, 0x04, 0xCF, 0x81, 0x10, 0x09, 0x28, 0x93, 0x32, 0xA5, 0x44, 0x5B, + 0x8A, 0x67, 0x76, 0x2C, 0x01, 0x05, 0x53, 0xFF, 0xEF, 0xFF, 0xEF, 0xC0, 0x01, 0x00, 0x57, 0xDC, + 0xDC, 0xDC, 0xDC, 0x0A, 0x01, 0x00, 0x01, 0x24, 0x01, 0x21, 0x03, 0x07, 0x04, 0x00, 0xF1, 0x03, + 0x00, 0x24, 0xFF, 0xFF, 0x00, 0x44, 0x57, 0x6E, 0x00, 0x28, 0x72, 0x39, 0x00, 0x10, 0x9C, 0x4B, + 0x00, 0x10, 0x58, 0x01, 0xB2, 0x08, 0x4C, 0x00, 0x00, 0x80, 0x20, 0x10, 0x0A, 0x00, 0x28, 0x10, + 0xE0, 0x02, 0x0C, 0x74, 0x01, 0x04, 0x08, 0x00, 0x17, 0x05, 0x10, 0x00, 0x08, 0xF8, 0x03, 0xE4, + 0x01, 0x00, 0x02, 0x02, 0x01, 0x02, 0x03, 0x00, 0x04, 0x05, 0xC3, 0x71, 0x0F, 0x0F, 0x98, 0x05, + 0x14, 0x1F, 0xD8, 0x00, 0x01, 0xC0, 0x03, 0x14, 0x01, 0xDD, 0x00, 0x14, 0x80, 0xB6, 0x00, 0x15, + 0xF0, 0xD4, 0x03, 0x68, 0x43, 0xC3, 0xBA, 0xE4, 0xD3, 0x1E, 0xD2, 0x00, 0x2F, 0xF0, 0xFF, 0xEC, + 0x00, 0x05, 0x19, 0x08, 0x0E, 0x00, 0x14, 0x30, 0xAB, 0x00, 0x0F, 0x2C, 0x00, 0x02, 0x4F, 0x76, + 0x0C, 0x00, 0x04, 0x50, 0x02, 0x01, 0x05, 0x34, 0x00, 0x0F, 0x3A, 0x00, 0x04, 0x38, 0x7E, 0x16, + 0x40, 0x9F, 0x05, 0x0F, 0x38, 0x00, 0x17, 0x3F, 0x1E, 0x40, 0x04, 0xA8, 0x00, 0x08, 0x2F, 0x00, + 0xC0, 0x55, 0x00, 0x04, 0x3F, 0x46, 0x24, 0x00, 0x38, 0x00, 0x0A, 0x0F, 0x01, 0x00, 0x05, 0x22, + 0x46, 0x2C, 0x38, 0x00, 0x2F, 0xEC, 0x00, 0x3C, 0x01, 0x02, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, +}; + +constexpr inline const u8 SdramParamsErista6[0x3B3] = { + 0xFF, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x2C, 0x01, + 0x00, 0x01, 0x00, 0x0E, 0xFC, 0x05, 0x68, 0xBC, 0x01, 0x70, 0x0A, 0x00, 0x00, 0x00, 0x04, 0xB4, + 0x01, 0x70, 0x01, 0x32, 0x54, 0x76, 0xC8, 0xE6, 0x00, 0x70, 0x24, 0x00, 0xC8, 0x34, 0x00, 0x00, + 0x00, 0x02, 0x80, 0x18, 0x40, 0x00, 0x00, 0x00, 0x40, 0x18, 0x00, 0xFF, 0x01, 0xFF, 0xFF, 0x1F, + 0x00, 0xD8, 0x51, 0x1A, 0xA0, 0x00, 0x00, 0x50, 0x05, 0x00, 0x00, 0x77, 0x00, 0x04, 0x00, 0x01, + 0xD3, 0xA6, 0xA6, 0xAF, 0xB3, 0x3C, 0x9E, 0x00, 0x00, 0x03, 0x03, 0xE0, 0xC1, 0x04, 0x01, 0x00, + 0x00, 0x3C, 0x00, 0x19, 0x1F, 0x01, 0x00, 0x42, 0x00, 0x00, 0x04, 0x08, 0x46, 0x00, 0x57, 0xA1, + 0x01, 0x00, 0x00, 0x32, 0x64, 0x00, 0x00, 0xC3, 0x00, 0x13, 0x02, 0x0C, 0x00, 0x13, 0x03, 0x04, + 0x00, 0xD7, 0x1E, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x3A, 0x00, 0x00, 0x00, 0x1D, 0x2C, + 0x00, 0x10, 0x09, 0xC8, 0x00, 0x07, 0x10, 0x00, 0x13, 0x0B, 0x28, 0x00, 0x13, 0x08, 0x0C, 0x00, + 0x00, 0x1C, 0x00, 0x57, 0x20, 0x00, 0x00, 0x00, 0x06, 0x04, 0x00, 0x13, 0x03, 0x2C, 0x00, 0x13, + 0x04, 0x10, 0x00, 0x17, 0x02, 0x10, 0x00, 0x13, 0x08, 0x40, 0x00, 0x13, 0x05, 0x1C, 0x00, 0x04, + 0x58, 0x00, 0x13, 0x02, 0x18, 0x00, 0x04, 0x64, 0x00, 0x00, 0xA6, 0x00, 0xB5, 0x12, 0x00, 0x00, + 0x00, 0x14, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x0C, 0x00, 0x01, 0x58, 0x01, 0x03, 0x61, 0x00, + 0x13, 0xC1, 0x50, 0x00, 0x17, 0x08, 0xC8, 0x00, 0x13, 0x03, 0x2C, 0x00, 0x17, 0x05, 0x54, 0x00, + 0x13, 0x3B, 0x04, 0x00, 0x13, 0x05, 0x04, 0x00, 0x13, 0x04, 0xD8, 0x00, 0x13, 0x05, 0x30, 0x00, + 0x00, 0x0C, 0x00, 0x90, 0x1C, 0x03, 0x00, 0x00, 0x0D, 0xA0, 0x60, 0x91, 0xBF, 0x29, 0x00, 0xF1, + 0x29, 0x00, 0xF3, 0x0C, 0x04, 0x05, 0x1B, 0x06, 0x02, 0x03, 0x07, 0x1C, 0x23, 0x25, 0x25, 0x05, + 0x08, 0x1D, 0x09, 0x0A, 0x24, 0x0B, 0x1E, 0x0D, 0x0C, 0x26, 0x26, 0x03, 0x02, 0x1B, 0x1C, 0x23, + 0x03, 0x04, 0x07, 0x05, 0x06, 0x25, 0x25, 0x02, 0x0A, 0x0B, 0x1D, 0x0D, 0x08, 0x0C, 0x09, 0x1E, + 0x24, 0x26, 0x26, 0x08, 0x24, 0x06, 0x07, 0x9A, 0x12, 0xC1, 0x01, 0x2C, 0x00, 0xFF, 0xEC, 0x01, + 0xB0, 0x04, 0x00, 0x01, 0x08, 0x00, 0x00, 0x02, 0x08, 0x00, 0x00, 0x0D, 0xAB, 0x00, 0xD0, 0xC0, + 0x71, 0x71, 0x03, 0x08, 0x00, 0x00, 0x0B, 0x08, 0x72, 0x72, 0x0E, 0x0C, 0x20, 0x00, 0xC2, 0x08, + 0x08, 0x0D, 0x0C, 0x00, 0x00, 0x0D, 0x0C, 0x14, 0x14, 0x16, 0x08, 0x2C, 0x00, 0x2C, 0x11, 0x08, + 0x67, 0x02, 0x70, 0x15, 0x00, 0xCC, 0x00, 0x0A, 0x00, 0x33, 0x6E, 0x01, 0x94, 0xF3, 0x05, 0x08, + 0x11, 0x00, 0xFF, 0x0F, 0xFF, 0x0F, 0xCC, 0x01, 0x80, 0x01, 0x03, 0x00, 0x70, 0x00, 0x0C, 0x00, + 0x01, 0x0C, 0x00, 0xC0, 0x08, 0x44, 0x00, 0x10, 0x04, 0x04, 0x00, 0x06, 0x13, 0x07, 0x00, 0x80, + 0x10, 0x00, 0xA2, 0xA0, 0x00, 0x2C, 0x00, 0x01, 0x37, 0x00, 0x00, 0x00, 0x80, 0x48, 0x00, 0xD3, + 0x08, 0x00, 0x04, 0x00, 0x1F, 0x22, 0x20, 0x80, 0x0F, 0xF4, 0x20, 0x02, 0x28, 0x01, 0x00, 0x13, + 0x11, 0x01, 0x00, 0x10, 0xBE, 0xBF, 0x00, 0x12, 0x0F, 0x02, 0x00, 0x1F, 0x00, 0x01, 0x00, 0x2C, + 0x7F, 0x15, 0x00, 0x12, 0x00, 0x12, 0x00, 0x16, 0x18, 0x00, 0x06, 0xF5, 0x00, 0x32, 0x00, 0x2F, + 0x00, 0x32, 0x00, 0x31, 0x00, 0x34, 0x00, 0x36, 0x00, 0x2F, 0x00, 0x33, 0x0C, 0x02, 0x0F, 0x18, + 0x00, 0x05, 0x1F, 0x28, 0x02, 0x00, 0x0C, 0x13, 0x15, 0x5A, 0x00, 0x02, 0x5E, 0x00, 0x3B, 0x16, + 0x00, 0x15, 0x78, 0x00, 0x05, 0x50, 0x01, 0xA4, 0x40, 0x06, 0x00, 0xCC, 0x00, 0x09, 0x00, 0x4F, + 0x00, 0x51, 0x18, 0x00, 0x00, 0x28, 0x01, 0x23, 0x40, 0x01, 0x0C, 0x02, 0x54, 0xAB, 0x00, 0x0A, + 0x04, 0x11, 0x58, 0x01, 0x03, 0x04, 0x00, 0x0F, 0xEC, 0x00, 0x0D, 0x17, 0x02, 0x0C, 0x00, 0x17, + 0x03, 0x60, 0x03, 0x02, 0xA1, 0x01, 0x7B, 0x22, 0x04, 0xFF, 0xFF, 0xAF, 0x4F, 0x01, 0x28, 0x00, + 0x00, 0x01, 0x00, 0x32, 0x8B, 0xFF, 0x07, 0x84, 0x00, 0xF0, 0x10, 0x32, 0x54, 0x76, 0x10, 0x47, + 0x32, 0x65, 0x10, 0x34, 0x76, 0x25, 0x01, 0x34, 0x67, 0x25, 0x01, 0x75, 0x64, 0x32, 0x01, 0x72, + 0x56, 0x34, 0x10, 0x23, 0x74, 0x56, 0x01, 0x45, 0x32, 0x67, 0x24, 0x00, 0x31, 0x49, 0x92, 0x24, + 0x04, 0x00, 0x0C, 0x01, 0x00, 0x13, 0x12, 0x04, 0x00, 0x0C, 0x94, 0x00, 0x80, 0x2F, 0x41, 0x13, + 0x1F, 0x14, 0x00, 0x01, 0x00, 0x7C, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0x7F, 0x0B, 0xD7, 0x06, 0x40, + 0x82, 0x00, 0xB2, 0x08, 0x08, 0x03, 0x00, 0x00, 0x5C, 0x01, 0x00, 0x10, 0x10, 0x10, 0x59, 0x03, + 0x0B, 0x94, 0x04, 0x11, 0x37, 0x16, 0x03, 0x30, 0x00, 0x00, 0x10, 0x05, 0x00, 0x51, 0x30, 0x00, + 0x00, 0x11, 0x01, 0xB9, 0x02, 0x00, 0x1F, 0x00, 0x13, 0x0A, 0xA9, 0x04, 0x17, 0x10, 0x77, 0x03, + 0x05, 0x12, 0x00, 0x00, 0x04, 0x04, 0xCF, 0x81, 0x10, 0x09, 0x28, 0x93, 0x32, 0xA5, 0x44, 0x5B, + 0x8A, 0x67, 0x76, 0x2C, 0x01, 0x05, 0x53, 0xFF, 0xEF, 0xFF, 0xEF, 0xC0, 0x01, 0x00, 0x57, 0xDC, + 0xDC, 0xDC, 0xDC, 0x0A, 0x01, 0x00, 0x01, 0x24, 0x01, 0x21, 0x03, 0x07, 0x04, 0x00, 0xF1, 0x03, + 0x00, 0x24, 0xFF, 0xFF, 0x00, 0x44, 0x57, 0x6E, 0x00, 0x28, 0x72, 0x39, 0x00, 0x10, 0x9C, 0x4B, + 0x00, 0x10, 0x58, 0x01, 0xB2, 0x08, 0x4C, 0x00, 0x00, 0x80, 0x20, 0x10, 0x0A, 0x00, 0x28, 0x10, + 0xE0, 0x02, 0x0C, 0x74, 0x01, 0x04, 0x08, 0x00, 0x17, 0x05, 0x10, 0x00, 0x13, 0x04, 0x10, 0x00, + 0x11, 0x07, 0x10, 0x00, 0xC4, 0x02, 0x02, 0x01, 0x02, 0x03, 0x00, 0x04, 0x05, 0xA3, 0x72, 0x0F, + 0x0F, 0x98, 0x05, 0x15, 0x1F, 0xF3, 0x00, 0x00, 0xC0, 0x03, 0x14, 0x01, 0xDD, 0x00, 0x14, 0x80, + 0xB6, 0x00, 0x15, 0xF0, 0xD4, 0x03, 0x68, 0x43, 0xC3, 0xBA, 0xE4, 0xD3, 0x1E, 0xD2, 0x00, 0x2F, + 0xF0, 0xFF, 0xEC, 0x00, 0x05, 0x19, 0x08, 0x0E, 0x00, 0x14, 0x30, 0xAB, 0x00, 0x0F, 0x2C, 0x00, + 0x02, 0x4F, 0x76, 0x0C, 0x00, 0x04, 0x50, 0x02, 0x01, 0x05, 0x34, 0x00, 0x0F, 0x3A, 0x00, 0x04, + 0x38, 0x7E, 0x16, 0x40, 0x9F, 0x05, 0x0F, 0x38, 0x00, 0x17, 0x3F, 0x1E, 0x40, 0x04, 0xA8, 0x00, + 0x08, 0x2F, 0x00, 0xC0, 0x55, 0x00, 0x04, 0x3F, 0x46, 0x24, 0x00, 0x38, 0x00, 0x0A, 0x0F, 0x01, + 0x00, 0x05, 0x22, 0x46, 0x2C, 0x38, 0x00, 0x2F, 0xEC, 0x00, 0x3C, 0x01, 0x02, 0x50, 0x00, 0x00, + 0x00, 0x00, 0x00, +}; + +constexpr inline const u8 SdramParamsMariko0[0x3A9] = { + 0xFF, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x2C, 0x01, + 0x00, 0x01, 0x00, 0x96, 0x88, 0x02, 0x80, 0x18, 0x40, 0x00, 0x00, 0x00, 0x40, 0x14, 0x00, 0x82, + 0xFF, 0xFF, 0x1F, 0x00, 0xD8, 0x51, 0x1A, 0xA0, 0x0E, 0x00, 0x11, 0x88, 0x04, 0x00, 0x26, 0x20, + 0x12, 0x0C, 0x00, 0x02, 0x04, 0x00, 0xF7, 0x00, 0x00, 0x00, 0xBC, 0xBC, 0xC5, 0xB3, 0x3C, 0x9E, + 0x00, 0x00, 0x02, 0x03, 0xE0, 0xC1, 0x04, 0x01, 0x00, 0x17, 0x3F, 0x01, 0x00, 0x00, 0x38, 0x00, + 0xD0, 0x04, 0x08, 0x00, 0x00, 0x50, 0x50, 0x50, 0x00, 0xA1, 0x01, 0x00, 0x00, 0x30, 0x39, 0x00, + 0x62, 0x10, 0x00, 0x16, 0x00, 0x10, 0x90, 0x80, 0x00, 0x03, 0x74, 0x00, 0x13, 0x03, 0x04, 0x00, + 0xD7, 0x1E, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x3A, 0x00, 0x00, 0x00, 0x1D, 0x94, 0x00, + 0x57, 0x09, 0x00, 0x00, 0x00, 0x04, 0x10, 0x00, 0x13, 0x0B, 0x28, 0x00, 0x13, 0x08, 0x0C, 0x00, + 0x00, 0x1C, 0x00, 0x53, 0x17, 0x00, 0x00, 0x00, 0x15, 0x08, 0x00, 0x13, 0x1B, 0x28, 0x00, 0x57, + 0x20, 0x00, 0x00, 0x00, 0x06, 0x04, 0x00, 0x13, 0x03, 0x18, 0x00, 0x13, 0x04, 0x10, 0x00, 0x17, + 0x02, 0x10, 0x00, 0x00, 0x4C, 0x00, 0x53, 0x0E, 0x00, 0x00, 0x00, 0x05, 0x1C, 0x00, 0x05, 0x24, + 0x01, 0x03, 0x6C, 0x00, 0x03, 0xD7, 0x01, 0x10, 0x80, 0x0A, 0x00, 0x00, 0x0F, 0x01, 0x93, 0x18, + 0x00, 0x00, 0x00, 0x1A, 0x00, 0x00, 0x00, 0x16, 0x0C, 0x00, 0x10, 0x0A, 0x48, 0x00, 0x03, 0x61, + 0x00, 0x13, 0xC1, 0x50, 0x00, 0x13, 0x08, 0x74, 0x00, 0x13, 0x0A, 0x08, 0x00, 0x13, 0x14, 0x60, + 0x00, 0x04, 0x54, 0x00, 0x13, 0x3B, 0x04, 0x00, 0x13, 0x05, 0x04, 0x00, 0x13, 0x04, 0xEC, 0x00, + 0x08, 0x0C, 0x00, 0x90, 0x1C, 0x03, 0x00, 0x00, 0x0D, 0xA0, 0x60, 0x91, 0x3F, 0x15, 0x01, 0xF1, + 0x28, 0x00, 0xF3, 0x0C, 0x04, 0x05, 0x1B, 0x06, 0x02, 0x03, 0x07, 0x1C, 0x23, 0x25, 0x25, 0x05, + 0x08, 0x1D, 0x09, 0x0A, 0x24, 0x0B, 0x1E, 0x0D, 0x0C, 0x26, 0x26, 0x03, 0x02, 0x1B, 0x1C, 0x23, + 0x03, 0x04, 0x07, 0x05, 0x06, 0x25, 0x25, 0x02, 0x0A, 0x0B, 0x1D, 0x0D, 0x08, 0x0C, 0x09, 0x1E, + 0x24, 0x26, 0x26, 0x08, 0x24, 0x06, 0x07, 0x9A, 0xBF, 0x01, 0x3C, 0xFF, 0x00, 0xFF, 0x00, 0x02, + 0xB0, 0x04, 0x00, 0x01, 0x88, 0x00, 0x00, 0x02, 0x88, 0x00, 0x00, 0x0D, 0xD5, 0x01, 0xF2, 0x0E, + 0xC0, 0x31, 0x31, 0x03, 0x88, 0x00, 0x00, 0x0B, 0x88, 0x5D, 0x5D, 0x0E, 0x8C, 0x5D, 0x5D, 0x0C, + 0x88, 0x08, 0x08, 0x0D, 0x8C, 0x00, 0x00, 0x0D, 0x8C, 0x16, 0x16, 0x16, 0x88, 0x2C, 0x00, 0x2C, + 0x11, 0x08, 0xDF, 0x02, 0x70, 0x10, 0x00, 0xCC, 0x00, 0x0A, 0x00, 0x33, 0x6E, 0x01, 0x40, 0xF3, + 0x25, 0x08, 0x11, 0x69, 0x00, 0x23, 0x0F, 0x00, 0x30, 0x01, 0x80, 0x01, 0x03, 0x00, 0x70, 0x00, + 0x0C, 0x00, 0x01, 0x0C, 0x00, 0xA2, 0x08, 0x44, 0x00, 0x10, 0x04, 0x04, 0x00, 0x06, 0x13, 0x07, + 0x1C, 0x00, 0x71, 0xA0, 0x00, 0x2C, 0x00, 0x01, 0x37, 0x0F, 0x52, 0x01, 0x00, 0x10, 0x01, 0xDB, + 0x0C, 0x00, 0x04, 0x00, 0x1F, 0x22, 0x20, 0x80, 0x0F, 0xF4, 0x20, 0x02, 0x29, 0x01, 0x00, 0x12, + 0x78, 0x9A, 0x02, 0x1F, 0x0F, 0xF4, 0x02, 0x31, 0x7F, 0x22, 0x00, 0x0E, 0x00, 0x10, 0x00, 0x1B, + 0x18, 0x00, 0x06, 0xF3, 0x02, 0x43, 0x00, 0x49, 0x00, 0x45, 0x00, 0x42, 0x00, 0x47, 0x00, 0x49, + 0x00, 0x47, 0x00, 0x46, 0x00, 0x16, 0xE6, 0x00, 0x0F, 0x18, 0x00, 0x05, 0x1F, 0x28, 0x02, 0x00, + 0x0C, 0x11, 0x22, 0x5A, 0x00, 0x00, 0x5C, 0x00, 0x00, 0x5E, 0x00, 0x3F, 0x1B, 0x00, 0x22, 0x94, + 0x00, 0x00, 0x05, 0x54, 0x01, 0xB3, 0x40, 0x06, 0x00, 0xCC, 0x00, 0x09, 0x00, 0x4F, 0x00, 0x51, + 0x80, 0x18, 0x00, 0x04, 0x08, 0x00, 0x01, 0x40, 0x02, 0x54, 0xAB, 0x00, 0x0A, 0x04, 0x11, 0x5C, + 0x01, 0x03, 0x04, 0x00, 0x0F, 0xE4, 0x03, 0x0E, 0x07, 0x0C, 0x00, 0x04, 0xA8, 0x04, 0x01, 0x14, + 0x00, 0x8B, 0x01, 0x22, 0x04, 0xFF, 0x9F, 0xAF, 0x4F, 0x01, 0x24, 0x00, 0x00, 0x01, 0x00, 0x32, + 0x9F, 0xFF, 0x37, 0x98, 0x00, 0xF0, 0x10, 0x32, 0x54, 0x76, 0x10, 0x47, 0x32, 0x65, 0x10, 0x34, + 0x76, 0x25, 0x01, 0x34, 0x67, 0x25, 0x01, 0x75, 0x64, 0x32, 0x01, 0x72, 0x56, 0x34, 0x10, 0x23, + 0x74, 0x56, 0x01, 0x45, 0x32, 0x67, 0x24, 0x00, 0x31, 0x49, 0x92, 0x24, 0x04, 0x00, 0x0C, 0x01, + 0x00, 0x13, 0x12, 0x04, 0x00, 0x0C, 0x90, 0x00, 0x80, 0x20, 0x41, 0x13, 0x1F, 0x14, 0x00, 0x01, + 0x00, 0x7C, 0x00, 0x85, 0xFF, 0xFF, 0xFF, 0x7F, 0x1F, 0xD7, 0x36, 0x40, 0xE6, 0x03, 0x24, 0x34, + 0x10, 0x0A, 0x00, 0x0F, 0xCC, 0x00, 0x02, 0x31, 0x03, 0x00, 0x05, 0x2B, 0x03, 0x22, 0x10, 0x02, + 0xDD, 0x03, 0x13, 0x21, 0x15, 0x04, 0x14, 0x40, 0x8B, 0x02, 0x07, 0x01, 0x00, 0x71, 0x80, 0x00, + 0x40, 0x00, 0x04, 0x10, 0x80, 0x04, 0x04, 0xDF, 0x81, 0x10, 0x09, 0x28, 0x93, 0x32, 0xA5, 0x44, + 0x5B, 0x8A, 0x67, 0x76, 0x00, 0x01, 0x00, 0x4C, 0x22, 0x10, 0x10, 0x04, 0x00, 0x44, 0x00, 0xEF, + 0x00, 0xEF, 0x14, 0x00, 0x4D, 0x1C, 0x1C, 0x1C, 0x1C, 0x98, 0x01, 0x21, 0x03, 0x08, 0x04, 0x00, + 0xF1, 0x03, 0x00, 0x24, 0xFF, 0xFF, 0x00, 0x44, 0x57, 0x6E, 0x00, 0x28, 0x72, 0x39, 0x00, 0x10, + 0x9C, 0x4B, 0x00, 0x10, 0xA4, 0x01, 0xEF, 0x08, 0x4C, 0x00, 0x00, 0x80, 0x20, 0x10, 0x0A, 0x00, + 0x28, 0x10, 0x00, 0x80, 0x01, 0xC0, 0x01, 0x00, 0x04, 0x08, 0x00, 0x17, 0x05, 0x0C, 0x02, 0x13, + 0x04, 0x10, 0x00, 0x12, 0x07, 0x62, 0x00, 0xD2, 0x02, 0x01, 0x02, 0x03, 0x00, 0x04, 0x05, 0xA3, + 0x72, 0x0F, 0x0F, 0x00, 0x70, 0x42, 0x00, 0x16, 0x1F, 0x28, 0x01, 0x43, 0xFF, 0x00, 0xFF, 0x01, + 0xA4, 0x04, 0x24, 0x00, 0x80, 0x96, 0x00, 0x15, 0xF0, 0x24, 0x04, 0x68, 0x43, 0xC3, 0xBA, 0xE4, + 0xD3, 0x1E, 0x0B, 0x05, 0x2F, 0xF0, 0xFF, 0xF4, 0x00, 0x05, 0x19, 0x08, 0x0E, 0x00, 0x01, 0xE6, + 0x05, 0x1F, 0x03, 0x2C, 0x00, 0x05, 0x10, 0x76, 0xE9, 0x03, 0x0F, 0x9C, 0x02, 0x00, 0x05, 0x34, + 0x00, 0x0F, 0x3A, 0x00, 0x04, 0x38, 0x7E, 0x16, 0x40, 0x03, 0x06, 0x0F, 0x38, 0x00, 0x17, 0x3F, + 0x1E, 0x40, 0x04, 0xA8, 0x00, 0x08, 0x2F, 0x00, 0xC0, 0x55, 0x00, 0x04, 0x3F, 0x46, 0x24, 0x00, + 0x38, 0x00, 0x0A, 0x0F, 0x01, 0x00, 0x05, 0x22, 0x46, 0x2C, 0x38, 0x00, 0x19, 0xEC, 0x16, 0x00, + 0x0D, 0x3C, 0x01, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, +}; + +constexpr inline const u8 SdramParamsMariko1[0x3AA] = { + 0xFF, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x2C, 0x01, + 0x00, 0x01, 0x00, 0x96, 0x88, 0x02, 0x80, 0x18, 0x40, 0x00, 0x00, 0x00, 0x40, 0x14, 0x00, 0x82, + 0xFF, 0xFF, 0x1F, 0x00, 0xD8, 0x51, 0x1A, 0xA0, 0x0E, 0x00, 0x11, 0x88, 0x04, 0x00, 0x26, 0x20, + 0x12, 0x0C, 0x00, 0x02, 0x04, 0x00, 0xF7, 0x00, 0x00, 0x00, 0xBC, 0xBC, 0xC5, 0xB3, 0x3C, 0x9E, + 0x00, 0x00, 0x02, 0x03, 0xE0, 0xC1, 0x04, 0x01, 0x00, 0x17, 0x3F, 0x01, 0x00, 0x00, 0x38, 0x00, + 0xD0, 0x04, 0x08, 0x00, 0x00, 0x50, 0x50, 0x50, 0x00, 0xA1, 0x01, 0x00, 0x00, 0x30, 0x39, 0x00, + 0x62, 0x10, 0x00, 0x16, 0x00, 0x10, 0x90, 0x80, 0x00, 0x03, 0x74, 0x00, 0x13, 0x03, 0x04, 0x00, + 0xD7, 0x1E, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x3A, 0x00, 0x00, 0x00, 0x1D, 0x94, 0x00, + 0x57, 0x09, 0x00, 0x00, 0x00, 0x04, 0x10, 0x00, 0x13, 0x0B, 0x28, 0x00, 0x13, 0x08, 0x0C, 0x00, + 0x00, 0x1C, 0x00, 0x53, 0x17, 0x00, 0x00, 0x00, 0x15, 0x08, 0x00, 0x13, 0x1B, 0x28, 0x00, 0x57, + 0x20, 0x00, 0x00, 0x00, 0x06, 0x04, 0x00, 0x13, 0x03, 0x18, 0x00, 0x13, 0x04, 0x10, 0x00, 0x17, + 0x02, 0x10, 0x00, 0x00, 0x4C, 0x00, 0x53, 0x0E, 0x00, 0x00, 0x00, 0x05, 0x1C, 0x00, 0x05, 0x24, + 0x01, 0x03, 0x6C, 0x00, 0x03, 0xD7, 0x01, 0x10, 0x80, 0x0A, 0x00, 0x00, 0x0F, 0x01, 0x93, 0x18, + 0x00, 0x00, 0x00, 0x1A, 0x00, 0x00, 0x00, 0x16, 0x0C, 0x00, 0x10, 0x0A, 0x48, 0x00, 0x03, 0x61, + 0x00, 0x13, 0xC1, 0x50, 0x00, 0x13, 0x08, 0x74, 0x00, 0x13, 0x0A, 0x08, 0x00, 0x13, 0x14, 0x60, + 0x00, 0x04, 0x54, 0x00, 0x13, 0x3B, 0x04, 0x00, 0x13, 0x05, 0x04, 0x00, 0x13, 0x04, 0xEC, 0x00, + 0x08, 0x0C, 0x00, 0x90, 0x1C, 0x03, 0x00, 0x00, 0x0D, 0xA0, 0x60, 0x91, 0x3F, 0x15, 0x01, 0xF1, + 0x28, 0x00, 0xF3, 0x0C, 0x04, 0x05, 0x1B, 0x06, 0x02, 0x03, 0x07, 0x1C, 0x23, 0x25, 0x25, 0x05, + 0x08, 0x1D, 0x09, 0x0A, 0x24, 0x0B, 0x1E, 0x0D, 0x0C, 0x26, 0x26, 0x03, 0x02, 0x1B, 0x1C, 0x23, + 0x03, 0x04, 0x07, 0x05, 0x06, 0x25, 0x25, 0x02, 0x0A, 0x0B, 0x1D, 0x0D, 0x08, 0x0C, 0x09, 0x1E, + 0x24, 0x26, 0x26, 0x08, 0x24, 0x06, 0x07, 0x9A, 0xBF, 0x01, 0x3C, 0xFF, 0x00, 0xFF, 0x00, 0x02, + 0xB0, 0x04, 0x00, 0x01, 0x88, 0x00, 0x00, 0x02, 0x88, 0x00, 0x00, 0x0D, 0xD5, 0x01, 0xF2, 0x0E, + 0xC0, 0x31, 0x31, 0x03, 0x88, 0x00, 0x00, 0x0B, 0x88, 0x5D, 0x5D, 0x0E, 0x8C, 0x5D, 0x5D, 0x0C, + 0x88, 0x08, 0x08, 0x0D, 0x8C, 0x00, 0x00, 0x0D, 0x8C, 0x16, 0x16, 0x16, 0x88, 0x2C, 0x00, 0x2C, + 0x11, 0x08, 0xDF, 0x02, 0x70, 0x10, 0x00, 0xCC, 0x00, 0x0A, 0x00, 0x33, 0x6E, 0x01, 0x40, 0xF3, + 0x25, 0x08, 0x11, 0x69, 0x00, 0x23, 0x0F, 0x00, 0x30, 0x01, 0x80, 0x01, 0x03, 0x00, 0x70, 0x00, + 0x0C, 0x00, 0x01, 0x0C, 0x00, 0xA2, 0x08, 0x44, 0x00, 0x10, 0x04, 0x04, 0x00, 0x06, 0x13, 0x07, + 0x1C, 0x00, 0x71, 0xA0, 0x00, 0x2C, 0x00, 0x01, 0x37, 0x0F, 0x52, 0x01, 0x00, 0x10, 0x01, 0xDB, + 0x0C, 0x00, 0x04, 0x00, 0x1F, 0x22, 0x20, 0x80, 0x0F, 0xF4, 0x20, 0x02, 0x29, 0x01, 0x00, 0x12, + 0x78, 0x9A, 0x02, 0x1F, 0x0F, 0xF4, 0x02, 0x31, 0x7F, 0x16, 0x00, 0x0D, 0x00, 0x0B, 0x00, 0x17, + 0x18, 0x00, 0x06, 0xF1, 0x02, 0x43, 0x00, 0x45, 0x00, 0x45, 0x00, 0x43, 0x00, 0x46, 0x00, 0x47, + 0x00, 0x41, 0x00, 0x46, 0x00, 0x0C, 0xBA, 0x01, 0x1F, 0x0D, 0x18, 0x00, 0x06, 0x1F, 0x28, 0x02, + 0x00, 0x0C, 0x11, 0x16, 0x5A, 0x00, 0x00, 0x5C, 0x00, 0x00, 0x5E, 0x00, 0x3F, 0x17, 0x00, 0x16, + 0x94, 0x00, 0x00, 0x05, 0x54, 0x01, 0xB3, 0x40, 0x06, 0x00, 0xCC, 0x00, 0x09, 0x00, 0x4F, 0x00, + 0x51, 0x80, 0x18, 0x00, 0x04, 0x08, 0x00, 0x01, 0x6E, 0x00, 0x54, 0xAB, 0x00, 0x0A, 0x04, 0x11, + 0x5C, 0x01, 0x03, 0x04, 0x00, 0x0F, 0xE4, 0x03, 0x0E, 0x07, 0x0C, 0x00, 0x04, 0xA8, 0x04, 0x01, + 0x14, 0x00, 0x8B, 0x01, 0x22, 0x04, 0xFF, 0x9F, 0xAF, 0x4F, 0x01, 0x24, 0x00, 0x00, 0x01, 0x00, + 0x32, 0x9F, 0xFF, 0x37, 0x98, 0x00, 0xF0, 0x10, 0x32, 0x54, 0x76, 0x10, 0x47, 0x32, 0x65, 0x10, + 0x34, 0x76, 0x25, 0x01, 0x34, 0x67, 0x25, 0x01, 0x75, 0x64, 0x32, 0x01, 0x72, 0x56, 0x34, 0x10, + 0x23, 0x74, 0x56, 0x01, 0x45, 0x32, 0x67, 0x24, 0x00, 0x31, 0x49, 0x92, 0x24, 0x04, 0x00, 0x0C, + 0x01, 0x00, 0x13, 0x12, 0x04, 0x00, 0x0C, 0x90, 0x00, 0x80, 0x20, 0x41, 0x13, 0x1F, 0x14, 0x00, + 0x01, 0x00, 0x7C, 0x00, 0x85, 0xFF, 0xFF, 0xFF, 0x7F, 0x1F, 0xD7, 0x36, 0x40, 0xE6, 0x03, 0x24, + 0x34, 0x10, 0x0A, 0x00, 0x0F, 0xCC, 0x00, 0x02, 0x31, 0x03, 0x00, 0x05, 0x2B, 0x03, 0x22, 0x10, + 0x02, 0xDD, 0x03, 0x13, 0x21, 0x15, 0x04, 0x14, 0x40, 0x8B, 0x02, 0x07, 0x01, 0x00, 0x71, 0x80, + 0x00, 0x40, 0x00, 0x04, 0x10, 0x80, 0x04, 0x04, 0xDF, 0x81, 0x10, 0x09, 0x28, 0x93, 0x32, 0xA5, + 0x44, 0x5B, 0x8A, 0x67, 0x76, 0x00, 0x01, 0x00, 0x4C, 0x22, 0x10, 0x10, 0x04, 0x00, 0x44, 0x00, + 0xEF, 0x00, 0xEF, 0x14, 0x00, 0x4D, 0x1C, 0x1C, 0x1C, 0x1C, 0x98, 0x01, 0x21, 0x03, 0x08, 0x04, + 0x00, 0xF1, 0x03, 0x00, 0x24, 0xFF, 0xFF, 0x00, 0x44, 0x57, 0x6E, 0x00, 0x28, 0x72, 0x39, 0x00, + 0x10, 0x9C, 0x4B, 0x00, 0x10, 0xA4, 0x01, 0xEF, 0x08, 0x4C, 0x00, 0x00, 0x80, 0x20, 0x10, 0x0A, + 0x00, 0x28, 0x10, 0x00, 0x80, 0x01, 0xC0, 0x01, 0x00, 0x04, 0x08, 0x00, 0x17, 0x05, 0x0C, 0x02, + 0x13, 0x04, 0x10, 0x00, 0x12, 0x07, 0x62, 0x00, 0xD2, 0x02, 0x01, 0x02, 0x03, 0x00, 0x04, 0x05, + 0xA3, 0x72, 0x0F, 0x0F, 0x00, 0x70, 0x42, 0x00, 0x16, 0x1F, 0x28, 0x01, 0x43, 0xFF, 0x00, 0xFF, + 0x01, 0xA4, 0x04, 0x24, 0x00, 0x80, 0x96, 0x00, 0x15, 0xF0, 0x24, 0x04, 0x68, 0x43, 0xC3, 0xBA, + 0xE4, 0xD3, 0x1E, 0x0B, 0x05, 0x2F, 0xF0, 0xFF, 0xF4, 0x00, 0x05, 0x19, 0x08, 0x0E, 0x00, 0x01, + 0xE6, 0x05, 0x1F, 0x03, 0x2C, 0x00, 0x05, 0x10, 0x76, 0xE9, 0x03, 0x0F, 0x9C, 0x02, 0x00, 0x05, + 0x34, 0x00, 0x0F, 0x3A, 0x00, 0x04, 0x38, 0x7E, 0x16, 0x40, 0x03, 0x06, 0x0F, 0x38, 0x00, 0x17, + 0x3F, 0x1E, 0x40, 0x04, 0xA8, 0x00, 0x08, 0x2F, 0x00, 0xC0, 0x55, 0x00, 0x04, 0x3F, 0x46, 0x24, + 0x00, 0x38, 0x00, 0x0A, 0x0F, 0x01, 0x00, 0x05, 0x22, 0x46, 0x2C, 0x38, 0x00, 0x19, 0xEC, 0x16, + 0x00, 0x0D, 0x3C, 0x01, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, +}; + +constexpr inline const u8 SdramParamsMariko2[0x3B3] = { + 0xFF, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x2C, 0x01, + 0x00, 0x01, 0x00, 0x96, 0x88, 0x02, 0x80, 0x18, 0x40, 0x00, 0x00, 0x00, 0x40, 0x14, 0x00, 0xF0, + 0x01, 0xFF, 0xFF, 0x1F, 0x00, 0xD8, 0x51, 0x1A, 0xA0, 0x00, 0x00, 0x50, 0x05, 0x00, 0x00, 0x88, + 0x00, 0x04, 0x00, 0x20, 0x20, 0x12, 0x1A, 0x00, 0x17, 0x88, 0x04, 0x00, 0xF7, 0x00, 0x00, 0x00, + 0xBC, 0xBC, 0xAF, 0xC9, 0x3C, 0x9E, 0x00, 0x00, 0x02, 0x03, 0xE0, 0xC1, 0x04, 0x01, 0x00, 0x17, + 0x3F, 0x01, 0x00, 0x00, 0x38, 0x00, 0xD0, 0x04, 0x08, 0x00, 0x00, 0x50, 0x50, 0x50, 0x00, 0xA1, + 0x01, 0x00, 0x00, 0x30, 0x39, 0x00, 0x61, 0x10, 0x00, 0x16, 0x00, 0x10, 0x90, 0x30, 0x01, 0x13, + 0x02, 0x74, 0x00, 0x13, 0x03, 0x04, 0x00, 0xD7, 0x1E, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, + 0x3A, 0x00, 0x00, 0x00, 0x1D, 0x94, 0x00, 0x57, 0x09, 0x00, 0x00, 0x00, 0x04, 0x10, 0x00, 0x13, + 0x0B, 0x28, 0x00, 0x13, 0x08, 0x0C, 0x00, 0x00, 0x1C, 0x00, 0x53, 0x17, 0x00, 0x00, 0x00, 0x15, + 0x08, 0x00, 0x13, 0x1B, 0x28, 0x00, 0x57, 0x20, 0x00, 0x00, 0x00, 0x06, 0x04, 0x00, 0x13, 0x03, + 0x18, 0x00, 0x13, 0x04, 0x10, 0x00, 0x17, 0x02, 0x10, 0x00, 0x00, 0x4C, 0x00, 0x13, 0x0E, 0x18, + 0x00, 0x17, 0x05, 0x6C, 0x00, 0x00, 0x34, 0x00, 0x13, 0x0C, 0xE0, 0x01, 0x40, 0x00, 0x00, 0x00, + 0x80, 0x0A, 0x00, 0x00, 0x0F, 0x01, 0x93, 0x18, 0x00, 0x00, 0x00, 0x1A, 0x00, 0x00, 0x00, 0x16, + 0x0C, 0x00, 0x10, 0x0A, 0x48, 0x00, 0x03, 0x61, 0x00, 0x13, 0xC1, 0x50, 0x00, 0x13, 0x08, 0x40, + 0x00, 0x13, 0x0A, 0x08, 0x00, 0x13, 0x14, 0x5C, 0x00, 0x13, 0x02, 0xC0, 0x00, 0x13, 0x3B, 0x04, + 0x00, 0x13, 0x05, 0x04, 0x00, 0x13, 0x04, 0xEC, 0x00, 0x08, 0x0C, 0x00, 0x90, 0x1C, 0x03, 0x00, + 0x00, 0x0D, 0xA0, 0x60, 0x91, 0x3F, 0x15, 0x01, 0xF1, 0x28, 0x00, 0xF3, 0x0C, 0x04, 0x05, 0x1B, + 0x06, 0x02, 0x03, 0x07, 0x1C, 0x23, 0x25, 0x25, 0x05, 0x08, 0x1D, 0x09, 0x0A, 0x24, 0x0B, 0x1E, + 0x0D, 0x0C, 0x26, 0x26, 0x03, 0x02, 0x1B, 0x1C, 0x23, 0x03, 0x04, 0x07, 0x05, 0x06, 0x25, 0x25, + 0x02, 0x0A, 0x0B, 0x1D, 0x0D, 0x08, 0x0C, 0x09, 0x1E, 0x24, 0x26, 0x26, 0x08, 0x24, 0x06, 0x07, + 0x9A, 0xBF, 0x01, 0x3C, 0xFF, 0x00, 0xFF, 0x00, 0x02, 0xB0, 0x04, 0x00, 0x01, 0x08, 0x00, 0x00, + 0x02, 0x08, 0x00, 0x00, 0x0D, 0xAB, 0x00, 0xF2, 0x0E, 0xC0, 0x31, 0x31, 0x03, 0x08, 0x00, 0x00, + 0x0B, 0x08, 0x5D, 0x5D, 0x0E, 0x0C, 0x5D, 0x5D, 0x0C, 0x08, 0x08, 0x08, 0x0D, 0x0C, 0x00, 0x00, + 0x0D, 0x0C, 0x14, 0x14, 0x16, 0x08, 0x2C, 0x00, 0x2C, 0x11, 0x08, 0xDF, 0x02, 0x70, 0x10, 0x00, + 0xCC, 0x00, 0x0A, 0x00, 0x33, 0x6E, 0x01, 0x40, 0xF3, 0x25, 0x08, 0x11, 0x69, 0x00, 0x23, 0x0F, + 0x00, 0x30, 0x01, 0x80, 0x01, 0x03, 0x00, 0x70, 0x00, 0x0C, 0x00, 0x01, 0x0C, 0x00, 0xA2, 0x08, + 0x44, 0x00, 0x10, 0x04, 0x04, 0x00, 0x06, 0x13, 0x07, 0x1C, 0x00, 0x71, 0xA0, 0x00, 0x2C, 0x00, + 0x01, 0x37, 0x0F, 0x52, 0x01, 0x11, 0x00, 0x64, 0x01, 0xB3, 0x04, 0x00, 0x1F, 0x22, 0x20, 0x80, + 0x0F, 0xF4, 0x20, 0x02, 0x35, 0x01, 0x00, 0x13, 0x29, 0x01, 0x00, 0x12, 0x78, 0x9A, 0x02, 0x1F, + 0x0F, 0xF4, 0x02, 0x31, 0x7F, 0x16, 0x00, 0x0D, 0x00, 0x0B, 0x00, 0x17, 0x18, 0x00, 0x06, 0xF1, + 0x02, 0x43, 0x00, 0x45, 0x00, 0x45, 0x00, 0x43, 0x00, 0x46, 0x00, 0x47, 0x00, 0x41, 0x00, 0x46, + 0x00, 0x0C, 0xBA, 0x01, 0x1F, 0x0D, 0x18, 0x00, 0x06, 0x1F, 0x10, 0x02, 0x00, 0x0C, 0x11, 0x16, + 0x5A, 0x00, 0x00, 0x5C, 0x00, 0x00, 0x5E, 0x00, 0x3F, 0x17, 0x00, 0x16, 0x94, 0x00, 0x00, 0x05, + 0x54, 0x01, 0xA4, 0x40, 0x06, 0x00, 0xCC, 0x00, 0x09, 0x00, 0x4F, 0x00, 0x51, 0x18, 0x00, 0x63, + 0x80, 0x01, 0x00, 0x00, 0x40, 0x01, 0x40, 0x02, 0x54, 0xAB, 0x00, 0x0A, 0x04, 0x11, 0x5C, 0x01, + 0x03, 0x04, 0x00, 0x0F, 0xE4, 0x03, 0x0E, 0x0B, 0xCC, 0x02, 0x05, 0x78, 0x03, 0x8B, 0x01, 0x22, + 0x04, 0xFF, 0x9F, 0xAF, 0x4F, 0x01, 0x24, 0x00, 0x00, 0x01, 0x00, 0x32, 0x9F, 0xFF, 0x37, 0x80, + 0x00, 0xF0, 0x10, 0x32, 0x54, 0x76, 0x10, 0x47, 0x32, 0x65, 0x10, 0x34, 0x76, 0x25, 0x01, 0x34, + 0x67, 0x25, 0x01, 0x75, 0x64, 0x32, 0x01, 0x72, 0x56, 0x34, 0x10, 0x23, 0x74, 0x56, 0x01, 0x45, + 0x32, 0x67, 0x24, 0x00, 0x31, 0x49, 0x92, 0x24, 0x04, 0x00, 0x0C, 0x01, 0x00, 0x13, 0x12, 0x04, + 0x00, 0x0C, 0x90, 0x00, 0x80, 0x20, 0x41, 0x13, 0x1F, 0x14, 0x00, 0x01, 0x00, 0x7C, 0x00, 0x85, + 0xFF, 0xFF, 0xFF, 0x7F, 0x1F, 0xD7, 0x36, 0x40, 0xE6, 0x03, 0x24, 0x34, 0x10, 0x0A, 0x00, 0x0F, + 0xCC, 0x00, 0x02, 0x31, 0x03, 0x00, 0x05, 0x2B, 0x03, 0x22, 0x10, 0x02, 0xDD, 0x03, 0x13, 0x21, + 0x15, 0x04, 0x14, 0x40, 0x8B, 0x02, 0x1D, 0x00, 0x9D, 0x02, 0x01, 0x04, 0x04, 0xDF, 0x81, 0x10, + 0x09, 0x28, 0x93, 0x32, 0xA5, 0x44, 0x5B, 0x8A, 0x67, 0x76, 0x00, 0x01, 0x00, 0x4C, 0x22, 0x10, + 0x10, 0x04, 0x00, 0x44, 0x00, 0xEF, 0x00, 0xEF, 0x14, 0x00, 0x4C, 0x1C, 0x1C, 0x1C, 0x1C, 0xF0, + 0x01, 0x31, 0x02, 0x03, 0x08, 0x04, 0x00, 0xF1, 0x03, 0x00, 0x24, 0xFF, 0xFF, 0x00, 0x44, 0x57, + 0x6E, 0x00, 0x28, 0x72, 0x39, 0x00, 0x10, 0x9C, 0x4B, 0x00, 0x20, 0x20, 0x00, 0xB1, 0x08, 0x4C, + 0x00, 0x00, 0x80, 0x20, 0x10, 0x0A, 0x00, 0x28, 0x10, 0x04, 0x02, 0x0D, 0xC0, 0x01, 0x04, 0x08, + 0x00, 0x17, 0x05, 0x10, 0x00, 0x13, 0x04, 0x10, 0x00, 0x11, 0x07, 0x10, 0x00, 0xE2, 0x02, 0x02, + 0x01, 0x02, 0x03, 0x00, 0x04, 0x05, 0xA3, 0x72, 0x0F, 0x0F, 0x00, 0x70, 0x42, 0x00, 0x16, 0x1F, + 0x28, 0x01, 0x43, 0xFF, 0x00, 0xFF, 0x01, 0xA4, 0x04, 0x04, 0x84, 0x03, 0x35, 0x00, 0x00, 0xF0, + 0x24, 0x04, 0x60, 0x43, 0xC3, 0xBA, 0xE4, 0xD3, 0x1E, 0x0F, 0x05, 0x3B, 0x80, 0x2A, 0x02, 0x1C, + 0x00, 0x0C, 0xF4, 0x00, 0x19, 0x08, 0x0E, 0x00, 0x01, 0xE6, 0x05, 0x1F, 0x03, 0x2C, 0x00, 0x05, + 0x10, 0x76, 0xE9, 0x03, 0x0F, 0x9C, 0x02, 0x00, 0x05, 0x34, 0x00, 0x0F, 0x3A, 0x00, 0x04, 0x38, + 0x7E, 0x16, 0x40, 0x03, 0x06, 0x0F, 0x38, 0x00, 0x17, 0x3F, 0x1E, 0x40, 0x04, 0xA8, 0x00, 0x08, + 0x2F, 0x00, 0xC0, 0x55, 0x00, 0x04, 0x3F, 0x46, 0x24, 0x00, 0x38, 0x00, 0x0A, 0x0F, 0x01, 0x00, + 0x05, 0x22, 0x46, 0x2C, 0x38, 0x00, 0x19, 0xEC, 0x16, 0x00, 0x0D, 0x3C, 0x01, 0x50, 0x00, 0x00, + 0x00, 0x00, 0x00, +}; + +constexpr inline const u8 SdramParamsMariko3[0x3AA] = { + 0xFF, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x2C, 0x01, + 0x00, 0x01, 0x00, 0x96, 0x88, 0x02, 0x80, 0x18, 0x40, 0x00, 0x00, 0x00, 0x40, 0x14, 0x00, 0x82, + 0xFF, 0xFF, 0x1F, 0x00, 0xD8, 0x51, 0x1A, 0xA0, 0x0E, 0x00, 0x11, 0x88, 0x04, 0x00, 0x26, 0x20, + 0x12, 0x0C, 0x00, 0x02, 0x04, 0x00, 0xF7, 0x00, 0x00, 0x00, 0xBC, 0xBC, 0xC5, 0xB3, 0x3C, 0x9E, + 0x00, 0x00, 0x02, 0x03, 0xE0, 0xC1, 0x04, 0x01, 0x00, 0x17, 0x3F, 0x01, 0x00, 0x00, 0x38, 0x00, + 0xD0, 0x04, 0x08, 0x00, 0x00, 0x50, 0x50, 0x50, 0x00, 0xA1, 0x01, 0x00, 0x00, 0x30, 0x39, 0x00, + 0x62, 0x10, 0x00, 0x16, 0x00, 0x10, 0x90, 0x80, 0x00, 0x03, 0x74, 0x00, 0x13, 0x03, 0x04, 0x00, + 0xD7, 0x1E, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x3A, 0x00, 0x00, 0x00, 0x1D, 0x94, 0x00, + 0x57, 0x09, 0x00, 0x00, 0x00, 0x04, 0x10, 0x00, 0x13, 0x0B, 0x28, 0x00, 0x13, 0x08, 0x0C, 0x00, + 0x00, 0x1C, 0x00, 0x53, 0x17, 0x00, 0x00, 0x00, 0x15, 0x08, 0x00, 0x13, 0x1B, 0x28, 0x00, 0x57, + 0x20, 0x00, 0x00, 0x00, 0x06, 0x04, 0x00, 0x13, 0x03, 0x18, 0x00, 0x13, 0x04, 0x10, 0x00, 0x17, + 0x02, 0x10, 0x00, 0x00, 0x4C, 0x00, 0x53, 0x0E, 0x00, 0x00, 0x00, 0x05, 0x1C, 0x00, 0x05, 0x24, + 0x01, 0x03, 0x6C, 0x00, 0x03, 0xD7, 0x01, 0x10, 0x80, 0x0A, 0x00, 0x00, 0x0F, 0x01, 0x93, 0x18, + 0x00, 0x00, 0x00, 0x1A, 0x00, 0x00, 0x00, 0x16, 0x0C, 0x00, 0x10, 0x0A, 0x48, 0x00, 0x03, 0x61, + 0x00, 0x13, 0xC1, 0x50, 0x00, 0x13, 0x08, 0x74, 0x00, 0x13, 0x0A, 0x08, 0x00, 0x13, 0x14, 0x60, + 0x00, 0x04, 0x54, 0x00, 0x13, 0x3B, 0x04, 0x00, 0x13, 0x05, 0x04, 0x00, 0x13, 0x04, 0xEC, 0x00, + 0x08, 0x0C, 0x00, 0x90, 0x1C, 0x03, 0x00, 0x00, 0x0D, 0xA0, 0x60, 0x91, 0x3F, 0x15, 0x01, 0xF1, + 0x28, 0x00, 0xF3, 0x0C, 0x04, 0x05, 0x1B, 0x06, 0x02, 0x03, 0x07, 0x1C, 0x23, 0x25, 0x25, 0x05, + 0x08, 0x1D, 0x09, 0x0A, 0x24, 0x0B, 0x1E, 0x0D, 0x0C, 0x26, 0x26, 0x03, 0x02, 0x1B, 0x1C, 0x23, + 0x03, 0x04, 0x07, 0x05, 0x06, 0x25, 0x25, 0x02, 0x0A, 0x0B, 0x1D, 0x0D, 0x08, 0x0C, 0x09, 0x1E, + 0x24, 0x26, 0x26, 0x08, 0x24, 0x06, 0x07, 0x9A, 0xBF, 0x01, 0x3C, 0xFF, 0x00, 0xFF, 0x00, 0x02, + 0xB0, 0x04, 0x00, 0x01, 0x88, 0x00, 0x00, 0x02, 0x88, 0x00, 0x00, 0x0D, 0xD5, 0x01, 0xF2, 0x0E, + 0xC0, 0x31, 0x31, 0x03, 0x88, 0x00, 0x00, 0x0B, 0x88, 0x5D, 0x5D, 0x0E, 0x8C, 0x5D, 0x5D, 0x0C, + 0x88, 0x08, 0x08, 0x0D, 0x8C, 0x00, 0x00, 0x0D, 0x8C, 0x16, 0x16, 0x16, 0x88, 0x2C, 0x00, 0x2C, + 0x11, 0x08, 0xDF, 0x02, 0x70, 0x10, 0x00, 0xCC, 0x00, 0x0A, 0x00, 0x33, 0x6E, 0x01, 0x40, 0xF3, + 0x25, 0x08, 0x11, 0x69, 0x00, 0x23, 0x0F, 0x00, 0x30, 0x01, 0x80, 0x01, 0x03, 0x00, 0x70, 0x00, + 0x0C, 0x00, 0x01, 0x0C, 0x00, 0xA2, 0x08, 0x44, 0x00, 0x10, 0x04, 0x04, 0x00, 0x06, 0x13, 0x07, + 0x1C, 0x00, 0x71, 0xA0, 0x00, 0x2C, 0x00, 0x01, 0x37, 0x0F, 0x52, 0x01, 0x00, 0x10, 0x01, 0xDB, + 0x0C, 0x00, 0x04, 0x00, 0x1F, 0x22, 0x20, 0x80, 0x0F, 0xF4, 0x20, 0x02, 0x29, 0x01, 0x00, 0x12, + 0x78, 0x9A, 0x02, 0x1F, 0x0F, 0xF4, 0x02, 0x31, 0x7F, 0x16, 0x00, 0x0D, 0x00, 0x0B, 0x00, 0x17, + 0x18, 0x00, 0x06, 0xF1, 0x02, 0x43, 0x00, 0x45, 0x00, 0x45, 0x00, 0x43, 0x00, 0x46, 0x00, 0x47, + 0x00, 0x41, 0x00, 0x46, 0x00, 0x0C, 0xBA, 0x01, 0x1F, 0x0D, 0x18, 0x00, 0x06, 0x1F, 0x28, 0x02, + 0x00, 0x0C, 0x11, 0x16, 0x5A, 0x00, 0x00, 0x5C, 0x00, 0x00, 0x5E, 0x00, 0x3F, 0x17, 0x00, 0x16, + 0x94, 0x00, 0x00, 0x05, 0x54, 0x01, 0xB3, 0x40, 0x06, 0x00, 0xCC, 0x00, 0x09, 0x00, 0x4F, 0x00, + 0x51, 0x80, 0x18, 0x00, 0x04, 0x08, 0x00, 0x01, 0x6E, 0x00, 0x54, 0xAB, 0x00, 0x0A, 0x04, 0x11, + 0x5C, 0x01, 0x03, 0x04, 0x00, 0x0F, 0xE4, 0x03, 0x0E, 0x07, 0x0C, 0x00, 0x04, 0xA8, 0x04, 0x01, + 0x14, 0x00, 0x8B, 0x01, 0x22, 0x04, 0xFF, 0x9F, 0xAF, 0x4F, 0x01, 0x24, 0x00, 0x00, 0x01, 0x00, + 0x32, 0x9F, 0xFF, 0x37, 0x98, 0x00, 0xF0, 0x10, 0x32, 0x54, 0x76, 0x10, 0x47, 0x32, 0x65, 0x10, + 0x34, 0x76, 0x25, 0x01, 0x34, 0x67, 0x25, 0x01, 0x75, 0x64, 0x32, 0x01, 0x72, 0x56, 0x34, 0x10, + 0x23, 0x74, 0x56, 0x01, 0x45, 0x32, 0x67, 0x24, 0x00, 0x31, 0x49, 0x92, 0x24, 0x04, 0x00, 0x0C, + 0x01, 0x00, 0x13, 0x12, 0x04, 0x00, 0x0C, 0x90, 0x00, 0x80, 0x20, 0x41, 0x13, 0x1F, 0x14, 0x00, + 0x01, 0x00, 0x7C, 0x00, 0x85, 0xFF, 0xFF, 0xFF, 0x7F, 0x1F, 0xD7, 0x36, 0x40, 0xE6, 0x03, 0x24, + 0x34, 0x10, 0x0A, 0x00, 0x0F, 0xCC, 0x00, 0x02, 0x31, 0x03, 0x00, 0x05, 0x2B, 0x03, 0x22, 0x10, + 0x02, 0xDD, 0x03, 0x13, 0x21, 0x15, 0x04, 0x14, 0x40, 0x8B, 0x02, 0x07, 0x01, 0x00, 0x71, 0x80, + 0x00, 0x40, 0x00, 0x04, 0x10, 0x80, 0x04, 0x04, 0xDF, 0x81, 0x10, 0x09, 0x28, 0x93, 0x32, 0xA5, + 0x44, 0x5B, 0x8A, 0x67, 0x76, 0x00, 0x01, 0x00, 0x4C, 0x22, 0x10, 0x10, 0x04, 0x00, 0x44, 0x00, + 0xEF, 0x00, 0xEF, 0x14, 0x00, 0x4D, 0x1C, 0x1C, 0x1C, 0x1C, 0x98, 0x01, 0x21, 0x03, 0x08, 0x04, + 0x00, 0xF1, 0x03, 0x00, 0x24, 0xFF, 0xFF, 0x00, 0x44, 0x57, 0x6E, 0x00, 0x28, 0x72, 0x39, 0x00, + 0x10, 0x9C, 0x4B, 0x00, 0x10, 0xA4, 0x01, 0xEF, 0x08, 0x4C, 0x00, 0x00, 0x80, 0x20, 0x10, 0x0A, + 0x00, 0x28, 0x10, 0x00, 0x80, 0x01, 0xC0, 0x01, 0x00, 0x04, 0x08, 0x00, 0x17, 0x05, 0x0C, 0x02, + 0x13, 0x04, 0x10, 0x00, 0x12, 0x07, 0x62, 0x00, 0xD2, 0x02, 0x01, 0x02, 0x03, 0x00, 0x04, 0x05, + 0xA3, 0x72, 0x0F, 0x0F, 0x00, 0x70, 0x42, 0x00, 0x16, 0x1F, 0x28, 0x01, 0x43, 0xFF, 0x00, 0xFF, + 0x01, 0xA4, 0x04, 0x24, 0x00, 0x80, 0x96, 0x00, 0x15, 0xF0, 0x24, 0x04, 0x68, 0x43, 0xC3, 0xBA, + 0xE4, 0xD3, 0x1E, 0x0B, 0x05, 0x2F, 0xF0, 0xFF, 0xF4, 0x00, 0x05, 0x19, 0x08, 0x0E, 0x00, 0x01, + 0xE6, 0x05, 0x1F, 0x03, 0x2C, 0x00, 0x05, 0x10, 0x76, 0xE9, 0x03, 0x0F, 0x9C, 0x02, 0x00, 0x05, + 0x34, 0x00, 0x0F, 0x3A, 0x00, 0x04, 0x38, 0x7E, 0x16, 0x40, 0x03, 0x06, 0x0F, 0x38, 0x00, 0x17, + 0x3F, 0x1E, 0x40, 0x04, 0xA8, 0x00, 0x08, 0x2F, 0x00, 0xC0, 0x55, 0x00, 0x04, 0x3F, 0x46, 0x24, + 0x00, 0x38, 0x00, 0x0A, 0x0F, 0x01, 0x00, 0x05, 0x22, 0x46, 0x2C, 0x38, 0x00, 0x19, 0xEC, 0x16, + 0x00, 0x0D, 0x3C, 0x01, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, +}; + +constexpr inline const u8 SdramParamsMariko4[0x3B4] = { + 0xFF, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x2C, 0x01, + 0x00, 0x01, 0x00, 0x96, 0x88, 0x02, 0x80, 0x18, 0x40, 0x00, 0x00, 0x00, 0x40, 0x14, 0x00, 0xF0, + 0x01, 0xFF, 0xFF, 0x1F, 0x00, 0xD8, 0x51, 0x1A, 0xA0, 0x00, 0x00, 0x50, 0x05, 0x00, 0x00, 0x88, + 0x00, 0x04, 0x00, 0x20, 0x20, 0x12, 0x1A, 0x00, 0x17, 0x88, 0x04, 0x00, 0xF7, 0x00, 0x00, 0x00, + 0xBC, 0xBC, 0xAF, 0xC9, 0x3C, 0x9E, 0x00, 0x00, 0x02, 0x03, 0xE0, 0xC1, 0x04, 0x01, 0x00, 0x17, + 0x3F, 0x01, 0x00, 0x00, 0x38, 0x00, 0xD0, 0x04, 0x08, 0x00, 0x00, 0x50, 0x50, 0x50, 0x00, 0xA1, + 0x01, 0x00, 0x00, 0x30, 0x39, 0x00, 0x62, 0x10, 0x00, 0x16, 0x00, 0x10, 0x90, 0x80, 0x00, 0x03, + 0x74, 0x00, 0x13, 0x03, 0x04, 0x00, 0xD7, 0x1E, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x3A, + 0x00, 0x00, 0x00, 0x1D, 0x94, 0x00, 0x57, 0x09, 0x00, 0x00, 0x00, 0x04, 0x10, 0x00, 0x13, 0x0B, + 0x28, 0x00, 0x13, 0x08, 0x0C, 0x00, 0x00, 0x1C, 0x00, 0x53, 0x17, 0x00, 0x00, 0x00, 0x15, 0x08, + 0x00, 0x13, 0x1B, 0x28, 0x00, 0x57, 0x20, 0x00, 0x00, 0x00, 0x06, 0x04, 0x00, 0x13, 0x03, 0x18, + 0x00, 0x13, 0x04, 0x10, 0x00, 0x17, 0x02, 0x10, 0x00, 0x00, 0x4C, 0x00, 0x53, 0x0E, 0x00, 0x00, + 0x00, 0x05, 0x1C, 0x00, 0x05, 0x24, 0x01, 0x03, 0x6C, 0x00, 0x03, 0xD7, 0x01, 0x10, 0x80, 0x0A, + 0x00, 0x00, 0x0F, 0x01, 0x93, 0x18, 0x00, 0x00, 0x00, 0x1A, 0x00, 0x00, 0x00, 0x16, 0x0C, 0x00, + 0x10, 0x0A, 0x48, 0x00, 0x03, 0x61, 0x00, 0x13, 0xC1, 0x50, 0x00, 0x13, 0x08, 0x74, 0x00, 0x13, + 0x0A, 0x08, 0x00, 0x13, 0x14, 0x60, 0x00, 0x04, 0x54, 0x00, 0x13, 0x3B, 0x04, 0x00, 0x13, 0x05, + 0x04, 0x00, 0x13, 0x04, 0xEC, 0x00, 0x08, 0x0C, 0x00, 0x90, 0x1C, 0x03, 0x00, 0x00, 0x0D, 0xA0, + 0x60, 0x91, 0x3F, 0x15, 0x01, 0xF1, 0x28, 0x00, 0xF3, 0x0C, 0x04, 0x05, 0x1B, 0x06, 0x02, 0x03, + 0x07, 0x1C, 0x23, 0x25, 0x25, 0x05, 0x08, 0x1D, 0x09, 0x0A, 0x24, 0x0B, 0x1E, 0x0D, 0x0C, 0x26, + 0x26, 0x03, 0x02, 0x1B, 0x1C, 0x23, 0x03, 0x04, 0x07, 0x05, 0x06, 0x25, 0x25, 0x02, 0x0A, 0x0B, + 0x1D, 0x0D, 0x08, 0x0C, 0x09, 0x1E, 0x24, 0x26, 0x26, 0x08, 0x24, 0x06, 0x07, 0x9A, 0xBF, 0x01, + 0x3C, 0xFF, 0x00, 0xFF, 0x00, 0x02, 0xB0, 0x04, 0x00, 0x01, 0x88, 0x00, 0x00, 0x02, 0x88, 0x00, + 0x00, 0x0D, 0xD5, 0x01, 0xF2, 0x0E, 0xC0, 0x31, 0x31, 0x03, 0x88, 0x00, 0x00, 0x0B, 0x88, 0x5D, + 0x5D, 0x0E, 0x8C, 0x5D, 0x5D, 0x0C, 0x88, 0x08, 0x08, 0x0D, 0x8C, 0x00, 0x00, 0x0D, 0x8C, 0x14, + 0x14, 0x16, 0x88, 0x2C, 0x00, 0x2C, 0x11, 0x08, 0xDF, 0x02, 0x70, 0x10, 0x00, 0xCC, 0x00, 0x0A, + 0x00, 0x33, 0x6E, 0x01, 0x40, 0xF3, 0x25, 0x08, 0x11, 0x69, 0x00, 0x23, 0x0F, 0x00, 0x30, 0x01, + 0x80, 0x01, 0x03, 0x00, 0x70, 0x00, 0x0C, 0x00, 0x01, 0x0C, 0x00, 0xC0, 0x08, 0x44, 0x00, 0x10, + 0x04, 0x04, 0x00, 0x06, 0x13, 0x07, 0x00, 0x80, 0x10, 0x00, 0x71, 0xA0, 0x00, 0x2C, 0x00, 0x01, + 0x37, 0x0F, 0x52, 0x01, 0x00, 0x10, 0x01, 0xDB, 0x0C, 0x00, 0x04, 0x00, 0x1F, 0x22, 0x20, 0x80, + 0x0F, 0xF4, 0x20, 0x02, 0x29, 0x01, 0x00, 0x12, 0x78, 0x9A, 0x02, 0x1F, 0x0F, 0xF4, 0x02, 0x31, + 0x7F, 0x16, 0x00, 0x0D, 0x00, 0x0B, 0x00, 0x17, 0x18, 0x00, 0x06, 0xF1, 0x02, 0x43, 0x00, 0x45, + 0x00, 0x45, 0x00, 0x43, 0x00, 0x46, 0x00, 0x47, 0x00, 0x41, 0x00, 0x46, 0x00, 0x0C, 0xBA, 0x01, + 0x1F, 0x0D, 0x18, 0x00, 0x06, 0x1F, 0x28, 0x02, 0x00, 0x0C, 0x11, 0x16, 0x5A, 0x00, 0x00, 0x5C, + 0x00, 0x00, 0x5E, 0x00, 0x3F, 0x17, 0x00, 0x16, 0x94, 0x00, 0x00, 0x05, 0x54, 0x01, 0xB3, 0x40, + 0x06, 0x00, 0xCC, 0x00, 0x09, 0x00, 0x4F, 0x00, 0x51, 0x80, 0x18, 0x00, 0x04, 0x08, 0x00, 0x01, + 0x6E, 0x00, 0x54, 0xAB, 0x00, 0x0A, 0x04, 0x11, 0x5C, 0x01, 0x03, 0x04, 0x00, 0x0F, 0xE4, 0x03, + 0x0E, 0x07, 0x0C, 0x00, 0x04, 0xA8, 0x04, 0x01, 0x14, 0x00, 0x8B, 0x01, 0x22, 0x04, 0xFF, 0x9F, + 0xAF, 0x4F, 0x01, 0x24, 0x00, 0x00, 0x01, 0x00, 0x32, 0x9F, 0xFF, 0x37, 0x98, 0x00, 0xF0, 0x10, + 0x32, 0x54, 0x76, 0x10, 0x47, 0x32, 0x65, 0x10, 0x34, 0x76, 0x25, 0x01, 0x34, 0x67, 0x25, 0x01, + 0x75, 0x64, 0x32, 0x01, 0x72, 0x56, 0x34, 0x10, 0x23, 0x74, 0x56, 0x01, 0x45, 0x32, 0x67, 0x24, + 0x00, 0x31, 0x49, 0x92, 0x24, 0x04, 0x00, 0x0C, 0x01, 0x00, 0x13, 0x12, 0x04, 0x00, 0x0C, 0x90, + 0x00, 0x80, 0x20, 0x41, 0x13, 0x1F, 0x14, 0x00, 0x01, 0x00, 0x7C, 0x00, 0x85, 0xFF, 0xFF, 0xFF, + 0x7F, 0x1F, 0xD7, 0x36, 0x40, 0xE6, 0x03, 0x24, 0x34, 0x10, 0x0A, 0x00, 0x0F, 0xCC, 0x00, 0x02, + 0x31, 0x03, 0x00, 0x05, 0x2B, 0x03, 0x22, 0x10, 0x02, 0xDD, 0x03, 0x13, 0x21, 0x15, 0x04, 0x14, + 0x40, 0x8B, 0x02, 0x07, 0x01, 0x00, 0x71, 0x80, 0x00, 0x40, 0x00, 0x04, 0x10, 0x80, 0x04, 0x04, + 0xDF, 0x81, 0x10, 0x09, 0x28, 0x93, 0x32, 0xA5, 0x44, 0x5B, 0x8A, 0x67, 0x76, 0x00, 0x01, 0x00, + 0x4C, 0x22, 0x10, 0x10, 0x04, 0x00, 0x44, 0x00, 0xEF, 0x00, 0xEF, 0x14, 0x00, 0x4D, 0x1C, 0x1C, + 0x1C, 0x1C, 0x98, 0x01, 0x21, 0x03, 0x08, 0x04, 0x00, 0xF1, 0x03, 0x00, 0x24, 0xFF, 0xFF, 0x00, + 0x44, 0x57, 0x6E, 0x00, 0x28, 0x72, 0x39, 0x00, 0x10, 0x9C, 0x4B, 0x00, 0x10, 0xA4, 0x01, 0xB2, + 0x08, 0x4C, 0x00, 0x00, 0x80, 0x20, 0x10, 0x0A, 0x00, 0x28, 0x10, 0x30, 0x03, 0x0C, 0xC0, 0x01, + 0x04, 0x08, 0x00, 0x17, 0x05, 0x0C, 0x02, 0x13, 0x04, 0x10, 0x00, 0x12, 0x07, 0x62, 0x00, 0xD2, + 0x02, 0x01, 0x02, 0x03, 0x00, 0x04, 0x05, 0xA3, 0x72, 0x0F, 0x0F, 0x00, 0x70, 0x42, 0x00, 0x16, + 0x1F, 0x28, 0x01, 0x43, 0xFF, 0x00, 0xFF, 0x01, 0xA4, 0x04, 0x24, 0x00, 0x80, 0x96, 0x00, 0x15, + 0xF0, 0x24, 0x04, 0x60, 0x43, 0xC3, 0xBA, 0xE4, 0xD3, 0x1E, 0x0B, 0x05, 0x3B, 0x80, 0x2A, 0x02, + 0x1C, 0x00, 0x0C, 0xF4, 0x00, 0x19, 0x08, 0x0E, 0x00, 0x01, 0xE6, 0x05, 0x1F, 0x03, 0x2C, 0x00, + 0x05, 0x10, 0x76, 0xE9, 0x03, 0x0F, 0x9C, 0x02, 0x00, 0x05, 0x34, 0x00, 0x0F, 0x3A, 0x00, 0x04, + 0x38, 0x7E, 0x16, 0x40, 0x03, 0x06, 0x0F, 0x38, 0x00, 0x17, 0x3F, 0x1E, 0x40, 0x04, 0xA8, 0x00, + 0x08, 0x2F, 0x00, 0xC0, 0x55, 0x00, 0x04, 0x3F, 0x46, 0x24, 0x00, 0x38, 0x00, 0x0A, 0x0F, 0x01, + 0x00, 0x05, 0x22, 0x46, 0x2C, 0x38, 0x00, 0x19, 0xEC, 0x16, 0x00, 0x0D, 0x3C, 0x01, 0x50, 0x00, + 0x00, 0x00, 0x00, 0x00, +}; + +constexpr inline const u8 SdramParamsMariko5[0x3B8] = { + 0xFF, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x2C, 0x01, + 0x00, 0x01, 0x00, 0x96, 0x88, 0x02, 0x80, 0x18, 0x40, 0x00, 0x00, 0x00, 0x40, 0x14, 0x00, 0xF0, + 0x01, 0xFF, 0xFF, 0x1F, 0x00, 0xD8, 0x51, 0x1A, 0xA0, 0x00, 0x00, 0x50, 0x05, 0x00, 0x00, 0x88, + 0x00, 0x04, 0x00, 0x20, 0x20, 0x12, 0x1A, 0x00, 0x17, 0x88, 0x04, 0x00, 0xF7, 0x00, 0x00, 0x00, + 0xBC, 0xBC, 0xAF, 0xC9, 0x3C, 0x9E, 0x00, 0x00, 0x02, 0x03, 0xE0, 0xC1, 0x04, 0x01, 0x00, 0x17, + 0x3F, 0x01, 0x00, 0x00, 0x38, 0x00, 0xD0, 0x04, 0x08, 0x00, 0x00, 0x50, 0x50, 0x50, 0x00, 0xA1, + 0x01, 0x00, 0x00, 0x30, 0x39, 0x00, 0x62, 0x10, 0x00, 0x16, 0x00, 0x10, 0x90, 0x80, 0x00, 0x03, + 0x74, 0x00, 0x13, 0x03, 0x04, 0x00, 0xD7, 0x1E, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x3A, + 0x00, 0x00, 0x00, 0x1D, 0x94, 0x00, 0x57, 0x09, 0x00, 0x00, 0x00, 0x04, 0x10, 0x00, 0x13, 0x0B, + 0x28, 0x00, 0x13, 0x08, 0x0C, 0x00, 0x00, 0x1C, 0x00, 0x53, 0x17, 0x00, 0x00, 0x00, 0x15, 0x08, + 0x00, 0x13, 0x1B, 0x28, 0x00, 0x57, 0x20, 0x00, 0x00, 0x00, 0x06, 0x04, 0x00, 0x13, 0x03, 0x18, + 0x00, 0x13, 0x04, 0x10, 0x00, 0x17, 0x02, 0x10, 0x00, 0x00, 0x4C, 0x00, 0x53, 0x0E, 0x00, 0x00, + 0x00, 0x05, 0x1C, 0x00, 0x05, 0x24, 0x01, 0x03, 0x6C, 0x00, 0x03, 0xD7, 0x01, 0x10, 0x80, 0x0A, + 0x00, 0x00, 0x0F, 0x01, 0x93, 0x18, 0x00, 0x00, 0x00, 0x1A, 0x00, 0x00, 0x00, 0x16, 0x0C, 0x00, + 0x10, 0x0A, 0x48, 0x00, 0x03, 0x61, 0x00, 0x13, 0xC1, 0x50, 0x00, 0x13, 0x08, 0x74, 0x00, 0x13, + 0x0A, 0x08, 0x00, 0x13, 0x14, 0x60, 0x00, 0x04, 0x54, 0x00, 0x13, 0x3B, 0x04, 0x00, 0x13, 0x05, + 0x04, 0x00, 0x13, 0x04, 0xEC, 0x00, 0x08, 0x0C, 0x00, 0x90, 0x1C, 0x03, 0x00, 0x00, 0x0D, 0xA0, + 0x60, 0x91, 0x3F, 0x15, 0x01, 0xF1, 0x28, 0x00, 0xF3, 0x0C, 0x04, 0x05, 0x1B, 0x06, 0x02, 0x03, + 0x07, 0x1C, 0x23, 0x25, 0x25, 0x05, 0x08, 0x1D, 0x09, 0x0A, 0x24, 0x0B, 0x1E, 0x0D, 0x0C, 0x26, + 0x26, 0x03, 0x02, 0x1B, 0x1C, 0x23, 0x03, 0x04, 0x07, 0x05, 0x06, 0x25, 0x25, 0x02, 0x0A, 0x0B, + 0x1D, 0x0D, 0x08, 0x0C, 0x09, 0x1E, 0x24, 0x26, 0x26, 0x08, 0x24, 0x06, 0x07, 0x9A, 0xBF, 0x01, + 0x3C, 0xFF, 0x00, 0xFF, 0x00, 0x02, 0xB0, 0x04, 0x00, 0x01, 0x88, 0x00, 0x00, 0x02, 0x88, 0x00, + 0x00, 0x0D, 0xD5, 0x01, 0xF2, 0x0E, 0xC0, 0x31, 0x31, 0x03, 0x88, 0x00, 0x00, 0x0B, 0x88, 0x5D, + 0x5D, 0x0E, 0x8C, 0x5D, 0x5D, 0x0C, 0x88, 0x08, 0x08, 0x0D, 0x8C, 0x00, 0x00, 0x0D, 0x8C, 0x14, + 0x14, 0x16, 0x88, 0x2C, 0x00, 0x2C, 0x11, 0x08, 0xDF, 0x02, 0x70, 0x10, 0x00, 0xCC, 0x00, 0x0A, + 0x00, 0x33, 0x6E, 0x01, 0x40, 0xF3, 0x25, 0x08, 0x11, 0x69, 0x00, 0x23, 0x0F, 0x00, 0x30, 0x01, + 0x80, 0x01, 0x03, 0x00, 0x70, 0x00, 0x0C, 0x00, 0x01, 0x0C, 0x00, 0xC0, 0x08, 0x44, 0x00, 0x10, + 0x04, 0x04, 0x00, 0x06, 0x13, 0x07, 0x00, 0x80, 0x10, 0x00, 0x71, 0xA0, 0x00, 0x2C, 0x00, 0x01, + 0x37, 0x0F, 0x52, 0x01, 0x00, 0x10, 0x01, 0xD3, 0x0C, 0x00, 0x04, 0x00, 0x1F, 0x22, 0x20, 0x80, + 0x0F, 0xF4, 0x20, 0x02, 0x32, 0x01, 0x00, 0x13, 0x29, 0x01, 0x00, 0x12, 0x78, 0x9A, 0x02, 0x1F, + 0x0F, 0xF4, 0x02, 0x31, 0x7F, 0x18, 0x00, 0x0F, 0x00, 0x0B, 0x00, 0x17, 0x18, 0x00, 0x06, 0xF1, + 0x02, 0x48, 0x00, 0x44, 0x00, 0x45, 0x00, 0x44, 0x00, 0x47, 0x00, 0x47, 0x00, 0x41, 0x00, 0x46, + 0x00, 0x0D, 0x8E, 0x01, 0x1F, 0x0D, 0x18, 0x00, 0x06, 0x1F, 0x78, 0x02, 0x00, 0x0C, 0x11, 0x18, + 0x5A, 0x00, 0x00, 0x5C, 0x00, 0x00, 0x5E, 0x00, 0x3F, 0x17, 0x00, 0x18, 0x94, 0x00, 0x00, 0x05, + 0x54, 0x01, 0xB3, 0x40, 0x06, 0x00, 0xCC, 0x00, 0x09, 0x00, 0x4F, 0x00, 0x51, 0x80, 0x18, 0x00, + 0x04, 0x08, 0x00, 0x01, 0x40, 0x02, 0x54, 0xAB, 0x00, 0x0A, 0x04, 0x11, 0x5C, 0x01, 0x03, 0x04, + 0x00, 0x0F, 0xE4, 0x03, 0x0E, 0x07, 0x0C, 0x00, 0x04, 0xA8, 0x04, 0x01, 0x14, 0x00, 0x8B, 0x01, + 0x22, 0x04, 0xFF, 0x9F, 0xAF, 0x4F, 0x01, 0x24, 0x00, 0x00, 0x01, 0x00, 0x32, 0x9F, 0xFF, 0x37, + 0x98, 0x00, 0xF0, 0x10, 0x32, 0x54, 0x76, 0x10, 0x47, 0x32, 0x65, 0x10, 0x34, 0x76, 0x25, 0x01, + 0x34, 0x67, 0x25, 0x01, 0x75, 0x64, 0x32, 0x01, 0x72, 0x56, 0x34, 0x10, 0x23, 0x74, 0x56, 0x01, + 0x45, 0x32, 0x67, 0x24, 0x00, 0x31, 0x49, 0x92, 0x24, 0x04, 0x00, 0x0C, 0x01, 0x00, 0x13, 0x12, + 0x04, 0x00, 0x0C, 0x90, 0x00, 0x80, 0x20, 0x41, 0x13, 0x1F, 0x14, 0x00, 0x01, 0x00, 0x7C, 0x00, + 0x85, 0xFF, 0xFF, 0xFF, 0x7F, 0x1F, 0xD7, 0x36, 0x40, 0xE6, 0x03, 0x24, 0x34, 0x10, 0x0A, 0x00, + 0x0F, 0xCC, 0x00, 0x02, 0x31, 0x03, 0x00, 0x05, 0x2B, 0x03, 0x22, 0x10, 0x02, 0xDD, 0x03, 0x13, + 0x21, 0x15, 0x04, 0x14, 0x40, 0x8B, 0x02, 0x07, 0x01, 0x00, 0x71, 0x80, 0x00, 0x40, 0x00, 0x04, + 0x10, 0x80, 0x04, 0x04, 0xDF, 0x81, 0x10, 0x09, 0x28, 0x93, 0x32, 0xA5, 0x44, 0x5B, 0x8A, 0x67, + 0x76, 0x00, 0x01, 0x00, 0x4C, 0x22, 0x10, 0x10, 0x04, 0x00, 0x44, 0x00, 0xEF, 0x00, 0xEF, 0x14, + 0x00, 0x4D, 0x1C, 0x1C, 0x1C, 0x1C, 0x98, 0x01, 0x21, 0x03, 0x08, 0x04, 0x00, 0xF1, 0x03, 0x00, + 0x24, 0xFF, 0xFF, 0x00, 0x44, 0x57, 0x6E, 0x00, 0x28, 0x72, 0x39, 0x00, 0x10, 0x9C, 0x4B, 0x00, + 0x10, 0xA4, 0x01, 0xB2, 0x08, 0x4C, 0x00, 0x00, 0x80, 0x20, 0x10, 0x0A, 0x00, 0x28, 0x10, 0x30, + 0x03, 0x0C, 0xC0, 0x01, 0x04, 0x08, 0x00, 0x17, 0x05, 0x0C, 0x02, 0x13, 0x04, 0x10, 0x00, 0x12, + 0x07, 0x62, 0x00, 0xD2, 0x02, 0x01, 0x02, 0x03, 0x00, 0x04, 0x05, 0xA3, 0x72, 0x0F, 0x0F, 0x00, + 0x70, 0x42, 0x00, 0x16, 0x1F, 0x28, 0x01, 0x43, 0xFF, 0x00, 0xFF, 0x01, 0xA4, 0x04, 0x24, 0x00, + 0x80, 0x96, 0x00, 0x15, 0xF0, 0x24, 0x04, 0x60, 0x43, 0xC3, 0xBA, 0xE4, 0xD3, 0x1E, 0x0B, 0x05, + 0x3B, 0x80, 0x2A, 0x02, 0x1C, 0x00, 0x0C, 0xF4, 0x00, 0x19, 0x08, 0x0E, 0x00, 0x01, 0xE6, 0x05, + 0x1F, 0x03, 0x2C, 0x00, 0x05, 0x10, 0x76, 0xE9, 0x03, 0x0F, 0x9C, 0x02, 0x00, 0x05, 0x34, 0x00, + 0x0F, 0x3A, 0x00, 0x04, 0x38, 0x7E, 0x16, 0x40, 0x03, 0x06, 0x0F, 0x38, 0x00, 0x17, 0x3F, 0x1E, + 0x40, 0x04, 0xA8, 0x00, 0x08, 0x2F, 0x00, 0xC0, 0x55, 0x00, 0x04, 0x3F, 0x46, 0x24, 0x00, 0x38, + 0x00, 0x0A, 0x0F, 0x01, 0x00, 0x05, 0x22, 0x46, 0x2C, 0x38, 0x00, 0x19, 0xEC, 0x16, 0x00, 0x0D, + 0x3C, 0x01, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, +}; + +constexpr inline const u8 SdramParamsMariko6[0x3B3] = { + 0xFF, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x2C, 0x01, + 0x00, 0x01, 0x00, 0x96, 0x88, 0x02, 0x80, 0x18, 0x40, 0x00, 0x00, 0x00, 0x40, 0x14, 0x00, 0xF0, + 0x01, 0xFF, 0xFF, 0x1F, 0x00, 0xD8, 0x51, 0x1A, 0xA0, 0x00, 0x00, 0x50, 0x05, 0x00, 0x00, 0x88, + 0x00, 0x04, 0x00, 0x20, 0x20, 0x12, 0x1A, 0x00, 0x17, 0x88, 0x04, 0x00, 0xF7, 0x00, 0x00, 0x00, + 0xBC, 0xBC, 0xAF, 0xC9, 0x3C, 0x9E, 0x00, 0x00, 0x02, 0x03, 0xE0, 0xC1, 0x04, 0x01, 0x00, 0x17, + 0x3F, 0x01, 0x00, 0x00, 0x38, 0x00, 0xD0, 0x04, 0x08, 0x00, 0x00, 0x50, 0x50, 0x50, 0x00, 0xA1, + 0x01, 0x00, 0x00, 0x30, 0x39, 0x00, 0x62, 0x10, 0x00, 0x16, 0x00, 0x10, 0x90, 0x80, 0x00, 0x03, + 0x74, 0x00, 0x13, 0x03, 0x04, 0x00, 0xD7, 0x1E, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x3A, + 0x00, 0x00, 0x00, 0x1D, 0x94, 0x00, 0x57, 0x09, 0x00, 0x00, 0x00, 0x04, 0x10, 0x00, 0x13, 0x0B, + 0x28, 0x00, 0x13, 0x08, 0x0C, 0x00, 0x00, 0x1C, 0x00, 0x53, 0x17, 0x00, 0x00, 0x00, 0x15, 0x08, + 0x00, 0x13, 0x1B, 0x28, 0x00, 0x57, 0x20, 0x00, 0x00, 0x00, 0x06, 0x04, 0x00, 0x13, 0x03, 0x18, + 0x00, 0x13, 0x04, 0x10, 0x00, 0x17, 0x02, 0x10, 0x00, 0x00, 0x4C, 0x00, 0x13, 0x0E, 0x18, 0x00, + 0x17, 0x05, 0x6C, 0x00, 0x00, 0x34, 0x00, 0x13, 0x0C, 0xE0, 0x01, 0x40, 0x00, 0x00, 0x00, 0x80, + 0x0A, 0x00, 0x00, 0x0F, 0x01, 0x93, 0x18, 0x00, 0x00, 0x00, 0x1A, 0x00, 0x00, 0x00, 0x16, 0x0C, + 0x00, 0x10, 0x0A, 0x48, 0x00, 0x03, 0x61, 0x00, 0x13, 0xC1, 0x50, 0x00, 0x13, 0x08, 0x40, 0x00, + 0x13, 0x0A, 0x08, 0x00, 0x13, 0x14, 0x5C, 0x00, 0x13, 0x02, 0xC0, 0x00, 0x13, 0x3B, 0x04, 0x00, + 0x13, 0x05, 0x04, 0x00, 0x13, 0x04, 0xEC, 0x00, 0x08, 0x0C, 0x00, 0x90, 0x1C, 0x03, 0x00, 0x00, + 0x0D, 0xA0, 0x60, 0x91, 0x3F, 0x15, 0x01, 0xF1, 0x28, 0x00, 0xF3, 0x0C, 0x04, 0x05, 0x1B, 0x06, + 0x02, 0x03, 0x07, 0x1C, 0x23, 0x25, 0x25, 0x05, 0x08, 0x1D, 0x09, 0x0A, 0x24, 0x0B, 0x1E, 0x0D, + 0x0C, 0x26, 0x26, 0x03, 0x02, 0x1B, 0x1C, 0x23, 0x03, 0x04, 0x07, 0x05, 0x06, 0x25, 0x25, 0x02, + 0x0A, 0x0B, 0x1D, 0x0D, 0x08, 0x0C, 0x09, 0x1E, 0x24, 0x26, 0x26, 0x08, 0x24, 0x06, 0x07, 0x9A, + 0xBF, 0x01, 0x3C, 0xFF, 0x00, 0xFF, 0x00, 0x02, 0xB0, 0x04, 0x00, 0x01, 0x88, 0x00, 0x00, 0x02, + 0x88, 0x00, 0x00, 0x0D, 0xD5, 0x01, 0xF2, 0x0E, 0xC0, 0x31, 0x31, 0x03, 0x88, 0x00, 0x00, 0x0B, + 0x88, 0x5D, 0x5D, 0x0E, 0x8C, 0x5D, 0x5D, 0x0C, 0x88, 0x08, 0x08, 0x0D, 0x8C, 0x00, 0x00, 0x0D, + 0x8C, 0x14, 0x14, 0x16, 0x88, 0x2C, 0x00, 0x2C, 0x11, 0x08, 0xDF, 0x02, 0x70, 0x10, 0x00, 0xCC, + 0x00, 0x0A, 0x00, 0x33, 0x6E, 0x01, 0x40, 0xF3, 0x25, 0x08, 0x11, 0x69, 0x00, 0x23, 0x0F, 0x00, + 0x30, 0x01, 0x80, 0x01, 0x03, 0x00, 0x70, 0x00, 0x0C, 0x00, 0x01, 0x0C, 0x00, 0xC0, 0x08, 0x44, + 0x00, 0x10, 0x04, 0x04, 0x00, 0x06, 0x13, 0x07, 0x00, 0x80, 0x10, 0x00, 0x71, 0xA0, 0x00, 0x2C, + 0x00, 0x01, 0x37, 0x0F, 0x52, 0x01, 0x11, 0x02, 0x64, 0x01, 0xBB, 0x04, 0x00, 0x1F, 0x22, 0x20, + 0x80, 0x0F, 0xF4, 0x20, 0x02, 0x29, 0x01, 0x00, 0x12, 0x78, 0x9A, 0x02, 0x1F, 0x0F, 0xF4, 0x02, + 0x31, 0x7F, 0x16, 0x00, 0x0D, 0x00, 0x0B, 0x00, 0x17, 0x18, 0x00, 0x06, 0xF1, 0x02, 0x43, 0x00, + 0x45, 0x00, 0x45, 0x00, 0x43, 0x00, 0x46, 0x00, 0x47, 0x00, 0x41, 0x00, 0x46, 0x00, 0x0C, 0xBA, + 0x01, 0x1F, 0x0D, 0x18, 0x00, 0x06, 0x1F, 0x28, 0x02, 0x00, 0x0C, 0x11, 0x16, 0x5A, 0x00, 0x00, + 0x5C, 0x00, 0x00, 0x5E, 0x00, 0x3F, 0x17, 0x00, 0x16, 0x94, 0x00, 0x00, 0x05, 0x54, 0x01, 0xB3, + 0x40, 0x06, 0x00, 0xCC, 0x00, 0x09, 0x00, 0x4F, 0x00, 0x51, 0x80, 0x18, 0x00, 0x04, 0x08, 0x00, + 0x01, 0x6E, 0x00, 0x54, 0xAB, 0x00, 0x0A, 0x04, 0x11, 0x5C, 0x01, 0x03, 0x04, 0x00, 0x0F, 0xE4, + 0x03, 0x0E, 0x0B, 0xCC, 0x02, 0x14, 0x01, 0x14, 0x00, 0x8B, 0x01, 0x22, 0x04, 0xFF, 0x9F, 0xAF, + 0x4F, 0x01, 0x24, 0x00, 0x00, 0x01, 0x00, 0x32, 0x9F, 0xFF, 0x37, 0x98, 0x00, 0xF0, 0x10, 0x32, + 0x54, 0x76, 0x10, 0x47, 0x32, 0x65, 0x10, 0x34, 0x76, 0x25, 0x01, 0x34, 0x67, 0x25, 0x01, 0x75, + 0x64, 0x32, 0x01, 0x72, 0x56, 0x34, 0x10, 0x23, 0x74, 0x56, 0x01, 0x45, 0x32, 0x67, 0x24, 0x00, + 0x31, 0x49, 0x92, 0x24, 0x04, 0x00, 0x0C, 0x01, 0x00, 0x13, 0x12, 0x04, 0x00, 0x0C, 0x90, 0x00, + 0x80, 0x20, 0x41, 0x13, 0x1F, 0x14, 0x00, 0x01, 0x00, 0x7C, 0x00, 0x85, 0xFF, 0xFF, 0xFF, 0x7F, + 0x1F, 0xD7, 0x36, 0x40, 0xE6, 0x03, 0x24, 0x34, 0x10, 0x0A, 0x00, 0x0F, 0xCC, 0x00, 0x02, 0x31, + 0x03, 0x00, 0x05, 0x2B, 0x03, 0x22, 0x10, 0x02, 0xDD, 0x03, 0x13, 0x21, 0x15, 0x04, 0x14, 0x40, + 0x8B, 0x02, 0x07, 0x01, 0x00, 0x71, 0x80, 0x00, 0x40, 0x00, 0x04, 0x10, 0x80, 0x04, 0x04, 0xDF, + 0x81, 0x10, 0x09, 0x28, 0x93, 0x32, 0xA5, 0x44, 0x5B, 0x8A, 0x67, 0x76, 0x00, 0x01, 0x00, 0x4C, + 0x22, 0x10, 0x10, 0x04, 0x00, 0x44, 0x00, 0xEF, 0x00, 0xEF, 0x14, 0x00, 0x4D, 0x1C, 0x1C, 0x1C, + 0x1C, 0x98, 0x01, 0x21, 0x03, 0x08, 0x04, 0x00, 0xF1, 0x03, 0x00, 0x24, 0xFF, 0xFF, 0x00, 0x44, + 0x57, 0x6E, 0x00, 0x28, 0x72, 0x39, 0x00, 0x10, 0x9C, 0x4B, 0x00, 0x10, 0xA4, 0x01, 0xB2, 0x08, + 0x4C, 0x00, 0x00, 0x80, 0x20, 0x10, 0x0A, 0x00, 0x28, 0x10, 0x30, 0x03, 0x0C, 0xC0, 0x01, 0x04, + 0x08, 0x00, 0x17, 0x05, 0x0C, 0x02, 0x13, 0x04, 0x10, 0x00, 0x12, 0x07, 0x62, 0x00, 0xD2, 0x02, + 0x01, 0x02, 0x03, 0x00, 0x04, 0x05, 0xA3, 0x72, 0x0F, 0x0F, 0x00, 0x70, 0x42, 0x00, 0x16, 0x1F, + 0x28, 0x01, 0x43, 0xFF, 0x00, 0xFF, 0x01, 0xA4, 0x04, 0x24, 0x00, 0x80, 0x96, 0x00, 0x15, 0xF0, + 0x24, 0x04, 0x60, 0x43, 0xC3, 0xBA, 0xE4, 0xD3, 0x1E, 0x0F, 0x05, 0x3B, 0x80, 0x2A, 0x02, 0x1C, + 0x00, 0x0C, 0xF4, 0x00, 0x19, 0x08, 0x0E, 0x00, 0x01, 0xE6, 0x05, 0x1F, 0x03, 0x2C, 0x00, 0x05, + 0x10, 0x76, 0xE9, 0x03, 0x0F, 0x9C, 0x02, 0x00, 0x05, 0x34, 0x00, 0x0F, 0x3A, 0x00, 0x04, 0x38, + 0x7E, 0x16, 0x40, 0x03, 0x06, 0x0F, 0x38, 0x00, 0x17, 0x3F, 0x1E, 0x40, 0x04, 0xA8, 0x00, 0x08, + 0x2F, 0x00, 0xC0, 0x55, 0x00, 0x04, 0x3F, 0x46, 0x24, 0x00, 0x38, 0x00, 0x0A, 0x0F, 0x01, 0x00, + 0x05, 0x22, 0x46, 0x2C, 0x38, 0x00, 0x19, 0xEC, 0x16, 0x00, 0x0D, 0x3C, 0x01, 0x50, 0x00, 0x00, + 0x00, 0x00, 0x00, +}; + +constexpr inline const u8 SdramParamsMariko7[0x3B4] = { + 0xFF, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x2C, 0x01, + 0x00, 0x01, 0x00, 0x96, 0x88, 0x02, 0x80, 0x18, 0x40, 0x00, 0x00, 0x00, 0x40, 0x14, 0x00, 0xF0, + 0x01, 0xFF, 0xFF, 0x1F, 0x00, 0xD8, 0x51, 0x1A, 0xA0, 0x00, 0x00, 0x50, 0x05, 0x00, 0x00, 0x88, + 0x00, 0x04, 0x00, 0x20, 0x20, 0x12, 0x1A, 0x00, 0x17, 0x88, 0x04, 0x00, 0xF7, 0x00, 0x00, 0x00, + 0xBC, 0xBC, 0xAF, 0xC9, 0x3C, 0x9E, 0x00, 0x00, 0x02, 0x03, 0xE0, 0xC1, 0x04, 0x01, 0x00, 0x17, + 0x3F, 0x01, 0x00, 0x00, 0x38, 0x00, 0xD0, 0x04, 0x08, 0x00, 0x00, 0x50, 0x50, 0x50, 0x00, 0xA1, + 0x01, 0x00, 0x00, 0x30, 0x39, 0x00, 0x61, 0x10, 0x00, 0x16, 0x00, 0x10, 0x90, 0x30, 0x01, 0x13, + 0x02, 0x74, 0x00, 0x13, 0x03, 0x04, 0x00, 0xD7, 0x1E, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, + 0x3A, 0x00, 0x00, 0x00, 0x1D, 0x94, 0x00, 0x57, 0x09, 0x00, 0x00, 0x00, 0x04, 0x10, 0x00, 0x13, + 0x0B, 0x28, 0x00, 0x13, 0x08, 0x0C, 0x00, 0x00, 0x1C, 0x00, 0x53, 0x17, 0x00, 0x00, 0x00, 0x15, + 0x08, 0x00, 0x13, 0x1B, 0x28, 0x00, 0x57, 0x20, 0x00, 0x00, 0x00, 0x06, 0x04, 0x00, 0x13, 0x03, + 0x18, 0x00, 0x13, 0x04, 0x10, 0x00, 0x17, 0x02, 0x10, 0x00, 0x00, 0x4C, 0x00, 0x13, 0x0E, 0x18, + 0x00, 0x17, 0x05, 0x6C, 0x00, 0x00, 0x34, 0x00, 0x13, 0x0C, 0xE0, 0x01, 0x40, 0x00, 0x00, 0x00, + 0x80, 0x0A, 0x00, 0x00, 0x0F, 0x01, 0x93, 0x18, 0x00, 0x00, 0x00, 0x1A, 0x00, 0x00, 0x00, 0x16, + 0x0C, 0x00, 0x10, 0x0A, 0x48, 0x00, 0x03, 0x61, 0x00, 0x13, 0xC1, 0x50, 0x00, 0x13, 0x08, 0x40, + 0x00, 0x13, 0x0A, 0x08, 0x00, 0x13, 0x14, 0x5C, 0x00, 0x13, 0x02, 0xC0, 0x00, 0x13, 0x3B, 0x04, + 0x00, 0x13, 0x05, 0x04, 0x00, 0x04, 0x88, 0x00, 0x04, 0x0C, 0x00, 0x00, 0xF8, 0x00, 0x90, 0x1C, + 0x03, 0x00, 0x00, 0x0D, 0xA0, 0x60, 0x91, 0x3F, 0x15, 0x01, 0xF1, 0x28, 0x00, 0xF3, 0x0C, 0x04, + 0x05, 0x1B, 0x06, 0x02, 0x03, 0x07, 0x1C, 0x23, 0x25, 0x25, 0x05, 0x08, 0x1D, 0x09, 0x0A, 0x24, + 0x0B, 0x1E, 0x0D, 0x0C, 0x26, 0x26, 0x03, 0x02, 0x1B, 0x1C, 0x23, 0x03, 0x04, 0x07, 0x05, 0x06, + 0x25, 0x25, 0x02, 0x0A, 0x0B, 0x1D, 0x0D, 0x08, 0x0C, 0x09, 0x1E, 0x24, 0x26, 0x26, 0x08, 0x24, + 0x06, 0x07, 0x9A, 0xBF, 0x01, 0x3C, 0xFF, 0x00, 0xFF, 0x00, 0x02, 0xB0, 0x04, 0x00, 0x01, 0x08, + 0x00, 0x00, 0x02, 0x08, 0x00, 0x00, 0x0D, 0x77, 0x00, 0xF2, 0x0E, 0xC0, 0x31, 0x31, 0x03, 0x08, + 0x00, 0x00, 0x0B, 0x08, 0x5D, 0x5D, 0x0E, 0x0C, 0x5D, 0x5D, 0x0C, 0x08, 0x08, 0x08, 0x0D, 0x0C, + 0x00, 0x00, 0x0D, 0x0C, 0x14, 0x14, 0x16, 0x08, 0x2C, 0x00, 0x2C, 0x11, 0x08, 0xDF, 0x02, 0x70, + 0x10, 0x00, 0xCC, 0x00, 0x0A, 0x00, 0x33, 0x6E, 0x01, 0x40, 0xF3, 0x25, 0x08, 0x11, 0x69, 0x00, + 0x23, 0x0F, 0x00, 0x30, 0x01, 0x80, 0x01, 0x03, 0x00, 0x70, 0x00, 0x0C, 0x00, 0x01, 0x0C, 0x00, + 0xA2, 0x08, 0x44, 0x00, 0x10, 0x04, 0x04, 0x00, 0x06, 0x13, 0x07, 0x1C, 0x00, 0x71, 0xA0, 0x00, + 0x2C, 0x00, 0x01, 0x37, 0x0F, 0x52, 0x01, 0x11, 0x00, 0x64, 0x01, 0xBB, 0x04, 0x00, 0x1F, 0x22, + 0x20, 0x80, 0x0F, 0xF4, 0x20, 0x02, 0x29, 0x01, 0x00, 0x12, 0x78, 0x9A, 0x02, 0x1F, 0x0F, 0xF4, + 0x02, 0x31, 0x7F, 0x16, 0x00, 0x0D, 0x00, 0x0B, 0x00, 0x17, 0x18, 0x00, 0x06, 0xF1, 0x02, 0x43, + 0x00, 0x45, 0x00, 0x45, 0x00, 0x43, 0x00, 0x46, 0x00, 0x47, 0x00, 0x41, 0x00, 0x46, 0x00, 0x0C, + 0xBA, 0x01, 0x1F, 0x0D, 0x18, 0x00, 0x06, 0x1F, 0x28, 0x02, 0x00, 0x0C, 0x11, 0x16, 0x5A, 0x00, + 0x00, 0x5C, 0x00, 0x00, 0x5E, 0x00, 0x3F, 0x17, 0x00, 0x16, 0x94, 0x00, 0x00, 0x05, 0x54, 0x01, + 0xA4, 0x40, 0x06, 0x00, 0xCC, 0x00, 0x09, 0x00, 0x4F, 0x00, 0x51, 0x18, 0x00, 0x63, 0x80, 0x01, + 0x00, 0x00, 0x40, 0x01, 0x40, 0x02, 0x54, 0xAB, 0x00, 0x0A, 0x04, 0x11, 0x5C, 0x01, 0x03, 0x04, + 0x00, 0x0F, 0xE4, 0x03, 0x0E, 0x0B, 0xCC, 0x02, 0x05, 0x78, 0x03, 0x8B, 0x01, 0x22, 0x04, 0xFF, + 0x9F, 0xAF, 0x4F, 0x01, 0x24, 0x00, 0x00, 0x01, 0x00, 0x32, 0x9F, 0xFF, 0x37, 0x80, 0x00, 0xF0, + 0x10, 0x32, 0x54, 0x76, 0x10, 0x47, 0x32, 0x65, 0x10, 0x34, 0x76, 0x25, 0x01, 0x34, 0x67, 0x25, + 0x01, 0x75, 0x64, 0x32, 0x01, 0x72, 0x56, 0x34, 0x10, 0x23, 0x74, 0x56, 0x01, 0x45, 0x32, 0x67, + 0x24, 0x00, 0x31, 0x49, 0x92, 0x24, 0x04, 0x00, 0x0C, 0x01, 0x00, 0x13, 0x12, 0x04, 0x00, 0x0C, + 0x90, 0x00, 0x80, 0x20, 0x41, 0x13, 0x1F, 0x14, 0x00, 0x01, 0x00, 0x7C, 0x00, 0x85, 0xFF, 0xFF, + 0xFF, 0x7F, 0x1F, 0xD7, 0x36, 0x40, 0xE6, 0x03, 0x24, 0x34, 0x10, 0x0A, 0x00, 0x0F, 0xCC, 0x00, + 0x02, 0x31, 0x03, 0x00, 0x05, 0x2B, 0x03, 0x22, 0x10, 0x02, 0xDD, 0x03, 0x13, 0x21, 0x15, 0x04, + 0x14, 0x40, 0x8B, 0x02, 0x1D, 0x00, 0x9D, 0x02, 0x01, 0x04, 0x04, 0xDF, 0x81, 0x10, 0x09, 0x28, + 0x93, 0x32, 0xA5, 0x44, 0x5B, 0x8A, 0x67, 0x76, 0x00, 0x01, 0x00, 0x4C, 0x22, 0x10, 0x10, 0x04, + 0x00, 0x44, 0x00, 0xEF, 0x00, 0xEF, 0x14, 0x00, 0x4C, 0x1C, 0x1C, 0x1C, 0x1C, 0xF0, 0x01, 0x31, + 0x02, 0x03, 0x08, 0x04, 0x00, 0xF1, 0x03, 0x00, 0x24, 0xFF, 0xFF, 0x00, 0x44, 0x57, 0x6E, 0x00, + 0x28, 0x72, 0x39, 0x00, 0x10, 0x9C, 0x4B, 0x00, 0x20, 0x20, 0x00, 0xB1, 0x08, 0x4C, 0x00, 0x00, + 0x80, 0x20, 0x10, 0x0A, 0x00, 0x28, 0x10, 0x04, 0x02, 0x09, 0xC0, 0x01, 0x17, 0x01, 0xC8, 0x01, + 0x04, 0x50, 0x04, 0x13, 0x01, 0x34, 0x04, 0x00, 0x10, 0x00, 0x11, 0x07, 0x10, 0x00, 0xE2, 0x02, + 0x02, 0x01, 0x02, 0x03, 0x00, 0x04, 0x05, 0xA3, 0x72, 0x0F, 0x0F, 0x00, 0x70, 0x42, 0x00, 0x16, + 0x1F, 0x28, 0x01, 0x43, 0xFF, 0x00, 0xFF, 0x01, 0x70, 0x04, 0x04, 0x84, 0x03, 0x35, 0x00, 0x00, + 0xF0, 0x24, 0x04, 0x60, 0x43, 0xC3, 0xBA, 0xE4, 0xD3, 0x1E, 0x0F, 0x05, 0x3B, 0x80, 0x2A, 0x02, + 0x1C, 0x00, 0x0C, 0xF4, 0x00, 0x19, 0x08, 0x0E, 0x00, 0x01, 0xE6, 0x05, 0x1F, 0x03, 0x2C, 0x00, + 0x05, 0x10, 0x76, 0xE9, 0x03, 0x0F, 0x9C, 0x02, 0x00, 0x05, 0x34, 0x00, 0x0F, 0x3A, 0x00, 0x04, + 0x38, 0x7E, 0x16, 0x40, 0x03, 0x06, 0x0F, 0x38, 0x00, 0x17, 0x3F, 0x1E, 0x40, 0x04, 0xA8, 0x00, + 0x08, 0x2F, 0x00, 0xC0, 0x55, 0x00, 0x04, 0x3F, 0x46, 0x24, 0x00, 0x38, 0x00, 0x0A, 0x0F, 0x01, + 0x00, 0x05, 0x22, 0x46, 0x2C, 0x38, 0x00, 0x19, 0xEC, 0x16, 0x00, 0x0D, 0x3C, 0x01, 0x50, 0x00, + 0x00, 0x00, 0x00, 0x00, +}; + +constexpr inline const u8 SdramParamsMariko8[0x3B7] = { + 0xFF, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x2C, 0x01, + 0x00, 0x01, 0x00, 0x96, 0x88, 0x02, 0x80, 0x18, 0x40, 0x00, 0x00, 0x00, 0x40, 0x14, 0x00, 0xF0, + 0x01, 0xFF, 0xFF, 0x1F, 0x00, 0xD8, 0x51, 0x1A, 0xA0, 0x00, 0x00, 0x50, 0x05, 0x00, 0x00, 0x88, + 0x00, 0x04, 0x00, 0x20, 0x20, 0x12, 0x1A, 0x00, 0x17, 0x88, 0x04, 0x00, 0xF7, 0x00, 0x00, 0x00, + 0xBC, 0xBC, 0xAF, 0xC9, 0x3C, 0x9E, 0x00, 0x00, 0x02, 0x03, 0xE0, 0xC1, 0x04, 0x01, 0x00, 0x17, + 0x3F, 0x01, 0x00, 0x00, 0x38, 0x00, 0xD0, 0x04, 0x08, 0x00, 0x00, 0x50, 0x50, 0x50, 0x00, 0xA1, + 0x01, 0x00, 0x00, 0x30, 0x39, 0x00, 0x62, 0x10, 0x00, 0x16, 0x00, 0x10, 0x90, 0x80, 0x00, 0x03, + 0x74, 0x00, 0x13, 0x03, 0x04, 0x00, 0xD7, 0x1E, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x3A, + 0x00, 0x00, 0x00, 0x1D, 0x94, 0x00, 0x57, 0x09, 0x00, 0x00, 0x00, 0x04, 0x10, 0x00, 0x13, 0x0B, + 0x28, 0x00, 0x13, 0x08, 0x0C, 0x00, 0x00, 0x1C, 0x00, 0x53, 0x17, 0x00, 0x00, 0x00, 0x15, 0x08, + 0x00, 0x13, 0x1B, 0x28, 0x00, 0x57, 0x20, 0x00, 0x00, 0x00, 0x06, 0x04, 0x00, 0x13, 0x03, 0x18, + 0x00, 0x13, 0x04, 0x10, 0x00, 0x17, 0x02, 0x10, 0x00, 0x00, 0x4C, 0x00, 0x53, 0x0E, 0x00, 0x00, + 0x00, 0x05, 0x1C, 0x00, 0x05, 0x24, 0x01, 0x03, 0x6C, 0x00, 0x03, 0xD7, 0x01, 0x10, 0x80, 0x0A, + 0x00, 0x00, 0x0F, 0x01, 0x93, 0x18, 0x00, 0x00, 0x00, 0x1A, 0x00, 0x00, 0x00, 0x16, 0x0C, 0x00, + 0x10, 0x0A, 0x48, 0x00, 0x03, 0x61, 0x00, 0x13, 0xC1, 0x50, 0x00, 0x13, 0x08, 0x74, 0x00, 0x13, + 0x0A, 0x08, 0x00, 0x13, 0x14, 0x60, 0x00, 0x04, 0x54, 0x00, 0x13, 0x3B, 0x04, 0x00, 0x13, 0x05, + 0x04, 0x00, 0x04, 0x88, 0x00, 0x04, 0x0C, 0x00, 0x00, 0xF8, 0x00, 0x90, 0x1C, 0x03, 0x00, 0x00, + 0x0D, 0xA0, 0x60, 0x91, 0x3F, 0x15, 0x01, 0xF1, 0x28, 0x00, 0xF3, 0x0C, 0x04, 0x05, 0x1B, 0x06, + 0x02, 0x03, 0x07, 0x1C, 0x23, 0x25, 0x25, 0x05, 0x08, 0x1D, 0x09, 0x0A, 0x24, 0x0B, 0x1E, 0x0D, + 0x0C, 0x26, 0x26, 0x03, 0x02, 0x1B, 0x1C, 0x23, 0x03, 0x04, 0x07, 0x05, 0x06, 0x25, 0x25, 0x02, + 0x0A, 0x0B, 0x1D, 0x0D, 0x08, 0x0C, 0x09, 0x1E, 0x24, 0x26, 0x26, 0x08, 0x24, 0x06, 0x07, 0x9A, + 0xBF, 0x01, 0x3C, 0xFF, 0x00, 0xFF, 0x00, 0x02, 0xB0, 0x04, 0x00, 0x01, 0x88, 0x00, 0x00, 0x02, + 0x88, 0x00, 0x00, 0x0D, 0xD5, 0x01, 0xF2, 0x0E, 0xC0, 0x31, 0x31, 0x03, 0x88, 0x00, 0x00, 0x0B, + 0x88, 0x5D, 0x5D, 0x0E, 0x8C, 0x5D, 0x5D, 0x0C, 0x88, 0x08, 0x08, 0x0D, 0x8C, 0x00, 0x00, 0x0D, + 0x8C, 0x14, 0x14, 0x16, 0x88, 0x2C, 0x00, 0x2C, 0x11, 0x08, 0xDF, 0x02, 0x70, 0x10, 0x00, 0xCC, + 0x00, 0x0A, 0x00, 0x33, 0x6E, 0x01, 0x40, 0xF3, 0x25, 0x08, 0x11, 0x69, 0x00, 0x23, 0x0F, 0x00, + 0x30, 0x01, 0x80, 0x01, 0x03, 0x00, 0x70, 0x00, 0x0C, 0x00, 0x01, 0x0C, 0x00, 0xC0, 0x08, 0x44, + 0x00, 0x10, 0x04, 0x04, 0x00, 0x06, 0x13, 0x07, 0x00, 0x80, 0x10, 0x00, 0x71, 0xA0, 0x00, 0x2C, + 0x00, 0x01, 0x37, 0x0F, 0x52, 0x01, 0x00, 0x10, 0x01, 0xDB, 0x0C, 0x00, 0x04, 0x00, 0x1F, 0x22, + 0x20, 0x80, 0x0F, 0xF4, 0x20, 0x02, 0x29, 0x01, 0x00, 0x12, 0x78, 0x9A, 0x02, 0x1F, 0x0F, 0xF4, + 0x02, 0x31, 0x7F, 0x18, 0x00, 0x0F, 0x00, 0x0B, 0x00, 0x17, 0x18, 0x00, 0x06, 0xF1, 0x02, 0x48, + 0x00, 0x44, 0x00, 0x45, 0x00, 0x44, 0x00, 0x47, 0x00, 0x47, 0x00, 0x41, 0x00, 0x46, 0x00, 0x0D, + 0x8E, 0x01, 0x1F, 0x0D, 0x18, 0x00, 0x06, 0x1F, 0x28, 0x02, 0x00, 0x0C, 0x11, 0x18, 0x5A, 0x00, + 0x00, 0x5C, 0x00, 0x00, 0x5E, 0x00, 0x3F, 0x17, 0x00, 0x18, 0x94, 0x00, 0x00, 0x05, 0x54, 0x01, + 0xB3, 0x40, 0x06, 0x00, 0xCC, 0x00, 0x09, 0x00, 0x4F, 0x00, 0x51, 0x80, 0x18, 0x00, 0x04, 0x08, + 0x00, 0x01, 0x40, 0x02, 0x54, 0xAB, 0x00, 0x0A, 0x04, 0x11, 0x5C, 0x01, 0x03, 0x04, 0x00, 0x0F, + 0xE4, 0x03, 0x0E, 0x07, 0x0C, 0x00, 0x04, 0xA8, 0x04, 0x01, 0x14, 0x00, 0x8B, 0x01, 0x22, 0x04, + 0xFF, 0x9F, 0xAF, 0x4F, 0x01, 0x24, 0x00, 0x00, 0x01, 0x00, 0x32, 0x9F, 0xFF, 0x37, 0x98, 0x00, + 0xF0, 0x10, 0x32, 0x54, 0x76, 0x10, 0x47, 0x32, 0x65, 0x10, 0x34, 0x76, 0x25, 0x01, 0x34, 0x67, + 0x25, 0x01, 0x75, 0x64, 0x32, 0x01, 0x72, 0x56, 0x34, 0x10, 0x23, 0x74, 0x56, 0x01, 0x45, 0x32, + 0x67, 0x24, 0x00, 0x31, 0x49, 0x92, 0x24, 0x04, 0x00, 0x0C, 0x01, 0x00, 0x13, 0x12, 0x04, 0x00, + 0x0C, 0x90, 0x00, 0x80, 0x20, 0x41, 0x13, 0x1F, 0x14, 0x00, 0x01, 0x00, 0x7C, 0x00, 0x85, 0xFF, + 0xFF, 0xFF, 0x7F, 0x1F, 0xD7, 0x36, 0x40, 0xE6, 0x03, 0x24, 0x34, 0x10, 0x0A, 0x00, 0x0F, 0xCC, + 0x00, 0x02, 0x31, 0x03, 0x00, 0x05, 0x2B, 0x03, 0x22, 0x10, 0x02, 0xDD, 0x03, 0x13, 0x21, 0x15, + 0x04, 0x14, 0x40, 0x8B, 0x02, 0x07, 0x01, 0x00, 0x71, 0x80, 0x00, 0x40, 0x00, 0x04, 0x10, 0x80, + 0x04, 0x04, 0xDF, 0x81, 0x10, 0x09, 0x28, 0x93, 0x32, 0xA5, 0x44, 0x5B, 0x8A, 0x67, 0x76, 0x00, + 0x01, 0x00, 0x4C, 0x22, 0x10, 0x10, 0x04, 0x00, 0x44, 0x00, 0xEF, 0x00, 0xEF, 0x14, 0x00, 0x4D, + 0x1C, 0x1C, 0x1C, 0x1C, 0x98, 0x01, 0x21, 0x03, 0x08, 0x04, 0x00, 0xF1, 0x03, 0x00, 0x24, 0xFF, + 0xFF, 0x00, 0x44, 0x57, 0x6E, 0x00, 0x28, 0x72, 0x39, 0x00, 0x10, 0x9C, 0x4B, 0x00, 0x10, 0xA4, + 0x01, 0xB2, 0x08, 0x4C, 0x00, 0x00, 0x80, 0x20, 0x10, 0x0A, 0x00, 0x28, 0x10, 0x30, 0x03, 0x08, + 0xC0, 0x01, 0x17, 0x01, 0xC8, 0x01, 0x17, 0x05, 0x10, 0x00, 0x13, 0x04, 0x10, 0x00, 0x12, 0x07, + 0x62, 0x00, 0xD2, 0x02, 0x01, 0x02, 0x03, 0x00, 0x04, 0x05, 0xA3, 0x72, 0x0F, 0x0F, 0x00, 0x70, + 0x42, 0x00, 0x16, 0x1F, 0x28, 0x01, 0x43, 0xFF, 0x00, 0xFF, 0x01, 0x70, 0x04, 0x24, 0x00, 0x80, + 0x96, 0x00, 0x15, 0xF0, 0x24, 0x04, 0x60, 0x43, 0xC3, 0xBA, 0xE4, 0xD3, 0x1E, 0x0B, 0x05, 0x3B, + 0x80, 0x2A, 0x02, 0x1C, 0x00, 0x0C, 0xF4, 0x00, 0x19, 0x08, 0x0E, 0x00, 0x01, 0xE6, 0x05, 0x1F, + 0x03, 0x2C, 0x00, 0x05, 0x10, 0x76, 0xE9, 0x03, 0x0F, 0x9C, 0x02, 0x00, 0x05, 0x34, 0x00, 0x0F, + 0x3A, 0x00, 0x04, 0x38, 0x7E, 0x16, 0x40, 0x03, 0x06, 0x0F, 0x38, 0x00, 0x17, 0x3F, 0x1E, 0x40, + 0x04, 0xA8, 0x00, 0x08, 0x2F, 0x00, 0xC0, 0x55, 0x00, 0x04, 0x3F, 0x46, 0x24, 0x00, 0x38, 0x00, + 0x0A, 0x0F, 0x01, 0x00, 0x05, 0x22, 0x46, 0x2C, 0x38, 0x00, 0x19, 0xEC, 0x16, 0x00, 0x0D, 0x3C, + 0x01, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, +}; + +constexpr inline const u8 SdramParamsMariko9[0x3BA] = { + 0xFF, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x2C, 0x01, + 0x00, 0x01, 0x00, 0x96, 0x88, 0x02, 0x80, 0x18, 0x40, 0x00, 0x00, 0x00, 0x40, 0x14, 0x00, 0xF0, + 0x01, 0xFF, 0xFF, 0x1F, 0x00, 0xD8, 0x51, 0x1A, 0xA0, 0x00, 0x00, 0x50, 0x05, 0x00, 0x00, 0x88, + 0x00, 0x04, 0x00, 0x20, 0x20, 0x12, 0x1A, 0x00, 0x17, 0x88, 0x04, 0x00, 0xF7, 0x00, 0x00, 0x00, + 0xBC, 0xBC, 0xAF, 0xC9, 0x3C, 0x9E, 0x00, 0x00, 0x02, 0x03, 0xE0, 0xC1, 0x04, 0x01, 0x00, 0x17, + 0x3F, 0x01, 0x00, 0x00, 0x38, 0x00, 0xD0, 0x04, 0x08, 0x00, 0x00, 0x50, 0x50, 0x50, 0x00, 0xA1, + 0x01, 0x00, 0x00, 0x30, 0x39, 0x00, 0x61, 0x10, 0x00, 0x16, 0x00, 0x10, 0x90, 0x30, 0x01, 0x13, + 0x02, 0x74, 0x00, 0x13, 0x03, 0x04, 0x00, 0xD7, 0x1E, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, + 0x3A, 0x00, 0x00, 0x00, 0x1D, 0x94, 0x00, 0x57, 0x09, 0x00, 0x00, 0x00, 0x04, 0x10, 0x00, 0x13, + 0x0B, 0x28, 0x00, 0x13, 0x08, 0x0C, 0x00, 0x00, 0x1C, 0x00, 0x53, 0x17, 0x00, 0x00, 0x00, 0x15, + 0x08, 0x00, 0x13, 0x1B, 0x28, 0x00, 0x57, 0x20, 0x00, 0x00, 0x00, 0x06, 0x04, 0x00, 0x13, 0x03, + 0x18, 0x00, 0x13, 0x04, 0x10, 0x00, 0x17, 0x02, 0x10, 0x00, 0x00, 0x4C, 0x00, 0x53, 0x0E, 0x00, + 0x00, 0x00, 0x05, 0x1C, 0x00, 0x05, 0x24, 0x01, 0x03, 0x6C, 0x00, 0x03, 0xD7, 0x01, 0x10, 0x80, + 0x0A, 0x00, 0x00, 0x0F, 0x01, 0x93, 0x18, 0x00, 0x00, 0x00, 0x1A, 0x00, 0x00, 0x00, 0x16, 0x0C, + 0x00, 0x10, 0x0A, 0x48, 0x00, 0x03, 0x61, 0x00, 0x13, 0xC1, 0x50, 0x00, 0x13, 0x08, 0x74, 0x00, + 0x13, 0x0A, 0x08, 0x00, 0x13, 0x14, 0x60, 0x00, 0x04, 0x54, 0x00, 0x13, 0x3B, 0x04, 0x00, 0x13, + 0x05, 0x04, 0x00, 0x04, 0x88, 0x00, 0x04, 0x0C, 0x00, 0x00, 0xF8, 0x00, 0x90, 0x1C, 0x03, 0x00, + 0x00, 0x0D, 0xA0, 0x60, 0x91, 0x3F, 0x15, 0x01, 0xF1, 0x28, 0x00, 0xF3, 0x0C, 0x04, 0x05, 0x1B, + 0x06, 0x02, 0x03, 0x07, 0x1C, 0x23, 0x25, 0x25, 0x05, 0x08, 0x1D, 0x09, 0x0A, 0x24, 0x0B, 0x1E, + 0x0D, 0x0C, 0x26, 0x26, 0x03, 0x02, 0x1B, 0x1C, 0x23, 0x03, 0x04, 0x07, 0x05, 0x06, 0x25, 0x25, + 0x02, 0x0A, 0x0B, 0x1D, 0x0D, 0x08, 0x0C, 0x09, 0x1E, 0x24, 0x26, 0x26, 0x08, 0x24, 0x06, 0x07, + 0x9A, 0xBF, 0x01, 0x3C, 0xFF, 0x00, 0xFF, 0x00, 0x02, 0xB0, 0x04, 0x00, 0x01, 0x08, 0x00, 0x00, + 0x02, 0x08, 0x00, 0x00, 0x0D, 0x77, 0x00, 0xF2, 0x0E, 0xC0, 0x31, 0x31, 0x03, 0x08, 0x00, 0x00, + 0x0B, 0x08, 0x5D, 0x5D, 0x0E, 0x0C, 0x5D, 0x5D, 0x0C, 0x08, 0x08, 0x08, 0x0D, 0x0C, 0x00, 0x00, + 0x0D, 0x0C, 0x14, 0x14, 0x16, 0x08, 0x2C, 0x00, 0x2C, 0x11, 0x08, 0xDF, 0x02, 0x70, 0x10, 0x00, + 0xCC, 0x00, 0x0A, 0x00, 0x33, 0x6E, 0x01, 0x40, 0xF3, 0x25, 0x08, 0x11, 0x69, 0x00, 0x23, 0x0F, + 0x00, 0x30, 0x01, 0x80, 0x01, 0x03, 0x00, 0x70, 0x00, 0x0C, 0x00, 0x01, 0x0C, 0x00, 0xA2, 0x08, + 0x44, 0x00, 0x10, 0x04, 0x04, 0x00, 0x06, 0x13, 0x07, 0x1C, 0x00, 0x71, 0xA0, 0x00, 0x2C, 0x00, + 0x01, 0x37, 0x0F, 0x52, 0x01, 0x00, 0x48, 0x00, 0xD3, 0x0C, 0x00, 0x04, 0x00, 0x1F, 0x22, 0x20, + 0x80, 0x0F, 0xF4, 0x20, 0x02, 0x32, 0x01, 0x00, 0x13, 0x29, 0x01, 0x00, 0x12, 0x78, 0x9A, 0x02, + 0x1F, 0x0F, 0xF4, 0x02, 0x31, 0x7F, 0x18, 0x00, 0x0F, 0x00, 0x0B, 0x00, 0x17, 0x18, 0x00, 0x06, + 0xF1, 0x02, 0x48, 0x00, 0x44, 0x00, 0x45, 0x00, 0x44, 0x00, 0x47, 0x00, 0x47, 0x00, 0x41, 0x00, + 0x46, 0x00, 0x0D, 0x8E, 0x01, 0x1F, 0x0D, 0x18, 0x00, 0x06, 0x1F, 0x28, 0x02, 0x00, 0x0C, 0x11, + 0x18, 0x5A, 0x00, 0x00, 0x5C, 0x00, 0x00, 0x5E, 0x00, 0x3F, 0x17, 0x00, 0x18, 0x94, 0x00, 0x00, + 0x05, 0x54, 0x01, 0xA4, 0x40, 0x06, 0x00, 0xCC, 0x00, 0x09, 0x00, 0x4F, 0x00, 0x51, 0x18, 0x00, + 0x63, 0x80, 0x01, 0x00, 0x00, 0x40, 0x01, 0x40, 0x02, 0x54, 0xAB, 0x00, 0x0A, 0x04, 0x11, 0x5C, + 0x01, 0x03, 0x04, 0x00, 0x0F, 0xE4, 0x03, 0x0E, 0x07, 0x0C, 0x00, 0x04, 0xA8, 0x04, 0x01, 0x78, + 0x03, 0x8B, 0x01, 0x22, 0x04, 0xFF, 0x9F, 0xAF, 0x4F, 0x01, 0x24, 0x00, 0x00, 0x01, 0x00, 0x32, + 0x9F, 0xFF, 0x37, 0x80, 0x00, 0xF0, 0x10, 0x32, 0x54, 0x76, 0x10, 0x47, 0x32, 0x65, 0x10, 0x34, + 0x76, 0x25, 0x01, 0x34, 0x67, 0x25, 0x01, 0x75, 0x64, 0x32, 0x01, 0x72, 0x56, 0x34, 0x10, 0x23, + 0x74, 0x56, 0x01, 0x45, 0x32, 0x67, 0x24, 0x00, 0x31, 0x49, 0x92, 0x24, 0x04, 0x00, 0x0C, 0x01, + 0x00, 0x13, 0x12, 0x04, 0x00, 0x0C, 0x90, 0x00, 0x80, 0x20, 0x41, 0x13, 0x1F, 0x14, 0x00, 0x01, + 0x00, 0x7C, 0x00, 0x85, 0xFF, 0xFF, 0xFF, 0x7F, 0x1F, 0xD7, 0x36, 0x40, 0xE6, 0x03, 0x24, 0x34, + 0x10, 0x0A, 0x00, 0x0F, 0xCC, 0x00, 0x02, 0x31, 0x03, 0x00, 0x05, 0x2B, 0x03, 0x22, 0x10, 0x02, + 0xDD, 0x03, 0x13, 0x21, 0x15, 0x04, 0x14, 0x40, 0x8B, 0x02, 0x1D, 0x00, 0x9D, 0x02, 0x01, 0x04, + 0x04, 0xDF, 0x81, 0x10, 0x09, 0x28, 0x93, 0x32, 0xA5, 0x44, 0x5B, 0x8A, 0x67, 0x76, 0x00, 0x01, + 0x00, 0x4C, 0x22, 0x10, 0x10, 0x04, 0x00, 0x44, 0x00, 0xEF, 0x00, 0xEF, 0x14, 0x00, 0x4C, 0x1C, + 0x1C, 0x1C, 0x1C, 0xF0, 0x01, 0x31, 0x02, 0x03, 0x08, 0x04, 0x00, 0xF1, 0x03, 0x00, 0x24, 0xFF, + 0xFF, 0x00, 0x44, 0x57, 0x6E, 0x00, 0x28, 0x72, 0x39, 0x00, 0x10, 0x9C, 0x4B, 0x00, 0x20, 0x20, + 0x00, 0xB1, 0x08, 0x4C, 0x00, 0x00, 0x80, 0x20, 0x10, 0x0A, 0x00, 0x28, 0x10, 0x04, 0x02, 0x09, + 0xC0, 0x01, 0x17, 0x01, 0xC8, 0x01, 0x04, 0x50, 0x04, 0x13, 0x01, 0x34, 0x04, 0x00, 0x10, 0x00, + 0x11, 0x07, 0x10, 0x00, 0xE2, 0x02, 0x02, 0x01, 0x02, 0x03, 0x00, 0x04, 0x05, 0xA3, 0x72, 0x0F, + 0x0F, 0x00, 0x70, 0x42, 0x00, 0x16, 0x1F, 0x28, 0x01, 0x43, 0xFF, 0x00, 0xFF, 0x01, 0x70, 0x04, + 0x04, 0x84, 0x03, 0x35, 0x00, 0x00, 0xF0, 0x24, 0x04, 0x60, 0x43, 0xC3, 0xBA, 0xE4, 0xD3, 0x1E, + 0x0B, 0x05, 0x3B, 0x80, 0x2A, 0x02, 0x1C, 0x00, 0x0C, 0xF4, 0x00, 0x19, 0x08, 0x0E, 0x00, 0x01, + 0xE6, 0x05, 0x1F, 0x03, 0x2C, 0x00, 0x05, 0x10, 0x76, 0xE9, 0x03, 0x0F, 0x9C, 0x02, 0x00, 0x05, + 0x34, 0x00, 0x0F, 0x3A, 0x00, 0x04, 0x38, 0x7E, 0x16, 0x40, 0x03, 0x06, 0x0F, 0x38, 0x00, 0x17, + 0x3F, 0x1E, 0x40, 0x04, 0xA8, 0x00, 0x08, 0x2F, 0x00, 0xC0, 0x55, 0x00, 0x04, 0x3F, 0x46, 0x24, + 0x00, 0x38, 0x00, 0x0A, 0x0F, 0x01, 0x00, 0x05, 0x22, 0x46, 0x2C, 0x38, 0x00, 0x19, 0xEC, 0x16, + 0x00, 0x0D, 0x3C, 0x01, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, +}; + +constexpr inline const u8 SdramParamsMariko10[0x3BB] = { + 0xFF, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x2C, 0x01, + 0x00, 0x01, 0x00, 0x96, 0x88, 0x02, 0x80, 0x18, 0x40, 0x00, 0x00, 0x00, 0x40, 0x14, 0x00, 0xF0, + 0x01, 0xFF, 0xFF, 0x1F, 0x00, 0xD8, 0x51, 0x1A, 0xA0, 0x00, 0x00, 0x50, 0x05, 0x00, 0x00, 0x88, + 0x00, 0x04, 0x00, 0x20, 0x20, 0x12, 0x1A, 0x00, 0x17, 0x88, 0x04, 0x00, 0xF7, 0x00, 0x00, 0x00, + 0xBC, 0xBC, 0xAF, 0xC9, 0x3C, 0x9E, 0x00, 0x00, 0x02, 0x03, 0xE0, 0xC1, 0x04, 0x01, 0x00, 0x17, + 0x3F, 0x01, 0x00, 0x00, 0x38, 0x00, 0xD0, 0x04, 0x08, 0x00, 0x00, 0x50, 0x50, 0x50, 0x00, 0xA1, + 0x01, 0x00, 0x00, 0x30, 0x39, 0x00, 0x62, 0x10, 0x00, 0x16, 0x00, 0x10, 0x90, 0x80, 0x00, 0x03, + 0x74, 0x00, 0x13, 0x03, 0x04, 0x00, 0xD7, 0x1E, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x3A, + 0x00, 0x00, 0x00, 0x1D, 0x94, 0x00, 0x57, 0x09, 0x00, 0x00, 0x00, 0x04, 0x10, 0x00, 0x13, 0x0B, + 0x28, 0x00, 0x13, 0x08, 0x0C, 0x00, 0x00, 0x1C, 0x00, 0x53, 0x17, 0x00, 0x00, 0x00, 0x15, 0x08, + 0x00, 0x13, 0x1B, 0x28, 0x00, 0x57, 0x20, 0x00, 0x00, 0x00, 0x06, 0x04, 0x00, 0x13, 0x03, 0x18, + 0x00, 0x13, 0x04, 0x10, 0x00, 0x17, 0x02, 0x10, 0x00, 0x00, 0x4C, 0x00, 0x53, 0x0E, 0x00, 0x00, + 0x00, 0x05, 0x1C, 0x00, 0x05, 0x24, 0x01, 0x03, 0x6C, 0x00, 0x03, 0xD7, 0x01, 0x10, 0x80, 0x0A, + 0x00, 0x00, 0x0F, 0x01, 0x93, 0x18, 0x00, 0x00, 0x00, 0x1A, 0x00, 0x00, 0x00, 0x16, 0x0C, 0x00, + 0x10, 0x0A, 0x48, 0x00, 0x03, 0x61, 0x00, 0x13, 0xC1, 0x50, 0x00, 0x13, 0x08, 0x74, 0x00, 0x13, + 0x0A, 0x08, 0x00, 0x13, 0x14, 0x60, 0x00, 0x04, 0x54, 0x00, 0x13, 0x3B, 0x04, 0x00, 0x13, 0x05, + 0x04, 0x00, 0x04, 0x88, 0x00, 0x04, 0x0C, 0x00, 0x00, 0xF8, 0x00, 0x90, 0x1C, 0x03, 0x00, 0x00, + 0x0D, 0xA0, 0x60, 0x91, 0x3F, 0x15, 0x01, 0xF1, 0x28, 0x00, 0xF3, 0x0C, 0x06, 0x1B, 0x04, 0x1C, + 0x07, 0x03, 0x05, 0x02, 0x00, 0x25, 0x25, 0x03, 0x00, 0x1E, 0x1D, 0x08, 0x0D, 0x0A, 0x0C, 0x09, + 0x0B, 0x26, 0x26, 0x05, 0x02, 0x04, 0x03, 0x05, 0x00, 0x06, 0x1C, 0x1B, 0x07, 0x25, 0x25, 0x07, + 0x0A, 0x0B, 0x1D, 0x0C, 0x0D, 0x09, 0x00, 0x08, 0x1E, 0x26, 0x26, 0x09, 0x24, 0x06, 0x08, 0x2A, + 0xBF, 0x01, 0x3C, 0xFF, 0x00, 0xFF, 0x00, 0x02, 0xB0, 0x04, 0x00, 0x01, 0x88, 0x00, 0x00, 0x02, + 0x88, 0x00, 0x00, 0x0D, 0xD5, 0x01, 0xF2, 0x0E, 0xC0, 0x31, 0x31, 0x03, 0x88, 0x00, 0x00, 0x0B, + 0x88, 0x5D, 0x5D, 0x0E, 0x8C, 0x5D, 0x5D, 0x0C, 0x88, 0x08, 0x08, 0x0D, 0x8C, 0x00, 0x00, 0x0D, + 0x8C, 0x14, 0x14, 0x16, 0x88, 0x2C, 0x00, 0x2C, 0x11, 0x08, 0xDF, 0x02, 0x70, 0x10, 0x00, 0xCC, + 0x00, 0x0A, 0x00, 0x33, 0x6E, 0x01, 0x40, 0xF3, 0x25, 0x08, 0x11, 0x69, 0x00, 0x23, 0x0F, 0x00, + 0x30, 0x01, 0x80, 0x01, 0x03, 0x00, 0x70, 0x00, 0x0C, 0x00, 0x01, 0x0C, 0x00, 0xC0, 0x08, 0x44, + 0x00, 0x10, 0x04, 0x04, 0x00, 0x06, 0x13, 0x07, 0x00, 0x80, 0x10, 0x00, 0x71, 0xA0, 0x00, 0x2C, + 0x00, 0x01, 0x37, 0x0F, 0x52, 0x01, 0x00, 0x10, 0x01, 0xDB, 0x0C, 0x00, 0x04, 0x00, 0x1F, 0x22, + 0x20, 0x80, 0x0F, 0xF4, 0x20, 0x02, 0x29, 0x01, 0x00, 0x12, 0x78, 0x9A, 0x02, 0x1F, 0x0F, 0xF4, + 0x02, 0x31, 0x7F, 0x10, 0x00, 0x14, 0x00, 0x0B, 0x00, 0x13, 0x18, 0x00, 0x06, 0xFF, 0x08, 0x47, + 0x00, 0x45, 0x00, 0x4F, 0x00, 0x4D, 0x00, 0x46, 0x00, 0x46, 0x00, 0x48, 0x00, 0x48, 0x00, 0x08, + 0x00, 0x0C, 0x00, 0x0C, 0x00, 0x0B, 0x18, 0x00, 0x06, 0x1F, 0x28, 0x02, 0x00, 0x0C, 0x11, 0x10, + 0x5A, 0x00, 0x00, 0x5C, 0x00, 0x00, 0x5E, 0x00, 0x3F, 0x13, 0x00, 0x10, 0x94, 0x00, 0x00, 0x05, + 0x54, 0x01, 0xB3, 0x40, 0x06, 0x00, 0xCC, 0x00, 0x09, 0x00, 0x4F, 0x00, 0x51, 0x80, 0x18, 0x00, + 0x04, 0x08, 0x00, 0x01, 0x40, 0x02, 0x54, 0xAB, 0x00, 0x0A, 0x04, 0x11, 0x5C, 0x01, 0x03, 0x04, + 0x00, 0x0F, 0xE4, 0x03, 0x0E, 0x07, 0x0C, 0x00, 0x04, 0xA8, 0x04, 0x01, 0x14, 0x00, 0x8B, 0x01, + 0x28, 0x40, 0xFF, 0x9F, 0x9F, 0x4F, 0x01, 0x24, 0x00, 0x00, 0x01, 0x00, 0x31, 0x9F, 0xFF, 0x37, + 0x08, 0x00, 0xF0, 0x11, 0x57, 0x21, 0x03, 0x64, 0x67, 0x04, 0x32, 0x51, 0x21, 0x56, 0x73, 0x04, + 0x12, 0x60, 0x35, 0x47, 0x73, 0x56, 0x04, 0x12, 0x10, 0x72, 0x65, 0x43, 0x37, 0x21, 0x40, 0x65, + 0x64, 0x21, 0x30, 0x57, 0x24, 0x00, 0x31, 0x49, 0x92, 0x24, 0x04, 0x00, 0x0C, 0x01, 0x00, 0x13, + 0x12, 0x04, 0x00, 0x0C, 0x90, 0x00, 0x80, 0x20, 0x41, 0x13, 0x1F, 0x14, 0x00, 0x01, 0x00, 0x7C, + 0x00, 0x85, 0xFF, 0xFF, 0xFF, 0x7F, 0x1F, 0xCF, 0x33, 0x40, 0xE6, 0x03, 0x25, 0x34, 0x10, 0xF0, + 0x03, 0x0F, 0xCC, 0x00, 0x01, 0x31, 0x03, 0x00, 0x05, 0x2B, 0x03, 0x22, 0x10, 0x02, 0xDD, 0x03, + 0x13, 0x21, 0x15, 0x04, 0x03, 0xC1, 0x04, 0x08, 0x5B, 0x01, 0x90, 0x10, 0x08, 0x01, 0x03, 0x00, + 0x50, 0x00, 0x40, 0x01, 0x04, 0x04, 0xDF, 0x81, 0x10, 0x08, 0x29, 0x32, 0x93, 0xA5, 0x54, 0x4A, + 0x6B, 0x76, 0x87, 0x00, 0x01, 0x00, 0x4C, 0x22, 0x10, 0x10, 0x04, 0x00, 0x44, 0x00, 0xEF, 0x00, + 0xEF, 0x14, 0x00, 0x4D, 0x1C, 0x1C, 0x1C, 0x1C, 0x98, 0x01, 0x21, 0x03, 0x08, 0x04, 0x00, 0xF1, + 0x03, 0x00, 0x24, 0xFF, 0xFF, 0x00, 0x44, 0x57, 0x6E, 0x00, 0x28, 0x72, 0x39, 0x00, 0x10, 0x9C, + 0x4B, 0x00, 0x10, 0xA4, 0x01, 0xB2, 0x08, 0x4C, 0x00, 0x00, 0x80, 0x20, 0x10, 0x0A, 0x00, 0x28, + 0x10, 0x30, 0x03, 0x08, 0xC0, 0x01, 0x17, 0x01, 0xC8, 0x01, 0x17, 0x05, 0x10, 0x00, 0x13, 0x04, + 0x10, 0x00, 0x12, 0x07, 0x62, 0x00, 0xD2, 0x02, 0x01, 0x02, 0x03, 0x00, 0x04, 0x05, 0xA3, 0x72, + 0x0F, 0x0F, 0x00, 0x70, 0x42, 0x00, 0x16, 0x1F, 0x28, 0x01, 0x43, 0xFF, 0x00, 0xFF, 0x01, 0x70, + 0x04, 0x24, 0x00, 0x80, 0x96, 0x00, 0x15, 0xF0, 0x24, 0x04, 0x60, 0x43, 0xCB, 0xFA, 0xE4, 0xD3, + 0xFE, 0x0B, 0x05, 0x3B, 0x80, 0x2A, 0x02, 0x1C, 0x00, 0x0C, 0xF4, 0x00, 0x19, 0x08, 0x0E, 0x00, + 0x01, 0xE6, 0x05, 0x1F, 0x03, 0x2C, 0x00, 0x05, 0x10, 0x76, 0xE9, 0x03, 0x0F, 0x9C, 0x02, 0x00, + 0x05, 0x34, 0x00, 0x0F, 0x3A, 0x00, 0x04, 0x38, 0x7E, 0x16, 0x40, 0x03, 0x06, 0x0F, 0x38, 0x00, + 0x17, 0x3F, 0x1E, 0x40, 0x04, 0xA8, 0x00, 0x08, 0x2F, 0x00, 0xC0, 0x55, 0x00, 0x04, 0x3F, 0x46, + 0x24, 0x00, 0x38, 0x00, 0x0A, 0x0F, 0x01, 0x00, 0x05, 0x22, 0x46, 0x2C, 0x38, 0x00, 0x19, 0x9C, + 0x16, 0x00, 0x0D, 0x3C, 0x01, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, +}; + +constexpr inline const u8 SdramParamsMariko11[0x3B6] = { + 0xFF, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x2C, 0x01, + 0x00, 0x01, 0x00, 0x96, 0x88, 0x02, 0x80, 0x18, 0x40, 0x00, 0x00, 0x00, 0x40, 0x14, 0x00, 0xF0, + 0x01, 0xFF, 0xFF, 0x1F, 0x00, 0xD8, 0x51, 0x1A, 0xA0, 0x00, 0x00, 0x50, 0x05, 0x00, 0x00, 0x88, + 0x00, 0x04, 0x00, 0x20, 0x20, 0x12, 0x1A, 0x00, 0x17, 0x88, 0x04, 0x00, 0xF7, 0x00, 0x00, 0x00, + 0xBC, 0xBC, 0xAF, 0xC9, 0x3C, 0x9E, 0x00, 0x00, 0x02, 0x03, 0xE0, 0xC1, 0x04, 0x01, 0x00, 0x17, + 0x3F, 0x01, 0x00, 0x00, 0x38, 0x00, 0xD0, 0x04, 0x08, 0x00, 0x00, 0x50, 0x50, 0x50, 0x00, 0xA1, + 0x01, 0x00, 0x00, 0x30, 0x39, 0x00, 0x62, 0x10, 0x00, 0x16, 0x00, 0x10, 0x90, 0x80, 0x00, 0x03, + 0x74, 0x00, 0x13, 0x03, 0x04, 0x00, 0xD7, 0x1E, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x3A, + 0x00, 0x00, 0x00, 0x1D, 0x94, 0x00, 0x57, 0x09, 0x00, 0x00, 0x00, 0x04, 0x10, 0x00, 0x13, 0x0B, + 0x28, 0x00, 0x13, 0x08, 0x0C, 0x00, 0x00, 0x1C, 0x00, 0x53, 0x17, 0x00, 0x00, 0x00, 0x15, 0x08, + 0x00, 0x13, 0x1B, 0x28, 0x00, 0x57, 0x20, 0x00, 0x00, 0x00, 0x06, 0x04, 0x00, 0x13, 0x03, 0x18, + 0x00, 0x13, 0x04, 0x10, 0x00, 0x17, 0x02, 0x10, 0x00, 0x00, 0x4C, 0x00, 0x13, 0x0E, 0x18, 0x00, + 0x17, 0x05, 0x6C, 0x00, 0x00, 0x34, 0x00, 0x13, 0x0C, 0xE0, 0x01, 0x40, 0x00, 0x00, 0x00, 0x80, + 0x0A, 0x00, 0x00, 0x0F, 0x01, 0x93, 0x18, 0x00, 0x00, 0x00, 0x1A, 0x00, 0x00, 0x00, 0x16, 0x0C, + 0x00, 0x10, 0x0A, 0x48, 0x00, 0x03, 0x61, 0x00, 0x13, 0xC1, 0x50, 0x00, 0x13, 0x08, 0x40, 0x00, + 0x13, 0x0A, 0x08, 0x00, 0x13, 0x14, 0x5C, 0x00, 0x13, 0x02, 0xC0, 0x00, 0x13, 0x3B, 0x04, 0x00, + 0x13, 0x05, 0x04, 0x00, 0x04, 0x88, 0x00, 0x04, 0x0C, 0x00, 0x00, 0xF8, 0x00, 0x90, 0x1C, 0x03, + 0x00, 0x00, 0x0D, 0xA0, 0x60, 0x91, 0x3F, 0x15, 0x01, 0xF1, 0x28, 0x00, 0xF3, 0x0C, 0x04, 0x05, + 0x1B, 0x06, 0x02, 0x03, 0x07, 0x1C, 0x23, 0x25, 0x25, 0x05, 0x08, 0x1D, 0x09, 0x0A, 0x24, 0x0B, + 0x1E, 0x0D, 0x0C, 0x26, 0x26, 0x03, 0x02, 0x1B, 0x1C, 0x23, 0x03, 0x04, 0x07, 0x05, 0x06, 0x25, + 0x25, 0x02, 0x0A, 0x0B, 0x1D, 0x0D, 0x08, 0x0C, 0x09, 0x1E, 0x24, 0x26, 0x26, 0x08, 0x24, 0x06, + 0x07, 0x9A, 0xBF, 0x01, 0x3C, 0xFF, 0x00, 0xFF, 0x00, 0x02, 0xB0, 0x04, 0x00, 0x01, 0x88, 0x00, + 0x00, 0x02, 0x88, 0x00, 0x00, 0x0D, 0xD5, 0x01, 0xF2, 0x0E, 0xC0, 0x31, 0x31, 0x03, 0x88, 0x00, + 0x00, 0x0B, 0x88, 0x5D, 0x5D, 0x0E, 0x8C, 0x5D, 0x5D, 0x0C, 0x88, 0x08, 0x08, 0x0D, 0x8C, 0x00, + 0x00, 0x0D, 0x8C, 0x14, 0x14, 0x16, 0x88, 0x2C, 0x00, 0x2C, 0x11, 0x08, 0xDF, 0x02, 0x70, 0x10, + 0x00, 0xCC, 0x00, 0x0A, 0x00, 0x33, 0x6E, 0x01, 0x40, 0xF3, 0x25, 0x08, 0x11, 0x69, 0x00, 0x23, + 0x0F, 0x00, 0x30, 0x01, 0x80, 0x01, 0x03, 0x00, 0x70, 0x00, 0x0C, 0x00, 0x01, 0x0C, 0x00, 0xC0, + 0x08, 0x44, 0x00, 0x10, 0x04, 0x04, 0x00, 0x06, 0x13, 0x07, 0x00, 0x80, 0x10, 0x00, 0x71, 0xA0, + 0x00, 0x2C, 0x00, 0x01, 0x37, 0x0F, 0x52, 0x01, 0x11, 0x02, 0x64, 0x01, 0xBB, 0x04, 0x00, 0x1F, + 0x22, 0x20, 0x80, 0x0F, 0xF4, 0x20, 0x02, 0x29, 0x01, 0x00, 0x12, 0x78, 0x9A, 0x02, 0x1F, 0x0F, + 0xF4, 0x02, 0x31, 0x7F, 0x16, 0x00, 0x0D, 0x00, 0x0B, 0x00, 0x17, 0x18, 0x00, 0x06, 0xF1, 0x02, + 0x43, 0x00, 0x45, 0x00, 0x45, 0x00, 0x43, 0x00, 0x46, 0x00, 0x47, 0x00, 0x41, 0x00, 0x46, 0x00, + 0x0C, 0xBA, 0x01, 0x1F, 0x0D, 0x18, 0x00, 0x06, 0x1F, 0x28, 0x02, 0x00, 0x0C, 0x11, 0x16, 0x5A, + 0x00, 0x00, 0x5C, 0x00, 0x00, 0x5E, 0x00, 0x3F, 0x17, 0x00, 0x16, 0x94, 0x00, 0x00, 0x05, 0x54, + 0x01, 0xB3, 0x40, 0x06, 0x00, 0xCC, 0x00, 0x09, 0x00, 0x4F, 0x00, 0x51, 0x80, 0x18, 0x00, 0x04, + 0x08, 0x00, 0x01, 0x6E, 0x00, 0x54, 0xAB, 0x00, 0x0A, 0x04, 0x11, 0x5C, 0x01, 0x03, 0x04, 0x00, + 0x0F, 0xE4, 0x03, 0x0E, 0x0B, 0xCC, 0x02, 0x14, 0x01, 0x14, 0x00, 0x8B, 0x01, 0x22, 0x04, 0xFF, + 0x9F, 0xAF, 0x4F, 0x01, 0x24, 0x00, 0x00, 0x01, 0x00, 0x32, 0x9F, 0xFF, 0x37, 0x98, 0x00, 0xF0, + 0x10, 0x32, 0x54, 0x76, 0x10, 0x47, 0x32, 0x65, 0x10, 0x34, 0x76, 0x25, 0x01, 0x34, 0x67, 0x25, + 0x01, 0x75, 0x64, 0x32, 0x01, 0x72, 0x56, 0x34, 0x10, 0x23, 0x74, 0x56, 0x01, 0x45, 0x32, 0x67, + 0x24, 0x00, 0x31, 0x49, 0x92, 0x24, 0x04, 0x00, 0x0C, 0x01, 0x00, 0x13, 0x12, 0x04, 0x00, 0x0C, + 0x90, 0x00, 0x80, 0x20, 0x41, 0x13, 0x1F, 0x14, 0x00, 0x01, 0x00, 0x7C, 0x00, 0x85, 0xFF, 0xFF, + 0xFF, 0x7F, 0x1F, 0xD7, 0x36, 0x40, 0xE6, 0x03, 0x24, 0x34, 0x10, 0x0A, 0x00, 0x0F, 0xCC, 0x00, + 0x02, 0x31, 0x03, 0x00, 0x05, 0x2B, 0x03, 0x22, 0x10, 0x02, 0xDD, 0x03, 0x13, 0x21, 0x15, 0x04, + 0x14, 0x40, 0x8B, 0x02, 0x07, 0x01, 0x00, 0x71, 0x80, 0x00, 0x40, 0x00, 0x04, 0x10, 0x80, 0x04, + 0x04, 0xDF, 0x81, 0x10, 0x09, 0x28, 0x93, 0x32, 0xA5, 0x44, 0x5B, 0x8A, 0x67, 0x76, 0x00, 0x01, + 0x00, 0x4C, 0x22, 0x10, 0x10, 0x04, 0x00, 0x44, 0x00, 0xEF, 0x00, 0xEF, 0x14, 0x00, 0x4D, 0x1C, + 0x1C, 0x1C, 0x1C, 0x98, 0x01, 0x21, 0x03, 0x08, 0x04, 0x00, 0xF1, 0x03, 0x00, 0x24, 0xFF, 0xFF, + 0x00, 0x44, 0x57, 0x6E, 0x00, 0x28, 0x72, 0x39, 0x00, 0x10, 0x9C, 0x4B, 0x00, 0x10, 0xA4, 0x01, + 0xB2, 0x08, 0x4C, 0x00, 0x00, 0x80, 0x20, 0x10, 0x0A, 0x00, 0x28, 0x10, 0x30, 0x03, 0x08, 0xC0, + 0x01, 0x17, 0x01, 0xC8, 0x01, 0x17, 0x05, 0x10, 0x00, 0x13, 0x04, 0x10, 0x00, 0x12, 0x07, 0x62, + 0x00, 0xD2, 0x02, 0x01, 0x02, 0x03, 0x00, 0x04, 0x05, 0xA3, 0x72, 0x0F, 0x0F, 0x00, 0x70, 0x42, + 0x00, 0x16, 0x1F, 0x28, 0x01, 0x43, 0xFF, 0x00, 0xFF, 0x01, 0x70, 0x04, 0x24, 0x00, 0x80, 0x96, + 0x00, 0x15, 0xF0, 0x24, 0x04, 0x60, 0x43, 0xC3, 0xBA, 0xE4, 0xD3, 0x1E, 0x0F, 0x05, 0x3B, 0x80, + 0x2A, 0x02, 0x1C, 0x00, 0x0C, 0xF4, 0x00, 0x19, 0x08, 0x0E, 0x00, 0x01, 0xE6, 0x05, 0x1F, 0x03, + 0x2C, 0x00, 0x05, 0x10, 0x76, 0xE9, 0x03, 0x0F, 0x9C, 0x02, 0x00, 0x05, 0x34, 0x00, 0x0F, 0x3A, + 0x00, 0x04, 0x38, 0x7E, 0x16, 0x40, 0x03, 0x06, 0x0F, 0x38, 0x00, 0x17, 0x3F, 0x1E, 0x40, 0x04, + 0xA8, 0x00, 0x08, 0x2F, 0x00, 0xC0, 0x55, 0x00, 0x04, 0x3F, 0x46, 0x24, 0x00, 0x38, 0x00, 0x0A, + 0x0F, 0x01, 0x00, 0x05, 0x22, 0x46, 0x2C, 0x38, 0x00, 0x19, 0xEC, 0x16, 0x00, 0x0D, 0x3C, 0x01, + 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, +}; + +constexpr inline const u8 SdramParamsMariko12[0x3B6] = { + 0xFF, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x2C, 0x01, + 0x00, 0x01, 0x00, 0x96, 0x88, 0x02, 0x80, 0x18, 0x40, 0x00, 0x00, 0x00, 0x40, 0x14, 0x00, 0xF0, + 0x01, 0xFF, 0xFF, 0x1F, 0x00, 0xD8, 0x51, 0x1A, 0xA0, 0x00, 0x00, 0x50, 0x05, 0x00, 0x00, 0x88, + 0x00, 0x04, 0x00, 0x20, 0x20, 0x12, 0x1A, 0x00, 0x17, 0x88, 0x04, 0x00, 0xF7, 0x00, 0x00, 0x00, + 0xBC, 0xBC, 0xAF, 0xC9, 0x3C, 0x9E, 0x00, 0x00, 0x02, 0x03, 0xE0, 0xC1, 0x04, 0x01, 0x00, 0x17, + 0x3F, 0x01, 0x00, 0x00, 0x38, 0x00, 0xD0, 0x04, 0x08, 0x00, 0x00, 0x50, 0x50, 0x50, 0x00, 0xA1, + 0x01, 0x00, 0x00, 0x30, 0x39, 0x00, 0x62, 0x10, 0x00, 0x16, 0x00, 0x10, 0x90, 0x80, 0x00, 0x03, + 0x74, 0x00, 0x13, 0x03, 0x04, 0x00, 0xD7, 0x1E, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x3A, + 0x00, 0x00, 0x00, 0x1D, 0x94, 0x00, 0x57, 0x09, 0x00, 0x00, 0x00, 0x04, 0x10, 0x00, 0x13, 0x0B, + 0x28, 0x00, 0x13, 0x08, 0x0C, 0x00, 0x00, 0x1C, 0x00, 0x53, 0x17, 0x00, 0x00, 0x00, 0x15, 0x08, + 0x00, 0x13, 0x1B, 0x28, 0x00, 0x57, 0x20, 0x00, 0x00, 0x00, 0x06, 0x04, 0x00, 0x13, 0x03, 0x18, + 0x00, 0x13, 0x04, 0x10, 0x00, 0x17, 0x02, 0x10, 0x00, 0x00, 0x4C, 0x00, 0x13, 0x0E, 0x18, 0x00, + 0x17, 0x05, 0x6C, 0x00, 0x00, 0x34, 0x00, 0x13, 0x0C, 0xE0, 0x01, 0x40, 0x00, 0x00, 0x00, 0x80, + 0x0A, 0x00, 0x00, 0x0F, 0x01, 0x93, 0x18, 0x00, 0x00, 0x00, 0x1A, 0x00, 0x00, 0x00, 0x16, 0x0C, + 0x00, 0x10, 0x0A, 0x48, 0x00, 0x03, 0x61, 0x00, 0x13, 0xC1, 0x50, 0x00, 0x13, 0x08, 0x40, 0x00, + 0x13, 0x0A, 0x08, 0x00, 0x13, 0x14, 0x5C, 0x00, 0x13, 0x02, 0xC0, 0x00, 0x13, 0x3B, 0x04, 0x00, + 0x13, 0x05, 0x04, 0x00, 0x04, 0x88, 0x00, 0x04, 0x0C, 0x00, 0x00, 0xF8, 0x00, 0x90, 0x1C, 0x03, + 0x00, 0x00, 0x0D, 0xA0, 0x60, 0x91, 0x3F, 0x15, 0x01, 0xF1, 0x28, 0x00, 0xF3, 0x0C, 0x04, 0x05, + 0x1B, 0x06, 0x02, 0x03, 0x07, 0x1C, 0x23, 0x25, 0x25, 0x05, 0x08, 0x1D, 0x09, 0x0A, 0x24, 0x0B, + 0x1E, 0x0D, 0x0C, 0x26, 0x26, 0x03, 0x02, 0x1B, 0x1C, 0x23, 0x03, 0x04, 0x07, 0x05, 0x06, 0x25, + 0x25, 0x02, 0x0A, 0x0B, 0x1D, 0x0D, 0x08, 0x0C, 0x09, 0x1E, 0x24, 0x26, 0x26, 0x08, 0x24, 0x06, + 0x07, 0x9A, 0xBF, 0x01, 0x3C, 0xFF, 0x00, 0xFF, 0x00, 0x02, 0xB0, 0x04, 0x00, 0x01, 0x88, 0x00, + 0x00, 0x02, 0x88, 0x00, 0x00, 0x0D, 0xD5, 0x01, 0xF2, 0x0E, 0xC0, 0x31, 0x31, 0x03, 0x88, 0x00, + 0x00, 0x0B, 0x88, 0x5D, 0x5D, 0x0E, 0x8C, 0x5D, 0x5D, 0x0C, 0x88, 0x08, 0x08, 0x0D, 0x8C, 0x00, + 0x00, 0x0D, 0x8C, 0x14, 0x14, 0x16, 0x88, 0x2C, 0x00, 0x2C, 0x11, 0x08, 0xDF, 0x02, 0x70, 0x10, + 0x00, 0xCC, 0x00, 0x0A, 0x00, 0x33, 0x6E, 0x01, 0x40, 0xF3, 0x25, 0x08, 0x11, 0x69, 0x00, 0x23, + 0x0F, 0x00, 0x30, 0x01, 0x80, 0x01, 0x03, 0x00, 0x70, 0x00, 0x0C, 0x00, 0x01, 0x0C, 0x00, 0xC0, + 0x08, 0x44, 0x00, 0x10, 0x04, 0x04, 0x00, 0x06, 0x13, 0x07, 0x00, 0x80, 0x10, 0x00, 0x71, 0xA0, + 0x00, 0x2C, 0x00, 0x01, 0x37, 0x0F, 0x52, 0x01, 0x11, 0x02, 0x64, 0x01, 0xBB, 0x04, 0x00, 0x1F, + 0x22, 0x20, 0x80, 0x0F, 0xF4, 0x20, 0x02, 0x29, 0x01, 0x00, 0x12, 0x78, 0x9A, 0x02, 0x1F, 0x0F, + 0xF4, 0x02, 0x31, 0x7F, 0x16, 0x00, 0x0D, 0x00, 0x0B, 0x00, 0x17, 0x18, 0x00, 0x06, 0xF1, 0x02, + 0x43, 0x00, 0x45, 0x00, 0x45, 0x00, 0x43, 0x00, 0x46, 0x00, 0x47, 0x00, 0x41, 0x00, 0x46, 0x00, + 0x0C, 0xBA, 0x01, 0x1F, 0x0D, 0x18, 0x00, 0x06, 0x1F, 0x28, 0x02, 0x00, 0x0C, 0x11, 0x16, 0x5A, + 0x00, 0x00, 0x5C, 0x00, 0x00, 0x5E, 0x00, 0x3F, 0x17, 0x00, 0x16, 0x94, 0x00, 0x00, 0x05, 0x54, + 0x01, 0xB3, 0x40, 0x06, 0x00, 0xCC, 0x00, 0x09, 0x00, 0x4F, 0x00, 0x51, 0x80, 0x18, 0x00, 0x04, + 0x08, 0x00, 0x01, 0x6E, 0x00, 0x54, 0xAB, 0x00, 0x0A, 0x04, 0x11, 0x5C, 0x01, 0x03, 0x04, 0x00, + 0x0F, 0xE4, 0x03, 0x0E, 0x0B, 0xCC, 0x02, 0x14, 0x01, 0x14, 0x00, 0x8B, 0x01, 0x22, 0x04, 0xFF, + 0x9F, 0xAF, 0x4F, 0x01, 0x24, 0x00, 0x00, 0x01, 0x00, 0x32, 0x9F, 0xFF, 0x37, 0x98, 0x00, 0xF0, + 0x10, 0x32, 0x54, 0x76, 0x10, 0x47, 0x32, 0x65, 0x10, 0x34, 0x76, 0x25, 0x01, 0x34, 0x67, 0x25, + 0x01, 0x75, 0x64, 0x32, 0x01, 0x72, 0x56, 0x34, 0x10, 0x23, 0x74, 0x56, 0x01, 0x45, 0x32, 0x67, + 0x24, 0x00, 0x31, 0x49, 0x92, 0x24, 0x04, 0x00, 0x0C, 0x01, 0x00, 0x13, 0x12, 0x04, 0x00, 0x0C, + 0x90, 0x00, 0x80, 0x20, 0x41, 0x13, 0x1F, 0x14, 0x00, 0x01, 0x00, 0x7C, 0x00, 0x85, 0xFF, 0xFF, + 0xFF, 0x7F, 0x1F, 0xD7, 0x36, 0x40, 0xE6, 0x03, 0x24, 0x34, 0x10, 0x0A, 0x00, 0x0F, 0xCC, 0x00, + 0x02, 0x31, 0x03, 0x00, 0x05, 0x2B, 0x03, 0x22, 0x10, 0x02, 0xDD, 0x03, 0x13, 0x21, 0x15, 0x04, + 0x14, 0x40, 0x8B, 0x02, 0x07, 0x01, 0x00, 0x71, 0x80, 0x00, 0x40, 0x00, 0x04, 0x10, 0x80, 0x04, + 0x04, 0xDF, 0x81, 0x10, 0x09, 0x28, 0x93, 0x32, 0xA5, 0x44, 0x5B, 0x8A, 0x67, 0x76, 0x00, 0x01, + 0x00, 0x4C, 0x22, 0x10, 0x10, 0x04, 0x00, 0x44, 0x00, 0xEF, 0x00, 0xEF, 0x14, 0x00, 0x4D, 0x1C, + 0x1C, 0x1C, 0x1C, 0x98, 0x01, 0x21, 0x03, 0x08, 0x04, 0x00, 0xF1, 0x03, 0x00, 0x24, 0xFF, 0xFF, + 0x00, 0x44, 0x57, 0x6E, 0x00, 0x28, 0x72, 0x39, 0x00, 0x10, 0x9C, 0x4B, 0x00, 0x10, 0xA4, 0x01, + 0xB2, 0x08, 0x4C, 0x00, 0x00, 0x80, 0x20, 0x10, 0x0A, 0x00, 0x28, 0x10, 0x30, 0x03, 0x08, 0xC0, + 0x01, 0x17, 0x01, 0xC8, 0x01, 0x17, 0x05, 0x10, 0x00, 0x13, 0x04, 0x10, 0x00, 0x12, 0x07, 0x62, + 0x00, 0xD2, 0x02, 0x01, 0x02, 0x03, 0x00, 0x04, 0x05, 0xA3, 0x72, 0x0F, 0x0F, 0x00, 0x70, 0x42, + 0x00, 0x16, 0x1F, 0x28, 0x01, 0x43, 0xFF, 0x00, 0xFF, 0x01, 0x70, 0x04, 0x24, 0x00, 0x80, 0x96, + 0x00, 0x15, 0xF0, 0x24, 0x04, 0x60, 0x43, 0xCB, 0xFA, 0xE4, 0xD3, 0xFE, 0x0F, 0x05, 0x3B, 0x80, + 0x2A, 0x02, 0x1C, 0x00, 0x0C, 0xF4, 0x00, 0x19, 0x08, 0x0E, 0x00, 0x01, 0xE6, 0x05, 0x1F, 0x03, + 0x2C, 0x00, 0x05, 0x10, 0x76, 0xE9, 0x03, 0x0F, 0x9C, 0x02, 0x00, 0x05, 0x34, 0x00, 0x0F, 0x3A, + 0x00, 0x04, 0x38, 0x7E, 0x16, 0x40, 0x03, 0x06, 0x0F, 0x38, 0x00, 0x17, 0x3F, 0x1E, 0x40, 0x04, + 0xA8, 0x00, 0x08, 0x2F, 0x00, 0xC0, 0x55, 0x00, 0x04, 0x3F, 0x46, 0x24, 0x00, 0x38, 0x00, 0x0A, + 0x0F, 0x01, 0x00, 0x05, 0x22, 0x46, 0x2C, 0x38, 0x00, 0x19, 0xEC, 0x16, 0x00, 0x0D, 0x3C, 0x01, + 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, +}; + diff --git a/fusee_cpp/program/source/fusee_uncompress.cpp b/fusee_cpp/program/source/fusee_uncompress.cpp new file mode 100644 index 000000000..6d31bf1a7 --- /dev/null +++ b/fusee_cpp/program/source/fusee_uncompress.cpp @@ -0,0 +1,103 @@ +/* + * Copyright (c) 2018-2020 Atmosphère-NX + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include +#include "fusee_uncompress.hpp" + +namespace ams::nxboot { + + namespace { + + class Lz4Uncompressor { + private: + const u8 *src; + size_t src_size; + size_t src_offset; + u8 *dst; + size_t dst_size; + size_t dst_offset; + public: + Lz4Uncompressor(void *dst, size_t dst_size, const void *src, size_t src_size) : src(static_cast(src)), src_size(src_size), src_offset(0), dst(static_cast(dst)), dst_size(dst_size), dst_offset(0) { + /* ... */ + } + + void Uncompress() { + while (true) { + /* Read a control byte. */ + const u8 control = this->ReadByte(); + + /* Copy what it specifies we should copy. */ + this->Copy(this->GetCopySize(control >> 4)); + + /* If we've exceeded size, we're done. */ + if (this->src_offset >= this->src_size) { + break; + } + + /* Read the wide copy offset. */ + u16 wide_offset = this->ReadByte(); + AMS_ABORT_UNLESS(this->CanRead()); + wide_offset |= (this->ReadByte() << 8); + + /* Determine the copy size. */ + const size_t wide_copy_size = this->GetCopySize(control & 0xF); + + /* Copy bytes. */ + const size_t end_offset = this->dst_offset + wide_copy_size + 4; + for (size_t cur_offset = this->dst_offset; cur_offset < end_offset; this->dst_offset = (++cur_offset)) { + AMS_ABORT_UNLESS(wide_offset <= cur_offset); + + this->dst[cur_offset] = this->dst[cur_offset - wide_offset]; + } + } + } + private: + u8 ReadByte() { + return this->src[this->src_offset++]; + } + + bool CanRead() const { + return this->src_offset < this->src_size; + } + + size_t GetCopySize(u8 control) { + size_t size = control; + + if (control >= 0xF) { + do { + AMS_ABORT_UNLESS(this->CanRead()); + control = this->ReadByte(); + size += control; + } while (control == 0xFF); + } + + return size; + } + + void Copy(size_t size) { + __builtin_memcpy(this->dst + this->dst_offset, this->src + this->src_offset, size); + this->dst_offset += size; + this->src_offset += size; + } + }; + + } + + void Uncompress(void *dst, size_t dst_size, const void *src, size_t src_size) { + /* Create an execute a decompressor. */ + Lz4Uncompressor(dst, dst_size, src, src_size).Uncompress(); + } + +} \ No newline at end of file diff --git a/fusee_cpp/program/source/fusee_uncompress.hpp b/fusee_cpp/program/source/fusee_uncompress.hpp new file mode 100644 index 000000000..26b82fc89 --- /dev/null +++ b/fusee_cpp/program/source/fusee_uncompress.hpp @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2018-2020 Atmosphère-NX + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include +#pragma once + +namespace ams::nxboot { + + void Uncompress(void *dst, size_t dst_size, const void *src, size_t src_size); + +} \ No newline at end of file diff --git a/fusee_cpp/program/update_sdram_params.py b/fusee_cpp/program/update_sdram_params.py new file mode 100644 index 000000000..d7d07c919 --- /dev/null +++ b/fusee_cpp/program/update_sdram_params.py @@ -0,0 +1,65 @@ +#!/usr/bin/env python +import sys, lz4, os +from struct import unpack as up + +def lz4_compress(data): + try: + import lz4.block as block + except ImportError: + block = lz4.LZ4_compress + return block.compress(data, 'high_compression', store_size=False) + +def read_file(fn): + with open(fn, 'rb') as f: + return f.read() + +def write_file(fn, data): + with open(fn, 'wb') as f: + f.write(data) + +def main(argc, argv): + if argc != 1: + print('Usage: %s' % argv[0]) + return 1 + params = { + 'erista' : {}, + 'mariko' : {}, + } + for fn in os.listdir('sdram_params/bin'): + assert fn.startswith('sdram_params_') and fn.endswith('.bin') + (_sdram, _params, soc, _id_bin) = tuple(fn.split('_')) + param_id = int(_id_bin[:-len('.bin')]) + assert soc in params.keys() + compressed = lz4_compress(read_file(os.path.join('sdram_params/bin', fn))) + write_file(os.path.join('sdram_params/lz', fn.replace('.bin', '.lz4')), compressed) + params[soc][param_id] = compressed + with open('source/fusee_sdram_params.inc', 'w') as f: + f.write('%s\n' % "/*") + f.write('%s\n' % " * Copyright (c) 2018-2020 Atmosph\xc3re-NX") + f.write('%s\n' % " *") + f.write('%s\n' % " * This program is free software; you can redistribute it and/or modify it") + f.write('%s\n' % " * under the terms and conditions of the GNU General Public License,") + f.write('%s\n' % " * version 2, as published by the Free Software Foundation.") + f.write('%s\n' % " *") + f.write('%s\n' % " * This program is distributed in the hope it will be useful, but WITHOUT") + f.write('%s\n' % " * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or") + f.write('%s\n' % " * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for") + f.write('%s\n' % " * more details.") + f.write('%s\n' % " *") + f.write('%s\n' % " * You should have received a copy of the GNU General Public License") + f.write('%s\n' % " * along with this program. If not, see .") + f.write('%s\n' % " */") + f.write('\n') + for soc in ('Erista', 'Mariko'): + for param_id in sorted(params[soc.lower()].keys()): + compressed = params[soc.lower()][param_id] + f.write('%s\n' % ('constexpr inline const u8 SdramParams%s%d[0x%03X] = {' % (soc, param_id, len(compressed)))) + while compressed: + block = compressed[:0x10] + compressed = compressed[0x10:] + f.write(' %s\n' % (', '.join('0x%02X' % ord(c) for c in block) + ',')) + f.write('};\n\n') + return 0 + +if __name__ == '__main__': + sys.exit(main(len(sys.argv), sys.argv)) diff --git a/libraries/libexosphere/include/exosphere/br/impl/br_common_types.hpp b/libraries/libexosphere/include/exosphere/br/impl/br_common_types.hpp new file mode 100644 index 000000000..23d032580 --- /dev/null +++ b/libraries/libexosphere/include/exosphere/br/impl/br_common_types.hpp @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2018-2020 Atmosphère-NX + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once +#include + +namespace ams::br { + + enum BootMemoryType : u32 { + BootMemoryType_None, + BootMemoryType_LpDdr2, + BootMemoryType_Ddr3, + BootMemoryType_LpDdr4, + }; + +} diff --git a/libraries/libexosphere/include/exosphere/br/impl/br_erista_types.hpp b/libraries/libexosphere/include/exosphere/br/impl/br_erista_types.hpp index ee26f5b9e..39d0daa1c 100644 --- a/libraries/libexosphere/include/exosphere/br/impl/br_erista_types.hpp +++ b/libraries/libexosphere/include/exosphere/br/impl/br_erista_types.hpp @@ -15,7 +15,486 @@ */ #pragma once #include +#include namespace ams::br::erista { + struct BootSdramParams { + BootMemoryType MemoryType; + u32 PllMInputDivider; + u32 PllMFeedbackDivider; + u32 PllMStableTime; + u32 PllMSetupControl; + u32 PllMPostDivider; + u32 PllMKCP; + u32 PllMKVCO; + u32 EmcBctSpare0; + u32 EmcBctSpare1; + u32 EmcBctSpare2; + u32 EmcBctSpare3; + u32 EmcBctSpare4; + u32 EmcBctSpare5; + u32 EmcBctSpare6; + u32 EmcBctSpare7; + u32 EmcBctSpare8; + u32 EmcBctSpare9; + u32 EmcBctSpare10; + u32 EmcBctSpare11; + u32 EmcBctSpare12; + u32 EmcBctSpare13; + u32 EmcClockSource; + u32 EmcClockSourceDll; + u32 ClkRstControllerPllmMisc2Override; + u32 ClkRstControllerPllmMisc2OverrideEnable; + u32 ClearClk2Mc1; + u32 EmcAutoCalInterval; + u32 EmcAutoCalConfig; + u32 EmcAutoCalConfig2; + u32 EmcAutoCalConfig3; + u32 EmcAutoCalConfig4; + u32 EmcAutoCalConfig5; + u32 EmcAutoCalConfig6; + u32 EmcAutoCalConfig7; + u32 EmcAutoCalConfig8; + u32 EmcAutoCalVrefSel0; + u32 EmcAutoCalVrefSel1; + u32 EmcAutoCalChannel; + u32 EmcPmacroAutocalCfg0; + u32 EmcPmacroAutocalCfg1; + u32 EmcPmacroAutocalCfg2; + u32 EmcPmacroRxTerm; + u32 EmcPmacroDqTxDrv; + u32 EmcPmacroCaTxDrv; + u32 EmcPmacroCmdTxDrv; + u32 EmcPmacroAutocalCfgCommon; + u32 EmcPmacroZctrl; + u32 EmcAutoCalWait; + u32 EmcXm2CompPadCtrl; + u32 EmcXm2CompPadCtrl2; + u32 EmcXm2CompPadCtrl3; + u32 EmcAdrCfg; + u32 EmcPinProgramWait; + u32 EmcPinExtraWait; + u32 EmcPinGpioEn; + u32 EmcPinGpio; + u32 EmcTimingControlWait; + u32 EmcRc; + u32 EmcRfc; + u32 EmcRfcPb; + u32 EmcRefctrl2; + u32 EmcRfcSlr; + u32 EmcRas; + u32 EmcRp; + u32 EmcR2r; + u32 EmcW2w; + u32 EmcR2w; + u32 EmcW2r; + u32 EmcR2p; + u32 EmcW2p; + u32 EmcTppd; + u32 EmcCcdmw; + u32 EmcRdRcd; + u32 EmcWrRcd; + u32 EmcRrd; + u32 EmcRext; + u32 EmcWext; + u32 EmcWdv; + u32 EmcWdvChk; + u32 EmcWsv; + u32 EmcWev; + u32 EmcWdvMask; + u32 EmcWsDuration; + u32 EmcWeDuration; + u32 EmcQUse; + u32 EmcQuseWidth; + u32 EmcIbdly; + u32 EmcObdly; + u32 EmcEInput; + u32 EmcEInputDuration; + u32 EmcPutermExtra; + u32 EmcPutermWidth; + u32 EmcQRst; + u32 EmcQSafe; + u32 EmcRdv; + u32 EmcRdvMask; + u32 EmcRdvEarly; + u32 EmcRdvEarlyMask; + u32 EmcQpop; + u32 EmcRefresh; + u32 EmcBurstRefreshNum; + u32 EmcPreRefreshReqCnt; + u32 EmcPdEx2Wr; + u32 EmcPdEx2Rd; + u32 EmcPChg2Pden; + u32 EmcAct2Pden; + u32 EmcAr2Pden; + u32 EmcRw2Pden; + u32 EmcCke2Pden; + u32 EmcPdex2Cke; + u32 EmcPdex2Mrr; + u32 EmcTxsr; + u32 EmcTxsrDll; + u32 EmcTcke; + u32 EmcTckesr; + u32 EmcTpd; + u32 EmcTfaw; + u32 EmcTrpab; + u32 EmcTClkStable; + u32 EmcTClkStop; + u32 EmcTRefBw; + u32 EmcFbioCfg5; + u32 EmcFbioCfg7; + u32 EmcFbioCfg8; + u32 EmcCmdMappingCmd0_0; + u32 EmcCmdMappingCmd0_1; + u32 EmcCmdMappingCmd0_2; + u32 EmcCmdMappingCmd1_0; + u32 EmcCmdMappingCmd1_1; + u32 EmcCmdMappingCmd1_2; + u32 EmcCmdMappingCmd2_0; + u32 EmcCmdMappingCmd2_1; + u32 EmcCmdMappingCmd2_2; + u32 EmcCmdMappingCmd3_0; + u32 EmcCmdMappingCmd3_1; + u32 EmcCmdMappingCmd3_2; + u32 EmcCmdMappingByte; + u32 EmcFbioSpare; + u32 EmcCfgRsv; + u32 EmcMrs; + u32 EmcEmrs; + u32 EmcEmrs2; + u32 EmcEmrs3; + u32 EmcMrw1; + u32 EmcMrw2; + u32 EmcMrw3; + u32 EmcMrw4; + u32 EmcMrw6; + u32 EmcMrw8; + u32 EmcMrw9; + u32 EmcMrw10; + u32 EmcMrw12; + u32 EmcMrw13; + u32 EmcMrw14; + u32 EmcMrwExtra; + u32 EmcWarmBootMrwExtra; + u32 EmcWarmBootExtraModeRegWriteEnable; + u32 EmcExtraModeRegWriteEnable; + u32 EmcMrwResetCommand; + u32 EmcMrwResetNInitWait; + u32 EmcMrsWaitCnt; + u32 EmcMrsWaitCnt2; + u32 EmcCfg; + u32 EmcCfg2; + u32 EmcCfgPipe; + u32 EmcCfgPipeClk; + u32 EmcFdpdCtrlCmdNoRamp; + u32 EmcCfgUpdate; + u32 EmcDbg; + u32 EmcDbgWriteMux; + u32 EmcCmdQ; + u32 EmcMc2EmcQ; + u32 EmcDynSelfRefControl; + u32 AhbArbitrationXbarCtrlMemInitDone; + u32 EmcCfgDigDll; + u32 EmcCfgDigDll_1; + u32 EmcCfgDigDllPeriod; + u32 EmcDevSelect; + u32 EmcSelDpdCtrl; + u32 EmcFdpdCtrlDq; + u32 EmcFdpdCtrlCmd; + u32 EmcPmacroIbVrefDq_0; + u32 EmcPmacroIbVrefDq_1; + u32 EmcPmacroIbVrefDqs_0; + u32 EmcPmacroIbVrefDqs_1; + u32 EmcPmacroIbRxrt; + u32 EmcCfgPipe1; + u32 EmcCfgPipe2; + u32 EmcPmacroQuseDdllRank0_0; + u32 EmcPmacroQuseDdllRank0_1; + u32 EmcPmacroQuseDdllRank0_2; + u32 EmcPmacroQuseDdllRank0_3; + u32 EmcPmacroQuseDdllRank0_4; + u32 EmcPmacroQuseDdllRank0_5; + u32 EmcPmacroQuseDdllRank1_0; + u32 EmcPmacroQuseDdllRank1_1; + u32 EmcPmacroQuseDdllRank1_2; + u32 EmcPmacroQuseDdllRank1_3; + u32 EmcPmacroQuseDdllRank1_4; + u32 EmcPmacroQuseDdllRank1_5; + u32 EmcPmacroObDdllLongDqRank0_0; + u32 EmcPmacroObDdllLongDqRank0_1; + u32 EmcPmacroObDdllLongDqRank0_2; + u32 EmcPmacroObDdllLongDqRank0_3; + u32 EmcPmacroObDdllLongDqRank0_4; + u32 EmcPmacroObDdllLongDqRank0_5; + u32 EmcPmacroObDdllLongDqRank1_0; + u32 EmcPmacroObDdllLongDqRank1_1; + u32 EmcPmacroObDdllLongDqRank1_2; + u32 EmcPmacroObDdllLongDqRank1_3; + u32 EmcPmacroObDdllLongDqRank1_4; + u32 EmcPmacroObDdllLongDqRank1_5; + u32 EmcPmacroObDdllLongDqsRank0_0; + u32 EmcPmacroObDdllLongDqsRank0_1; + u32 EmcPmacroObDdllLongDqsRank0_2; + u32 EmcPmacroObDdllLongDqsRank0_3; + u32 EmcPmacroObDdllLongDqsRank0_4; + u32 EmcPmacroObDdllLongDqsRank0_5; + u32 EmcPmacroObDdllLongDqsRank1_0; + u32 EmcPmacroObDdllLongDqsRank1_1; + u32 EmcPmacroObDdllLongDqsRank1_2; + u32 EmcPmacroObDdllLongDqsRank1_3; + u32 EmcPmacroObDdllLongDqsRank1_4; + u32 EmcPmacroObDdllLongDqsRank1_5; + u32 EmcPmacroIbDdllLongDqsRank0_0; + u32 EmcPmacroIbDdllLongDqsRank0_1; + u32 EmcPmacroIbDdllLongDqsRank0_2; + u32 EmcPmacroIbDdllLongDqsRank0_3; + u32 EmcPmacroIbDdllLongDqsRank1_0; + u32 EmcPmacroIbDdllLongDqsRank1_1; + u32 EmcPmacroIbDdllLongDqsRank1_2; + u32 EmcPmacroIbDdllLongDqsRank1_3; + u32 EmcPmacroDdllLongCmd_0; + u32 EmcPmacroDdllLongCmd_1; + u32 EmcPmacroDdllLongCmd_2; + u32 EmcPmacroDdllLongCmd_3; + u32 EmcPmacroDdllLongCmd_4; + u32 EmcPmacroDdllShortCmd_0; + u32 EmcPmacroDdllShortCmd_1; + u32 EmcPmacroDdllShortCmd_2; + u32 WarmBootWait; + u32 EmcOdtWrite; + u32 EmcZcalInterval; + u32 EmcZcalWaitCnt; + u32 EmcZcalMrwCmd; + u32 EmcMrsResetDll; + u32 EmcZcalInitDev0; + u32 EmcZcalInitDev1; + u32 EmcZcalInitWait; + u32 EmcZcalWarmColdBootEnables; + u32 EmcMrwLpddr2ZcalWarmBoot; + u32 EmcZqCalDdr3WarmBoot; + u32 EmcZqCalLpDdr4WarmBoot; + u32 EmcZcalWarmBootWait; + u32 EmcMrsWarmBootEnable; + u32 EmcMrsResetDllWait; + u32 EmcMrsExtra; + u32 EmcWarmBootMrsExtra; + u32 EmcEmrsDdr2DllEnable; + u32 EmcMrsDdr2DllReset; + u32 EmcEmrsDdr2OcdCalib; + u32 EmcDdr2Wait; + u32 EmcClkenOverride; + u32 EmcExtraRefreshNum; + u32 EmcClkenOverrideAllWarmBoot; + u32 McClkenOverrideAllWarmBoot; + u32 EmcCfgDigDllPeriodWarmBoot; + u32 PmcVddpSel; + u32 PmcVddpSelWait; + u32 PmcDdrPwr; + u32 PmcDdrCfg; + u32 PmcIoDpd3Req; + u32 PmcIoDpd3ReqWait; + u32 PmcIoDpd4ReqWait; + u32 PmcRegShort; + u32 PmcNoIoPower; + u32 PmcDdrCntrlWait; + u32 PmcDdrCntrl; + u32 EmcAcpdControl; + u32 EmcSwizzleRank0Byte0; + u32 EmcSwizzleRank0Byte1; + u32 EmcSwizzleRank0Byte2; + u32 EmcSwizzleRank0Byte3; + u32 EmcSwizzleRank1Byte0; + u32 EmcSwizzleRank1Byte1; + u32 EmcSwizzleRank1Byte2; + u32 EmcSwizzleRank1Byte3; + u32 EmcTxdsrvttgen; + u32 EmcDataBrlshft0; + u32 EmcDataBrlshft1; + u32 EmcDqsBrlshft0; + u32 EmcDqsBrlshft1; + u32 EmcCmdBrlshft0; + u32 EmcCmdBrlshft1; + u32 EmcCmdBrlshft2; + u32 EmcCmdBrlshft3; + u32 EmcQuseBrlshft0; + u32 EmcQuseBrlshft1; + u32 EmcQuseBrlshft2; + u32 EmcQuseBrlshft3; + u32 EmcDllCfg0; + u32 EmcDllCfg1; + u32 EmcPmcScratch1; + u32 EmcPmcScratch2; + u32 EmcPmcScratch3; + u32 EmcPmacroPadCfgCtrl; + u32 EmcPmacroVttgenCtrl0; + u32 EmcPmacroVttgenCtrl1; + u32 EmcPmacroVttgenCtrl2; + u32 EmcPmacroBrickCtrlRfu1; + u32 EmcPmacroCmdBrickCtrlFdpd; + u32 EmcPmacroBrickCtrlRfu2; + u32 EmcPmacroDataBrickCtrlFdpd; + u32 EmcPmacroBgBiasCtrl0; + u32 EmcPmacroDataPadRxCtrl; + u32 EmcPmacroCmdPadRxCtrl; + u32 EmcPmacroDataRxTermMode; + u32 EmcPmacroCmdRxTermMode; + u32 EmcPmacroDataPadTxCtrl; + u32 EmcPmacroCommonPadTxCtrl; + u32 EmcPmacroCmdPadTxCtrl; + u32 EmcCfg3; + u32 EmcPmacroTxPwrd0; + u32 EmcPmacroTxPwrd1; + u32 EmcPmacroTxPwrd2; + u32 EmcPmacroTxPwrd3; + u32 EmcPmacroTxPwrd4; + u32 EmcPmacroTxPwrd5; + u32 EmcConfigSampleDelay; + u32 EmcPmacroBrickMapping0; + u32 EmcPmacroBrickMapping1; + u32 EmcPmacroBrickMapping2; + u32 EmcPmacroTxSelClkSrc0; + u32 EmcPmacroTxSelClkSrc1; + u32 EmcPmacroTxSelClkSrc2; + u32 EmcPmacroTxSelClkSrc3; + u32 EmcPmacroTxSelClkSrc4; + u32 EmcPmacroTxSelClkSrc5; + u32 EmcPmacroDdllBypass; + u32 EmcPmacroDdllPwrd0; + u32 EmcPmacroDdllPwrd1; + u32 EmcPmacroDdllPwrd2; + u32 EmcPmacroCmdCtrl0; + u32 EmcPmacroCmdCtrl1; + u32 EmcPmacroCmdCtrl2; + u32 McEmemAdrCfg; + u32 McEmemAdrCfgDev0; + u32 McEmemAdrCfgDev1; + u32 McEmemAdrCfgChannelMask; + u32 McEmemAdrCfgBankMask0; + u32 McEmemAdrCfgBankMask1; + u32 McEmemAdrCfgBankMask2; + u32 McEmemCfg; + u32 McEmemArbCfg; + u32 McEmemArbOutstandingReq; + u32 McEmemArbRefpbHpCtrl; + u32 McEmemArbRefpbBankCtrl; + u32 McEmemArbTimingRcd; + u32 McEmemArbTimingRp; + u32 McEmemArbTimingRc; + u32 McEmemArbTimingRas; + u32 McEmemArbTimingFaw; + u32 McEmemArbTimingRrd; + u32 McEmemArbTimingRap2Pre; + u32 McEmemArbTimingWap2Pre; + u32 McEmemArbTimingR2R; + u32 McEmemArbTimingW2W; + u32 McEmemArbTimingR2W; + u32 McEmemArbTimingW2R; + u32 McEmemArbTimingRFCPB; + u32 McEmemArbDaTurns; + u32 McEmemArbDaCovers; + u32 McEmemArbMisc0; + u32 McEmemArbMisc1; + u32 McEmemArbMisc2; + u32 McEmemArbRing1Throttle; + u32 McEmemArbOverride; + u32 McEmemArbOverride1; + u32 McEmemArbRsv; + u32 McDaCfg0; + u32 McEmemArbTimingCcdmw; + u32 McClkenOverride; + u32 McStatControl; + u32 McVideoProtectBom; + u32 McVideoProtectBomAdrHi; + u32 McVideoProtectSizeMb; + u32 McVideoProtectVprOverride; + u32 McVideoProtectVprOverride1; + u32 McVideoProtectGpuOverride0; + u32 McVideoProtectGpuOverride1; + u32 McSecCarveoutBom; + u32 McSecCarveoutAdrHi; + u32 McSecCarveoutSizeMb; + u32 McVideoProtectWriteAccess; + u32 McSecCarveoutProtectWriteAccess; + u32 McGeneralizedCarveout1Bom; + u32 McGeneralizedCarveout1BomHi; + u32 McGeneralizedCarveout1Size128kb; + u32 McGeneralizedCarveout1Access0; + u32 McGeneralizedCarveout1Access1; + u32 McGeneralizedCarveout1Access2; + u32 McGeneralizedCarveout1Access3; + u32 McGeneralizedCarveout1Access4; + u32 McGeneralizedCarveout1ForceInternalAccess0; + u32 McGeneralizedCarveout1ForceInternalAccess1; + u32 McGeneralizedCarveout1ForceInternalAccess2; + u32 McGeneralizedCarveout1ForceInternalAccess3; + u32 McGeneralizedCarveout1ForceInternalAccess4; + u32 McGeneralizedCarveout1Cfg0; + u32 McGeneralizedCarveout2Bom; + u32 McGeneralizedCarveout2BomHi; + u32 McGeneralizedCarveout2Size128kb; + u32 McGeneralizedCarveout2Access0; + u32 McGeneralizedCarveout2Access1; + u32 McGeneralizedCarveout2Access2; + u32 McGeneralizedCarveout2Access3; + u32 McGeneralizedCarveout2Access4; + u32 McGeneralizedCarveout2ForceInternalAccess0; + u32 McGeneralizedCarveout2ForceInternalAccess1; + u32 McGeneralizedCarveout2ForceInternalAccess2; + u32 McGeneralizedCarveout2ForceInternalAccess3; + u32 McGeneralizedCarveout2ForceInternalAccess4; + u32 McGeneralizedCarveout2Cfg0; + u32 McGeneralizedCarveout3Bom; + u32 McGeneralizedCarveout3BomHi; + u32 McGeneralizedCarveout3Size128kb; + u32 McGeneralizedCarveout3Access0; + u32 McGeneralizedCarveout3Access1; + u32 McGeneralizedCarveout3Access2; + u32 McGeneralizedCarveout3Access3; + u32 McGeneralizedCarveout3Access4; + u32 McGeneralizedCarveout3ForceInternalAccess0; + u32 McGeneralizedCarveout3ForceInternalAccess1; + u32 McGeneralizedCarveout3ForceInternalAccess2; + u32 McGeneralizedCarveout3ForceInternalAccess3; + u32 McGeneralizedCarveout3ForceInternalAccess4; + u32 McGeneralizedCarveout3Cfg0; + u32 McGeneralizedCarveout4Bom; + u32 McGeneralizedCarveout4BomHi; + u32 McGeneralizedCarveout4Size128kb; + u32 McGeneralizedCarveout4Access0; + u32 McGeneralizedCarveout4Access1; + u32 McGeneralizedCarveout4Access2; + u32 McGeneralizedCarveout4Access3; + u32 McGeneralizedCarveout4Access4; + u32 McGeneralizedCarveout4ForceInternalAccess0; + u32 McGeneralizedCarveout4ForceInternalAccess1; + u32 McGeneralizedCarveout4ForceInternalAccess2; + u32 McGeneralizedCarveout4ForceInternalAccess3; + u32 McGeneralizedCarveout4ForceInternalAccess4; + u32 McGeneralizedCarveout4Cfg0; + u32 McGeneralizedCarveout5Bom; + u32 McGeneralizedCarveout5BomHi; + u32 McGeneralizedCarveout5Size128kb; + u32 McGeneralizedCarveout5Access0; + u32 McGeneralizedCarveout5Access1; + u32 McGeneralizedCarveout5Access2; + u32 McGeneralizedCarveout5Access3; + u32 McGeneralizedCarveout5Access4; + u32 McGeneralizedCarveout5ForceInternalAccess0; + u32 McGeneralizedCarveout5ForceInternalAccess1; + u32 McGeneralizedCarveout5ForceInternalAccess2; + u32 McGeneralizedCarveout5ForceInternalAccess3; + u32 McGeneralizedCarveout5ForceInternalAccess4; + u32 McGeneralizedCarveout5Cfg0; + u32 EmcCaTrainingEnable; + u32 SwizzleRankByteEncode; + u32 BootRomPatchControl; + u32 BootRomPatchData; + u32 McMtsCarveoutBom; + u32 McMtsCarveoutAdrHi; + u32 McMtsCarveoutSizeMb; + u32 McMtsCarveoutRegCtrl; + }; + static_assert(sizeof(BootSdramParams) == 0x768); + } diff --git a/libraries/libexosphere/include/exosphere/br/impl/br_mariko_types.hpp b/libraries/libexosphere/include/exosphere/br/impl/br_mariko_types.hpp index 8210479c2..a84735d5d 100644 --- a/libraries/libexosphere/include/exosphere/br/impl/br_mariko_types.hpp +++ b/libraries/libexosphere/include/exosphere/br/impl/br_mariko_types.hpp @@ -15,7 +15,538 @@ */ #pragma once #include +#include namespace ams::br::mariko { + struct BootSdramParams { + BootMemoryType MemoryType; + u32 PllMInputDivider; + u32 PllMFeedbackDivider; + u32 PllMStableTime; + u32 PllMSetupControl; + u32 PllMPostDivider; + u32 PllMKCP; + u32 PllMKVCO; + u32 EmcBctSpare0; + u32 EmcBctSpare1; + u32 EmcBctSpare2; + u32 EmcBctSpare3; + u32 EmcBctSpare4; + u32 EmcBctSpare5; + u32 EmcBctSpare6; + u32 EmcBctSpare7; + u32 EmcBctSpare8; + u32 EmcBctSpare9; + u32 EmcBctSpare10; + u32 EmcBctSpare11; + u32 EmcBctSpare12; + u32 EmcBctSpare13; + u32 EmcBctSpareSecure0; + u32 EmcBctSpareSecure1; + u32 EmcBctSpareSecure2; + u32 EmcBctSpareSecure3; + u32 EmcBctSpareSecure4; + u32 EmcBctSpareSecure5; + u32 EmcBctSpareSecure6; + u32 EmcBctSpareSecure7; + u32 EmcBctSpareSecure8; + u32 EmcBctSpareSecure9; + u32 EmcBctSpareSecure10; + u32 EmcBctSpareSecure11; + u32 EmcBctSpareSecure12; + u32 EmcBctSpareSecure13; + u32 EmcBctSpareSecure14; + u32 EmcBctSpareSecure15; + u32 EmcBctSpareSecure16; + u32 EmcBctSpareSecure17; + u32 EmcBctSpareSecure18; + u32 EmcBctSpareSecure19; + u32 EmcBctSpareSecure20; + u32 EmcBctSpareSecure21; + u32 EmcBctSpareSecure22; + u32 EmcBctSpareSecure23; + u32 EmcClockSource; + u32 EmcClockSourceDll; + u32 ClkRstControllerPllmMisc2Override; + u32 ClkRstControllerPllmMisc2OverrideEnable; + u32 ClearClk2Mc1; + u32 EmcAutoCalInterval; + u32 EmcAutoCalConfig; + u32 EmcAutoCalConfig2; + u32 EmcAutoCalConfig3; + u32 EmcAutoCalConfig4; + u32 EmcAutoCalConfig5; + u32 EmcAutoCalConfig6; + u32 EmcAutoCalConfig7; + u32 EmcAutoCalConfig8; + u32 EmcAutoCalConfig9; + u32 EmcAutoCalVrefSel0; + u32 EmcAutoCalVrefSel1; + u32 EmcAutoCalChannel; + u32 EmcPmacroAutocalCfg0; + u32 EmcPmacroAutocalCfg1; + u32 EmcPmacroAutocalCfg2; + u32 EmcPmacroRxTerm; + u32 EmcPmacroDqTxDrv; + u32 EmcPmacroCaTxDrv; + u32 EmcPmacroCmdTxDrv; + u32 EmcPmacroAutocalCfgCommon; + u32 EmcPmacroZctrl; + u32 EmcAutoCalWait; + u32 EmcXm2CompPadCtrl; + u32 EmcXm2CompPadCtrl2; + u32 EmcXm2CompPadCtrl3; + u32 EmcAdrCfg; + u32 EmcPinProgramWait; + u32 EmcPinExtraWait; + u32 EmcPinGpioEn; + u32 EmcPinGpio; + u32 EmcTimingControlWait; + u32 EmcRc; + u32 EmcRfc; + u32 EmcRfcPb; + u32 EmcRefctrl2; + u32 EmcRfcSlr; + u32 EmcRas; + u32 EmcRp; + u32 EmcR2r; + u32 EmcW2w; + u32 EmcR2w; + u32 EmcW2r; + u32 EmcR2p; + u32 EmcW2p; + u32 EmcTppd; + u32 EmcTrtm; + u32 EmcTwtm; + u32 EmcTratm; + u32 EmcTwatm; + u32 EmcTr2ref; + u32 EmcCcdmw; + u32 EmcRdRcd; + u32 EmcWrRcd; + u32 EmcRrd; + u32 EmcRext; + u32 EmcWext; + u32 EmcWdv; + u32 EmcWdvChk; + u32 EmcWsv; + u32 EmcWev; + u32 EmcWdvMask; + u32 EmcWsDuration; + u32 EmcWeDuration; + u32 EmcQUse; + u32 EmcQuseWidth; + u32 EmcIbdly; + u32 EmcObdly; + u32 EmcEInput; + u32 EmcEInputDuration; + u32 EmcPutermExtra; + u32 EmcPutermWidth; + u32 EmcQRst; + u32 EmcQSafe; + u32 EmcRdv; + u32 EmcRdvMask; + u32 EmcRdvEarly; + u32 EmcRdvEarlyMask; + u32 EmcQpop; + u32 EmcRefresh; + u32 EmcBurstRefreshNum; + u32 EmcPreRefreshReqCnt; + u32 EmcPdEx2Wr; + u32 EmcPdEx2Rd; + u32 EmcPChg2Pden; + u32 EmcAct2Pden; + u32 EmcAr2Pden; + u32 EmcRw2Pden; + u32 EmcCke2Pden; + u32 EmcPdex2Cke; + u32 EmcPdex2Mrr; + u32 EmcTxsr; + u32 EmcTxsrDll; + u32 EmcTcke; + u32 EmcTckesr; + u32 EmcTpd; + u32 EmcTfaw; + u32 EmcTrpab; + u32 EmcTClkStable; + u32 EmcTClkStop; + u32 EmcTRefBw; + u32 EmcFbioCfg5; + u32 EmcFbioCfg7; + u32 EmcFbioCfg8; + u32 EmcCmdMappingCmd0_0; + u32 EmcCmdMappingCmd0_1; + u32 EmcCmdMappingCmd0_2; + u32 EmcCmdMappingCmd1_0; + u32 EmcCmdMappingCmd1_1; + u32 EmcCmdMappingCmd1_2; + u32 EmcCmdMappingCmd2_0; + u32 EmcCmdMappingCmd2_1; + u32 EmcCmdMappingCmd2_2; + u32 EmcCmdMappingCmd3_0; + u32 EmcCmdMappingCmd3_1; + u32 EmcCmdMappingCmd3_2; + u32 EmcCmdMappingByte; + u32 EmcFbioSpare; + u32 EmcCfgRsv; + u32 EmcMrs; + u32 EmcEmrs; + u32 EmcEmrs2; + u32 EmcEmrs3; + u32 EmcMrw1; + u32 EmcMrw2; + u32 EmcMrw3; + u32 EmcMrw4; + u32 EmcMrw6; + u32 EmcMrw8; + u32 EmcMrw9; + u32 EmcMrw10; + u32 EmcMrw12; + u32 EmcMrw13; + u32 EmcMrw14; + u32 EmcMrwExtra; + u32 EmcWarmBootMrwExtra; + u32 EmcWarmBootExtraModeRegWriteEnable; + u32 EmcExtraModeRegWriteEnable; + u32 EmcMrwResetCommand; + u32 EmcMrwResetNInitWait; + u32 EmcMrsWaitCnt; + u32 EmcMrsWaitCnt2; + u32 EmcCfg; + u32 EmcCfg2; + u32 EmcCfgPipe; + u32 EmcCfgPipeClk; + u32 EmcFdpdCtrlCmdNoRamp; + u32 EmcCfgUpdate; + u32 EmcDbg; + u32 EmcDbgWriteMux; + u32 EmcCmdQ; + u32 EmcMc2EmcQ; + u32 EmcDynSelfRefControl; + u32 AhbArbitrationXbarCtrlMemInitDone; + u32 EmcCfgDigDll; + u32 EmcCfgDigDll_1; + u32 EmcCfgDigDllPeriod; + u32 EmcDevSelect; + u32 EmcSelDpdCtrl; + u32 EmcFdpdCtrlDq; + u32 EmcFdpdCtrlCmd; + u32 EmcPmacroIbVrefDq_0; + u32 EmcPmacroIbVrefDq_1; + u32 EmcPmacroIbVrefDqs_0; + u32 EmcPmacroIbVrefDqs_1; + u32 EmcPmacroIbRxrt; + u32 EmcCfgPipe1; + u32 EmcCfgPipe2; + u32 EmcPmacroQuseDdllRank0_0; + u32 EmcPmacroQuseDdllRank0_1; + u32 EmcPmacroQuseDdllRank0_2; + u32 EmcPmacroQuseDdllRank0_3; + u32 EmcPmacroQuseDdllRank0_4; + u32 EmcPmacroQuseDdllRank0_5; + u32 EmcPmacroQuseDdllRank1_0; + u32 EmcPmacroQuseDdllRank1_1; + u32 EmcPmacroQuseDdllRank1_2; + u32 EmcPmacroQuseDdllRank1_3; + u32 EmcPmacroQuseDdllRank1_4; + u32 EmcPmacroQuseDdllRank1_5; + u32 EmcPmacroObDdllLongDqRank0_0; + u32 EmcPmacroObDdllLongDqRank0_1; + u32 EmcPmacroObDdllLongDqRank0_2; + u32 EmcPmacroObDdllLongDqRank0_3; + u32 EmcPmacroObDdllLongDqRank0_4; + u32 EmcPmacroObDdllLongDqRank0_5; + u32 EmcPmacroObDdllLongDqRank1_0; + u32 EmcPmacroObDdllLongDqRank1_1; + u32 EmcPmacroObDdllLongDqRank1_2; + u32 EmcPmacroObDdllLongDqRank1_3; + u32 EmcPmacroObDdllLongDqRank1_4; + u32 EmcPmacroObDdllLongDqRank1_5; + u32 EmcPmacroObDdllLongDqsRank0_0; + u32 EmcPmacroObDdllLongDqsRank0_1; + u32 EmcPmacroObDdllLongDqsRank0_2; + u32 EmcPmacroObDdllLongDqsRank0_3; + u32 EmcPmacroObDdllLongDqsRank0_4; + u32 EmcPmacroObDdllLongDqsRank0_5; + u32 EmcPmacroObDdllLongDqsRank1_0; + u32 EmcPmacroObDdllLongDqsRank1_1; + u32 EmcPmacroObDdllLongDqsRank1_2; + u32 EmcPmacroObDdllLongDqsRank1_3; + u32 EmcPmacroObDdllLongDqsRank1_4; + u32 EmcPmacroObDdllLongDqsRank1_5; + u32 EmcPmacroIbDdllLongDqsRank0_0; + u32 EmcPmacroIbDdllLongDqsRank0_1; + u32 EmcPmacroIbDdllLongDqsRank0_2; + u32 EmcPmacroIbDdllLongDqsRank0_3; + u32 EmcPmacroIbDdllLongDqsRank1_0; + u32 EmcPmacroIbDdllLongDqsRank1_1; + u32 EmcPmacroIbDdllLongDqsRank1_2; + u32 EmcPmacroIbDdllLongDqsRank1_3; + u32 EmcPmacroDdllLongCmd_0; + u32 EmcPmacroDdllLongCmd_1; + u32 EmcPmacroDdllLongCmd_2; + u32 EmcPmacroDdllLongCmd_3; + u32 EmcPmacroDdllLongCmd_4; + u32 EmcPmacroDdllShortCmd_0; + u32 EmcPmacroDdllShortCmd_1; + u32 EmcPmacroDdllShortCmd_2; + u32 EmcPmacroDdllPeriodicOffset; + u32 WarmBootWait; + u32 EmcOdtWrite; + u32 EmcZcalInterval; + u32 EmcZcalWaitCnt; + u32 EmcZcalMrwCmd; + u32 EmcMrsResetDll; + u32 EmcZcalInitDev0; + u32 EmcZcalInitDev1; + u32 EmcZcalInitWait; + u32 EmcZcalWarmColdBootEnables; + u32 EmcMrwLpddr2ZcalWarmBoot; + u32 EmcZqCalDdr3WarmBoot; + u32 EmcZqCalLpDdr4WarmBoot; + u32 EmcZcalWarmBootWait; + u32 EmcMrsWarmBootEnable; + u32 EmcMrsResetDllWait; + u32 EmcMrsExtra; + u32 EmcWarmBootMrsExtra; + u32 EmcEmrsDdr2DllEnable; + u32 EmcMrsDdr2DllReset; + u32 EmcEmrsDdr2OcdCalib; + u32 EmcDdr2Wait; + u32 EmcClkenOverride; + u32 EmcExtraRefreshNum; + u32 EmcClkenOverrideAllWarmBoot; + u32 McClkenOverrideAllWarmBoot; + u32 EmcCfgDigDllPeriodWarmBoot; + u32 PmcVddpSel; + u32 PmcVddpSelWait; + u32 PmcDdrCfg; + u32 PmcIoDpd3Req; + u32 PmcIoDpd3ReqWait; + u32 PmcIoDpd4ReqWait; + u32 PmcRegShort; + u32 PmcNoIoPower; + u32 PmcDdrCntrlWait; + u32 PmcDdrCntrl; + u32 EmcAcpdControl; + u32 EmcSwizzleRank0Byte0; + u32 EmcSwizzleRank0Byte1; + u32 EmcSwizzleRank0Byte2; + u32 EmcSwizzleRank0Byte3; + u32 EmcSwizzleRank1Byte0; + u32 EmcSwizzleRank1Byte1; + u32 EmcSwizzleRank1Byte2; + u32 EmcSwizzleRank1Byte3; + u32 EmcTxdsrvttgen; + u32 EmcDataBrlshft0; + u32 EmcDataBrlshft1; + u32 EmcDqsBrlshft0; + u32 EmcDqsBrlshft1; + u32 EmcCmdBrlshft0; + u32 EmcCmdBrlshft1; + u32 EmcCmdBrlshft2; + u32 EmcCmdBrlshft3; + u32 EmcQuseBrlshft0; + u32 EmcQuseBrlshft1; + u32 EmcQuseBrlshft2; + u32 EmcQuseBrlshft3; + u32 EmcPmacroDllCfg0; + u32 EmcPmacroDllCfg1; + u32 EmcPmcScratch1; + u32 EmcPmcScratch2; + u32 EmcPmcScratch3; + u32 EmcPmacroPadCfgCtrl; + u32 EmcPmacroVttgenCtrl0; + u32 EmcPmacroVttgenCtrl1; + u32 EmcPmacroVttgenCtrl2; + u32 EmcPmacroDsrVttgenCtrl0; + u32 EmcPmacroBrickCtrlRfu1; + u32 EmcPmacroCmdBrickCtrlFdpd; + u32 EmcPmacroBrickCtrlRfu2; + u32 EmcPmacroDataBrickCtrlFdpd; + u32 EmcPmacroBgBiasCtrl0; + u32 EmcPmacroDataPadRxCtrl; + u32 EmcPmacroCmdPadRxCtrl; + u32 EmcPmacroDataRxTermMode; + u32 EmcPmacroCmdRxTermMode; + u32 EmcPmacroDataPadTxCtrl; + u32 EmcPmacroCmdPadTxCtrl; + u32 EmcCfg3; + u32 EmcPmacroTxPwrd0; + u32 EmcPmacroTxPwrd1; + u32 EmcPmacroTxPwrd2; + u32 EmcPmacroTxPwrd3; + u32 EmcPmacroTxPwrd4; + u32 EmcPmacroTxPwrd5; + u32 EmcConfigSampleDelay; + u32 EmcPmacroBrickMapping0; + u32 EmcPmacroBrickMapping1; + u32 EmcPmacroBrickMapping2; + u32 EmcPmacroTxSelClkSrc0; + u32 EmcPmacroTxSelClkSrc1; + u32 EmcPmacroTxSelClkSrc2; + u32 EmcPmacroTxSelClkSrc3; + u32 EmcPmacroTxSelClkSrc4; + u32 EmcPmacroTxSelClkSrc5; + u32 EmcPmacroPerbitFgcgCtrl0; + u32 EmcPmacroPerbitFgcgCtrl1; + u32 EmcPmacroPerbitFgcgCtrl2; + u32 EmcPmacroPerbitFgcgCtrl3; + u32 EmcPmacroPerbitFgcgCtrl4; + u32 EmcPmacroPerbitFgcgCtrl5; + u32 EmcPmacroPerbitRfuCtrl0; + u32 EmcPmacroPerbitRfuCtrl1; + u32 EmcPmacroPerbitRfuCtrl2; + u32 EmcPmacroPerbitRfuCtrl3; + u32 EmcPmacroPerbitRfuCtrl4; + u32 EmcPmacroPerbitRfuCtrl5; + u32 EmcPmacroPerbitRfu1Ctrl0; + u32 EmcPmacroPerbitRfu1Ctrl1; + u32 EmcPmacroPerbitRfu1Ctrl2; + u32 EmcPmacroPerbitRfu1Ctrl3; + u32 EmcPmacroPerbitRfu1Ctrl4; + u32 EmcPmacroPerbitRfu1Ctrl5; + u32 EmcPmacroDataPiCtrl; + u32 EmcPmacroCmdPiCtrl; + u32 EmcPmacroDdllBypass; + u32 EmcPmacroDdllPwrd0; + u32 EmcPmacroDdllPwrd1; + u32 EmcPmacroDdllPwrd2; + u32 EmcPmacroCmdCtrl0; + u32 EmcPmacroCmdCtrl1; + u32 EmcPmacroCmdCtrl2; + u32 McEmemAdrCfg; + u32 McEmemAdrCfgDev0; + u32 McEmemAdrCfgDev1; + u32 McEmemAdrCfgChannelMask; + u32 McEmemAdrCfgBankMask0; + u32 McEmemAdrCfgBankMask1; + u32 McEmemAdrCfgBankMask2; + u32 McEmemCfg; + u32 McEmemArbCfg; + u32 McEmemArbOutstandingReq; + u32 McEmemArbRefpbHpCtrl; + u32 McEmemArbRefpbBankCtrl; + u32 McEmemArbTimingRcd; + u32 McEmemArbTimingRp; + u32 McEmemArbTimingRc; + u32 McEmemArbTimingRas; + u32 McEmemArbTimingFaw; + u32 McEmemArbTimingRrd; + u32 McEmemArbTimingRap2Pre; + u32 McEmemArbTimingWap2Pre; + u32 McEmemArbTimingR2R; + u32 McEmemArbTimingW2W; + u32 McEmemArbTimingR2W; + u32 McEmemArbTimingW2R; + u32 McEmemArbTimingRFCPB; + u32 McEmemArbDaTurns; + u32 McEmemArbDaCovers; + u32 McEmemArbMisc0; + u32 McEmemArbMisc1; + u32 McEmemArbMisc2; + u32 McEmemArbRing1Throttle; + u32 McEmemArbOverride; + u32 McEmemArbOverride1; + u32 McEmemArbRsv; + u32 McDaCfg0; + u32 McEmemArbTimingCcdmw; + u32 McClkenOverride; + u32 McStatControl; + u32 McVideoProtectBom; + u32 McVideoProtectBomAdrHi; + u32 McVideoProtectSizeMb; + u32 McVideoProtectVprOverride; + u32 McVideoProtectVprOverride1; + u32 McVideoProtectGpuOverride0; + u32 McVideoProtectGpuOverride1; + u32 McSecCarveoutBom; + u32 McSecCarveoutAdrHi; + u32 McSecCarveoutSizeMb; + u32 McVideoProtectWriteAccess; + u32 McSecCarveoutProtectWriteAccess; + u32 McGeneralizedCarveout1Bom; + u32 McGeneralizedCarveout1BomHi; + u32 McGeneralizedCarveout1Size128kb; + u32 McGeneralizedCarveout1Access0; + u32 McGeneralizedCarveout1Access1; + u32 McGeneralizedCarveout1Access2; + u32 McGeneralizedCarveout1Access3; + u32 McGeneralizedCarveout1Access4; + u32 McGeneralizedCarveout1ForceInternalAccess0; + u32 McGeneralizedCarveout1ForceInternalAccess1; + u32 McGeneralizedCarveout1ForceInternalAccess2; + u32 McGeneralizedCarveout1ForceInternalAccess3; + u32 McGeneralizedCarveout1ForceInternalAccess4; + u32 McGeneralizedCarveout1Cfg0; + u32 McGeneralizedCarveout2Bom; + u32 McGeneralizedCarveout2BomHi; + u32 McGeneralizedCarveout2Size128kb; + u32 McGeneralizedCarveout2Access0; + u32 McGeneralizedCarveout2Access1; + u32 McGeneralizedCarveout2Access2; + u32 McGeneralizedCarveout2Access3; + u32 McGeneralizedCarveout2Access4; + u32 McGeneralizedCarveout2ForceInternalAccess0; + u32 McGeneralizedCarveout2ForceInternalAccess1; + u32 McGeneralizedCarveout2ForceInternalAccess2; + u32 McGeneralizedCarveout2ForceInternalAccess3; + u32 McGeneralizedCarveout2ForceInternalAccess4; + u32 McGeneralizedCarveout2Cfg0; + u32 McGeneralizedCarveout3Bom; + u32 McGeneralizedCarveout3BomHi; + u32 McGeneralizedCarveout3Size128kb; + u32 McGeneralizedCarveout3Access0; + u32 McGeneralizedCarveout3Access1; + u32 McGeneralizedCarveout3Access2; + u32 McGeneralizedCarveout3Access3; + u32 McGeneralizedCarveout3Access4; + u32 McGeneralizedCarveout3ForceInternalAccess0; + u32 McGeneralizedCarveout3ForceInternalAccess1; + u32 McGeneralizedCarveout3ForceInternalAccess2; + u32 McGeneralizedCarveout3ForceInternalAccess3; + u32 McGeneralizedCarveout3ForceInternalAccess4; + u32 McGeneralizedCarveout3Cfg0; + u32 McGeneralizedCarveout4Bom; + u32 McGeneralizedCarveout4BomHi; + u32 McGeneralizedCarveout4Size128kb; + u32 McGeneralizedCarveout4Access0; + u32 McGeneralizedCarveout4Access1; + u32 McGeneralizedCarveout4Access2; + u32 McGeneralizedCarveout4Access3; + u32 McGeneralizedCarveout4Access4; + u32 McGeneralizedCarveout4ForceInternalAccess0; + u32 McGeneralizedCarveout4ForceInternalAccess1; + u32 McGeneralizedCarveout4ForceInternalAccess2; + u32 McGeneralizedCarveout4ForceInternalAccess3; + u32 McGeneralizedCarveout4ForceInternalAccess4; + u32 McGeneralizedCarveout4Cfg0; + u32 McGeneralizedCarveout5Bom; + u32 McGeneralizedCarveout5BomHi; + u32 McGeneralizedCarveout5Size128kb; + u32 McGeneralizedCarveout5Access0; + u32 McGeneralizedCarveout5Access1; + u32 McGeneralizedCarveout5Access2; + u32 McGeneralizedCarveout5Access3; + u32 McGeneralizedCarveout5Access4; + u32 McGeneralizedCarveout5ForceInternalAccess0; + u32 McGeneralizedCarveout5ForceInternalAccess1; + u32 McGeneralizedCarveout5ForceInternalAccess2; + u32 McGeneralizedCarveout5ForceInternalAccess3; + u32 McGeneralizedCarveout5ForceInternalAccess4; + u32 McGeneralizedCarveout5Cfg0; + u32 EmcCaTrainingEnable; + u32 SwizzleRankByteEncode; + u32 BootRomPatchControl; + u32 BootRomPatchData; + u32 McMtsCarveoutBom; + u32 McMtsCarveoutAdrHi; + u32 McMtsCarveoutSizeMb; + u32 McMtsCarveoutRegCtrl; + u32 McUntranslatedRegionCheck; + u32 BCT_NA; + }; + static_assert(sizeof(BootSdramParams) == 0x838); + } diff --git a/libraries/libexosphere/include/exosphere/pmic_setup.hpp b/libraries/libexosphere/include/exosphere/pmic_setup.hpp index 38466504c..b6ff75e93 100644 --- a/libraries/libexosphere/include/exosphere/pmic_setup.hpp +++ b/libraries/libexosphere/include/exosphere/pmic_setup.hpp @@ -24,4 +24,6 @@ namespace ams::pmic { void EnableVddCore(fuse::SocType soc_type); void EnableLdo8(); + void EnableVddMemory(fuse::SocType soc_type); + } \ No newline at end of file diff --git a/libraries/libexosphere/source/libc/libgcc_thumb_case.arch.arm.s b/libraries/libexosphere/source/libc/libgcc_thumb_case.arch.arm.s index a7726543a..ffd068f4a 100644 --- a/libraries/libexosphere/source/libc/libgcc_thumb_case.arch.arm.s +++ b/libraries/libexosphere/source/libc/libgcc_thumb_case.arch.arm.s @@ -52,3 +52,23 @@ __gnu_thumb1_case_uhi: bx lr .type __gnu_thumb1_case_uhi, %function .size __gnu_thumb1_case_uhi, .-__gnu_thumb1_case_uhi + +.section .text.__gnu_thumb1_case_si, "ax", %progbits +.globl __gnu_thumb1_case_si +.align 0 +.thumb_func +.syntax unified +__gnu_thumb1_case_si: + push {r0, r1} + mov r1, lr + adds.n r1, r1, #2 + lsrs r1, r1, #2 + lsls r0, r0, #2 + lsls r1, r1, #2 + ldr r0, [r1, r0] + adds r0, r0, r1 + mov lr, r0 + pop {r0, r1} + bx lr +.type __gnu_thumb1_case_si, %function +.size __gnu_thumb1_case_si, .-__gnu_thumb1_case_si diff --git a/libraries/libexosphere/source/pmic/pmic_api.cpp b/libraries/libexosphere/source/pmic/pmic_api.cpp index 37dab92d7..47b862443 100644 --- a/libraries/libexosphere/source/pmic/pmic_api.cpp +++ b/libraries/libexosphere/source/pmic/pmic_api.cpp @@ -35,6 +35,8 @@ namespace ams::pmic { constexpr inline int Max77620RegisterCnfgBbc = 0x04; constexpr inline int Max77620RegisterOnOffStat = 0x15; constexpr inline int Max77620RegisterSd0 = 0x16; + constexpr inline int Max77620RegisterSd1 = 0x17; + constexpr inline int Max77620RegisterCnfg2Sd = 0x22; constexpr inline int Max77620RegisterCnfg1Ldo8 = 0x33; constexpr inline int Max77620RegisterGpio0 = 0x36; constexpr inline int Max77620RegisterAmeGpio = 0x40; @@ -276,4 +278,14 @@ namespace ams::pmic { i2c::SendByte(i2c::Port_5, I2cAddressMax77620Pmic, Max77620RegisterCnfg1Ldo8, 0xE8); } + void EnableVddMemory(fuse::SocType soc_type) { + /* Disable remote sense for Sd1. */ + i2c::SendByte(i2c::Port_5, I2cAddressMax77620Pmic, Max77620RegisterCnfg2Sd, 0x05); + + /* On Erista, set Sd1 voltage. */ + if (soc_type == fuse::SocType_Erista) { + SetVoltage(Max77620RegisterSd1, 1100); + } + } + } diff --git a/libraries/libvapours/include/vapours/tegra/tegra_ahb_arbc.hpp b/libraries/libvapours/include/vapours/tegra/tegra_ahb_arbc.hpp index 37066da05..9d1b454a4 100644 --- a/libraries/libvapours/include/vapours/tegra/tegra_ahb_arbc.hpp +++ b/libraries/libvapours/include/vapours/tegra/tegra_ahb_arbc.hpp @@ -28,6 +28,7 @@ #define AHB_MASTER_SWID (0x018) #define AHB_MASTER_SWID_1 (0x038) #define AHB_GIZMO_TZRAM (0x054) +#define AHB_ARBITRATION_XBAR_CTRL (0x0E0) #define AHB_AHB_SPARE_REG (0x110) #define AHB_REG_BITS_MASK(NAME) REG_NAMED_BITS_MASK (AHB_, NAME) @@ -46,6 +47,8 @@ DEFINE_AHB_REG_BIT_ENUM(ARBITRATION_DISABLE_AHBDMA, 5, ENABLE, DISABLE); DEFINE_AHB_REG_BIT_ENUM(ARBITRATION_DISABLE_USB, 6, ENABLE, DISABLE); DEFINE_AHB_REG_BIT_ENUM(ARBITRATION_DISABLE_USB2, 18, ENABLE, DISABLE); +DEFINE_AHB_REG_BIT_ENUM(ARBITRATION_XBAR_CTRL_MEM_INIT_DONE, 16, NOT_DONE, DONE); + DEFINE_AHB_REG(AHB_SPARE_REG_CSITE_PADMACRO3_TRIM_SEL, 0, 5); DEFINE_AHB_REG_BIT_ENUM(AHB_SPARE_REG_OBS_OVERRIDE_EN, 5, DISABLE, ENABLE); DEFINE_AHB_REG_BIT_ENUM(AHB_SPARE_REG_APB2JTAG_OVERRIDE_EN, 6, DISABLE, ENABLE); diff --git a/libraries/libvapours/include/vapours/tegra/tegra_clkrst.hpp b/libraries/libvapours/include/vapours/tegra/tegra_clkrst.hpp index 6d7fc51e6..9ba01e90c 100644 --- a/libraries/libvapours/include/vapours/tegra/tegra_clkrst.hpp +++ b/libraries/libvapours/include/vapours/tegra/tegra_clkrst.hpp @@ -41,6 +41,9 @@ #define CLK_RST_CONTROLLER_CLK_SYSTEM_RATE (0x030) #define CLK_RST_CONTROLLER_MISC_CLK_ENB (0x048) #define CLK_RST_CONTROLLER_OSC_CTRL (0x050) +#define CLK_RST_CONTROLLER_PLLM_BASE (0x090) +#define CLK_RST_CONTROLLER_PLLM_MISC1 (0x098) +#define CLK_RST_CONTROLLER_PLLM_MISC2 (0x09C) #define CLK_RST_CONTROLLER_PLLD_BASE (0x0D0) #define CLK_RST_CONTROLLER_PLLD_MISC1 (0x0D8) #define CLK_RST_CONTROLLER_PLLD_MISC (0x0DC) @@ -92,6 +95,14 @@ DEFINE_CLK_RST_REG_BIT_ENUM(OSC_CTRL_XOE, 0, DISABLE, ENABLE); DEFINE_CLK_RST_REG(OSC_CTRL_XOFS, 4, 6); DEFINE_CLK_RST_REG_FOUR_BIT_ENUM(OSC_CTRL_OSC_FREQ, 28, OSC13, OSC16P8, RSVD2, RSVD3, OSC19P2, OSC38P4, RSVD6, RSVD7, OSC12, OSC48, RSVD10, RSVD11, OSC26, RSVD13, RSVD14, RSVD15); +DEFINE_CLK_RST_REG(PLLM_BASE_PLLM_DIVM, 0, 8); +DEFINE_CLK_RST_REG(PLLM_BASE_PLLM_DIVN, 8, 8); +DEFINE_CLK_RST_REG(PLLM_BASE_PLLM_DIVP, 20, 5); +DEFINE_CLK_RST_REG_BIT_ENUM(PLLM_BASE_PLLM_LOCK, 27, NOT_LOCK, LOCK); +DEFINE_CLK_RST_REG_BIT_ENUM(PLLM_BASE_PLLM_REF_DIS, 29, REF_ENABLE, REF_DISABLE); +DEFINE_CLK_RST_REG_BIT_ENUM(PLLM_BASE_PLLM_ENABLE, 30, DISABLE, ENABLE); +DEFINE_CLK_RST_REG_BIT_ENUM(PLLM_BASE_PLLM_BYPASSPLL, 31, DISABLE, ENABLE); + DEFINE_CLK_RST_REG_BIT_ENUM(PLLD_BASE_CSI_CLK_SRC, 23, BRICK, PLL_D); DEFINE_CLK_RST_REG_BIT_ENUM(PLLD_BASE_PLLD_REF_DIS, 29, REF_ENABLE, REF_DISABLE); DEFINE_CLK_RST_REG_BIT_ENUM(PLLD_BASE_PLLD_ENABLE, 30, DISABLE, ENABLE); @@ -171,6 +182,7 @@ DEFINE_CLK_RST_REG_BIT_ENUM(PLLMB_BASE_PLLMB_ENABLE, 30, DISABLE, ENABLE); #define CLK_RST_CONTROLLER_CLK_SOURCE_DVFS_REF (0x62C) #define CLK_RST_CONTROLLER_CLK_SOURCE_DVFS_SOC (0x630) #define CLK_RST_CONTROLLER_CLK_SOURCE_I2C6 (0x65C) +#define CLK_RST_CONTROLLER_CLK_SOURCE_EMC_DLL (0x664) #define CLK_RST_CONTROLLER_CLK_SOURCE_UART_FST_MIPI_CAL (0x66C) #define CLK_RST_CONTROLLER_CLK_SOURCE_SDMMC_LEGACY_TM (0x694) #define CLK_RST_CONTROLLER_CLK_SOURCE_NVENC (0x6A4) diff --git a/libraries/libvapours/include/vapours/tegra/tegra_emc.hpp b/libraries/libvapours/include/vapours/tegra/tegra_emc.hpp index 1e1560d4c..6ec7802ff 100644 --- a/libraries/libvapours/include/vapours/tegra/tegra_emc.hpp +++ b/libraries/libvapours/include/vapours/tegra/tegra_emc.hpp @@ -25,23 +25,521 @@ #define EMC0_ADDRESS(x) (0x7001E000 + x) #define EMC1_ADDRESS(x) (0x7001F000 + x) -#define EMC_CFG (0x00C) -#define EMC_ADR_CFG (0x010) -#define EMC_TIMING_CONTROL (0x028) -#define EMC_SELF_REF (0x0E0) -#define EMC_MRW (0x0E8) -#define EMC_FBIO_CFG5 (0x104) -#define EMC_MRW3 (0x138) -#define EMC_AUTO_CAL_CONFIG (0x2A4) -#define EMC_REQ_CTRL (0x2B0) -#define EMC_EMC_STATUS (0x2B4) -#define EMC_CFG_DIG_DLL (0x2BC) -#define EMC_ZCAL_INTERVAL (0x2E0) -#define EMC_PMC_SCRATCH3 (0x448) -#define EMC_FBIO_CFG7 (0x584) -#define EMC_PMACRO_CFG_PM_GLOBAL_0 (0xC30) -#define EMC_PMACRO_TRAINING_CTRL_0 (0xCF8) -#define EMC_PMACRO_TRAINING_CTRL_1 (0xCFC) +#define EMC_INTSTATUS (0x000) +#define EMC_DBG (0x008) +#define EMC_CFG (0x00C) +#define EMC_ADR_CFG (0x010) +#define EMC_REFCTRL (0x020) +#define EMC_PIN (0x024) +#define EMC_TIMING_CONTROL (0x028) +#define EMC_RC (0x02C) +#define EMC_RFC (0x030) +#define EMC_RAS (0x034) +#define EMC_RP (0x038) +#define EMC_R2W (0x03C) +#define EMC_W2R (0x040) +#define EMC_R2P (0x044) +#define EMC_W2P (0x048) +#define EMC_RD_RCD (0x04C) +#define EMC_WR_RCD (0x050) +#define EMC_RRD (0x054) +#define EMC_REXT (0x058) +#define EMC_WDV (0x05C) +#define EMC_QUSE (0x060) +#define EMC_QRST (0x064) +#define EMC_QSAFE (0x068) +#define EMC_RDV (0x06C) +#define EMC_REFRESH (0x070) +#define EMC_BURST_REFRESH_NUM (0x074) +#define EMC_PDEX2WR (0x078) +#define EMC_PDEX2RD (0x07C) +#define EMC_PCHG2PDEN (0x080) +#define EMC_ACT2PDEN (0x084) +#define EMC_AR2PDEN (0x088) +#define EMC_RW2PDEN (0x08C) +#define EMC_TXSR (0x090) +#define EMC_TCKE (0x094) +#define EMC_TFAW (0x098) +#define EMC_TRPAB (0x09C) +#define EMC_TCLKSTABLE (0x0A0) +#define EMC_TCLKSTOP (0x0A4) +#define EMC_TREFBW (0x0A8) +#define EMC_TPPD (0x0AC) +#define EMC_ODT_WRITE (0x0B0) +#define EMC_PDEX2MRR (0x0B4) +#define EMC_WEXT (0x0B8) +#define EMC_TRTM (0x0BC) +#define EMC_RFC_SLR (0x0C0) +#define EMC_MRS_WAIT_CNT2 (0x0C4) +#define EMC_MRS_WAIT_CNT (0x0C8) +#define EMC_MRS (0x0CC) +#define EMC_EMRS (0x0D0) +#define EMC_REF (0x0D4) +#define EMC_NOP (0x0DC) +#define EMC_SELF_REF (0x0E0) +#define EMC_MRW (0x0E8) +#define EMC_MRR (0x0EC) +#define EMC_CMDQ (0x0F0) +#define EMC_MC2EMCQ (0x0F4) +#define EMC_TWTM (0x0F8) +#define EMC_TRATM (0x0FC) +#define EMC_FBIO_SPARE (0x100) +#define EMC_FBIO_CFG5 (0x104) +#define EMC_TWATM (0x108) +#define EMC_TR2REF (0x10C) +#define EMC_PMACRO_DATA_PI_CTRL (0x110) +#define EMC_PMACRO_CMD_PI_CTRL (0x114) +#define EMC_PDEX2CKE (0x118) +#define EMC_CKE2PDEN (0x11C) +#define EMC_CFG_RSV (0x120) +#define EMC_ACPD_CONTROL (0x124) +#define EMC_MPC (0x128) +#define EMC_EMRS2 (0x12C) +#define EMC_MRW2 (0x134) +#define EMC_MRW3 (0x138) +#define EMC_MRW3 (0x138) +#define EMC_MRW4 (0x13C) +#define EMC_CLKEN_OVERRIDE (0x140) +#define EMC_R2R (0x144) +#define EMC_W2W (0x148) +#define EMC_EINPUT (0x14C) +#define EMC_EINPUT_DURATION (0x150) +#define EMC_PUTERM_EXTRA (0x154) +#define EMC_TCKESR (0x158) +#define EMC_TPD (0x15C) +#define EMC_AUTO_CAL_CONFIG (0x2A4) +#define EMC_AUTO_CAL_INTERVAL (0x2A8) +#define EMC_REQ_CTRL (0x2B0) +#define EMC_EMC_STATUS (0x2B4) +#define EMC_CFG_2 (0x2B8) +#define EMC_CFG_DIG_DLL (0x2BC) +#define EMC_CFG_DIG_DLL_PERIOD (0x2C0) +#define EMC_DIG_DLL_STATUS (0x2C4) +#define EMC_CFG_DIG_DLL_1 (0x2C8) +#define EMC_RDV_MASK (0x2CC) +#define EMC_WDV_MASK (0x2D0) +#define EMC_RDV_EARLY_MASK (0x2D4) +#define EMC_RDV_EARLY (0x2D8) +#define EMC_AUTO_CAL_CONFIG8 (0x2DC) +#define EMC_ZCAL_INTERVAL (0x2E0) +#define EMC_ZCAL_WAIT_CNT (0x2E4) +#define EMC_ZCAL_MRW_CMD (0x2E8) +#define EMC_ZQ_CAL (0x2EC) +#define EMC_XM2COMPPADCTRL3 (0x2F4) +#define EMC_AUTO_CAL_VREF_SEL_0 (0x2F8) +#define EMC_AUTO_CAL_VREF_SEL_1 (0x300) +#define EMC_XM2COMPPADCTRL (0x30C) +#define EMC_FDPD_CTRL_DQ (0x310) +#define EMC_FDPD_CTRL_CMD (0x314) +#define EMC_PMACRO_CMD_BRICK_CTRL_FDPD (0x318) +#define EMC_PMACRO_DATA_BRICK_CTRL_FDPD (0x31C) +#define EMC_SCRATCH0 (0x324) +#define EMC_PMACRO_BRICK_CTRL_RFU1 (0x330) +#define EMC_PMACRO_BRICK_CTRL_RFU2 (0x334) +#define EMC_CMD_MAPPING_CMD0_0 (0x380) +#define EMC_CMD_MAPPING_CMD0_1 (0x384) +#define EMC_CMD_MAPPING_CMD0_2 (0x388) +#define EMC_CMD_MAPPING_CMD1_0 (0x38C) +#define EMC_CMD_MAPPING_CMD1_1 (0x390) +#define EMC_CMD_MAPPING_CMD1_2 (0x394) +#define EMC_CMD_MAPPING_CMD2_0 (0x398) +#define EMC_CMD_MAPPING_CMD2_1 (0x39C) +#define EMC_CMD_MAPPING_CMD2_2 (0x3A0) +#define EMC_CMD_MAPPING_CMD3_0 (0x3A4) +#define EMC_CMD_MAPPING_CMD3_1 (0x3A8) +#define EMC_CMD_MAPPING_CMD3_2 (0x3AC) +#define EMC_CMD_MAPPING_BYTE (0x3B0) +#define EMC_TR_TIMING_0 (0x3B4) +#define EMC_TR_CTRL_0 (0x3B8) +#define EMC_TR_CTRL_1 (0x3BC) +#define EMC_SWITCH_BACK_CTRL (0x3C0) +#define EMC_TR_RDV (0x3C4) +#define EMC_STALL_THEN_EXE_AFTER_CLKCHANGE (0x3CC) +#define EMC_SEL_DPD_CTRL (0x3D8) +#define EMC_PRE_REFRESH_REQ_CNT (0x3DC) +#define EMC_DYN_SELF_REF_CONTROL (0x3E0) +#define EMC_TXSRDLL (0x3E4) +#define EMC_CCFIFO_ADDR (0x3E8) +#define EMC_CCFIFO_DATA (0x3EC) +#define EMC_CCFIFO_STATUS (0x3F0) +#define EMC_TR_QPOP (0x3F4) +#define EMC_TR_RDV_MASK (0x3F8) +#define EMC_TR_QSAFE (0x3FC) +#define EMC_TR_QRST (0x400) +#define EMC_SWIZZLE_RANK0_BYTE0 (0x404) +#define EMC_SWIZZLE_RANK0_BYTE1 (0x408) +#define EMC_SWIZZLE_RANK0_BYTE2 (0x40C) +#define EMC_SWIZZLE_RANK0_BYTE3 (0x410) +#define EMC_SWIZZLE_RANK1_BYTE0 (0x418) +#define EMC_SWIZZLE_RANK1_BYTE1 (0x41C) +#define EMC_SWIZZLE_RANK1_BYTE2 (0x420) +#define EMC_SWIZZLE_RANK1_BYTE3 (0x424) +#define EMC_ISSUE_QRST (0x428) +#define EMC_AUTO_CAL_CONFIG9 (0x42C) +#define EMC_PMC_SCRATCH1 (0x440) +#define EMC_PMC_SCRATCH2 (0x444) +#define EMC_PMC_SCRATCH3 (0x448) +#define EMC_AUTO_CAL_CONFIG2 (0x458) +#define EMC_AUTO_CAL_CONFIG3 (0x45C) +#define EMC_TR_DVFS (0x460) +#define EMC_AUTO_CAL_CHANNEL (0x464) +#define EMC_IBDLY (0x468) +#define EMC_OBDLY (0x46C) +#define EMC_TXDSRVTTGEN (0x480) +#define EMC_WE_DURATION (0x48C) +#define EMC_WS_DURATION (0x490) +#define EMC_WEV (0x494) +#define EMC_WSV (0x498) +#define EMC_CFG_3 (0x49C) +#define EMC_MRW5 (0x4A0) +#define EMC_MRW6 (0x4A4) +#define EMC_MRW7 (0x4A8) +#define EMC_MRW8 (0x4AC) +#define EMC_MRW9 (0x4B0) +#define EMC_MRW10 (0x4B4) +#define EMC_MRW11 (0x4B8) +#define EMC_MRW12 (0x4BC) +#define EMC_MRW13 (0x4C0) +#define EMC_MRW14 (0x4C4) +#define EMC_MRW15 (0x4D0) +#define EMC_CFG_SYNC (0x4D4) +#define EMC_FDPD_CTRL_CMD_NO_RAMP (0x4D8) +#define EMC_WDV_CHK (0x4E0) +#define EMC_CFG_PIPE_2 (0x554) +#define EMC_CFG_PIPE_CLK (0x558) +#define EMC_CFG_PIPE_1 (0x55C) +#define EMC_CFG_PIPE (0x560) +#define EMC_QPOP (0x564) +#define EMC_QUSE_WIDTH (0x568) +#define EMC_PUTERM_WIDTH (0x56C) +#define EMC_AUTO_CAL_CONFIG7 (0x574) +#define EMC_XM2COMPPADCTRL2 (0x578) +#define EMC_REFCTRL2 (0x580) +#define EMC_FBIO_CFG7 (0x584) +#define EMC_DATA_BRLSHFT_0 (0x588) +#define EMC_DATA_BRLSHFT_1 (0x58C) +#define EMC_RFCPB (0x590) +#define EMC_DQS_BRLSHFT_0 (0x594) +#define EMC_DQS_BRLSHFT_1 (0x598) +#define EMC_CMD_BRLSHFT_0 (0x59C) +#define EMC_CMD_BRLSHFT_1 (0x5A0) +#define EMC_CMD_BRLSHFT_2 (0x5A4) +#define EMC_CMD_BRLSHFT_3 (0x5A8) +#define EMC_QUSE_BRLSHFT_0 (0x5AC) +#define EMC_AUTO_CAL_CONFIG4 (0x5B0) +#define EMC_AUTO_CAL_CONFIG5 (0x5B4) +#define EMC_QUSE_BRLSHFT_1 (0x5B8) +#define EMC_QUSE_BRLSHFT_2 (0x5BC) +#define EMC_CCDMW (0x5C0) +#define EMC_QUSE_BRLSHFT_3 (0x5C4) +#define EMC_FBIO_CFG8 (0x5C8) +#define EMC_AUTO_CAL_CONFIG6 (0x5CC) + +/* Erista */ +#define EMC_DLL_CFG_0 (0x5E4) +#define EMC_DLL_CFG_1 (0x5E8) + +/* Mariko */ +#define EMC_PMACRO_DLL_CFG_0 (0x5E4) +#define EMC_PMACRO_DLL_CFG_1 (0x5E8) + +#define EMC_CONFIG_SAMPLE_DELAY (0x5F0) +#define EMC_CFG_UPDATE (0x5F4) +#define EMC_PMACRO_QUSE_DDLL_RANK0_0 (0x600) +#define EMC_PMACRO_QUSE_DDLL_RANK0_1 (0x604) +#define EMC_PMACRO_QUSE_DDLL_RANK0_2 (0x608) +#define EMC_PMACRO_QUSE_DDLL_RANK0_3 (0x60C) +#define EMC_PMACRO_QUSE_DDLL_RANK0_4 (0x610) +#define EMC_PMACRO_QUSE_DDLL_RANK0_5 (0x614) +#define EMC_PMACRO_QUSE_DDLL_RANK1_4 (0x630) +#define EMC_PMACRO_QUSE_DDLL_RANK1_5 (0x634) +#define EMC_PMACRO_QUSE_DDLL_RANK1_0 (0x620) +#define EMC_PMACRO_QUSE_DDLL_RANK1_1 (0x624) +#define EMC_PMACRO_QUSE_DDLL_RANK1_2 (0x628) +#define EMC_PMACRO_QUSE_DDLL_RANK1_3 (0x62C) +#define EMC_PMACRO_OB_DDLL_LONG_DQ_RANK0_0 (0x640) +#define EMC_PMACRO_OB_DDLL_LONG_DQ_RANK0_1 (0x644) +#define EMC_PMACRO_OB_DDLL_LONG_DQ_RANK0_2 (0x648) +#define EMC_PMACRO_OB_DDLL_LONG_DQ_RANK0_3 (0x64C) +#define EMC_PMACRO_OB_DDLL_LONG_DQ_RANK0_4 (0x650) +#define EMC_PMACRO_OB_DDLL_LONG_DQ_RANK0_5 (0x654) +#define EMC_PMACRO_OB_DDLL_LONG_DQ_RANK1_0 (0x660) +#define EMC_PMACRO_OB_DDLL_LONG_DQ_RANK1_1 (0x664) +#define EMC_PMACRO_OB_DDLL_LONG_DQ_RANK1_2 (0x668) +#define EMC_PMACRO_OB_DDLL_LONG_DQ_RANK1_3 (0x66C) +#define EMC_PMACRO_OB_DDLL_LONG_DQ_RANK1_4 (0x670) +#define EMC_PMACRO_OB_DDLL_LONG_DQ_RANK1_5 (0x674) +#define EMC_PMACRO_OB_DDLL_LONG_DQS_RANK0_0 (0x680) +#define EMC_PMACRO_OB_DDLL_LONG_DQS_RANK0_1 (0x684) +#define EMC_PMACRO_OB_DDLL_LONG_DQS_RANK0_2 (0x688) +#define EMC_PMACRO_OB_DDLL_LONG_DQS_RANK0_3 (0x68C) +#define EMC_PMACRO_OB_DDLL_LONG_DQS_RANK0_4 (0x690) +#define EMC_PMACRO_OB_DDLL_LONG_DQS_RANK0_5 (0x694) +#define EMC_PMACRO_OB_DDLL_LONG_DQS_RANK1_0 (0x6A0) +#define EMC_PMACRO_OB_DDLL_LONG_DQS_RANK1_1 (0x6A4) +#define EMC_PMACRO_OB_DDLL_LONG_DQS_RANK1_2 (0x6A8) +#define EMC_PMACRO_OB_DDLL_LONG_DQS_RANK1_3 (0x6AC) +#define EMC_PMACRO_OB_DDLL_LONG_DQS_RANK1_4 (0x6B0) +#define EMC_PMACRO_OB_DDLL_LONG_DQS_RANK1_5 (0x6B4) +#define EMC_PMACRO_IB_DDLL_LONG_DQS_RANK0_0 (0x6C0) +#define EMC_PMACRO_IB_DDLL_LONG_DQS_RANK0_1 (0x6C4) +#define EMC_PMACRO_IB_DDLL_LONG_DQS_RANK0_2 (0x6C8) +#define EMC_PMACRO_IB_DDLL_LONG_DQS_RANK0_3 (0x6CC) +#define EMC_PMACRO_IB_DDLL_LONG_DQS_RANK1_0 (0x6E0) +#define EMC_PMACRO_IB_DDLL_LONG_DQS_RANK1_1 (0x6E4) +#define EMC_PMACRO_IB_DDLL_LONG_DQS_RANK1_2 (0x6E8) +#define EMC_PMACRO_IB_DDLL_LONG_DQS_RANK1_3 (0x6EC) +#define EMC_PMACRO_AUTOCAL_CFG_0 (0x700) +#define EMC_PMACRO_AUTOCAL_CFG_1 (0x704) +#define EMC_PMACRO_AUTOCAL_CFG_2 (0x708) +#define EMC_PMACRO_TX_PWRD_0 (0x720) +#define EMC_PMACRO_TX_PWRD_1 (0x724) +#define EMC_PMACRO_TX_PWRD_2 (0x728) +#define EMC_PMACRO_TX_PWRD_3 (0x72C) +#define EMC_PMACRO_TX_PWRD_4 (0x730) +#define EMC_PMACRO_TX_PWRD_5 (0x734) +#define EMC_PMACRO_TX_SEL_CLK_SRC_0 (0x740) +#define EMC_PMACRO_TX_SEL_CLK_SRC_1 (0x744) +#define EMC_PMACRO_TX_SEL_CLK_SRC_3 (0x74C) +#define EMC_PMACRO_TX_SEL_CLK_SRC_2 (0x748) +#define EMC_PMACRO_TX_SEL_CLK_SRC_4 (0x750) +#define EMC_PMACRO_TX_SEL_CLK_SRC_5 (0x754) +#define EMC_PMACRO_DDLL_BYPASS (0x760) +#define EMC_PMACRO_DDLL_PWRD_0 (0x770) +#define EMC_PMACRO_DDLL_PWRD_1 (0x774) +#define EMC_PMACRO_DDLL_PWRD_2 (0x778) +#define EMC_PMACRO_CMD_CTRL_0 (0x780) +#define EMC_PMACRO_CMD_CTRL_1 (0x784) +#define EMC_PMACRO_CMD_CTRL_2 (0x788) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK0_BYTE0_0 (0x800) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK0_BYTE0_1 (0x804) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK0_BYTE0_2 (0x808) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK0_BYTE0_3 (0x80C) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK0_BYTE1_0 (0x810) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK0_BYTE1_1 (0x814) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK0_BYTE1_2 (0x818) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK0_BYTE1_3 (0x81C) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK0_BYTE2_0 (0x820) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK0_BYTE2_1 (0x824) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK0_BYTE2_2 (0x828) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK0_BYTE2_3 (0x82C) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK0_BYTE3_0 (0x830) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK0_BYTE3_1 (0x834) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK0_BYTE3_2 (0x838) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK0_BYTE3_3 (0x83C) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK0_BYTE4_0 (0x840) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK0_BYTE4_1 (0x844) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK0_BYTE4_2 (0x848) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK0_BYTE4_3 (0x84C) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK0_BYTE5_0 (0x850) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK0_BYTE5_1 (0x854) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK0_BYTE5_2 (0x858) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK0_BYTE5_3 (0x85C) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK0_BYTE6_0 (0x860) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK0_BYTE6_1 (0x864) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK0_BYTE6_2 (0x868) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK0_BYTE6_3 (0x86C) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK0_BYTE7_0 (0x870) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK0_BYTE7_1 (0x874) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK0_BYTE7_2 (0x878) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK0_BYTE7_3 (0x87C) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK0_CMD0_0 (0x880) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK0_CMD0_1 (0x884) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK0_CMD0_2 (0x888) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK0_CMD0_3 (0x88C) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK0_CMD1_0 (0x890) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK0_CMD1_1 (0x894) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK0_CMD1_2 (0x898) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK0_CMD1_3 (0x89C) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK0_CMD2_0 (0x8A0) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK0_CMD2_1 (0x8A4) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK0_CMD2_2 (0x8A8) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK0_CMD2_3 (0x8AC) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK0_CMD3_0 (0x8B0) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK0_CMD3_1 (0x8B4) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK0_CMD3_2 (0x8B8) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK0_CMD3_3 (0x8BC) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK1_BYTE0_0 (0x900) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK1_BYTE0_1 (0x904) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK1_BYTE0_2 (0x908) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK1_BYTE0_3 (0x90C) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK1_BYTE1_0 (0x910) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK1_BYTE1_1 (0x914) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK1_BYTE1_2 (0x918) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK1_BYTE1_3 (0x91C) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK1_BYTE2_0 (0x920) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK1_BYTE2_1 (0x924) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK1_BYTE2_2 (0x928) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK1_BYTE2_3 (0x92C) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK1_BYTE3_0 (0x930) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK1_BYTE3_1 (0x934) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK1_BYTE3_2 (0x938) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK1_BYTE3_3 (0x93C) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK1_BYTE4_0 (0x940) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK1_BYTE4_1 (0x944) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK1_BYTE4_2 (0x948) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK1_BYTE4_3 (0x94C) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK1_BYTE5_0 (0x950) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK1_BYTE5_1 (0x954) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK1_BYTE5_2 (0x958) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK1_BYTE5_3 (0x95C) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK1_BYTE6_0 (0x960) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK1_BYTE6_1 (0x964) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK1_BYTE6_2 (0x968) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK1_BYTE6_3 (0x96C) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK1_BYTE7_0 (0x970) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK1_BYTE7_1 (0x974) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK1_BYTE7_2 (0x978) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK1_BYTE7_3 (0x97C) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK1_CMD0_0 (0x980) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK1_CMD0_1 (0x984) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK1_CMD0_2 (0x988) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK1_CMD0_3 (0x98C) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK1_CMD1_0 (0x990) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK1_CMD1_1 (0x994) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK1_CMD1_2 (0x998) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK1_CMD1_3 (0x99C) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK1_CMD2_0 (0x9A0) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK1_CMD2_1 (0x9A4) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK1_CMD2_2 (0x9A8) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK1_CMD2_3 (0x9AC) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK1_CMD3_0 (0x9B0) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK1_CMD3_1 (0x9B4) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK1_CMD3_2 (0x9B8) +#define EMC_PMACRO_OB_DDLL_SHORT_DQ_RANK1_CMD3_3 (0x9BC) +#define EMC_PMACRO_IB_DDLL_SHORT_DQ_RANK0_BYTE0_0 (0xA00) +#define EMC_PMACRO_IB_DDLL_SHORT_DQ_RANK0_BYTE0_1 (0xA04) +#define EMC_PMACRO_IB_DDLL_SHORT_DQ_RANK0_BYTE0_2 (0xA08) +#define EMC_PMACRO_IB_DDLL_SHORT_DQ_RANK0_BYTE1_0 (0xA10) +#define EMC_PMACRO_IB_DDLL_SHORT_DQ_RANK0_BYTE1_1 (0xA14) +#define EMC_PMACRO_IB_DDLL_SHORT_DQ_RANK0_BYTE1_2 (0xA18) +#define EMC_PMACRO_IB_DDLL_SHORT_DQ_RANK0_BYTE2_0 (0xA20) +#define EMC_PMACRO_IB_DDLL_SHORT_DQ_RANK0_BYTE2_1 (0xA24) +#define EMC_PMACRO_IB_DDLL_SHORT_DQ_RANK0_BYTE2_2 (0xA28) +#define EMC_PMACRO_IB_DDLL_SHORT_DQ_RANK0_BYTE3_0 (0xA30) +#define EMC_PMACRO_IB_DDLL_SHORT_DQ_RANK0_BYTE3_1 (0xA34) +#define EMC_PMACRO_IB_DDLL_SHORT_DQ_RANK0_BYTE3_2 (0xA38) +#define EMC_PMACRO_IB_DDLL_SHORT_DQ_RANK0_BYTE4_0 (0xA40) +#define EMC_PMACRO_IB_DDLL_SHORT_DQ_RANK0_BYTE4_1 (0xA44) +#define EMC_PMACRO_IB_DDLL_SHORT_DQ_RANK0_BYTE4_2 (0xA48) +#define EMC_PMACRO_IB_DDLL_SHORT_DQ_RANK0_BYTE5_0 (0xA50) +#define EMC_PMACRO_IB_DDLL_SHORT_DQ_RANK0_BYTE5_1 (0xA54) +#define EMC_PMACRO_IB_DDLL_SHORT_DQ_RANK0_BYTE5_2 (0xA58) +#define EMC_PMACRO_IB_DDLL_SHORT_DQ_RANK0_BYTE6_0 (0xA60) +#define EMC_PMACRO_IB_DDLL_SHORT_DQ_RANK0_BYTE6_1 (0xA64) +#define EMC_PMACRO_IB_DDLL_SHORT_DQ_RANK0_BYTE6_2 (0xA68) +#define EMC_PMACRO_IB_DDLL_SHORT_DQ_RANK0_BYTE7_0 (0xA70) +#define EMC_PMACRO_IB_DDLL_SHORT_DQ_RANK0_BYTE7_1 (0xA74) +#define EMC_PMACRO_IB_DDLL_SHORT_DQ_RANK0_BYTE7_2 (0xA78) +#define EMC_PMACRO_IB_DDLL_SHORT_DQ_RANK1_BYTE0_0 (0xB00) +#define EMC_PMACRO_IB_DDLL_SHORT_DQ_RANK1_BYTE0_1 (0xB04) +#define EMC_PMACRO_IB_DDLL_SHORT_DQ_RANK1_BYTE0_2 (0xB08) +#define EMC_PMACRO_IB_DDLL_SHORT_DQ_RANK1_BYTE1_0 (0xB10) +#define EMC_PMACRO_IB_DDLL_SHORT_DQ_RANK1_BYTE1_1 (0xB14) +#define EMC_PMACRO_IB_DDLL_SHORT_DQ_RANK1_BYTE1_2 (0xB18) +#define EMC_PMACRO_IB_DDLL_SHORT_DQ_RANK1_BYTE2_0 (0xB20) +#define EMC_PMACRO_IB_DDLL_SHORT_DQ_RANK1_BYTE2_1 (0xB24) +#define EMC_PMACRO_IB_DDLL_SHORT_DQ_RANK1_BYTE2_2 (0xB28) +#define EMC_PMACRO_IB_DDLL_SHORT_DQ_RANK1_BYTE3_0 (0xB30) +#define EMC_PMACRO_IB_DDLL_SHORT_DQ_RANK1_BYTE3_1 (0xB34) +#define EMC_PMACRO_IB_DDLL_SHORT_DQ_RANK1_BYTE3_2 (0xB38) +#define EMC_PMACRO_IB_DDLL_SHORT_DQ_RANK1_BYTE4_0 (0xB40) +#define EMC_PMACRO_IB_DDLL_SHORT_DQ_RANK1_BYTE4_1 (0xB44) +#define EMC_PMACRO_IB_DDLL_SHORT_DQ_RANK1_BYTE4_2 (0xB48) +#define EMC_PMACRO_IB_DDLL_SHORT_DQ_RANK1_BYTE5_0 (0xB50) +#define EMC_PMACRO_IB_DDLL_SHORT_DQ_RANK1_BYTE5_1 (0xB54) +#define EMC_PMACRO_IB_DDLL_SHORT_DQ_RANK1_BYTE5_2 (0xB58) +#define EMC_PMACRO_IB_DDLL_SHORT_DQ_RANK1_BYTE6_0 (0xB60) +#define EMC_PMACRO_IB_DDLL_SHORT_DQ_RANK1_BYTE6_1 (0xB64) +#define EMC_PMACRO_IB_DDLL_SHORT_DQ_RANK1_BYTE6_2 (0xB68) +#define EMC_PMACRO_IB_DDLL_SHORT_DQ_RANK1_BYTE7_0 (0xB70) +#define EMC_PMACRO_IB_DDLL_SHORT_DQ_RANK1_BYTE7_1 (0xB74) +#define EMC_PMACRO_IB_DDLL_SHORT_DQ_RANK1_BYTE7_2 (0xB78) +#define EMC_PMACRO_IB_VREF_DQ_0 (0xBE0) +#define EMC_PMACRO_IB_VREF_DQ_1 (0xBE4) +#define EMC_PMACRO_IB_VREF_DQS_0 (0xBF0) +#define EMC_PMACRO_IB_VREF_DQS_1 (0xBF4) +#define EMC_PMACRO_DDLL_LONG_CMD_0 (0xC00) +#define EMC_PMACRO_DDLL_LONG_CMD_1 (0xC04) +#define EMC_PMACRO_DDLL_LONG_CMD_2 (0xC08) +#define EMC_PMACRO_DDLL_LONG_CMD_3 (0xC0C) +#define EMC_PMACRO_DDLL_LONG_CMD_4 (0xC10) +#define EMC_PMACRO_DDLL_SHORT_CMD_0 (0xC20) +#define EMC_PMACRO_DDLL_SHORT_CMD_1 (0xC24) +#define EMC_PMACRO_DDLL_SHORT_CMD_2 (0xC28) +#define EMC_PMACRO_CFG_PM_GLOBAL_0 (0xC30) +#define EMC_PMACRO_VTTGEN_CTRL_0 (0xC34) +#define EMC_PMACRO_VTTGEN_CTRL_1 (0xC38) +#define EMC_PMACRO_BG_BIAS_CTRL_0 (0xC3C) +#define EMC_PMACRO_PAD_CFG_CTRL (0xC40) +#define EMC_PMACRO_ZCTRL (0xC44) +#define EMC_PMACRO_RX_TERM (0xC48) +#define EMC_PMACRO_CMD_TX_DRV (0xC4C) +#define EMC_PMACRO_CMD_PAD_RX_CTRL (0xC50) +#define EMC_PMACRO_DATA_PAD_RX_CTRL (0xC54) +#define EMC_PMACRO_CMD_RX_TERM_MODE (0xC58) +#define EMC_PMACRO_DATA_RX_TERM_MODE (0xC5C) +#define EMC_PMACRO_CMD_PAD_TX_CTRL (0xC60) +#define EMC_PMACRO_DATA_PAD_TX_CTRL (0xC64) +#define EMC_PMACRO_COMMON_PAD_TX_CTRL (0xC68) +#define EMC_PMACRO_DSR_VTTGEN_CTRL_0 (0xC6C) +#define EMC_PMACRO_DQ_TX_DRV (0xC70) +#define EMC_PMACRO_CA_TX_DRV (0xC74) +#define EMC_PMACRO_AUTOCAL_CFG_COMMON (0xC78) +#define EMC_PMACRO_BRICK_MAPPING_0 (0xC80) +#define EMC_PMACRO_BRICK_MAPPING_1 (0xC84) +#define EMC_PMACRO_BRICK_MAPPING_2 (0xC88) +#define EMC_PMACRO_DDLL_PERIODIC_OFFSET (0xCE8) +#define EMC_PMACRO_VTTGEN_CTRL_2 (0xCF0) +#define EMC_PMACRO_IB_RXRT (0xCF4) +#define EMC_PMACRO_TRAINING_CTRL_0 (0xCF8) +#define EMC_PMACRO_TRAINING_CTRL_1 (0xCFC) +#define EMC_PMACRO_PERBIT_FGCG_CTRL_0 (0xD40) +#define EMC_PMACRO_PERBIT_FGCG_CTRL_1 (0xD44) +#define EMC_PMACRO_PERBIT_FGCG_CTRL_2 (0xD48) +#define EMC_PMACRO_PERBIT_FGCG_CTRL_3 (0xD4C) +#define EMC_PMACRO_PERBIT_FGCG_CTRL_4 (0xD50) +#define EMC_PMACRO_PERBIT_FGCG_CTRL_5 (0xD54) +#define EMC_PMACRO_PERBIT_RFU_CTRL_0 (0xD60) +#define EMC_PMACRO_PERBIT_RFU_CTRL_1 (0xD64) +#define EMC_PMACRO_PERBIT_RFU_CTRL_2 (0xD68) +#define EMC_PMACRO_PERBIT_RFU_CTRL_3 (0xD6C) +#define EMC_PMACRO_PERBIT_RFU_CTRL_4 (0xD70) +#define EMC_PMACRO_PERBIT_RFU_CTRL_5 (0xD74) +#define EMC_PMACRO_PERBIT_RFU1_CTRL_0 (0xD80) +#define EMC_PMACRO_PERBIT_RFU1_CTRL_1 (0xD84) +#define EMC_PMACRO_PERBIT_RFU1_CTRL_2 (0xD88) +#define EMC_PMACRO_PERBIT_RFU1_CTRL_3 (0xD8C) +#define EMC_PMACRO_PERBIT_RFU1_CTRL_4 (0xD90) +#define EMC_PMACRO_PERBIT_RFU1_CTRL_5 (0xD94) +#define EMC_TRAINING_CMD (0xE00) +#define EMC_TRAINING_CTRL (0xE04) +#define EMC_TRAINING_STATUS (0xE08) +#define EMC_TRAINING_QUSE_CORS_CTRL (0xE0C) +#define EMC_TRAINING_QUSE_FINE_CTRL (0xE10) +#define EMC_TRAINING_QUSE_CTRL_MISC (0xE14) +#define EMC_TRAINING_WRITE_FINE_CTRL (0xE18) +#define EMC_TRAINING_WRITE_CTRL_MISC (0xE1C) +#define EMC_TRAINING_WRITE_VREF_CTRL (0xE20) +#define EMC_TRAINING_READ_FINE_CTRL (0xE24) +#define EMC_TRAINING_READ_CTRL_MISC (0xE28) +#define EMC_TRAINING_READ_VREF_CTRL (0xE2C) +#define EMC_TRAINING_CA_FINE_CTRL (0xE30) +#define EMC_TRAINING_CA_CTRL_MISC (0xE34) +#define EMC_TRAINING_CA_CTRL_MISC1 (0xE38) +#define EMC_TRAINING_CA_VREF_CTRL (0xE3C) +#define EMC_TRAINING_SETTLE (0xE44) +#define EMC_TRAINING_MPC (0xE5C) +#define EMC_TRAINING_PATRAM_CTRL (0xE60) +#define EMC_TRAINING_PATRAM_DQ (0xE64) +#define EMC_TRAINING_PATRAM_DMI (0xE68) +#define EMC_TRAINING_VREF_SETTLE (0xE6C) +#define EMC_TRAINING_OPT_CA_VREF (0xEC0) +#define EMC_TRAINING_OPT_DQ_OB_VREF (0xEC4) +#define EMC_TRAINING_QUSE_VREF_CTRL (0xED0) +#define EMC_TRAINING_OPT_DQS_IB_VREF_RANK0 (0xED4) +#define EMC_TRAINING_OPT_DQS_IB_VREF_RANK1 (0xED8) + #define EMC_REG_BITS_MASK(NAME) REG_NAMED_BITS_MASK (EMC, NAME) #define EMC_REG_BITS_VALUE(NAME, VALUE) REG_NAMED_BITS_VALUE (EMC, NAME, VALUE) @@ -54,6 +552,8 @@ #define DEFINE_EMC_REG_THREE_BIT_ENUM(NAME, __OFFSET__, ZERO, ONE, TWO, THREE, FOUR, FIVE, SIX, SEVEN) REG_DEFINE_NAMED_THREE_BIT_ENUM(EMC, NAME, __OFFSET__, ZERO, ONE, TWO, THREE, FOUR, FIVE, SIX, SEVEN) #define DEFINE_EMC_REG_FOUR_BIT_ENUM(NAME, __OFFSET__, ZERO, ONE, TWO, THREE, FOUR, FIVE, SIX, SEVEN, EIGHT, NINE, TEN, ELEVEN, TWELVE, THIRTEEN, FOURTEEN, FIFTEEN) REG_DEFINE_NAMED_FOUR_BIT_ENUM (EMC, NAME, __OFFSET__, ZERO, ONE, TWO, THREE, FOUR, FIVE, SIX, SEVEN, EIGHT, NINE, TEN, ELEVEN, TWELVE, THIRTEEN, FOURTEEN, FIFTEEN) +DEFINE_EMC_REG_BIT_ENUM(DBG_WRITE_MUX, 1, ASSEMBLY, ACTIVE); + DEFINE_EMC_REG_BIT_ENUM(CFG_DYN_SELF_REF, 28, DISABLED, ENABLED); DEFINE_EMC_REG_BIT_ENUM(CFG_DRAM_ACPD, 29, NO_POWERDOWN, ACTIVE_POWERDOWN); diff --git a/libraries/libvapours/include/vapours/tegra/tegra_mc.hpp b/libraries/libvapours/include/vapours/tegra/tegra_mc.hpp index 3b44a2769..fffece960 100644 --- a/libraries/libvapours/include/vapours/tegra/tegra_mc.hpp +++ b/libraries/libvapours/include/vapours/tegra/tegra_mc.hpp @@ -32,6 +32,12 @@ #define MC_SMMU_PTC_FLUSH_0 (0x034) #define MC_EMEM_CFG (0x050) #define MC_EMEM_ADR_CFG (0x054) +#define MC_EMEM_ADR_CFG_DEV0 (0x058) +#define MC_EMEM_ADR_CFG_DEV1 (0x05C) +#define MC_EMEM_ADR_CFG_CHANNEL_MASK (0x060) +#define MC_EMEM_ADR_CFG_BANK_MASK_0 (0x064) +#define MC_EMEM_ADR_CFG_BANK_MASK_1 (0x068) +#define MC_EMEM_ADR_CFG_BANK_MASK_2 (0x06C) #define MC_EMEM_ARB_CFG (0x090) #define MC_EMEM_ARB_OUTSTANDING_REQ (0x094) #define MC_EMEM_ARB_TIMING_RCD (0x098) @@ -52,6 +58,11 @@ #define MC_EMEM_ARB_MISC0 (0x0D8) #define MC_EMEM_ARB_MISC1 (0x0DC) #define MC_EMEM_ARB_RING1_THROTTLE (0x0E0) +#define MC_EMEM_ARB_OVERRIDE (0x0E8) +#define MC_EMEM_ARB_RSV (0x0EC) +#define MC_CLKEN_OVERRIDE (0x0F4) +#define MC_TIMING_CONTROL_DBG (0x0F8) +#define MC_TIMING_CONTROL (0x0FC) #define MC_CLIENT_HOTRESET_CTRL (0x200) #define MC_CLIENT_HOTRESET_STATUS (0x204) #define MC_SMMU_AFI_ASID (0x238) @@ -95,6 +106,7 @@ #define MC_LATENCY_ALLOWANCE_SDMMCAB_0 (0x3C4) #define MC_LATENCY_ALLOWANCE_NVDEC_0 (0x3D8) #define MC_LATENCY_ALLOWANCE_GPU2_0 (0x3E8) +#define MC_VIDEO_PROTECT_VPR_OVERRIDE (0x418) #define MC_DIS_PTSA_RATE (0x41C) #define MC_DIS_PTSA_MIN (0x420) #define MC_DIS_PTSA_MAX (0x424) @@ -142,6 +154,7 @@ #define MC_JPG_PTSA_RATE (0x584) #define MC_JPG_PTSA_MIN (0x588) #define MC_JPG_PTSA_MAX (0x58C) +#define MC_VIDEO_PROTECT_VPR_OVERRIDE1 (0x590) #define MC_GK2_PTSA_RATE (0x610) #define MC_GK2_PTSA_MIN (0x614) #define MC_GK2_PTSA_MAX (0x618) @@ -151,6 +164,8 @@ #define MC_HDAPC_PTSA_RATE (0x628) #define MC_HDAPC_PTSA_MIN (0x62C) #define MC_HDAPC_PTSA_MAX (0x630) +#define MC_VIDEO_PROTECT_BOM (0x648) +#define MC_EMEM_CFG_ACCESS_CTRL (0x664) #define MC_SEC_CARVEOUT_BOM (0x670) #define MC_SEC_CARVEOUT_SIZE_MB (0x674) #define MC_SCALED_LATENCY_ALLOWANCE_DISPLAY0A (0x690) @@ -165,9 +180,13 @@ #define MC_EMEM_ARB_REFPB_BANK_CTRL (0x6F4) #define MC_UNTRANSLATED_REGION_CHECK (0x948) #define MC_PTSA_GRANT_DECREMENT (0x960) +#define MC_EMEM_ARB_OVERRIDE_1 (0x968) #define MC_CLIENT_HOTRESET_CTRL_1 (0x970) #define MC_CLIENT_HOTRESET_STATUS_1 (0x974) +#define MC_VIDEO_PROTECT_BOM_ADR_HI (0x978) #define MC_SMMU_PTC_FLUSH_1 (0x9B8) +#define MC_SEC_CARVEOUT_ADR_HI (0x9D4) +#define MC_DA_CONFIG0 (0x9DC) #define MC_SMMU_DC1_ASID (0xA88) #define MC_SMMU_SDMMC1A_ASID (0xA94) #define MC_SMMU_SDMMC2A_ASID (0xA98) @@ -200,6 +219,7 @@ #define MC_EMEM_ARB_DHYST_TIMEOUT_UTIL_7 (0xBEC) #define MC_ERR_GENERALIZED_CARVEOUT_STATUS (0xC00) + #define MC_SMMU_TLB_CONFIG (0x014) #define MC_SMMU_PTC_CONFIG (0x018) diff --git a/libraries/libvapours/include/vapours/tegra/tegra_pmc.hpp b/libraries/libvapours/include/vapours/tegra/tegra_pmc.hpp index 5c5198bdf..6154db4fb 100644 --- a/libraries/libvapours/include/vapours/tegra/tegra_pmc.hpp +++ b/libraries/libvapours/include/vapours/tegra/tegra_pmc.hpp @@ -46,6 +46,7 @@ #define APBDEV_PMC_AUTO_WAKE_LVL_MASK (0x0DC) #define APBDEV_PMC_WAKE_DELAY (0x0E0) #define APBDEV_PMC_PWR_DET_VAL (0x0E4) +#define APBDEV_PMC_DDR_PWR (0x0E8) #define APBDEV_PMC_CRYPTO_OP (0x0F4) #define APBDEV_PMC_SCRATCH31 (0x118) #define APBDEV_PMC_SCRATCH32 (0x11C) @@ -64,12 +65,15 @@ #define APBDEV_PMC_IO_DPD2_REQ (0x1C0) #define APBDEV_PMC_IO_DPD2_STATUS (0x1C4) #define APBDEV_PMC_SEL_DPD_TIM (0x1C8) +#define APBDEV_PMC_VDDP_SEL (0x1CC) +#define APBDEV_PMC_DDR_CFG (0x1D0) #define APBDEV_PMC_SCRATCH45 (0x234) #define APBDEV_PMC_SCRATCH46 (0x238) #define APBDEV_PMC_SCRATCH49 (0x244) #define APBDEV_PMC_TSC_MULT (0x2B4) #define APBDEV_PMC_STICKY_BITS (0x2C0) #define APBDEV_PMC_WEAK_BIAS (0x2C8) +#define APBDEV_PMC_REG_SHORT (0x2CC) #define APBDEV_PMC_GPU_RG_CNTRL (0x2D4) #define APBDEV_PMC_CNTRL2 (0x440) #define APBDEV_PMC_FUSE_CTRL (0x450) @@ -125,6 +129,7 @@ #define APBDEV_PMC_SECURE_SCRATCH115 (0xB24) #define APBDEV_PMC_SECURE_SCRATCH119 (0xB34) +/* Mariko. */ #define APBDEV_PMC_TZRAM_PWR_CNTRL (0xBE8) #define APBDEV_PMC_TZRAM_SEC_DISABLE (0xBEC) #define APBDEV_PMC_TZRAM_NON_SEC_DISABLE (0xBF0)