Fix fuse_get_hardware_type for 4.x

This commit is contained in:
TuxSH 2018-03-07 23:24:38 +01:00
parent d5bb96c0f8
commit a409016a88
2 changed files with 4 additions and 3 deletions

View File

@ -185,7 +185,8 @@ uint32_t fuse_get_hardware_type(void) {
if (mkey_get_revision() >= MASTERKEY_REVISION_400_CURRENT) {
static const uint32_t types[] = {0,1,4,3};
hardware_type |= ((FUSE_CHIP_REGS->FUSE_RESERVED_ODM[4] >> 14) & 0x3C) - 1;
hardware_type |= (FUSE_CHIP_REGS->FUSE_RESERVED_ODM[4] >> 14) & 0x3C;
hardware_type--;
return hardware_type > 3 ? 4 : types[hardware_type];
} else {
if (hardware_type >= 1) {

View File

@ -204,8 +204,8 @@ void call_smc_handler(uint32_t handler_id, smc_args_t *args) {
int num_called = atomic_fetch_add(&g_num_smcs_called, 1);
/* DEBUG: use num_called to determine panic behavior. */
if (num_called == 0x30) {
/* panic(COLOR_F); */
if (num_called == 0x21A) {
panic(COLOR_F);
}
/* Call function. */