fuse: Add get odm keygen type

This commit is contained in:
CTCaer 2020-06-14 14:10:29 +03:00
parent 273f11cd59
commit ae7ef7d79a
4 changed files with 18 additions and 0 deletions

View file

@ -60,6 +60,14 @@ u32 fuse_read_odm(u32 idx)
return FUSE(FUSE_RESERVED_ODMX(idx));
}
u32 fuse_read_odm_keygen_rev()
{
if ((fuse_read_odm(4) & 0x800) && fuse_read_odm(0) == 0x8E61ECAE && fuse_read_odm(1) == 0xF2BA3BB2)
return (fuse_read_odm(2) & 0x1F);
return 0;
}
void fuse_wait_idle()
{
u32 ctrl;

View file

@ -77,6 +77,7 @@
void fuse_disable_program();
u32 fuse_read_odm(u32 idx);
u32 fuse_read_odm_keygen_rev();
void fuse_wait_idle();
int fuse_read_ipatch(void (*ipatch)(u32 offset, u32 value));
int fuse_read_evp_thunk(u32 *iram_evp_thunks, u32 *iram_evp_thunks_len);

View file

@ -60,6 +60,14 @@ u32 fuse_read_odm(u32 idx)
return FUSE(FUSE_RESERVED_ODMX(idx));
}
u32 fuse_read_odm_keygen_rev()
{
if ((fuse_read_odm(4) & 0x800) && fuse_read_odm(0) == 0x8E61ECAE && fuse_read_odm(1) == 0xF2BA3BB2)
return (fuse_read_odm(2) & 0x1F);
return 0;
}
void fuse_wait_idle()
{
u32 ctrl;

View file

@ -77,6 +77,7 @@
void fuse_disable_program();
u32 fuse_read_odm(u32 idx);
u32 fuse_read_odm_keygen_rev();
void fuse_wait_idle();
int fuse_read_ipatch(void (*ipatch)(u32 offset, u32 value));
int fuse_read_evp_thunk(u32 *iram_evp_thunks, u32 *iram_evp_thunks_len);