summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorHsin-Te Yuan <yuanhsinte@google.com>2022-07-14 17:22:21 +0800
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2022-08-03 08:25:01 +0000
commitb671c3553d0e2a596db2dddbf8042441c11cc6ab (patch)
treec22927a5f2e08d1712c666206e1a4ac2d3ef673d /firmware
parent18cb85b52d689b4cfbd49c6384ae2088b78af1e0 (diff)
downloadvboot-b671c3553d0e2a596db2dddbf8042441c11cc6ab.tar.gz
vboot_api.h: Remove VbExDiskGetInfo and VbExDiskFreeInfo
VbExDiskGetInfo and VbDiskFreeInfo are removed. Also, remove VB2_DISK_FLAG_REMOVABLE and VB2_DISK_FLAG_FIXED since depthcharge doesn't need them anymore. BUG=b:172339016 BRANCH=none TEST=make runtests TEST=make test-screenshot TEST=FW_NAME=tomato emerge-cherry depthcharge Cq-Depend: chromium:3760812 Signed-off-by: Hsin-Te Yuan <yuanhsinte@google.com> Change-Id: I30d142508992b8c634ab4f919cc1b1b1edb23f14 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3762078 Reviewed-by: Hsuan Ting Chen <roccochen@chromium.org> Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
Diffstat (limited to 'firmware')
-rw-r--r--firmware/2lib/include/2api.h25
-rw-r--r--firmware/include/vboot_api.h28
-rw-r--r--firmware/stub/vboot_api_stub_disk.c20
3 files changed, 0 insertions, 73 deletions
diff --git a/firmware/2lib/include/2api.h b/firmware/2lib/include/2api.h
index 23af95d8..79283c25 100644
--- a/firmware/2lib/include/2api.h
+++ b/firmware/2lib/include/2api.h
@@ -824,31 +824,6 @@ struct vb2_kernel_params {
#define VB2_DISK_FLAG_SELECT_MASK 0xffff
#define VB2_DISK_FLAG_ATTRIBUTE_MASK (0xffff << 16)
-/* Disk is removable. Example removable disks: SD cards, USB keys. */
-#define VB2_DISK_FLAG_REMOVABLE (1 << 0)
-/*
- * Disk is fixed. If this flag is present, disk is internal to the system and
- * not removable. Example fixed disks: internal SATA SSD, eMMC.
- */
-#define VB2_DISK_FLAG_FIXED (1 << 1)
-/*
- * Note that VB2_DISK_FLAG_REMOVABLE and VB2_DISK_FLAG_FIXED are
- * mutually-exclusive for a single disk. VbExDiskGetInfo() may specify both
- * flags to request disks of both types in a single call.
- *
- * At some point we could specify additional flags, but we don't currently
- * have a way to make use of these:
- *
- * USB Device is known to be attached to USB. Note that the SD
- * card reader inside x86 systems is attached to USB so this
- * isn't super useful.
- * SD Device is known to be a SD card. Note that external card
- * readers might not return this information, so also of
- * questionable use.
- * READ_ONLY Device is known to be read-only. Could be used by recovery
- * when processing read-only recovery image.
- */
-
/*
* Disks are used in two ways:
* - As a random-access device to read and write the GPT
diff --git a/firmware/include/vboot_api.h b/firmware/include/vboot_api.h
index 4059accb..c2fc0ad6 100644
--- a/firmware/include/vboot_api.h
+++ b/firmware/include/vboot_api.h
@@ -40,34 +40,6 @@ typedef struct VbSharedDataHeader VbSharedDataHeader;
/* Disk access (previously in boot_device.h) */
/**
- * Store information into [info] for all disks (storage devices) attached to
- * the system which match all of the disk_flags.
- *
- * On output, count indicates how many disks are present, and [infos_ptr]
- * points to a [count]-sized array of vb2_disk_info structs with the information
- * on those disks; this pointer must be freed by calling VbExDiskFreeInfo().
- * If count=0, infos_ptr may point to NULL. If [infos_ptr] points to NULL
- * because count=0 or error, it is not necessary to call VbExDiskFreeInfo().
- *
- * A multi-function device (such as a 4-in-1 card reader) should provide
- * multiple disk handles.
- *
- * The firmware must not alter or free the list pointed to by [infos_ptr] until
- * VbExDiskFreeInfo() is called.
- */
-vb2_error_t VbExDiskGetInfo(struct vb2_disk_info **infos_ptr, uint32_t *count,
- uint32_t disk_flags);
-
-/**
- * Free a disk information list [infos] previously returned by
- * VbExDiskGetInfo(). If [preserve_handle] != NULL, the firmware must ensure
- * that handle remains valid after this call; all other handles from the info
- * list need not remain valid after this call.
- */
-vb2_error_t VbExDiskFreeInfo(struct vb2_disk_info *infos,
- vb2ex_disk_handle_t preserve_handle);
-
-/**
* Read lba_count LBA sectors, starting at sector lba_start, from the disk,
* into the buffer.
*
diff --git a/firmware/stub/vboot_api_stub_disk.c b/firmware/stub/vboot_api_stub_disk.c
index dd24c21d..b09388e8 100644
--- a/firmware/stub/vboot_api_stub_disk.c
+++ b/firmware/stub/vboot_api_stub_disk.c
@@ -15,25 +15,6 @@
#include "2common.h"
#include "vboot_api.h"
-
-__attribute__((weak))
-vb2_error_t VbExDiskGetInfo(struct vb2_disk_info **infos_ptr, uint32_t *count,
- uint32_t disk_flags)
-{
- *infos_ptr = NULL;
- *count = 0;
- return VB2_SUCCESS;
-}
-
-
-__attribute__((weak))
-vb2_error_t VbExDiskFreeInfo(struct vb2_disk_info *infos_ptr,
- vb2ex_disk_handle_t preserve_handle)
-{
- return VB2_SUCCESS;
-}
-
-
__attribute__((weak))
vb2_error_t VbExDiskRead(vb2ex_disk_handle_t handle, uint64_t lba_start,
uint64_t lba_count, void* buffer)
@@ -41,7 +22,6 @@ vb2_error_t VbExDiskRead(vb2ex_disk_handle_t handle, uint64_t lba_start,
return VB2_SUCCESS;
}
-
__attribute__((weak))
vb2_error_t VbExDiskWrite(vb2ex_disk_handle_t handle, uint64_t lba_start,
uint64_t lba_count, const void* buffer)