From ad6124a39de70311f2ba78e7b5aa2452b970ccc8 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Thu, 10 Oct 2024 03:45:09 -0700 Subject: [PATCH] ldr: ProgramInfo is 0x410 now, and fix debug flags for hbl --- libstratosphere/include/stratosphere/ldr/ldr_types.hpp | 3 ++- libstratosphere/source/ldr/ldr_pm_api.os.horizon.cpp | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/libstratosphere/include/stratosphere/ldr/ldr_types.hpp b/libstratosphere/include/stratosphere/ldr/ldr_types.hpp index e81be6b7..7d1a94aa 100644 --- a/libstratosphere/include/stratosphere/ldr/ldr_types.hpp +++ b/libstratosphere/include/stratosphere/ldr/ldr_types.hpp @@ -34,9 +34,10 @@ namespace ams::ldr { u32 aci_sac_size; u32 acid_fac_size; u32 aci_fah_size; + u8 unused_20[0x10]; u8 ac_buffer[0x3E0]; }; - static_assert(util::is_pod::value && sizeof(ProgramInfo) == 0x400, "ProgramInfo definition!"); + static_assert(util::is_pod::value && sizeof(ProgramInfo) == 0x410, "ProgramInfo definition!"); enum ProgramInfoFlag { ProgramInfoFlag_SystemModule = (0 << 0), diff --git a/libstratosphere/source/ldr/ldr_pm_api.os.horizon.cpp b/libstratosphere/source/ldr/ldr_pm_api.os.horizon.cpp index 8441977f..2e00417d 100644 --- a/libstratosphere/source/ldr/ldr_pm_api.os.horizon.cpp +++ b/libstratosphere/source/ldr/ldr_pm_api.os.horizon.cpp @@ -24,6 +24,7 @@ namespace ams::ldr::pm { } Result GetProgramInfo(ProgramInfo *out, const ncm::ProgramLocation &loc) { + static_assert(sizeof(*out) == sizeof(LoaderProgramInfo)); R_RETURN(ldrPmGetProgramInfo(reinterpret_cast(std::addressof(loc)), reinterpret_cast(out))); } @@ -42,6 +43,7 @@ namespace ams::ldr::pm { Result AtmosphereGetProgramInfo(ProgramInfo *out, cfg::OverrideStatus *out_status, const ncm::ProgramLocation &loc) { static_assert(sizeof(*out_status) == sizeof(CfgOverrideStatus), "CfgOverrideStatus definition!"); + static_assert(sizeof(*out) == sizeof(LoaderProgramInfo)); R_RETURN(ldrPmAtmosphereGetProgramInfo(reinterpret_cast(out), reinterpret_cast(out_status), reinterpret_cast(std::addressof(loc)))); }