diff options
author | Che-Liang Chiou <clchiou@chromium.org> | 2011-06-15 16:35:52 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2011-08-29 10:39:28 -0700 |
commit | be0a258c41b2e9824ded36665a4933761f0881c9 (patch) | |
tree | f29a0bfb83811b9bea925131b15a09f757bf6b80 /include | |
parent | 3a353a4470384f7098fad8530b2b45af188943be (diff) |
CHROMIUM: [5/6] refactor for onestop; simplify load kernel process
* simplify load kernel process
* update document
BUG=chromium-os:16508
TEST=manual; see first commit
Change-Id: Id17bfc537991b11547d98a9f92a9eff31cfdba7c
Reviewed-on: http://gerrit.chromium.org/gerrit/2739
Tested-by: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/chromeos/load_kernel_helper.h | 46 |
1 files changed, 17 insertions, 29 deletions
diff --git a/include/chromeos/load_kernel_helper.h b/include/chromeos/load_kernel_helper.h index 4870b6f2675..803a88786b0 100644 --- a/include/chromeos/load_kernel_helper.h +++ b/include/chromeos/load_kernel_helper.h @@ -12,38 +12,26 @@ #define CHROMEOS_LOAD_KERNEL_HELPER_H_ #include <linux/types.h> - -#include <load_kernel_fw.h> #include <vboot_nvstorage.h> -/* - * Wrapper of LoadKernel() function. Returns the return value of LoadKernel(). - * - * See vboot_reference/firmware/include/load_kernel_fw.h for documentation. +/** + * This loads and verifies the kernel image on storage device that is specified + * by set_bootdev. The caller of this functions must have called set_bootdev + * first. * - * If <shared_data_blob> is NULL, it will use a system default location. - */ -int load_kernel_wrapper(LoadKernelParams *params, - void *gbb_data, uint64_t gbb_size, uint64_t boot_flags, - VbNvContext *nvcxt, uint8_t *shared_data_blob); - -/* - * Actual wrapper implementation. Most callers invoke it with - * 'bypass_load_kernel' set to False. If it is set to True - the shared memory - * is intialized, but the actual kernel load function is not invoked. This - * facilitates debugging when the kernel is loaded by some other means (for - * instance netbooted) - */ -int load_kernel_wrapper_core(LoadKernelParams *params, void *gbb_data, - uint64_t gbb_size, uint64_t boot_flags, - VbNvContext *nvcxt, uint8_t *shared_data_blob, - int bypass_load_kernel); - -/* - * Call load_kernel_wrapper and boot the loaded kernel if load_kernel_wrapper - * returns success. + * @param boot_flags are bitwise-or'ed of flags in load_kernel_fw.h + * @param gbb_data points to a GBB blob + * @param gbb_size is the size of the GBB blob + * @param vbshared_data points to VbSharedData blob + * @param vbshared_size is the size of the VbSharedData blob + * @param nvcxt points to a VbNvContext object + * @return error codes, e.g., LOAD_KERNEL_INVALID if either the verification + * fails or the kernel is not bootable; otherwise, this function + * boots the kernel and never returns to its caller */ -int load_and_boot_kernel(void *gbb_data, uint64_t gbb_size, - uint64_t boot_flags); +int boot_kernel(uint64_t boot_flags, + void *gbb_data, uint32_t gbb_size, + void *vbshared_data, uint32_t vbshared_size, + VbNvContext *nvcxt); #endif /* CHROMEOS_LOAD_KERNEL_HELPER_H_ */ |