ldr: even more (partially guessed) labeling of CvbMeta

This commit is contained in:
Lightos1
2026-05-12 13:07:46 +02:00
parent ef830ce3f6
commit 34e1f39510
3 changed files with 7 additions and 12 deletions

View File

@@ -38,14 +38,14 @@ namespace ams::ldr::hoc::pcv {
};
static_assert(sizeof(cvb_entry_t) == 0x38);
struct cvb_cpu_dfll_data {
struct CvbCpuDfllData {
u32 tune0_low;
u32 tune0_high;
u32 tune1_low;
u32 tune1_high;
unsigned int tune_high_min_millivolts;
unsigned int tune_high_margin_millivolts;
unsigned long dvco_calibration_max;
u32 tune_high_min_millivolts;
u32 tune_high_margin_millivolts;
u64 dvco_calibration_max;
};
struct __attribute__((packed)) div_nmp {
@@ -117,12 +117,7 @@ namespace ams::ldr::hoc::pcv {
struct __attribute__((packed)) CvbMeta {
u64 socType;
u32 tune0_low;
u32 tune0_high;
u32 tune1_low;
u32 tune1_high;
u32 unkZero[2];
u64 unkScale;
CvbCpuDfllData dfllData; /* Maybe? */
u32 unkZero2[6];
u32 unkMagic;
u32 unkZero3;

View File

@@ -66,7 +66,7 @@ namespace ams::ldr::hoc::pcv::erista {
}
Result CpuVoltDfll(u32* ptr) {
cvb_cpu_dfll_data *entry = reinterpret_cast<cvb_cpu_dfll_data *>(ptr);
CvbCpuDfllData *entry = reinterpret_cast<CvbCpuDfllData *>(ptr);
R_UNLESS(entry->tune0_low == 0xFFEAD0FF, ldr::ResultInvalidCpuVoltDfllEntry());
R_UNLESS(entry->tune0_high == 0x0, ldr::ResultInvalidCpuVoltDfllEntry());
R_UNLESS(entry->tune1_low == 0x0, ldr::ResultInvalidCpuVoltDfllEntry());

View File

@@ -134,7 +134,7 @@ namespace ams::ldr::hoc::pcv::mariko {
}
Result CpuVoltDfll(u32 *ptr) {
cvb_cpu_dfll_data *entry = reinterpret_cast<cvb_cpu_dfll_data *>(ptr);
CvbCpuDfllData *entry = reinterpret_cast<CvbCpuDfllData *>(ptr);
R_UNLESS(entry->tune0_low == 0xFFCF, ldr::ResultInvalidCpuVoltDfllEntry());
R_UNLESS(entry->tune0_high == 0x0, ldr::ResultInvalidCpuVoltDfllEntry());