HOC 3.0.0 part 1
- version change to athena (3.0.0) - cust rev 7 - build script change - EMC 64LUT
This commit is contained in:
@@ -82,9 +82,10 @@ typedef struct {
|
||||
u8 custRev;
|
||||
u16 kipVersion;
|
||||
bool isKipLoaded;
|
||||
bool rebootRequired;
|
||||
|
||||
// Reserved for future use
|
||||
u8 reserved[0x35A];
|
||||
u8 reserved[0x359];
|
||||
} HocClkContext;
|
||||
|
||||
typedef struct
|
||||
@@ -95,7 +96,7 @@ typedef struct
|
||||
};
|
||||
} HocClkTitleProfileList;
|
||||
|
||||
#define HOCCLK_FREQ_LIST_MAX 48
|
||||
#define HOCCLK_FREQ_LIST_MAX 64
|
||||
|
||||
#define HOCCLK_GLOBAL_PROFILE_TID 0xA111111111111111
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ include ${TOPDIR}/lib/libultrahand/ultrahand.mk
|
||||
# version control constants
|
||||
#---------------------------------------------------------------------------------
|
||||
#TARGET_VERSION := $(shell git describe --dirty --always --tags)
|
||||
APP_VERSION := 2.5.0 # ensure to set KIP_VERSION and CUST_REV in sysmodule Makefile when updating this
|
||||
APP_VERSION := 3.0.0 # ensure to set KIP_VERSION and CUST_REV in sysmodule Makefile when updating this
|
||||
TARGET_VERSION := $(APP_VERSION)
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
@@ -96,6 +96,15 @@ class AppOverlay : public tsl::Overlay {
|
||||
"");
|
||||
}
|
||||
|
||||
HocClkContext context = {};
|
||||
if (R_SUCCEEDED(hocclkIpcGetCurrentContext(&context)) && context.rebootRequired) {
|
||||
return initially<FatalGui>("Horizon OC has been updated.\n\n"
|
||||
"\n"
|
||||
"Please reboot your console\n\n"
|
||||
"to finish applying the update.",
|
||||
"");
|
||||
}
|
||||
|
||||
return initially<MainGui>();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -132,7 +132,7 @@ void BaseGui::preDraw(tsl::gfx::Renderer *renderer) {
|
||||
|
||||
drawDynamicUltraText(renderer, LOGO_TEXT_X, TEXT_Y, LOGO_LABEL_FONT_SIZE, STATIC_TEAL, false);
|
||||
|
||||
static const std::string versionStr = "Version " + getVersionString() + " \"Gaea\"";
|
||||
static const std::string versionStr = "Version " + getVersionString() + " \"Athena\"";
|
||||
static constexpr tsl::Color versionColor(9, 9, 9, 15);
|
||||
static constexpr s32 vx = LOGO_TEXT_X + 15;
|
||||
static constexpr s32 vy = TEXT_Y + 18;
|
||||
|
||||
@@ -228,15 +228,15 @@ std::vector<std::string> ConfigInfoStrings(HocClkConfigValue val, bool isMariko,
|
||||
case KipConfigValue_stepMode:
|
||||
return {
|
||||
"The step that RAM clocks take.",
|
||||
"Options (with examples):",
|
||||
"Options:",
|
||||
" - 33MHz - 3 MHz step (ex. 1600, 1633, 1666, 1700, etc.)",
|
||||
" - 66MHz - 66 MHz step (ex. 1600, 1666, 1733, etc.)",
|
||||
" - 100MHz - 100 MHz step (ex. 1600, 1700, 1800, etc.)",
|
||||
" - 133MHz - 66 MHz step (ex. 1600, 1733, 1866, etc.)",
|
||||
" - 133MHz - 133 MHz step (ex. 1600, 1733, 1866, etc.)",
|
||||
" - JEDEC:",
|
||||
" - 1600, 1866, 1996, 2133, 2400, 2666, 2933 and 3200 MHz are used",
|
||||
"The RAM max clock will always be available regardless of the step mode, but the intermediate frequencies will be limited by the selected step mode.",
|
||||
"This setting does not affect performance and the option you choose mostly is based on your personal taste",
|
||||
"33 MHz step mode is not possible due to certain limitations of Horizon OS",
|
||||
"This setting does not affect performance and the option you choose mostly is based on your personal taste",
|
||||
"Default: 66 MHz",
|
||||
};
|
||||
|
||||
|
||||
@@ -1143,6 +1143,7 @@ class RamSubmenuGui : public MiscGui {
|
||||
|
||||
if (IsMariko()) {
|
||||
std::vector<NamedValue> stepMode = {
|
||||
NamedValue("33MHz", 4),
|
||||
NamedValue("66MHz", 0),
|
||||
NamedValue("100MHz", 1),
|
||||
NamedValue("133MHz", 3), // Mantain compatability
|
||||
|
||||
@@ -28,9 +28,9 @@ INCLUDES := ../common/include src/hos src/soc src/i2c src/util src/pwr src/ipc
|
||||
EXEFS_SRC := exefs_src
|
||||
LIBNAMES := minIni
|
||||
# major minor patch
|
||||
TARGET_VERSION := 2.5.0
|
||||
KIP_VERSION := 250
|
||||
CUST_REV := 6
|
||||
TARGET_VERSION := 3.0.0
|
||||
KIP_VERSION := 300
|
||||
CUST_REV := 7
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# options for code generation
|
||||
|
||||
@@ -222,7 +222,8 @@ namespace kip {
|
||||
!config::GetConfigValue(HocClkConfigValue_IsFirstLoad)) {
|
||||
MigrateKipData(cust_get_cust_rev(&table), cust_get_kip_version(&table));
|
||||
SetKipData();
|
||||
notification::writeNotification("Horizon OC\nKIP has been updated\nPlease reboot your console");
|
||||
clockManager::gContext.rebootRequired = true;
|
||||
notification::writeNotification("Horizon OC\nKIP has been updated\nPlease reboot your console to use Horizon OC");
|
||||
return;
|
||||
}
|
||||
if (config::GetConfigValue(HocClkConfigValue_IsFirstLoad) == true) {
|
||||
|
||||
@@ -295,6 +295,47 @@ namespace clockManager {
|
||||
hz++;
|
||||
}
|
||||
|
||||
/* Since it is a pain to patch the vtables in ipc we can just hack the freqs in. You can still set them. */
|
||||
constexpr u64 EmcClkOSLimitHz = 1600000ULL * 1000; // 1600 MHz
|
||||
const u64 maxHz = static_cast<u64>(config::GetConfigValue(KipConfigValue_marikoEmcMaxClock)) * 1000;
|
||||
if (module == HocClkModule_MEM && board::GetSocType() == HocClkSocType_Mariko &&
|
||||
kip::kipAvailable && maxHz >= EmcClkOSLimitHz &&
|
||||
config::GetConfigValue(KipConfigValue_stepMode) == 4 /* 33 MHz */) {
|
||||
|
||||
/* Drop the clkrst entries above the OS limit */
|
||||
u32 kept = 0;
|
||||
for (u32 i = 0; i < gFreqTable[module].count; ++i) {
|
||||
if (static_cast<u64>(gFreqTable[module].list[i]) <= EmcClkOSLimitHz) {
|
||||
gFreqTable[module].list[kept++] = gFreqTable[module].list[i];
|
||||
}
|
||||
}
|
||||
gFreqTable[module].count = kept;
|
||||
|
||||
auto push = [&](u64 freqHz) {
|
||||
if (freqHz > maxHz || gFreqTable[module].count >= HOCCLK_FREQ_LIST_MAX) {
|
||||
return;
|
||||
}
|
||||
gFreqTable[module].list[gFreqTable[module].count++] = static_cast<u32>(freqHz);
|
||||
};
|
||||
|
||||
static const u32 stepFreqs33[] = {
|
||||
1633000, 1666000, 1700000, 1733000, 1766000, 1800000, 1833000, 1866000, 1900000, 1933000,
|
||||
1966000, 2000000, 2033000, 2066000, 2100000, 2133000, 2166000, 2200000, 2233000, 2266000,
|
||||
2300000, 2333000, 2366000, 2400000, 2433000, 2466000, 2500000, 2533000, 2566000, 2600000,
|
||||
2633000, 2666000, 2700000, 2733000, 2766000, 2800000, 2833000, 2866000, 2900000, 2933000,
|
||||
2966000, 3000000, 3033000, 3066000, 3100000, 3133000, 3166000, 3200000, 3233000, 3266000,
|
||||
3300000, 3333000, 3366000, 3400000, 3433000, 3466000, 3500000,
|
||||
};
|
||||
for (u32 f : stepFreqs33) {
|
||||
push(static_cast<u64>(f) * 1000);
|
||||
}
|
||||
|
||||
if (gFreqTable[module].count == 0 ||
|
||||
static_cast<u64>(gFreqTable[module].list[gFreqTable[module].count - 1]) != maxHz) {
|
||||
push(maxHz);
|
||||
}
|
||||
}
|
||||
|
||||
fileUtils::LogLine("[mgr] count = %u", gFreqTable[module].count);
|
||||
}
|
||||
|
||||
@@ -560,7 +601,6 @@ namespace clockManager {
|
||||
if (module == HocClkModule_MEM && targetHz > oldHz && config::GetConfigValue(HocClkConfigValue_DVFSMode) == DVFSMode_Hijack) {
|
||||
ApplyGpuDvfs(targetHz);
|
||||
}
|
||||
|
||||
board::SetHz((HocClkModule)module, nearestHz);
|
||||
gContext.freqs[module] = nearestHz;
|
||||
|
||||
@@ -739,6 +779,11 @@ namespace clockManager {
|
||||
gContext = {};
|
||||
gContext.applicationId = 0;
|
||||
gContext.profile = HocClkProfile_Handheld;
|
||||
|
||||
/* Load the KIP customize table before building the freq tables: the MEM freq-list
|
||||
synthesis in RefreshFreqTableRow reads marikoEmcMaxClock / stepMode from it. */
|
||||
kip::GetKipData();
|
||||
|
||||
for (unsigned int module = 0; module < HocClkModule_EnumMax; module++) {
|
||||
gContext.freqs[module] = 0;
|
||||
gContext.realFreqs[module] = 0;
|
||||
@@ -757,8 +802,6 @@ namespace clockManager {
|
||||
gLastTempLogNs = 0;
|
||||
gLastCsvWriteNs = 0;
|
||||
|
||||
kip::GetKipData();
|
||||
|
||||
board::FuseData *fuse = board::GetFuseData();
|
||||
|
||||
gContext.speedos[HocClkSpeedo_CPU] = fuse->cpuSpeedo;
|
||||
|
||||
Reference in New Issue
Block a user