main: Check for SIP disable for proxy backdoor mode

Seems -v stopped being filtered (or never was?). Explicitly check boot
policy, so we don't depend on boot-args filtering directly (which can
change). -v still makes things verbose unconditionally, but the proxy
backdoor now requires that plus full SIP disable (sip0=127).

Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
Hector Martin 2022-07-30 10:54:33 +09:00
parent 4fd7b1cefd
commit 0c04783a86

View file

@ -65,7 +65,15 @@ void run_actions(void)
#ifndef BRINGUP #ifndef BRINGUP
#ifdef EARLY_PROXY_TIMEOUT #ifdef EARLY_PROXY_TIMEOUT
if (!cur_boot_args.video.display) { int node = adt_path_offset(adt, "/chosen/asmb");
u64 lp_sip0 = 0;
if (node >= 0) {
ADT_GETPROP(adt, node, "lp-sip0", &lp_sip0);
printf("Boot policy: sip0 = %ld\n", lp_sip0);
}
if (!cur_boot_args.video.display && lp_sip0 == 127) {
printf("Bringing up USB for early debug...\n"); printf("Bringing up USB for early debug...\n");
usb_init(); usb_init();