projects
/
platform
/
kernel
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
configs: migrate CONFIG_VIDEO_BMP_RLE8 to defconfigs
[platform/kernel/u-boot.git]
/
include
/
avb_verify.h
diff --git
a/include/avb_verify.h
b/include/avb_verify.h
index
428c69a
..
1e787ba
100644
(file)
--- a/
include/avb_verify.h
+++ b/
include/avb_verify.h
@@
-9,20
+9,36
@@
#define _AVB_VERIFY_H
#include <../lib/libavb/libavb.h>
#define _AVB_VERIFY_H
#include <../lib/libavb/libavb.h>
+#include <mapmem.h>
#include <mmc.h>
#include <mmc.h>
-#define ALLOWED_BUF_ALIGN 8
+#define AVB_MAX_ARGS 1024
+#define VERITY_TABLE_OPT_RESTART "restart_on_corruption"
+#define VERITY_TABLE_OPT_LOGGING "ignore_corruption"
+#define ALLOWED_BUF_ALIGN 8
+
+enum avb_boot_state {
+ AVB_GREEN,
+ AVB_YELLOW,
+ AVB_ORANGE,
+ AVB_RED,
+};
struct AvbOpsData {
struct AvbOps ops;
int mmc_dev;
struct AvbOpsData {
struct AvbOps ops;
int mmc_dev;
+ enum avb_boot_state boot_state;
+#ifdef CONFIG_OPTEE_TA_AVB
+ struct udevice *tee;
+ u32 session;
+#endif
};
struct mmc_part {
int dev_num;
struct mmc *mmc;
struct blk_desc *mmc_blk;
};
struct mmc_part {
int dev_num;
struct mmc *mmc;
struct blk_desc *mmc_blk;
-
disk_partition_t
info;
+
struct disk_partition
info;
};
enum mmc_io_type {
};
enum mmc_io_type {
@@
-33,6
+49,12
@@
enum mmc_io_type {
AvbOps *avb_ops_alloc(int boot_device);
void avb_ops_free(AvbOps *ops);
AvbOps *avb_ops_alloc(int boot_device);
void avb_ops_free(AvbOps *ops);
+char *avb_set_state(AvbOps *ops, enum avb_boot_state boot_state);
+char *avb_set_enforce_verity(const char *cmdline);
+char *avb_set_ignore_corruption(const char *cmdline);
+
+char *append_cmd_line(char *cmdline_orig, char *cmdline_new);
+
/**
* ============================================================================
* I/O helper inline functions
/**
* ============================================================================
* I/O helper inline functions
@@
-50,12
+72,12
@@
static inline uint64_t calc_offset(struct mmc_part *part, int64_t offset)
static inline size_t get_sector_buf_size(void)
{
static inline size_t get_sector_buf_size(void)
{
- return (size_t)CONFIG_
FASTBOOT
_BUF_SIZE;
+ return (size_t)CONFIG_
AVB
_BUF_SIZE;
}
static inline void *get_sector_buf(void)
{
}
static inline void *get_sector_buf(void)
{
- return
(void *)CONFIG_FASTBOOT_BUF_ADDR
;
+ return
map_sysmem(CONFIG_AVB_BUF_ADDR, CONFIG_AVB_BUF_SIZE)
;
}
static inline bool is_buf_unaligned(void *buffer)
}
static inline bool is_buf_unaligned(void *buffer)