blob: b94502f6efb5df0acbaa11cd05b6b70baca35d80 [file] [log] [blame]
Randall Spangler68f54d42013-01-25 15:05:08 -08001/* Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
Randall Spanglerd1836442010-06-10 09:59:04 -07002 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file.
4 *
5 * Data structure and API definitions for a verified boot kernel image.
6 * (Firmware Portion)
7 */
8
9#ifndef VBOOT_REFERENCE_VBOOT_KERNEL_H_
10#define VBOOT_REFERENCE_VBOOT_KERNEL_H_
11
Randall Spanglerd1836442010-06-10 09:59:04 -070012#include "cgptlib.h"
Dan Ehrenberg7c2beb02014-10-21 16:15:54 -070013#include "gpt_misc.h"
Simon Glass527ba812013-07-25 08:48:47 -060014#include "load_kernel_fw.h"
Randall Spanglere49e8af2011-07-08 13:03:32 -070015#include "vboot_api.h"
Randall Spanglerd1836442010-06-10 09:59:04 -070016
Randall Spanglere4136dc2016-10-27 14:34:59 -070017struct vb2_context;
Randall Spangler7f436692013-02-05 12:42:36 -080018
19/**
Randall Spanglere4136dc2016-10-27 14:34:59 -070020 * Attempt loading a kernel from the specified type(s) of disks.
21 *
Randall Spanglerb07b4b92018-01-04 17:58:01 -080022 * If successful, sets lkp.disk_handle to the disk for the kernel and returns
Joel Kitchingcf49e7b2019-07-29 18:51:00 +080023 * VB2_SUCCESS.
Randall Spanglere4136dc2016-10-27 14:34:59 -070024 *
25 * @param ctx Vboot context
Randall Spanglere4136dc2016-10-27 14:34:59 -070026 * @param get_info_flags Flags to pass to VbExDiskGetInfo()
Joel Kitching99b15d62019-07-30 10:36:00 +080027 * @return VB2_SUCCESS or the most specific VB2_ERROR_LK error.
Randall Spangler7f436692013-02-05 12:42:36 -080028 */
Joel Kitchinge6700f42019-07-31 14:12:30 +080029vb2_error_t VbTryLoadKernel(struct vb2_context *ctx, uint32_t get_info_flags);
Randall Spangler7f436692013-02-05 12:42:36 -080030
Randall Spanglerd1836442010-06-10 09:59:04 -070031#endif /* VBOOT_REFERENCE_VBOOT_KERNEL_H_ */