disk: Improve performance on UEFI
This commit is contained in:
parent
c5dfd77fba
commit
c67d70d3bf
|
@ -443,8 +443,13 @@ void disk_create_index(void) {
|
||||||
block->sect_count = drive->Media->LastBlock + 1;
|
block->sect_count = drive->Media->LastBlock + 1;
|
||||||
block->max_partition = -1;
|
block->max_partition = -1;
|
||||||
|
|
||||||
// TODO: get fastest xfer size also for UEFI?
|
if (drive->Revision >= EFI_BLOCK_IO_PROTOCOL_REVISION3) {
|
||||||
block->fastest_xfer_size = 8;
|
block->fastest_xfer_size = drive->Media->OptimalTransferLengthGranularity;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (block->fastest_xfer_size == 0) {
|
||||||
|
block->fastest_xfer_size = 64;
|
||||||
|
}
|
||||||
|
|
||||||
if (gpt_get_guid(&block->guid, block)) {
|
if (gpt_get_guid(&block->guid, block)) {
|
||||||
block->guid_valid = true;
|
block->guid_valid = true;
|
||||||
|
|
Loading…
Reference in New Issue