remove bss crap

This commit is contained in:
Lightos1 committed 2026-09-10 13:24:25 +02:00
1 parent b770f88b9b
commit 1741e27116
4 files changed
+3 -17

No files matched your search

@@ -820,12 +820,6 @@ namespace ams::ldr {
} }
Result CreateProcessAndLoadAutoLoadModules(ProcessInfo *out, const Meta *meta, const AutoLoadModuleContext &ctx, const ArgumentStore::Entry *argument, u32 flags, os::NativeHandle resource_limit) { Result CreateProcessAndLoadAutoLoadModules(ProcessInfo *out, const Meta *meta, const AutoLoadModuleContext &ctx, const ArgumentStore::Entry *argument, u32 flags, os::NativeHandle resource_limit) {
/* Append extra .bss for 64LUT */
/* TODO: REMOVE THIS. */
if (g_is_pcv && ctx.main_nso_idx >= 0) {
g_nso_headers[ctx.main_nso_idx].bss_size += static_cast<u32>(hoc::pcv::HocPcvScratchSize);
}
/* Get CreateProcessParameter. */ /* Get CreateProcessParameter. */
svc::CreateProcessParameter param; svc::CreateProcessParameter param;
R_TRY(GetCreateProcessParameter(std::addressof(param), meta, flags, resource_limit)); R_TRY(GetCreateProcessParameter(std::addressof(param), meta, flags, resource_limit));
@@ -45,6 +45,7 @@ namespace ams::ldr::hoc::pcv::mariko {
size_t g_nso_size = 0; size_t g_nso_size = 0;
} }
/* Todo: Remove this bs. */
[[maybe_unused]] static uintptr_t CaveReserve(size_t count) { [[maybe_unused]] static uintptr_t CaveReserve(size_t count) {
return reinterpret_cast<uintptr_t>(Hooks().Reserve(count)); return reinterpret_cast<uintptr_t>(Hooks().Reserve(count));
} }
@@ -620,10 +621,8 @@ namespace ams::ldr::hoc::pcv::mariko {
} }
void Patch(uintptr_t mapped_nso, size_t nso_size) { void Patch(uintptr_t mapped_nso, size_t nso_size) {
nsoStart = reinterpret_cast<u32 *>(mapped_nso); nsoStart = reinterpret_cast<u32 *>(mapped_nso);
g_nso_size = nso_size;
g_pcv_scratch = mapped_nso + nso_size - HocPcvScratchSize;
g_nso_size = nso_size;
MtcGenerateFreqTables(); MtcGenerateFreqTables();
@@ -212,10 +212,6 @@ namespace ams::ldr::hoc::pcv {
Result MemFreqPllmLimit(u32 *ptr); Result MemFreqPllmLimit(u32 *ptr);
Result MemVoltHandler(u32 *ptr); // Used for Erista MEM Vdd2 + EMC Vddq or Mariko MEM Vdd2 Result MemVoltHandler(u32 *ptr); // Used for Erista MEM Vdd2 + EMC Vddq or Mariko MEM Vdd2
/* Extra pcv .bss */
constexpr size_t HocPcvScratchSize = 0x2000;
constexpr size_t HocBusFreqBufOffset = 0x1000; /* start of the SOC bus region */
void SafetyCheck(); void SafetyCheck();
void Patch(uintptr_t mapped_nso, size_t nso_size, uintptr_t cave, size_t cave_size, uintptr_t nso_address, uintptr_t data_arena); void Patch(uintptr_t mapped_nso, size_t nso_size, uintptr_t cave, size_t cave_size, uintptr_t nso_address, uintptr_t data_arena);
@@ -204,9 +204,6 @@ namespace ams::ldr::hoc::pcv {
// The pcv SoC-voltage DVB table is a fixed 32-entry region. (it doesn't need to be larger) // The pcv SoC-voltage DVB table is a fixed 32-entry region. (it doesn't need to be larger)
constexpr size_t DvbTableCapacity = 32; constexpr size_t DvbTableCapacity = 32;
// extra .bss location, 0 until Patch() runs.
inline uintptr_t g_pcv_scratch = 0;
inline uintptr_t g_pcv_cave = 0; inline uintptr_t g_pcv_cave = 0;
inline size_t g_pcv_cave_size = 0; inline size_t g_pcv_cave_size = 0;