firmware/2lib: Introduce `vb2api_get_fw_boot_info` API

This patch introduces a new API named `vb2api_get_fw_boot_info` to get
the FW slot information like tries, current boot slot, previous boot
slot, previous boot status and boot mode.

Additionally, moved the required data structures from 2api.h to newly
created 2info.h file to keep vboot information and inline functions
for coreboot/eventlog usage.

TEST=Able to compile the Google/Kano board using the emerge command.

Signed-off-by: Subrata Banik <>
Change-Id: Ib3f197c851dc4b445dbf64868c3f9157a4f6c9fe
Auto-Submit: Subrata Banik <>
Commit-Queue: Yu-Ping Wu <>
Tested-by: Subrata Banik <>
Reviewed-by: Julius Werner <>
3 files changed