Chromium Code Reviews| Index: firmware/include/vboot_struct.h |
| diff --git a/firmware/include/vboot_struct.h b/firmware/include/vboot_struct.h |
| index ed83f3e7e5f73445cf917d2d4b1d5f09e20e8c6e..b1433ef0e26c8b11c768653ea4bebe974c117fe5 100644 |
| --- a/firmware/include/vboot_struct.h |
| +++ b/firmware/include/vboot_struct.h |
| @@ -1,4 +1,4 @@ |
| -/* Copyright (c) 2010-2011 The Chromium OS Authors. All rights reserved. |
| +/* Copyright (c) 2011 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. |
| * |
| @@ -131,6 +131,34 @@ typedef struct VbKernelPreambleHeader { |
| #define EXPECTED_VBKERNELPREAMBLEHEADER_SIZE 96 |
| +/* Data shared between LoadFirmware() and LoadKernel() */ |
| +typedef struct VbSharedDataHeader { |
| + /* Fields present in version 1 */ |
| + uint32_t struct_version; /* Version of this structure */ |
| + uint64_t struct_size; /* Size of this structure in bytes */ |
| + uint64_t data_size; /* Size of shared data buffer in bytes */ |
|
Bill Richardson
2011/03/09 20:52:20
So the idea is that a single big blob of memory is
Randall Spangler
2011/03/09 21:11:35
Done.
|
| + uint64_t data_used; /* Amount of shared data used */ |
| + |
| + VbPublicKey kernel_subkey; /* Kernel subkey, from firmware */ |
| + uint64_t kernel_subkey_data_offset; /* Offset of kernel subkey data from |
| + * start of this struct */ |
| + uint64_t kernel_subkey_data_size; /* Offset of kernel subkey data */ |
| + |
| + uint64_t flags; /* Flags */ |
| + |
| + /* After read-only firmware which uses version 1 is released, any additional |
| + * fields must be added below, and the struct version must be increased. |
| + * Before reading/writing those fields, make sure that the struct being |
| + * accessed is at least version 2. |
| + * |
| + * It's always ok for an older firmware to access a newer struct, since all |
| + * the fields it knows about are present. Newer firmware needs to use |
| + * reasonable defaults when accessing older structs. */ |
| + |
| +} __attribute__((packed)) VbSharedDataHeader; |
| + |
| +#define VB_SHARED_DATA_VERSION 1 /* Version for struct_version */ |
| + |
| __pragma(pack(pop)) /* Support packing for MSVC. */ |
| #endif /* VBOOT_REFERENCE_VBOOT_STRUCT_H_ */ |