Make LoadKernel() pass back the kernel partition's UniqueGuid.

LoadKernel already returns the partition number for the selected kernel.
This change makes it also return the GPT Entry's UniqueGuid, which will
eventually be passed to the kernel itself, so the kernel can determine which
of several possible devices it has booted from. It doesn't know for certain
because the BIOS and the kernel may enumerate the devices in a different
order.

BUG=chromium-os:4984

Review URL: http://codereview.chromium.org/3056014
This commit is contained in:
Bill Richardson
2010-07-23 17:22:25 -07:00
parent e272940ec5
commit 5deb67f225
6 changed files with 33 additions and 3 deletions

View File

@@ -44,6 +44,7 @@ typedef struct LoadKernelParams {
* (1...M) */
uint64_t bootloader_address; /* Address of bootloader image in RAM */
uint64_t bootloader_size; /* Size of bootloader image in bytes */
uint8_t partition_guid[16]; /* UniquePartitionGuid for boot partition */
} LoadKernelParams;
int LoadKernel(LoadKernelParams* params);
@@ -62,6 +63,7 @@ typedef struct KernelBootloaderOptions {
uint64_t original_address; /* Absolute bootloader start adddress,
* as returned from LoadKernel() in
* LoadKernelParams.bootloader_start */
uint8_t partition_guid[16]; /* UniquePartitionGuid for boot partition */
} KernelBootloaderOptions;