Merge pull request #108 from Horizon-OC/bpmpfw

hocclk: add BPMP-Lite firmware
This commit is contained in:
Souldbminer authored and GitHub committed 2026-08-25 19:21:30 -04:00
commit 8222fe6b0c
72 files changed
+2712 -58

No files matched your search

@@ -30,6 +30,7 @@
#include <i2c.h>
#include "../board/board.hpp"
#include "../bpmp/bpmp.hpp"
#include "../display/aula.hpp"
#include "../display/display_refresh_rate.hpp"
#include "../file/config.hpp"
@@ -629,6 +630,8 @@ namespace clockManager {
bool RefreshContext() {
bool hasChanged = false;
gContext.bpmpInfo = *bpmp::GetSharedInfo();
std::uint32_t mode = 0;
Result rc = apmExtGetCurrentPerformanceConfiguration(&mode);
ASSERT_RESULT_OK(rc, "apmExtGetCurrentPerformanceConfiguration");
@@ -879,6 +882,11 @@ namespace clockManager {
}
void WaitForNextTick() {
if (!bpmp::IsAwake()) {
svcSleepThread(250 * 1000000ULL); // 250ms
return;
}
if (board::GetHz(HocClkModule_MEM) > 665000000)
svcSleepThread(config::GetConfigValue(HocClkConfigValue_PollingIntervalMs) * 1000000ULL);
else