| /* |
| * Copyright 2016 Google Inc. |
| * |
| * See file CREDITS for list of people who contributed to this |
| * project. |
| * |
| * This program is free software; you can redistribute it and/or |
| * modify it under the terms of the GNU General Public License as |
| * published by the Free Software Foundation; either version 2 of |
| * the License, or (at your option) any later version. |
| * |
| * This program is distributed in the hope that it will be useful, |
| * but without any warranty; without even the implied warranty of |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| * GNU General Public License for more details. |
| * |
| * You should have received a copy of the GNU General Public License |
| * along with this program; if not, write to the Free Software |
| * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
| * MA 02111-1307 USA |
| */ |
| |
| #ifndef __VBOOT_BOARD_H__ |
| #define __VBOOT_BOARD_H__ |
| |
| #include "drivers/storage/storage.h" |
| |
| // Whether write protect was enabled at boot time. |
| int board_flag_write_protect(void); |
| // Whether recovery mode was requested. |
| int board_flag_recovery(void); |
| // Whether developer mode was requested/enabled. |
| int board_flag_developer_mode(void); |
| // Whether the EC is running the RW portion of its firmware. |
| int board_flag_ec_in_rw(void); |
| |
| /* |
| * This group of functions return storage objects which provide access to |
| * different bits of information which are needed during boot. These might |
| * be additional pieces of firmware, or blocks of data like the GBB which |
| * firmware acts on. The storage objects should be combined together to |
| * abstract away the actual media storing the data, and any data structures |
| * which map out the media into smaller components. |
| */ |
| |
| StorageOps *board_storage_ec_a(int devidx); |
| StorageOps *board_storage_ec_b(int devidx); |
| StorageOps *board_storage_ec_hash_a(int devidx); |
| StorageOps *board_storage_ec_hash_b(int devidx); |
| StorageOps *board_storage_fwid_rwa(void); |
| StorageOps *board_storage_fwid_rwb(void); |
| StorageOps *board_storage_fwid_ro(void); |
| StorageOps *board_storage_gbb(void); |
| StorageOps *board_storage_legacy(void); |
| StorageOps *board_storage_main_fw_a(void); |
| StorageOps *board_storage_main_fw_b(void); |
| StorageOps *board_storage_nv_scratch(void); |
| StorageOps *board_storage_vblock_a(void); |
| StorageOps *board_storage_vblock_b(void); |
| StorageOps *board_storage_vboot_nvstorage(void); |
| StorageOps *board_storage_verified_a(void); |
| StorageOps *board_storage_verified_b(void); |
| |
| int board_storage_locale_count(uint32_t *count); |
| typedef enum { |
| IMAGE_ARROW_LEFT, |
| IMAGE_ARROW_RIGHT, |
| IMAGE_BAD_SD, |
| IMAGE_BAD_USB, |
| IMAGE_CHROME_LOGO, |
| IMAGE_DEV_MODE, |
| IMAGE_DIVIDER_TOP, |
| IMAGE_DIVIDER_BOTTOM, |
| IMAGE_FOR_HELP_LEFT, |
| IMAGE_ICON_VERIFICATION_OFF, |
| IMAGE_ICON_VERIFICATION_ON, |
| IMAGE_ICON_WARNING, |
| IMAGE_INSERT, |
| IMAGE_LANGUAGE, |
| IMAGE_MODEL, |
| IMAGE_OS_BROKEN, |
| IMAGE_REBOOT_ERASE, |
| IMAGE_REMOVE, |
| IMAGE_REMOVE_DEVICES, |
| IMAGE_TO_DEV, |
| IMAGE_TO_NORM, |
| IMAGE_UPDATE, |
| IMAGE_URL, |
| IMAGE_VERIFICIATION_OFF, |
| IMAGE_VERIFICATION_ON, |
| IMAGE_YUCK, |
| IMAGE_MAX_INDEX, |
| } BoardImageIdx; |
| StorageOps *board_storage_image(BoardImageIdx idx); |
| StorageOps *board_storage_image_locale(uint32_t locale, BoardImageIdx idx); |
| StorageOps *board_storage_glyph(char c); |
| |
| #endif /* __VBOOT_BOARD_H__ */ |