1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-10 06:01:52 +00:00

loader: Add support for 6.0.0.

This commit is contained in:
SciresM 2018-09-06 11:57:57 +09:00 committed by GitHub
parent 9a8aa0bc15
commit bb0f3ac024
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,6 +8,15 @@
#include "ldr_npdm.hpp"
#include "ldr_nso.hpp"
extern "C" {
bool __attribute__((weak)) kernelAbove600(void) {
u64 tmp;
return (svcGetInfo(&tmp, 21, INVALID_HANDLE, 0) != 0xF001);
}
}
Result ProcessCreation::InitializeProcessInfo(NpdmUtils::NpdmInfo *npdm, Handle reslimit_h, u64 arg_flags, ProcessInfo *out_proc_info) {
/* Initialize a ProcessInfo using an npdm. */
*out_proc_info = (const ProcessCreation::ProcessInfo){0};
@ -48,7 +57,7 @@ Result ProcessCreation::InitializeProcessInfo(NpdmUtils::NpdmInfo *npdm, Handle
if ((out_proc_info->process_flags & 6) == 0) {
return 0x809;
}
if ((application_type & 3) != 1) {
if (!(((application_type & 3) == 1) || (kernelAbove600() && (application_type & 3) == 2))) {
return 0x809;
}
if (npdm->header->system_resource_size > 0x1FE00000) {