mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-11-26 19:25:02 +00:00
vboot2: Split vb2_guid into its own header file
This allows the api header to include it without pulling in the rest of the vboot2 internal structs. No functional changes; just moving a struct definition. BUG=chromium:423882 BRANCH=none TEST=VBOOT2=1 make runtests Change-Id: Ife9408f9b597939a3cc85a10d534108e12f2d739 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/229793 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
This commit is contained in:
committed by
chrome-internal-fetch
parent
ab89959180
commit
7c1eee09ef
@@ -22,6 +22,7 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include "2fw_hash_tags.h"
|
#include "2fw_hash_tags.h"
|
||||||
|
#include "2guid.h"
|
||||||
#include "2recovery_reasons.h"
|
#include "2recovery_reasons.h"
|
||||||
#include "2return_codes.h"
|
#include "2return_codes.h"
|
||||||
|
|
||||||
|
|||||||
42
firmware/2lib/include/2guid.h
Normal file
42
firmware/2lib/include/2guid.h
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
/* Copyright (c) 2014 The Chromium OS Authors. All rights reserved.
|
||||||
|
* Use of this source code is governed by a BSD-style license that can be
|
||||||
|
* found in the LICENSE file.
|
||||||
|
*
|
||||||
|
* GUID structure. Defined in appendix A of EFI standard.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef VBOOT_REFERENCE_VBOOT_2GUID_H_
|
||||||
|
#define VBOOT_REFERENCE_VBOOT_2GUID_H_
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#define UUID_NODE_LEN 6
|
||||||
|
#define GUID_SIZE 16
|
||||||
|
|
||||||
|
struct vb2_guid {
|
||||||
|
union {
|
||||||
|
struct {
|
||||||
|
uint32_t time_low;
|
||||||
|
uint16_t time_mid;
|
||||||
|
uint16_t time_high_and_version;
|
||||||
|
uint8_t clock_seq_high_and_reserved;
|
||||||
|
uint8_t clock_seq_low;
|
||||||
|
uint8_t node[UUID_NODE_LEN];
|
||||||
|
} uuid;
|
||||||
|
uint8_t raw[GUID_SIZE];
|
||||||
|
};
|
||||||
|
} __attribute__((packed));
|
||||||
|
|
||||||
|
#define EXPECTED_GUID_SIZE GUID_SIZE
|
||||||
|
|
||||||
|
/* Key GUIDs to use for VB2_SIG_NONE and hash algorithms */
|
||||||
|
|
||||||
|
#define VB2_GUID_NONE_SHA1 \
|
||||||
|
{{{0xcfb5687a,0x6092,0x11e4,0x96,0xe1,{0x8f,0x3b,0x1a,0x60,0xa2,0x1d}}}}
|
||||||
|
|
||||||
|
#define VB2_GUID_NONE_SHA256 \
|
||||||
|
{{{0x0e4114e0,0x6093,0x11e4,0x9d,0xcb,{0x8f,0x8a,0xf4,0xca,0x2e,0x32}}}}
|
||||||
|
|
||||||
|
#define VB2_GUID_NONE_SHA512 \
|
||||||
|
{{{0x1c695960,0x6093,0x11e4,0x82,0x63,{0xdb,0xee,0xe9,0x3c,0xcd,0x7e}}}}
|
||||||
|
|
||||||
|
#endif /* VBOOT_REFERENCE_VBOOT_2GUID_H_ */
|
||||||
@@ -10,38 +10,7 @@
|
|||||||
#define VBOOT_REFERENCE_VBOOT_2STRUCT_H_
|
#define VBOOT_REFERENCE_VBOOT_2STRUCT_H_
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
/****************************************************************************/
|
#include "2guid.h"
|
||||||
/* GUID structure. Defined in appendix A of EFI standard. */
|
|
||||||
|
|
||||||
#define UUID_NODE_LEN 6
|
|
||||||
#define GUID_SIZE 16
|
|
||||||
|
|
||||||
struct vb2_guid {
|
|
||||||
union {
|
|
||||||
struct {
|
|
||||||
uint32_t time_low;
|
|
||||||
uint16_t time_mid;
|
|
||||||
uint16_t time_high_and_version;
|
|
||||||
uint8_t clock_seq_high_and_reserved;
|
|
||||||
uint8_t clock_seq_low;
|
|
||||||
uint8_t node[UUID_NODE_LEN];
|
|
||||||
} uuid;
|
|
||||||
uint8_t raw[GUID_SIZE];
|
|
||||||
};
|
|
||||||
} __attribute__((packed));
|
|
||||||
|
|
||||||
#define EXPECTED_GUID_SIZE GUID_SIZE
|
|
||||||
|
|
||||||
/* Key GUIDs to use for VB2_SIG_NONE and hash algorithms */
|
|
||||||
|
|
||||||
#define VB2_GUID_NONE_SHA1 \
|
|
||||||
{{{0xcfb5687a,0x6092,0x11e4,0x96,0xe1,{0x8f,0x3b,0x1a,0x60,0xa2,0x1d}}}}
|
|
||||||
|
|
||||||
#define VB2_GUID_NONE_SHA256 \
|
|
||||||
{{{0x0e4114e0,0x6093,0x11e4,0x9d,0xcb,{0x8f,0x8a,0xf4,0xca,0x2e,0x32}}}}
|
|
||||||
|
|
||||||
#define VB2_GUID_NONE_SHA512 \
|
|
||||||
{{{0x1c695960,0x6093,0x11e4,0x82,0x63,{0xdb,0xee,0xe9,0x3c,0xcd,0x7e}}}}
|
|
||||||
|
|
||||||
/****************************************************************************/
|
/****************************************************************************/
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user