diff --git a/SECURITY.md b/SECURITY.md index 656298e8..b01e8439 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -4,8 +4,9 @@ | Version | Supported | | ------- | ------------------ | -| 1.x | :white_check_mark: | -| 0.x | Not supported | +| 2.x.x | :white_check_mark: | +| 1.x.x | Not supported | +| 0.x.x | Not supported | ## Reporting a Vulnerability diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/customize.cpp b/Source/Atmosphere/stratosphere/loader/source/oc/customize.cpp index 03730c06..92c19518 100644 --- a/Source/Atmosphere/stratosphere/loader/source/oc/customize.cpp +++ b/Source/Atmosphere/stratosphere/loader/source/oc/customize.cpp @@ -42,7 +42,7 @@ volatile CustomizeTable C = { /* Available: 66MHz step rate, 100MHz step rate and jedec. */ /* Jedec freqs are 1333MHz, 1600MHz, 1866MHz, 2133MHz, 2400MHz, 2666MHz, 2933MHz, 3200MHz. */ -.stepMode = StepMode_Jedec, +.stepMode = StepMode_66MHz, .marikoEmcMaxClock = 2133000, /* 1866MHz @ 1866tWRL is guaranteed to work on all Mariko units */ .marikoEmcVddqVolt = 600000, @@ -96,8 +96,8 @@ volatile CustomizeTable C = { * 1331WL = 12 */ -.mem_burst_read_latency = RL_2133, -.mem_burst_write_latency = WL_2133, +.mem_burst_read_latency = RL_1600, +.mem_burst_write_latency = WL_1600, .eristaCpuUV = 0, .eristaCpuVmin = 800, diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/mariko/calculate_timings.cpp b/Source/Atmosphere/stratosphere/loader/source/oc/mariko/calculate_timings.cpp index c88412d7..02d4d11f 100644 --- a/Source/Atmosphere/stratosphere/loader/source/oc/mariko/calculate_timings.cpp +++ b/Source/Atmosphere/stratosphere/loader/source/oc/mariko/calculate_timings.cpp @@ -46,14 +46,11 @@ namespace ams::ldr::hoc::pcv::mariko { } void AutoLatency(volatile u32 &latency, u32 freq, u32 latencyStep) { - if (freq >= 1866'000 && freq < 2133000) { + if (freq > 1600'000 && freq <= 1866'000) { /* 1866tRWL */ latency += latencyStep * 2; - } else if (freq >= 2133'000) { + } else { /* 2133tRWL */ latency += latencyStep * 3; - } else { - latency += latencyStep; } - /* 1333 latency is not possible with this config. */ } void HandleLatency(u32 freq, volatile u32 &latency, volatile u32 *latencyArray, u32 indexMax, u32 latencyStep) { diff --git a/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv_mariko.cpp b/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv_mariko.cpp index 98238089..c478871e 100644 --- a/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv_mariko.cpp +++ b/Source/Atmosphere/stratosphere/loader/source/oc/pcv/pcv_mariko.cpp @@ -608,6 +608,10 @@ namespace ams::ldr::hoc::pcv::mariko { } } + if (newEmcList.back() != C.marikoEmcMaxClock) { + newEmcList.push_back(static_cast(C.marikoEmcMaxClock)); + } + newEmcList.resize(std::min(newEmcList.size(), DvfsTableEntryLimit)); } diff --git a/Source/hoc-clk/common/include/hocclk/clock_manager.h b/Source/hoc-clk/common/include/hocclk/clock_manager.h index 618abcf9..fe43cd56 100644 --- a/Source/hoc-clk/common/include/hocclk/clock_manager.h +++ b/Source/hoc-clk/common/include/hocclk/clock_manager.h @@ -12,9 +12,9 @@ * * You should have received a copy of the GNU General Public License * along with this program. If not, see . - * + * */ - + /* -------------------------------------------------------------------------- * "THE BEER-WARE LICENSE" (Revision 42): * , , @@ -58,9 +58,9 @@ typedef struct // FPS / Resolution u8 fps; u16 resolutionHeight; - + // Reserved for future use - u8 reserved[0xF28]; + u8 reserved[0x428]; } HocClkContext; typedef struct @@ -75,4 +75,4 @@ typedef struct #define GLOBAL_PROFILE_ID 0xA111111111111111 -static_assert(sizeof(HocClkContext) == 0x1000); \ No newline at end of file +static_assert(sizeof(HocClkContext) == 0x500); \ No newline at end of file diff --git a/Source/hoc-clk/overlay/lang/es.json b/Source/hoc-clk/overlay/lang/es.json index 546b4429..a938c1e3 100644 --- a/Source/hoc-clk/overlay/lang/es.json +++ b/Source/hoc-clk/overlay/lang/es.json @@ -2,140 +2,140 @@ "Information": "Información", "IDDQ:": "IDDQ:", "Module: ": "Módulo:", - "sys-dock status:": "estado del sys-dock:", + "sys-dock status:": "Estado de sys-dock:", "SaltyNX status:": "Estado de SaltyNX:", - "RR Display status:": "Estado de visualización RR:", - "Wafer Position:": "Posición de la oblea:", + "RR Display status:": "Estado de pantalla RR:", + "Wafer Position:": "Posición del wafer:", "Credits": "Créditos", "Developers": "Desarrolladores", "Contributors": "Colaboradores", - "Testers": "Probadores", - "Special Thanks": "agradecimiento especial", + "Testers": "Testers", + "Special Thanks": "Agradecimientos especiales", "Unknown": "Desconocido", "Installed": "Instalado", "Not Installed": "No instalado", "X: %u Y: %u": "X: %u Y: %u", - "THE BEER-WARE LICENSE": "LA LICENCIA DE CERVEZA", + "THE BEER-WARE LICENSE": "LICENCIA BEER-WARE", "Default": "Predeterminado", - "Do Not Override": "No anular", - "Disabled": "Discapacitado", - "Enabled": "Habilitado", + "Do Not Override": "No sobrescribir", + "Disabled": "Desactivado", + "Enabled": "Activado", " \\ue0e3 Reset": "\\ue0e3 Restablecer", "Display": "Pantalla", - "Application changed\\n\\n": "Aplicación modificada\\n\\n", - "The running application changed\\n\\n": "La aplicación en ejecución cambió\\n\\n", - "while editing was going on.": "mientras se realizaba la edición.", - "Board": "tablero", + "Application changed\\n\\n": "Aplicación cambiada\\n\\n", + "The running application changed\\n\\n": "La aplicación en ejecución ha cambiado\\n\\n", + "while editing was going on.": "mientras se estaba editando.", + "Board": "Placa", "%u.%u%u mV": "%u.%u%u mV", - "Could not connect to hoc-clk sysmodule.\\n\\n": "No se pudo conectar al módulo del sistema hoc-clk.\\n\\n", - "Please make sure everything is\\n\\n": "Por favor asegúrese de que todo esté\\n\\n", - "correctly installed and enabled.": "correctamente instalado y habilitado.", - "Fatal error": "error fatal", - "Temporary Overrides ": "Anulaciones temporales", - "Sleep Mode": "Modo de suspensión", - "Stock": "Valores", - "Dev OC": "Desarrollador OC", - "Boost Mode": "Modo de impulso", + "Could not connect to hoc-clk sysmodule.\\n\\n": "No se pudo conectar al sysmodule hoc-clk.\\n\\n", + "Please make sure everything is\\n\\n": "Asegúrate de que todo esté\\n\\n", + "correctly installed and enabled.": "correctamente instalado y activado.", + "Fatal error": "Error fatal", + "Temporary Overrides ": "Ajustes temporales", + "Sleep Mode": "Modo reposo", + "Stock": "Valores de fábrica", + "Dev OC": "OC de desarrollo", + "Boost Mode": "Modo boost", "Safe Max": "Máximo seguro", - "Unsafe Max": "Máximo inseguro", + "Unsafe Max": "Máximo no seguro", "Absolute Max": "Máximo absoluto", - "Handheld Safe Max": "Caja fuerte de mano máx.", - "Enable": "Habilitar", + "Handheld Safe Max": "Máximo seguro en portátil", + "Enable": "Activar", "Edit App Profile": "Editar perfil de aplicación", "Edit Global Profile": "Editar perfil global", - "Temporary Overrides": "Anulaciones temporales", + "Temporary Overrides": "Ajustes temporales", "Settings": "Configuración", "About": "Acerca de", - "Compiling with minimal features": "Compilando con características mínimas", - "General Settings": "Configuraciones generales", - "Governor Settings": "Configuración del gobernador", - "Safety Settings": "Configuraciones de seguridad", - "Save KIP Settings": "Guardar configuración de KIP", + "Compiling with minimal features": "Compilado con funciones mínimas", + "General Settings": "Configuración general", + "Governor Settings": "Configuración del governor", + "Safety Settings": "Configuración de seguridad", + "Save KIP Settings": "Guardar configuración KIP", "RAM Settings": "Configuración de RAM", - "CPU Settings": "Configuración de la CPU", + "CPU Settings": "Configuración de CPU", "GPU Settings": "Configuración de GPU", "Display Settings": "Configuración de pantalla", "Experimental": "Experimental", - "GPU Scheduling Override Method": "Método de anulación de programación de GPU", - "can be dangerous and may cause": "puede ser peligroso y puede causar", - "damage to your battery or charger!": "¡Daños a su batería o cargador!", - "Charge Current Override": "Anulación de corriente de carga", + "GPU Scheduling Override Method": "Método de sobrescritura del scheduling de GPU", + "can be dangerous and may cause": "puede ser peligroso y causar", + "damage to your battery or charger!": "daños a la batería o al cargador.", + "Charge Current Override": "Sobrescritura de corriente de carga", "RAM Voltage Display Mode": "Modo de visualización de voltaje de RAM", "Polling Interval": "Intervalo de sondeo", - "CPU Governor Minimum Frequency": "Frecuencia mínima del gobernador de CPU", - "refresh rates may cause stress": "Las frecuencias de actualización pueden causar estrés.", - "or damage to your display! ": "o daños a su pantalla!", - "Proceed at your own risk!": "¡Continúe bajo su propio riesgo!", - "Max Handheld Display": "Pantalla portátil máxima", - "Display Clock": "Reloj de pantalla", - "Official Rating": "Calificación oficial", + "CPU Governor Minimum Frequency": "Frecuencia mínima del governor de CPU", + "refresh rates may cause stress": "las tasas de refresco pueden causar estrés", + "or damage to your display! ": "o dañar la pantalla.", + "Proceed at your own risk!": "¡Úsalo bajo tu propio riesgo!", + "Max Handheld Display": "Frecuencia máxima de pantalla en portátil", + "Display Clock": "Frecuencia de pantalla", + "Official Rating": "Valor oficial", "TDP Threshold": "Umbral de TDP", - "Power": "poder", - "Thermal Throttle Limit": "Límite del acelerador térmico", - "HP Mode": "Modo HP", + "Power": "Potencia", + "Thermal Throttle Limit": "Límite de thermal throttling", + "HP Mode": "Modo alto rendimiento", "Default (Mariko)": "Predeterminado (Mariko)", "Default (Erista)": "Predeterminado (Erista)", - "Rating": "Calificación", - "Safe Max (Mariko)": "Max seguro (Mariko)", - "Safe Max (Erista)": "Safe Max (Erista)", - "RAM VDD2 Voltage": "Voltaje RAM VDD2", - "Voltage": "voltaje", - "RAM VDDQ Voltage": "Voltaje RAM VDDQ", - "RAM Frequency Editor": "Editor de frecuencia RAM", - "JEDEC.": "JEDEC.", - "High speedo needed!": "¡Se necesita alta velocidad!", - "3333MHz (Needs extreme Speedo/PLL)": "3333MHz (Necesita Speedo/PLL extremo)", - "3366MHz (Needs extreme Speedo/PLL)": "3366MHz (Necesita Speedo/PLL extremo)", - "3400MHz (Needs extreme Speedo/PLL)": "3400MHz (Necesita Speedo/PLL extremo)", - "3433MHz (Needs ridiculous Speedo/PLL)": "3433MHz (Necesita Speedo/PLL ridículo)", - "3466MHz (Needs ridiculous Speedo/PLL)": "3466MHz (Necesita Speedo/PLL ridículo)", - "3500MHz (Needs ridiculous Speedo/PLL)": "3500MHz (Necesita Speedo/PLL ridículo)", - "Ram Max Clock": "Ram Max Reloj", - "RAM Latency Editor": "Editor de latencia de RAM", - "RAM Timing Reductions": "Reducciones de tiempo de RAM", - "Memory Timings": "Tiempos de memoria", + "Rating": "Valor", + "Safe Max (Mariko)": "Máximo seguro (Mariko)", + "Safe Max (Erista)": "Máximo seguro (Erista)", + "RAM VDD2 Voltage": "Voltaje VDD2 de RAM", + "Voltage": "Voltaje", + "RAM VDDQ Voltage": "Voltaje VDDQ de RAM", + "RAM Frequency Editor": "Editor de frecuencia de RAM", + "JEDEC.": "JEDEC", + "High speedo needed!": "¡Se necesita alto speedo!", + "3333MHz (Needs extreme Speedo/PLL)": "3333MHz (requiere Speedo/PLL extremo)", + "3366MHz (Needs extreme Speedo/PLL)": "3366MHz (requiere Speedo/PLL extremo)", + "3400MHz (Needs extreme Speedo/PLL)": "3400MHz (requiere Speedo/PLL extremo)", + "3433MHz (Needs ridiculous Speedo/PLL)": "3433MHz (requiere Speedo/PLL muy alto)", + "3466MHz (Needs ridiculous Speedo/PLL)": "3466MHz (requiere Speedo/PLL muy alto)", + "3500MHz (Needs ridiculous Speedo/PLL)": "3500MHz (requiere Speedo/PLL muy alto)", + "Ram Max Clock": "Frecuencia máxima de RAM", + "RAM Latency Editor": "Editor de latencias de RAM", + "RAM Timing Reductions": "Reducción de timings de RAM", + "Memory Timings": "Timings de memoria", "Advanced": "Avanzado", - "t6 tRTW Fine Tune": "t6 tRTW Ajuste fino", + "t6 tRTW Fine Tune": "Ajuste fino t6 tRTW", "tRTW Fine Tune": "Ajuste fino tRTW", - "t7 tWTR Fine Tune": "t7 tWTR Ajuste fino", - "tWTR Fine Tune": "Ajuste fino de tWTR", - "Memory Latencies": "Latencias de la memoria", - "Read Latency": "Leer latencia", + "t7 tWTR Fine Tune": "Ajuste fino t7 tWTR", + "tWTR Fine Tune": "Ajuste fino tWTR", + "Memory Latencies": "Latencias de memoria", + "Read Latency": "Latencia de lectura", "Write Latency": "Latencia de escritura", - "CPU Boost Clock": "Reloj de aumento de CPU", - "CPU UV": "procesador ultravioleta", + "CPU Boost Clock": "Frecuencia boost de CPU", + "CPU UV": "Undervolt de CPU", "CPU Unlock": "Desbloqueo de CPU", - "CPU VMIN": "CPU VMIN", - "CPU Max Voltage": "Voltaje máximo de la CPU", - "CPU Max Clock": "Reloj máximo de CPU", - "Extreme UV Table": "Mesa UV extrema", - "CPU UV Table": "Tabla UV de CPU", - "CPU Low UV": "CPU baja radiación ultravioleta", - "CPU High UV": "CPU alta UV", + "CPU VMIN": "VMIN de CPU", + "CPU Max Voltage": "Voltaje máximo de CPU", + "CPU Max Clock": "Frecuencia máxima de CPU", + "Extreme UV Table": "Tabla de undervolt extrema", + "CPU UV Table": "Tabla de undervolt de CPU", + "CPU Low UV": "Undervolt bajo de CPU", + "CPU High UV": "Undervolt alto de CPU", "CPU Low VMIN": "VMIN bajo de CPU", "CPU High VMIN": "VMIN alto de CPU", - "No Undervolt": "Sin subvoltaje", - "SLT Table": "Mesa TR", + "No Undervolt": "Sin undervolt", + "SLT Table": "Tabla SLT", "HiOPT Table": "Tabla HiOPT", - "GPU Undervolt Table": "Tabla de subvoltaje de GPU", + "GPU Undervolt Table": "Tabla de undervolt de GPU", "GPU Minimum Voltage": "Voltaje mínimo de GPU", - "Calculate GPU Vmin": "Calcular GPU Vmin", - "GPU VMIN": "GPU VMIN", + "Calculate GPU Vmin": "Calcular Vmin de GPU", + "GPU VMIN": "VMIN de GPU", "GPU Maximum Voltage": "Voltaje máximo de GPU", - "GPU Voltage Offset": "Compensación de voltaje de GPU", - "Do not override": "no anular", - "Enabled (Default)": "Habilitado (predeterminado)", - "96.6% limit": "límite del 96,6%", - "99.7% limit": "límite del 99,7%", - "GPU Scheduling Override": "Anulación de programación de GPU", - "Official Service": "Servicio Oficial", - "GPU DVFS Mode": "Modo GPU DVFS", - "GPU DVFS Offset": "Compensación DVFS de GPU", + "GPU Voltage Offset": "Offset de voltaje de GPU", + "Do not override": "No sobrescribir", + "Enabled (Default)": "Activado (predeterminado)", + "96.6% limit": "Límite 96,6%", + "99.7% limit": "Límite 99,7%", + "GPU Scheduling Override": "Sobrescritura de scheduling de GPU", + "Official Service": "Servicio oficial", + "GPU DVFS Mode": "Modo DVFS de GPU", + "GPU DVFS Offset": "Offset DVFS de GPU", "GPU Voltage Table": "Tabla de voltaje de GPU", "GPU Custom Table (mV)": "Tabla personalizada de GPU (mV)", - "1075MHz without UV, 1152MHz on SLT": "1075MHz sin UV, 1152MHz en SLT", - "or 1228MHz on HiOPT can cause ": "o 1228MHz en HiOPT pueden causar", - "permanent damage to your Switch!": "¡Daño permanente a tu Switch!", - "921MHz without UV and 960MHz on": "921MHz sin UV y 960MHz encendido", - "SLT or HiOPT can cause ": "SLT o HiOPT pueden causar" -} + "1075MHz without UV, 1152MHz on SLT": "1075MHz sin undervolt, 1152MHz en SLT", + "or 1228MHz on HiOPT can cause ": "o 1228MHz en HiOPT pueden causar ", + "permanent damage to your Switch!": "¡daño permanente a tu Switch!", + "921MHz without UV and 960MHz on": "921MHz sin undervolt y 960MHz en", + "SLT or HiOPT can cause ": "SLT o HiOPT pueden causar " +} \ No newline at end of file diff --git a/Source/hoc-clk/sysmodule/src/file_utils.cpp b/Source/hoc-clk/sysmodule/src/file_utils.cpp index 7b25d668..366bad68 100644 --- a/Source/hoc-clk/sysmodule/src/file_utils.cpp +++ b/Source/hoc-clk/sysmodule/src/file_utils.cpp @@ -33,6 +33,7 @@ namespace fileUtils { namespace { + u64 bootTimeS; LockableMutex g_log_mutex; LockableMutex g_csv_mutex; std::atomic_bool g_has_initialized = false; @@ -82,12 +83,10 @@ namespace fileUtils { FILE* file = fopen(FILE_LOG_FILE_PATH, "a"); if (file) { - struct timespec now; - struct tm *timeInfo; + timespec now = {}; clock_gettime(CLOCK_REALTIME, &now); - timeInfo = localtime(&now.tv_sec); - fprintf(file, "[%02d:%02d:%02d] ", timeInfo->tm_hour, timeInfo->tm_min, timeInfo->tm_sec); + fprintf(file, "[%luls] ", now.tv_sec - bootTimeS); vfprintf(file, format, args); fprintf(file, "\n"); fclose(file); @@ -152,6 +151,12 @@ namespace fileUtils { } } + void SetBootTime() { + timespec bootTime = {}; + clock_gettime(CLOCK_REALTIME, &bootTime); + bootTimeS = bootTime.tv_sec; + } + void InitializeAsync() { Thread initThread = {0}; threadCreate(&initThread, InitializeThreadFunc, NULL, NULL, 0x4000, 0x15, 0); @@ -167,6 +172,7 @@ namespace fileUtils { __libnx_init_time(); timeExit(); + SetBootTime(); if (R_SUCCEEDED(rc)) { rc = fsInitialize(); diff --git a/Source/hoc-clk/sysmodule/src/kip.cpp b/Source/hoc-clk/sysmodule/src/kip.cpp index 77c0f38d..2b45abe9 100644 --- a/Source/hoc-clk/sysmodule/src/kip.cpp +++ b/Source/hoc-clk/sysmodule/src/kip.cpp @@ -52,11 +52,12 @@ namespace kip { return; } - if(cust_get_cust_rev(&table) != CUST_REV) { - notification::writeNotification("Horizon OC\nKip version mismatch\nPlease reinstall Horizon OC"); - return; - } - + // if(cust_get_cust_rev(&table) != CUST_REV) { + // fileUtils::LogLine("Revision: %u", cust_get_cust_rev(&table)); + // notification::writeNotification("Horizon OC\nKip version mismatch\nPlease reinstall Horizon OC"); + // return; + // } + CUST_WRITE_FIELD_BATCH(&table, custRev, config::GetConfigValue(KipConfigValue_custRev)); // CUST_WRITE_FIELD_BATCH(&table, mtcConf, config::GetConfigValue(KipConfigValue_mtcConf)); CUST_WRITE_FIELD_BATCH(&table, hpMode, config::GetConfigValue(KipConfigValue_hpMode)); @@ -181,10 +182,10 @@ namespace kip { return; } - if(cust_get_cust_rev(&table) != CUST_REV) { - notification::writeNotification("Horizon OC\nKip version mismatch\nPlease reinstall Horizon OC"); - return; - } + // if(cust_get_cust_rev(&table) != CUST_REV) { + // notification::writeNotification("Horizon OC\nKip version mismatch\nPlease reinstall Horizon OC"); + // return; + // } if ((u64)crc32::checksum_file("sdmc:/atmosphere/kips/hoc.kip") != config::GetConfigValue(KipCrc32) && !config::GetConfigValue(HocClkConfigValue_IsFirstLoad)) { SetKipData();