bdk: fuse: allow overriding dram id fuses

This should be set before running sdram init.
fuse_read_dramid(true) will still return the real id.
This commit is contained in:
CTCaer
2025-11-27 12:04:12 +02:00
parent 364465399e
commit 4a24956f3a
2 changed files with 15 additions and 0 deletions

View File

@@ -89,6 +89,14 @@ u32 fuse_read_odm_keygen_rev()
return 0; return 0;
} }
static bool _dramid_8gb = false;
void fuse_force_8gb_dramid()
{
// Override fuse DRAM ID with a 8GB ID.
_dramid_8gb = true;
}
u32 fuse_read_dramid(bool raw_id) u32 fuse_read_dramid(bool raw_id)
{ {
bool tegra_t210 = hw_get_chip_id() == GP_HIDREV_MAJOR_T210; bool tegra_t210 = hw_get_chip_id() == GP_HIDREV_MAJOR_T210;
@@ -107,11 +115,17 @@ u32 fuse_read_dramid(bool raw_id)
{ {
if (dramid > 7) if (dramid > 7)
dramid = 0; dramid = 0;
if (_dramid_8gb)
dramid = 7;
} }
else else
{ {
if (dramid > 34) if (dramid > 34)
dramid = 8; dramid = 8;
if (_dramid_8gb)
dramid = 28;
} }
return dramid; return dramid;

View File

@@ -311,6 +311,7 @@ enum
void fuse_disable_program(); void fuse_disable_program();
u32 fuse_read_odm(u32 idx); u32 fuse_read_odm(u32 idx);
u32 fuse_read_odm_keygen_rev(); u32 fuse_read_odm_keygen_rev();
void fuse_force_8gb_dramid();
u32 fuse_read_dramid(bool raw_id); u32 fuse_read_dramid(bool raw_id);
u32 fuse_read_hw_state(); u32 fuse_read_hw_state();
u32 fuse_read_hw_type(); u32 fuse_read_hw_type();