Install: Hekate 8GB after copy (fuse >4GiB), dram_fuse helper, RAM test target
All checks were successful
Build / Build (push) Successful in 14s
All checks were successful
Build / Build (push) Successful in 14s
- Add dram_fuse.c/h for shared fuse-to-MiB mapping - After successful update/clean install copy: if hekate_8gb.bin exists and fuse reports more than 4 GiB, copy to sd:/payload.bin and sd:/bootloader/update.bin, then remove source; otherwise remove helper only - Makefile: make ram-test builds output/RAM-Test.bin (tools/ram_test_main.c) Made-with: Cursor
This commit is contained in:
46
source/dram_fuse.c
Normal file
46
source/dram_fuse.c
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* DRAM capacity from fuse (SKU), not physical probe.
|
||||
*/
|
||||
|
||||
#include "dram_fuse.h"
|
||||
#include <soc/fuse.h>
|
||||
#include <soc/hw_init.h>
|
||||
#include <soc/t210.h>
|
||||
|
||||
static int mariko_dram_mib(u32 dram_id)
|
||||
{
|
||||
switch (dram_id) {
|
||||
case 9:
|
||||
case 13:
|
||||
case 18:
|
||||
case 21:
|
||||
case 23:
|
||||
case 28:
|
||||
return 8192;
|
||||
default:
|
||||
if (dram_id >= 3 && dram_id <= 28)
|
||||
return 4096;
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
static int erista_dram_mib(u32 dram_id)
|
||||
{
|
||||
if (dram_id == 4)
|
||||
return 6144;
|
||||
if (dram_id <= 6)
|
||||
return 4096;
|
||||
return -1;
|
||||
}
|
||||
|
||||
int dram_capacity_mib_from_fuse(void)
|
||||
{
|
||||
u32 nid = fuse_read_dramid(false);
|
||||
u32 chip = hw_get_chip_id();
|
||||
|
||||
if (chip == GP_HIDREV_MAJOR_T210)
|
||||
return erista_dram_mib(nid);
|
||||
if (chip == GP_HIDREV_MAJOR_T210B01)
|
||||
return mariko_dram_mib(nid);
|
||||
return -1;
|
||||
}
|
||||
Reference in New Issue
Block a user