mirror of
https://github.com/CTCaer/hekate.git
synced 2024-11-26 11:42:09 +00:00
Use bit_count for burnt fuses counting
This commit is contained in:
parent
539caf3d83
commit
432d4a4ffa
3 changed files with 5 additions and 4 deletions
|
@ -61,7 +61,7 @@ void print_fuseinfo()
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
gfx_printf("Sdram ID: %d\n", fuse_read_dramid(true));
|
gfx_printf("Sdram ID: %d\n", fuse_read_dramid(true));
|
||||||
gfx_printf("Burnt fuses: %d / 64\n", fuse_count_burnt(fuse_read_odm(7)));
|
gfx_printf("Burnt fuses: %d / 64\n", bit_count(fuse_read_odm(7)));
|
||||||
gfx_printf("Secure key: %08X%08X%08X%08X\n\n\n",
|
gfx_printf("Secure key: %08X%08X%08X%08X\n\n\n",
|
||||||
byte_swap_32(FUSE(FUSE_PRIVATE_KEY0)), byte_swap_32(FUSE(FUSE_PRIVATE_KEY1)),
|
byte_swap_32(FUSE(FUSE_PRIVATE_KEY0)), byte_swap_32(FUSE(FUSE_PRIVATE_KEY1)),
|
||||||
byte_swap_32(FUSE(FUSE_PRIVATE_KEY2)), byte_swap_32(FUSE(FUSE_PRIVATE_KEY3)));
|
byte_swap_32(FUSE(FUSE_PRIVATE_KEY2)), byte_swap_32(FUSE(FUSE_PRIVATE_KEY3)));
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
#include <soc/t210.h>
|
#include <soc/t210.h>
|
||||||
#include <storage/nx_sd.h>
|
#include <storage/nx_sd.h>
|
||||||
#include <utils/aarch64_util.h>
|
#include <utils/aarch64_util.h>
|
||||||
|
#include <utils/util.h>
|
||||||
|
|
||||||
extern hekate_config h_cfg;
|
extern hekate_config h_cfg;
|
||||||
|
|
||||||
|
@ -355,7 +356,7 @@ int pkg1_warmboot_config(void *hos_ctxt, u32 warmboot_base)
|
||||||
u32 pa_id;
|
u32 pa_id;
|
||||||
u32 fuses_max = 32; // Current ODM7 max.
|
u32 fuses_max = 32; // Current ODM7 max.
|
||||||
u32 fuses_fw = ctxt->pkg1_id->fuses;
|
u32 fuses_fw = ctxt->pkg1_id->fuses;
|
||||||
u8 burnt_fuses = fuse_count_burnt(fuse_read_odm(7));
|
u8 burnt_fuses = bit_count(fuse_read_odm(7));
|
||||||
|
|
||||||
// Save current warmboot in storage cache (MWS) and check if another one is needed.
|
// Save current warmboot in storage cache (MWS) and check if another one is needed.
|
||||||
if (!ctxt->warmboot)
|
if (!ctxt->warmboot)
|
||||||
|
|
|
@ -686,8 +686,8 @@ static lv_res_t _create_window_fuses_info_status(lv_obj_t *btn)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Count burnt fuses.
|
// Count burnt fuses.
|
||||||
u8 burnt_fuses_7 = fuse_count_burnt(fuse_read_odm(7));
|
u8 burnt_fuses_7 = bit_count(fuse_read_odm(7));
|
||||||
u8 burnt_fuses_6 = fuse_count_burnt(fuse_read_odm(6));
|
u8 burnt_fuses_6 = bit_count(fuse_read_odm(6));
|
||||||
|
|
||||||
switch (burnt_fuses_7)
|
switch (burnt_fuses_7)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue