Skip to content

Commit 4829a79

Browse files
committed
vc/dasharo/options.c: Temporarily remove HMRFPO enabling in FUM
Uncomment the HMRFPO enabling code, as it issues a global reset, which corrupts capsule update data. Consider re-enabling this code once capsule-on-disk is implemented. Upstream-Status: Inappropriate [Dasharo downstream] Change-Id: I2dc0384360c1028d547c572f47f8a767abc61fe2 Signed-off-by: Michał Kopeć <[email protected]>
1 parent ebdff81 commit 4829a79

File tree

1 file changed

+46
-46
lines changed

1 file changed

+46
-46
lines changed

src/vendorcode/dasharo/options.c

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -223,45 +223,45 @@ bool dma_protection_enabled(void)
223223
}
224224

225225
#if CONFIG(SOC_INTEL_COMMON_BLOCK_CSE)
226-
static void disable_me_hmrfpo(uint8_t *var)
227-
{
228-
int hmrfpo_sts = cse_hmrfpo_get_status();
229-
230-
if (hmrfpo_sts == -1) {
231-
printk (BIOS_DEBUG, "ME HMRFPO Get Status failed\n");
232-
goto hmrfpo_error;
233-
}
234-
235-
printk (BIOS_DEBUG, "ME HMRFPO status: ");
236-
switch (hmrfpo_sts) {
237-
case 0:
238-
printk (BIOS_DEBUG, "DISABLED\n");
239-
if (cse_hmrfpo_enable() != CB_SUCCESS)
240-
goto hmrfpo_error;
241-
else
242-
do_global_reset(); /* No return */
243-
break;
244-
case 1:
245-
printk (BIOS_DEBUG, "LOCKED\n");
246-
goto hmrfpo_error;
247-
case 2:
248-
printk (BIOS_DEBUG, "ENABLED\n");
249-
/* Override ME disable method to not switch ME mode */
250-
*var = ME_MODE_DISABLE_HMRFPO;
251-
/* TODO: disable HMRFPO here if not in FUM? Reboot disables HMRFPO. */
252-
break;
253-
default:
254-
printk (BIOS_DEBUG, "UNKNOWN\n");
255-
goto hmrfpo_error;
256-
}
257-
258-
return;
259-
260-
hmrfpo_error:
261-
/* Try other available methods if something goes wrong */
262-
*var = CONFIG(HAVE_INTEL_ME_HAP) ? ME_MODE_DISABLE_HAP
263-
: ME_MODE_DISABLE_HECI;
264-
}
226+
//static void disable_me_hmrfpo(uint8_t *var)
227+
//{
228+
// int hmrfpo_sts = cse_hmrfpo_get_status();
229+
//
230+
// if (hmrfpo_sts == -1) {
231+
// printk (BIOS_DEBUG, "ME HMRFPO Get Status failed\n");
232+
// goto hmrfpo_error;
233+
// }
234+
//
235+
// printk (BIOS_DEBUG, "ME HMRFPO status: ");
236+
// switch (hmrfpo_sts) {
237+
// case 0:
238+
// printk (BIOS_DEBUG, "DISABLED\n");
239+
// if (cse_hmrfpo_enable() != CB_SUCCESS)
240+
// goto hmrfpo_error;
241+
// else
242+
// do_global_reset(); /* No return */
243+
// break;
244+
// case 1:
245+
// printk (BIOS_DEBUG, "LOCKED\n");
246+
// goto hmrfpo_error;
247+
// case 2:
248+
// printk (BIOS_DEBUG, "ENABLED\n");
249+
// /* Override ME disable method to not switch ME mode */
250+
// *var = ME_MODE_DISABLE_HMRFPO;
251+
// /* TODO: disable HMRFPO here if not in FUM? Reboot disables HMRFPO. */
252+
// break;
253+
// default:
254+
// printk (BIOS_DEBUG, "UNKNOWN\n");
255+
// goto hmrfpo_error;
256+
// }
257+
//
258+
// return;
259+
//
260+
//hmrfpo_error:
261+
// /* Try other available methods if something goes wrong */
262+
// *var = CONFIG(HAVE_INTEL_ME_HAP) ? ME_MODE_DISABLE_HAP
263+
// : ME_MODE_DISABLE_HECI;
264+
//}
265265

266266
uint8_t cse_get_me_disable_mode(void)
267267
{
@@ -274,13 +274,13 @@ uint8_t cse_get_me_disable_mode(void)
274274
}
275275

276276
/* Disable ME via HMRPFO if in Firmware Update Mode */
277-
if (CONFIG(DASHARO_FIRMWARE_UPDATE_MODE) && fum) {
278-
/* Check if already in HMRFPO mode */
279-
if (cse_is_hfs1_com_secover_mei_msg())
280-
return ME_MODE_DISABLE_HMRFPO;
281-
else
282-
disable_me_hmrfpo(&var);
283-
}
277+
//if (CONFIG(DASHARO_FIRMWARE_UPDATE_MODE) && fum) {
278+
// /* Check if already in HMRFPO mode */
279+
// if (cse_is_hfs1_com_secover_mei_msg())
280+
// return ME_MODE_DISABLE_HMRFPO;
281+
// else
282+
// disable_me_hmrfpo(&var);
283+
//}
284284

285285
return var;
286286
}

0 commit comments

Comments
 (0)