ldr: change formating

This commit is contained in:
Lightos1
2026-06-06 14:31:46 +02:00
parent 19175e5307
commit e7c5bd02c2
2 changed files with 10 additions and 10 deletions

View File

@@ -73,7 +73,7 @@ namespace ams::ldr::hoc::pcv {
u32 unk_0;
struct div_nmp *div_nmp;
u32 unk_1[4];
void (*unk_fn)(u64* unk_struct); // set_defaults?
void (*unk_fn)(u64 *unk_struct); // set_defaults?
};
struct __attribute__((packed)) dvfs_rail {
@@ -90,7 +90,7 @@ namespace ams::ldr::hoc::pcv {
struct __attribute__((packed)) regulator {
u64 id;
const char* name;
const char *name;
u32 type;
union {
struct {
@@ -148,7 +148,7 @@ namespace ams::ldr::hoc::pcv {
size_t GetDvfsTableEntryCount(T *table_head) {
using NT = std::remove_const_t<std::remove_volatile_t<T>>;
auto is_empty = [](NT* entry) {
auto is_empty = [](NT *entry) {
u8 *m = reinterpret_cast<u8 *>(entry);
for (size_t i = 0; i < sizeof(NT); i++) {
if (*(m + i)) {

View File

@@ -20,7 +20,7 @@
namespace ams::ldr::hoc::ptm {
Result CpuPtmBoost(perf_conf_entry* entry) {
Result CpuPtmBoost(perf_conf_entry *entry) {
bool isMariko = (spl::GetSocType() == spl::SocType_Mariko);
if (!C.eristaCpuBoostClock || !C.marikoCpuBoostClock) {
@@ -35,19 +35,19 @@ namespace ams::ldr::hoc::ptm {
R_SUCCEED();
}
Result MemPtm(perf_conf_entry* entry) {
Result MemPtm(perf_conf_entry *entry) {
PATCH_OFFSET(&(entry->emc_freq_1), memPtmLimit);
PATCH_OFFSET(&(entry->emc_freq_2), memPtmLimit);
R_SUCCEED();
}
bool PtmEntryIsValid(perf_conf_entry* entry) {
bool PtmEntryIsValid(perf_conf_entry *entry) {
return (entry->cpu_freq_1 == entry->cpu_freq_2 && entry->gpu_freq_1 == entry->gpu_freq_2 && entry->emc_freq_1 == entry->emc_freq_2);
}
bool PtmTablePatternFn(u32* ptr) {
perf_conf_entry* entry = reinterpret_cast<perf_conf_entry *>(ptr);
bool PtmTablePatternFn(u32 *ptr) {
perf_conf_entry *entry = reinterpret_cast<perf_conf_entry *>(ptr);
if (!PtmEntryIsValid(entry)) {
return false;
}
@@ -56,9 +56,9 @@ namespace ams::ldr::hoc::ptm {
}
void Patch(uintptr_t mapped_nso, size_t nso_size) {
perf_conf_entry* confTable = nullptr;
perf_conf_entry *confTable = nullptr;
for (uintptr_t ptr = mapped_nso; ptr <= mapped_nso + nso_size - sizeof(perf_conf_entry) * entryCnt; ptr += sizeof(u32)) {
u32* ptr32 = reinterpret_cast<u32 *>(ptr);
u32 *ptr32 = reinterpret_cast<u32 *>(ptr);
if (PtmTablePatternFn(ptr32)) {
confTable = reinterpret_cast<perf_conf_entry *>(ptr);
break;