blob: 59c27cf6e83c8e455bd8290d32aea6620a6ca101 [file] [log] [blame]
Daisuke Nojiri6b5c4e92016-05-06 12:32:38 -07001/* Copyright 2016 The Chromium OS Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file.
4 */
5
6#ifndef VBOOT_REFERENCE_FIRMWARE_BDB_SECRETS_H_
7#define VBOOT_REFERENCE_FIRMWARE_BDB_SECRETS_H_
8
9#define BDB_SECRET_SIZE 32
Daisuke Nojiri7fbebd92016-05-06 12:32:38 -070010#define BDB_CONSTANT_BLOCK_SIZE 64
11
Daisuke Nojiri7fbebd92016-05-06 12:32:38 -070012enum bdb_secret_type {
13 BDB_SECRET_TYPE_WSR,
14 BDB_SECRET_TYPE_NVM_WP,
15 BDB_SECRET_TYPE_NVM_RW,
16 BDB_SECRET_TYPE_BDB,
17 BDB_SECRET_TYPE_BOOT_VERIFIED,
18 BDB_SECRET_TYPE_BOOT_PATH,
19 BDB_SECRET_TYPE_BUC,
20 BDB_SECRET_TYPE_COUNT, /* Last entry. Add new secrets before this. */
21};
Daisuke Nojiri6b5c4e92016-05-06 12:32:38 -070022
23/*
Daisuke Nojiri626e0b02016-09-12 12:47:14 -070024 * Struct storing BDB secrets passed between SP-RO and SP-RW.
Daisuke Nojiri6b5c4e92016-05-06 12:32:38 -070025 */
Daisuke Nojiri626e0b02016-09-12 12:47:14 -070026struct bdb_secrets {
Daisuke Nojiri6b5c4e92016-05-06 12:32:38 -070027 uint8_t nvm_rw[BDB_SECRET_SIZE];
28 uint8_t bdb[BDB_SECRET_SIZE];
29 uint8_t boot_verified[BDB_SECRET_SIZE];
30 uint8_t boot_path[BDB_SECRET_SIZE];
Daisuke Nojiri626e0b02016-09-12 12:47:14 -070031 uint8_t nvm_wp[BDB_SECRET_SIZE];
Daisuke Nojiri6b5c4e92016-05-06 12:32:38 -070032 uint8_t buc[BDB_SECRET_SIZE];
33};
34
35#endif