diff --git a/rpcs3/Crypto/unself.cpp b/rpcs3/Crypto/unself.cpp index 78e9ba2054..9efbbd0aa5 100644 --- a/rpcs3/Crypto/unself.cpp +++ b/rpcs3/Crypto/unself.cpp @@ -192,21 +192,21 @@ void WriteShdr(const fs::file& f, Elf32_Shdr& shdr) } -void AppInfo::Load(const fs::file& f) +void program_identification_header::Load(const fs::file& f) { - authid = Read64(f); - vendor_id = Read32(f); - self_type = Read32(f); - version = Read64(f); - padding = Read64(f); + program_authority_id = Read64(f); + program_vendor_id = Read32(f); + program_type = Read32(f); + program_sceversion = Read64(f); + padding = Read64(f); } -void AppInfo::Show() const +void program_identification_header::Show() const { - self_log.notice("AuthID: 0x%llx", authid); - self_log.notice("VendorID: 0x%08x", vendor_id); - self_log.notice("SELF type: 0x%08x", self_type); - self_log.notice("Version: 0x%llx", version); + self_log.notice("AuthID: 0x%llx", program_authority_id); + self_log.notice("VendorID: 0x%08x", program_vendor_id); + self_log.notice("SELF type: 0x%08x", program_type); + self_log.notice("Version: 0x%llx", program_sceversion); } void SectionInfo::Load(const fs::file& f) @@ -888,11 +888,11 @@ bool SELFDecrypter::LoadHeaders(bool isElf32, SelfAdditionalInfo* out_info) // Read the APP INFO. self_f.seek(m_ext_hdr.program_identification_hdr_offset); - app_info.Load(self_f); + m_prog_id_hdr.Load(self_f); if (out_info) { - out_info->app_info = app_info; + out_info->prog_id_hdr = m_prog_id_hdr; } // Read ELF header. @@ -1027,7 +1027,7 @@ void SELFDecrypter::ShowHeaders(bool isElf32) self_log.notice("----------------------------------------------------"); self_log.notice("APP INFO"); self_log.notice("----------------------------------------------------"); - app_info.Show(); + m_prog_id_hdr.Show(); self_log.notice("----------------------------------------------------"); self_log.notice("ELF header"); self_log.notice("----------------------------------------------------"); @@ -1150,7 +1150,7 @@ bool SELFDecrypter::LoadMetadata(u8* klic_key) self_f.read(metadata_headers.get(), metadata_headers_size); // Find the right keyset from the key vault. - SELF_KEY keyset = key_v.FindSelfKey(app_info.self_type, sce_hdr.se_flags, app_info.version); + SELF_KEY keyset = key_v.FindSelfKey(m_prog_id_hdr.program_type, sce_hdr.se_flags, m_prog_id_hdr.program_sceversion); // Set klic if given if (klic_key) diff --git a/rpcs3/Crypto/unself.h b/rpcs3/Crypto/unself.h index 6fc268b5d4..86345857b5 100644 --- a/rpcs3/Crypto/unself.h +++ b/rpcs3/Crypto/unself.h @@ -11,12 +11,12 @@ LOG_CHANNEL(self_log, "SELF"); -struct AppInfo +struct program_identification_header { - u64 authid; - u32 vendor_id; - u32 self_type; - u64 version; + u64 program_authority_id; + u32 program_vendor_id; + u32 program_type; + u64 program_sceversion; u64 padding; void Load(const fs::file& f); @@ -338,7 +338,7 @@ struct SelfAdditionalInfo { bool valid = false; std::vector ctrl_info; - AppInfo app_info; + program_identification_header prog_id_hdr; }; class SCEDecrypter @@ -377,7 +377,7 @@ class SELFDecrypter // SCE, SELF and APP headers. SceHeader sce_hdr{}; ext_hdr m_ext_hdr{}; - AppInfo app_info{}; + program_identification_header m_prog_id_hdr{}; // ELF64 header and program header/section header arrays. Elf64_Ehdr elf64_hdr{}; diff --git a/rpcs3/Emu/Cell/PPUModule.cpp b/rpcs3/Emu/Cell/PPUModule.cpp index e311abee2e..1a2c727d74 100644 --- a/rpcs3/Emu/Cell/PPUModule.cpp +++ b/rpcs3/Emu/Cell/PPUModule.cpp @@ -1925,7 +1925,7 @@ bool ppu_load_exec(const ppu_exec_object& elf, utils::serial* ar) } ppu_loader.notice("SELF header information found: ctrl_flags1=0x%x, authid=0x%llx", - g_ps3_process_info.ctrl_flags1, g_ps3_process_info.self_info.app_info.authid); + g_ps3_process_info.ctrl_flags1, g_ps3_process_info.self_info.prog_id_hdr.program_authority_id); } // Load other programs diff --git a/rpcs3/Emu/Cell/lv2/sys_ss.cpp b/rpcs3/Emu/Cell/lv2/sys_ss.cpp index c559e2083a..67e4088f1f 100644 --- a/rpcs3/Emu/Cell/lv2/sys_ss.cpp +++ b/rpcs3/Emu/Cell/lv2/sys_ss.cpp @@ -83,7 +83,7 @@ error_code sys_ss_access_control_engine(u64 pkg_id, u64 a2, u64 a3) sys_ss.todo("sys_ss_access_control_engine(pkg_id=0x%llx, a2=0x%llx, a3=0x%llx)", pkg_id, a2, a3); const u64 authid = g_ps3_process_info.self_info.valid ? - g_ps3_process_info.self_info.app_info.authid : 0; + g_ps3_process_info.self_info.prog_id_hdr.program_authority_id : 0; switch (pkg_id) {