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.

BUG=b:215615970
TEST=Able to compile the Google/Kano board using the emerge command.

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: Ib3f197c851dc4b445dbf64868c3f9157a4f6c9fe
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3737570
Auto-Submit: Subrata Banik <subratabanik@chromium.org>
Commit-Queue: Yu-Ping Wu <yupingso@chromium.org>
Tested-by: Subrata Banik <subratabanik@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
3 files changed