mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2026-06-13 15:03:58 +03:00
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>
This commit is contained in:
@@ -26,6 +26,7 @@ struct udevice;
|
||||
* @glob_head: Head for the global list of all bootflows across all bootdevs
|
||||
* @bootmeth_count: Number of bootmeth devices in @bootmeth_order
|
||||
* @bootmeth_order: List of bootmeth devices to use, in order, NULL-terminated
|
||||
* @vbe_bootmeth: Currently selected VBE bootmeth, NULL if none
|
||||
*/
|
||||
struct bootstd_priv {
|
||||
const char **prefixes;
|
||||
@@ -35,6 +36,7 @@ struct bootstd_priv {
|
||||
struct list_head glob_head;
|
||||
int bootmeth_count;
|
||||
struct udevice **bootmeth_order;
|
||||
struct udevice *vbe_bootmeth;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
48
include/vbe.h
Normal file
48
include/vbe.h
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user