From 7cbefa306156a324e27b66300152073d03b2b3ee Mon Sep 17 00:00:00 2001 From: CTCaer Date: Thu, 27 Nov 2025 12:17:33 +0200 Subject: [PATCH] bdk: add reserved cfg to ipl meta and nyx storage --- bdk/memory_map.h | 1 + bdk/utils/types.h | 15 ++++++++++++--- bdk/utils/util.h | 11 +++++++++-- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/bdk/memory_map.h b/bdk/memory_map.h index 883071de..1facf54b 100644 --- a/bdk/memory_map.h +++ b/bdk/memory_map.h @@ -77,6 +77,7 @@ // Nyx buffers. !Do not change! #define NYX_STORAGE_ADDR 0xED000000 +#define NYX_STR_SZ SZ_16M #define NYX_RES_ADDR 0xEE000000 #define NYX_RES_SZ SZ_16M diff --git a/bdk/utils/types.h b/bdk/utils/types.h index 66c5d60c..563d070d 100644 --- a/bdk/utils/types.h +++ b/bdk/utils/types.h @@ -1,6 +1,6 @@ /* * Copyright (c) 2018 naehrwert -* Copyright (c) 2018-2022 CTCaer +* Copyright (c) 2018-2025 CTCaer * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -149,12 +149,21 @@ typedef struct __attribute__((__packed__)) _boot_cfg_t static_assert(sizeof(boot_cfg_t) == 0x84, "Boot cfg storage size is wrong!"); +#define RSVD_FLAG_DRAM_8GB BIT(0) + +typedef struct __attribute__((__packed__)) _rsvd_cfg_t +{ + u16 rsvd0; + u8 rsvd_flags; + u8 bclk_t210:4; + u8 bclk_t210b01:4; +} rsvd_cfg_t; + typedef struct __attribute__((__packed__)) _ipl_ver_meta_t { u32 magic; u32 version; - u16 rsvd0; - u16 rsvd1; + rsvd_cfg_t rcfg; } ipl_ver_meta_t; typedef struct __attribute__((__packed__)) _reloc_meta_t diff --git a/bdk/utils/util.h b/bdk/utils/util.h index ba8d72b5..aab34d82 100644 --- a/bdk/utils/util.h +++ b/bdk/utils/util.h @@ -87,13 +87,20 @@ typedef struct _nyx_info_t u32 errors; } nyx_info_t; +typedef struct _nyx_info_ex_t +{ + u32 magic; + u32 rsvd_flags; +} nyx_info_ex_t; + typedef struct _nyx_storage_t { u32 version; u32 cfg; - u8 irama[0x8000]; + u8 rsdv0[0x8000]; u8 hekate[0x30000]; - u8 rsvd[SZ_8M - sizeof(nyx_info_t)]; + nyx_info_ex_t info_ex; + u8 rsvd1[SZ_8M - sizeof(nyx_info_ex_t) - sizeof(nyx_info_t)]; nyx_info_t info; minerva_str_t minerva; } nyx_storage_t;