mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-14 15:14:23 -04:00
fusee_cpp: implement tsec_keygen firmware execution
This commit is contained in:
parent
80999988d4
commit
51cf28339b
11 changed files with 270 additions and 53 deletions
|
@ -17,8 +17,8 @@
|
|||
|
||||
namespace ams::nxboot {
|
||||
|
||||
void DoMemoryTrainingErista();
|
||||
void DoMemoryTrainingMariko();
|
||||
void DoMemoryTrainingErista(int index);
|
||||
void DoMemoryTrainingMariko(int index);
|
||||
|
||||
namespace {
|
||||
|
||||
|
@ -56,21 +56,23 @@ namespace ams::nxboot {
|
|||
/* DramId_MarikoAulaSamsung1y8gbX */ 0x0D,
|
||||
};
|
||||
|
||||
int GetMemoryTrainingTableIndex() {
|
||||
if (const auto dram_id = fuse::GetDramId(); dram_id < util::size(MemoryTrainingTableIndices) && MemoryTrainingTableIndices[dram_id] != MemoryTrainingTableIndex_Invalid) {
|
||||
return static_cast<int>(MemoryTrainingTableIndices[dram_id]);
|
||||
} else {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void DoMemoryTraining() {
|
||||
if (fuse::GetSocType() == fuse::SocType_Erista) {
|
||||
DoMemoryTrainingErista();
|
||||
} else {
|
||||
DoMemoryTrainingMariko();
|
||||
}
|
||||
}
|
||||
const auto index = GetMemoryTrainingTableIndex();
|
||||
|
||||
int GetMemoryTrainingTableIndex() {
|
||||
if (const auto dram_id = fuse::GetDramId(); dram_id < util::size(MemoryTrainingTableIndices) && MemoryTrainingTableIndices[dram_id] != MemoryTrainingTableIndex_Invalid) {
|
||||
return static_cast<int>(MemoryTrainingTableIndices[dram_id]);
|
||||
if (fuse::GetSocType() == fuse::SocType_Erista) {
|
||||
DoMemoryTrainingErista(index);
|
||||
} else {
|
||||
return -1;
|
||||
DoMemoryTrainingMariko(index);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue