program_metadata: Add getters for ACID/ACI0 FAC and SAC regions
This commit is contained in:
@@ -48,6 +48,15 @@ Loader::ResultStatus ProgramMetadata::Load(VirtualFile file) {
|
||||
return Loader::ResultStatus::ErrorBadKernelCapabilityDescriptors;
|
||||
}
|
||||
|
||||
acid_file_access_raw =
|
||||
file->ReadBytes(acid_header.fac_size, npdm_header.acid_offset + acid_header.fac_offset);
|
||||
aci0_file_access_raw =
|
||||
file->ReadBytes(aci_header.fah_size, npdm_header.aci_offset + aci_header.fah_offset);
|
||||
acid_service_access_raw =
|
||||
file->ReadBytes(acid_header.sac_size, npdm_header.acid_offset + acid_header.sac_offset);
|
||||
aci0_service_access_raw =
|
||||
file->ReadBytes(aci_header.sac_size, npdm_header.aci_offset + aci_header.sac_offset);
|
||||
|
||||
return Loader::ResultStatus::Success;
|
||||
}
|
||||
|
||||
@@ -66,6 +75,22 @@ void ProgramMetadata::LoadManual(bool is_64_bit, ProgramAddressSpaceType address
|
||||
aci_kernel_capabilities = std ::move(capabilities);
|
||||
}
|
||||
|
||||
std::vector<u8> ProgramMetadata::GetACIDFileAccessControl() const {
|
||||
return acid_file_access_raw;
|
||||
}
|
||||
|
||||
std::vector<u8> ProgramMetadata::GetACI0FileAccessControl() const {
|
||||
return aci0_file_access_raw;
|
||||
}
|
||||
|
||||
std::vector<u8> ProgramMetadata::GetACIDServiceAccessControl() const {
|
||||
return acid_service_access_raw;
|
||||
}
|
||||
|
||||
std::vector<u8> ProgramMetadata::GetACI0ServiceAccessControl() const {
|
||||
return aci0_service_access_raw;
|
||||
}
|
||||
|
||||
bool ProgramMetadata::Is64BitProgram() const {
|
||||
return npdm_header.has_64_bit_instructions;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user