From 7f7c4852cc6dc9b423087342c04e31d374b4b5c1 Mon Sep 17 00:00:00 2001 From: TuxSH Date: Mon, 27 Apr 2020 00:57:00 +0100 Subject: [PATCH] hbloader: raise the maximum time share APT_SetAppCpuTimeLimit can set from 30% to 89%... ... now that we understand both PM and the kernel better. 89% is the maximum value supported for this preemption mode. --- sysmodules/rosalina/source/hbloader.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sysmodules/rosalina/source/hbloader.c b/sysmodules/rosalina/source/hbloader.c index c22b395..c9aa68e 100644 --- a/sysmodules/rosalina/source/hbloader.c +++ b/sysmodules/rosalina/source/hbloader.c @@ -279,7 +279,9 @@ void HBLDR_HandleCommands(void *ctx) memset(localcaps0->reslimits, 0, sizeof(localcaps0->reslimits)); - localcaps0->reslimits[0] = 0x9E; // Stuff needed to run stuff on core1 + // Set mode1 preemption mode for core1, max. 89% of CPU time (default 0, requires a APT_SetAppCpuTimeLimit call) + // See the big comment in sysmodules/pm/source/reslimit.c for technical details. + localcaps0->reslimits[0] = BIT(7) | 89; localcaps0->storage_info.fs_access_info = 0xFFFFFFFF; // Give access to everything localcaps0->storage_info.no_romfs = true;