Use 64-bit LBAs
Logical block addresses for UEFI disks are required to be 64-bit
to cope with large storage devices. Block storage components were
using 32-bit LBAs. This commit aligns block storage with UEFI.
Signed-off-by: Julian Hall <julian.hall@arm.com>
Change-Id: I9489d3df14f908a0642099d874a9fd73a66e5db6
diff --git a/protocols/service/block_storage/packed-c/messages.h b/protocols/service/block_storage/packed-c/messages.h
index fc17d79..2155889 100644
--- a/protocols/service/block_storage/packed-c/messages.h
+++ b/protocols/service/block_storage/packed-c/messages.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022, Arm Limited and Contributors. All rights reserved.
+ * Copyright (c) 2022-2023, Arm Limited and Contributors. All rights reserved.
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -34,7 +34,7 @@
/* Mandatory fixed sized output parameters */
struct __attribute__ ((__packed__)) ts_block_storage_get_partition_info_out
{
- uint32_t num_blocks;
+ uint64_t num_blocks;
uint32_t block_size;
uint8_t partition_guid[TS_BLOCK_STORAGE_GUID_OCTET_LEN];
uint8_t parent_guid[TS_BLOCK_STORAGE_GUID_OCTET_LEN];
@@ -83,7 +83,7 @@
struct __attribute__ ((__packed__)) ts_block_storage_read_in
{
uint64_t handle;
- uint32_t lba;
+ uint64_t lba;
uint32_t offset;
uint32_t len;
};
@@ -100,7 +100,7 @@
struct __attribute__ ((__packed__)) ts_block_storage_write_in
{
uint64_t handle;
- uint32_t lba;
+ uint64_t lba;
uint32_t offset;
};
@@ -122,7 +122,7 @@
struct __attribute__ ((__packed__)) ts_block_storage_erase_in
{
uint64_t handle;
- uint32_t begin_lba;
+ uint64_t begin_lba;
uint32_t num_blocks;
};