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

Unified Diff: src/platform/vboot_reference/vboot_firmware/include/load_kernel_fw.h

Issue 2327002: Initial LoadKernel() implementation. (Closed) Base URL: ssh://gitrw.chromium.org/chromiumos
Patch Set: Created 10 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: src/platform/vboot_reference/vboot_firmware/include/load_kernel_fw.h
diff --git a/src/platform/vboot_reference/vboot_firmware/include/load_kernel_fw.h b/src/platform/vboot_reference/vboot_firmware/include/load_kernel_fw.h
index 1c7ed0714f37a04d526a4f312a2aee09f71cc0ff..f34d53112ec7a4c16f44909f7d973cdfab5966fa 100644
--- a/src/platform/vboot_reference/vboot_firmware/include/load_kernel_fw.h
+++ b/src/platform/vboot_reference/vboot_firmware/include/load_kernel_fw.h
@@ -18,17 +18,21 @@
#define LOAD_KERNEL_NOT_FOUND 1
#define LOAD_KERNEL_INVALID 2
+/* Boot modes for LoadKernel() */
+#define BOOT_MODE_NORMAL 0
+#define BOOT_MODE_DEVELOPER 1
+#define BOOT_MODE_RECOVERY 2
+
typedef struct LoadKernelParams {
/* Inputs to LoadKernel() */
+ void *header_sign_key_blob; /* Key blob used to sign the kernel header */
uint64_t bytes_per_lba; /* Bytes per lba sector on current device */
uint64_t ending_lba; /* Last addressable lba sector on current
* device */
void *kernel_buffer; /* Destination buffer for kernel
* (normally at 0x100000) */
uint64_t kernel_buffer_size; /* Size of kernel buffer in bytes */
- uint8_t in_developer_mode; /* Did device boot in developer mode?
- * 0 = normal or recovery mode
- * 1 = developer mode */
+ uint8_t boot_mode; /* Boot mode */
/* Outputs from LoadKernel(); valid only if LoadKernel() returns
* LOAD_KERNEL_SUCCESS */
@@ -38,7 +42,7 @@ typedef struct LoadKernelParams {
uint64_t bootloader_size; /* Size of bootloader image in bytes */
} LoadKernelParams;
-uint64_t LoadKernel(LoadKernelParams* params);
+int LoadKernel(LoadKernelParams* params);
/* Attempts to load the kernel from the current device.
*
* Returns LOAD_KERNEL_SUCCESS if successful, error code on failure. */

Powered by Google App Engine
This is Rietveld 408576698