apple: Nail down the EFI system partition

Now that we have a way to find the appropriate EFI system
partition on the internal NVMe storage, nail it down as the
preferred EFI system partition such that we can use it to
store EFI variables.  This allows multiple OS installations to
exist on Apple Silicon machines without interfering with eachother.

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
This commit is contained in:
Mark Kettenis 2023-05-02 20:46:52 +02:00
parent b2109c8d71
commit 0346b3f48c

View file

@ -820,8 +820,12 @@ static char *asahi_esp_devpart(void)
break;
}
if (part > 0)
if (part > 0) {
snprintf(devpart, sizeof(devpart), "%x:%x", devnum, part);
efi_system_partition.uclass_id = UCLASS_NVME;
efi_system_partition.devnum = devnum;
efi_system_partition.part = part;
}
return devpart;
}