UEFI: remove .._BOOTED_FROM_IMAGE, alwasy use ..HARD_DISK

BOOT_VOLUME_BOOTED_FROM_IMAGE is for booting from floppy images
(or CD equivalent) where you can't provide all details.
BOOT_METHOD_CD is also for when all you know that it is a "disc".

UEFI can always give partition offset and checksum, so we can
use BOOT_METHOD_HARD_DISK directly.

Change-Id: Iede9beef2f00eadd7883be0a739caf4eb11969c1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3820
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
This commit is contained in:
Fredrik Holmqvist 2021-03-23 20:24:11 +01:00
parent 45872f7f9c
commit 552e0ac095

View File

@ -37,7 +37,6 @@ class EfiDevice : public Node
return (fBlockIo->Media->LastBlock + 1) * BlockSize(); }
uint32 BlockSize() const { return fBlockIo->Media->BlockSize; }
bool ReadOnly() const { return fBlockIo->Media->ReadOnly; }
private:
efi_block_io_protocol* fBlockIo;
};
@ -215,9 +214,8 @@ platform_register_boot_device(Node *device)
offset);
}
gBootVolume.SetInt32(BOOT_METHOD, efiDevice->ReadOnly() ? BOOT_METHOD_CD:
BOOT_METHOD_HARD_DISK);
gBootVolume.SetBool(BOOT_VOLUME_BOOTED_FROM_IMAGE, efiDevice->ReadOnly());
// ...HARD_DISK, as we pick partition and have checksum (no need to use _CD)
gBootVolume.SetInt32(BOOT_METHOD, BOOT_METHOD_HARD_DISK);
gBootVolume.SetData(BOOT_VOLUME_DISK_IDENTIFIER, B_RAW_TYPE,
&identifier, sizeof(disk_identifier));