Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Side by Side Diff: firmware/include/gbb_header.h

Issue 3837007: Add maximum length constant for HWID, so it can be used by other utilities/firmware. (Closed) Base URL: http://git.chromium.org/git/vboot_reference.git
Patch Set: Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 /* Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. 3 * found in the LICENSE file.
4 * 4 *
5 * Data structure of Google Binary Block (GBB) 5 * Data structure of Google Binary Block (GBB)
6 */ 6 */
7 7
8 #ifndef VBOOT_REFERENCE_GBB_HEADER_H_ 8 #ifndef VBOOT_REFERENCE_GBB_HEADER_H_
9 #define VBOOT_REFERENCE_GBB_HEADER_H_ 9 #define VBOOT_REFERENCE_GBB_HEADER_H_
10 10
11 #include "sysincludes.h" 11 #include "sysincludes.h"
12 12
13 #define GBB_HEADER_SIZE (0x80) 13 #define GBB_HEADER_SIZE (0x80)
14 14
15 #define GBB_SIGNATURE "$GBB" 15 #define GBB_SIGNATURE "$GBB"
16 #define GBB_SIGNATURE_SIZE (4) 16 #define GBB_SIGNATURE_SIZE (4)
17 17
18 #define GBB_MAJOR_VER (0x01) 18 #define GBB_MAJOR_VER (0x01)
19 #define GBB_MINOR_VER (0x00) 19 #define GBB_MINOR_VER (0x00)
20 20
21 /* Maximum length of a HWID in bytes, counting terminating null. */
22 #define GBB_HWID_MAX_SIZE 256
23
21 #ifdef __cplusplus 24 #ifdef __cplusplus
22 extern "C" { 25 extern "C" {
23 #endif // __cplusplus 26 #endif // __cplusplus
24 27
25 typedef struct GoogleBinaryBlockHeader { 28 typedef struct GoogleBinaryBlockHeader {
26 uint8_t signature[GBB_SIGNATURE_SIZE]; // GBB_SIGNATURE "$GBB" 29 uint8_t signature[GBB_SIGNATURE_SIZE]; // GBB_SIGNATURE "$GBB"
27 uint16_t major_version; // see GBB_MAJOR_VER 30 uint16_t major_version; // see GBB_MAJOR_VER
28 uint16_t minor_version; // see GBB_MINOR_VER 31 uint16_t minor_version; // see GBB_MINOR_VER
29 uint32_t header_size; // size of GBB header in bytes 32 uint32_t header_size; // size of GBB header in bytes
30 uint32_t reserved; 33 uint32_t reserved;
31 34
32 uint32_t hwid_offset; // HWID offset from header 35 uint32_t hwid_offset; // HWID offset from header
33 uint32_t hwid_size; // HWID size in bytes 36 uint32_t hwid_size; // HWID size in bytes
34 uint32_t rootkey_offset; // Root Key offset from header 37 uint32_t rootkey_offset; // Root Key offset from header
35 uint32_t rootkey_size; // Root Key size in bytes 38 uint32_t rootkey_size; // Root Key size in bytes
36 uint32_t bmpfv_offset; // BMP FV offset from header 39 uint32_t bmpfv_offset; // BMP FV offset from header
37 uint32_t bmpfv_size; // BMP FV size in bytes 40 uint32_t bmpfv_size; // BMP FV size in bytes
38 uint32_t recovery_key_offset; // Recovery Key offset from header 41 uint32_t recovery_key_offset; // Recovery Key offset from header
39 uint32_t recovery_key_size; // Recovery Key size in bytes 42 uint32_t recovery_key_size; // Recovery Key size in bytes
40 43
41 uint8_t pad[80]; // to match GBB_HEADER_SIZE 44 uint8_t pad[80]; // to match GBB_HEADER_SIZE
42 } GoogleBinaryBlockHeader; 45 } GoogleBinaryBlockHeader;
43 46
44 #ifdef __cplusplus 47 #ifdef __cplusplus
45 } 48 }
46 #endif // __cplusplus 49 #endif // __cplusplus
47 50
48 #endif /* VBOOT_REFERENCE_GBB_HEADER_H_ */ 51 #endif /* VBOOT_REFERENCE_GBB_HEADER_H_ */
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698