vboot: Plumb the two disk sizes and 'gpt on device' param through

To support an external GPT, disks have two new attributes:
- A binary flag indicating whether the GPT is in the same address
  space as the payloads or a separate one.
- The number of sectors of the streaming portion of storage, as
  opposed to the portion containing the GPT.
These have been added elsewhere to GptData (in cgptlib) and BlockDev
(in depthcharge). This patch adds the plumbing between those, including
in the DiskInfo interface between the firmware and vboot.

BUG=chromium:425677
BRANCH=none
TEST=Interactively wrote the GPT with cgpt and observed the following
boot with depthcharge to read the GPT from SPI and then read from
the proper locations in NAND flash.
make runalltests passes.

Signed-off-by: Dan Ehrenberg <dehrenberg@chromium.org>
Change-Id: I5a77e417aea8ee9442d18c200d1b073aa5375ecf
Reviewed-on: https://chromium-review.googlesource.com/228943
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
This commit is contained in:
Dan Ehrenberg
2014-11-04 16:06:20 -08:00
committed by chrome-internal-fetch
parent e8dfacf141
commit 5040a945df
8 changed files with 53 additions and 15 deletions

View File

@@ -42,6 +42,10 @@ typedef struct LoadKernelParams {
uint64_t bytes_per_lba;
/* Last addressable lba sector on current device */
uint64_t ending_lba;
/* Random-access GPT size */
uint64_t gpt_lba_count;
/* External GPT */
uint8_t external_gpt; /* 1 = external, 0 = internal */
/* Destination buffer for kernel (normally at 0x100000) */
void *kernel_buffer;
/* Size of kernel buffer in bytes */