summaryrefslogtreecommitdiff
path: root/include/vbe.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2022-07-30 15:52:32 -0600
committerTom Rini <trini@konsulko.com>2022-08-12 08:17:11 -0400
commit4c7418f3efbc0e193caa0f5af2b3d750af47854d (patch)
treeaa2327cb3542e93a1f78c580d832ec07e171be8b /include/vbe.h
parent98887ab802e4118e7c813e5e052678772fa1b3a8 (diff)
downloadu-boot-4c7418f3efbc0e193caa0f5af2b3d750af47854d.tar.gz
u-boot-4c7418f3efbc0e193caa0f5af2b3d750af47854d.tar.bz2
u-boot-4c7418f3efbc0e193caa0f5af2b3d750af47854d.zip
vbe: Add initial support for VBE
Create a new bootmeth for VBE along with a library to handle finding the VBE methods. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/vbe.h')
-rw-r--r--include/vbe.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/include/vbe.h b/include/vbe.h
new file mode 100644
index 0000000000..b83f6f0c51
--- /dev/null
+++ b/include/vbe.h
@@ -0,0 +1,48 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Verified Boot for Embedded (VBE) support
+ * See doc/develop/vbe.rst
+ *
+ * Copyright 2022 Google LLC
+ * Written by Simon Glass <sjg@chromium.org>
+ */
+
+#ifndef __VBE_H
+#define __VBE_H
+
+/**
+ * vbe_list() - List the VBE bootmeths
+ *
+ * This shows a list of the VBE bootmeth devices
+ *
+ * @return 0 (always)
+ */
+int vbe_list(void);
+
+/**
+ * vbe_find_by_any() - Find a VBE bootmeth by name or sequence
+ *
+ * @name: name (e.g. "vbe-simple"), or sequence ("2") to find
+ * @devp: returns the device found, on success
+ * Return: 0 if OK, -ve on error
+ */
+int vbe_find_by_any(const char *name, struct udevice **devp);
+
+/**
+ * vbe_find_first_device() - Find the first VBE bootmeth
+ *
+ * @devp: Returns first available VBE bootmeth, or NULL if none
+ * Returns: 0 (always)
+ */
+int vbe_find_first_device(struct udevice **devp);
+
+/**
+ * vbe_find_next_device() - Find the next available VBE bootmeth
+ *
+ * @devp: Previous device to start from. Returns next available VBE bootmeth,
+ * or NULL if none
+ * Returns: 0 (always)
+ */
+int vbe_find_next_device(struct udevice **devp);
+
+#endif