1 /* Copyright 2020 The ChromiumOS Authors 2 * Use of this source code is governed by a BSD-style license that can be 3 * found in the LICENSE file. 4 * 5 */ 6 #ifndef __CR50_INCLUDE_AP_RO_INTEGRITY_CHECK_H 7 #define __CR50_INCLUDE_AP_RO_INTEGRITY_CHECK_H 8 9 #include "flash_log.h" 10 #include "ap_ro_status.h" 11 12 /* 13 * validate_ap_ro: based on information saved in an H1 RO flash page verify 14 * contents of the AP flash. Hold the EC in reset if verification fails. 15 */ 16 void validate_ap_ro(void); 17 18 /* 19 * ap_ro_add_flash_event: add a flash log event to keep track of AP RO 20 * verification attempt progress. 21 */ 22 void ap_ro_add_flash_event(enum ap_ro_verification_ev event); 23 24 /* 25 * ap_ro_board_id_blocked: Returns True if AP RO verification is disabled for 26 * the board's RLZ. 27 */ 28 int ap_ro_board_id_blocked(void); 29 30 /* 31 * ap_ro_device_reset: Clear AP RO verification state on a new boot. 32 */ 33 void ap_ro_device_reset(void); 34 35 /* 36 * Clear the AP RO result and release the EC from reset. This should only be 37 * done through a key combo. 38 */ 39 void ap_ro_clear_ec_rst_override(void); 40 41 #endif /* ! __CR50_INCLUDE_AP_RO_INTEGRITY_CHECK_H */ 42