summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChing-Kang Yen <chingkang@google.com>2023-04-17 15:05:47 +0800
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-04-18 08:00:35 +0000
commit23ab98d4b8a2a36d7f310953cb45622a8b72ed47 (patch)
tree98004042e382a713401d085b034a29341fd49420
parentdb9be1a89bcc74a12e804760a93db5c193ab57ce (diff)
downloadchrome-ec-23ab98d4b8a2a36d7f310953cb45622a8b72ed47.tar.gz
cr50: separate ap_ro_status
Move ap_ro_status to ap_ro_status.h from ap_ro_integrity_check.h so that we could have enum ap_ro_status exposed to trunks and tpm_manager. BUG=b:275524662 TEST=make buildall -j Change-Id: Ibe0a6ef5de1fe63d9bb0a677b5902857109251fb Signed-off-by: Ching-Kang Yen <chingkang@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4431682 Commit-Queue: Ching-Kang Yen <chingkang@chromium.org> Tested-by: Ching-Kang Yen <chingkang@chromium.org> Reviewed-by: Mary Ruthven <mruthven@chromium.org>
-rw-r--r--include/ap_ro_integrity_check.h34
-rw-r--r--include/ap_ro_status.h43
2 files changed, 44 insertions, 33 deletions
diff --git a/include/ap_ro_integrity_check.h b/include/ap_ro_integrity_check.h
index feb7c56b4e..ac86f54c5e 100644
--- a/include/ap_ro_integrity_check.h
+++ b/include/ap_ro_integrity_check.h
@@ -7,40 +7,8 @@
#define __CR50_INCLUDE_AP_RO_INTEGRITY_CHECK_H
#include "flash_log.h"
+#include "ap_ro_status.h"
-enum ap_ro_status {
- /* All AP RO Verification V1 statuses are less than 20 */
- AP_RO_NOT_RUN = 0,
- AP_RO_PASS_UNVERIFIED_GBB = 1,
- AP_RO_FAIL = 2,
- AP_RO_UNSUPPORTED_UNKNOWN = 3, /* Deprecated */
- AP_RO_UNSUPPORTED_NOT_TRIGGERED = 4,
- AP_RO_UNSUPPORTED_TRIGGERED = 5,
- AP_RO_PASS = 6,
- AP_RO_IN_PROGRESS = 7,
- /* All AP RO Verification V2 status are 20 or greater */
- AP_RO_V2_SUCCESS = 20,
- AP_RO_V2_FAILED_VERIFICATION = 21,
- AP_RO_V2_INCONSISTENT_GSCVD = 22,
- AP_RO_V2_INCONSISTENT_KEYBLOCK = 23,
- AP_RO_V2_INCONSISTENT_KEY = 24,
- AP_RO_V2_SPI_READ = 25,
- AP_RO_V2_UNSUPPORTED_CRYPTO_ALGORITHM = 26,
- AP_RO_V2_VERSION_MISMATCH = 27,
- AP_RO_V2_OUT_OF_MEMORY = 28,
- AP_RO_V2_INTERNAL = 29,
- AP_RO_V2_TOO_BIG = 30,
- AP_RO_V2_MISSING_GSCVD = 31,
- AP_RO_V2_BOARD_ID_MISMATCH = 32,
- AP_RO_V2_SETTING_NOT_PROVISIONED = 33,
- /*
- * Do not use values 34 and 35. They are ambiguous depending on
- * ti50 FW version.
- */
- AP_RO_V2_NON_ZERO_GBB_FLAGS = 36,
- AP_RO_V2_WRONG_ROOT_KEY = 37,
- AP_RO_V2_UNKNOWN = 255,
-};
/*
* validate_ap_ro: based on information saved in an H1 RO flash page verify
* contents of the AP flash. Hold the EC in reset if verification fails.
diff --git a/include/ap_ro_status.h b/include/ap_ro_status.h
new file mode 100644
index 0000000000..6f3dcb02f7
--- /dev/null
+++ b/include/ap_ro_status.h
@@ -0,0 +1,43 @@
+/* Copyright 2023 The ChromiumOS Authors
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ *
+ */
+#ifndef __CR50_INCLUDE_AP_RO_STATUS_H
+#define __CR50_INCLUDE_AP_RO_STATUS_H
+
+enum ap_ro_status {
+ /* All AP RO Verification V1 statuses are less than 20 */
+ AP_RO_NOT_RUN = 0,
+ AP_RO_PASS_UNVERIFIED_GBB = 1,
+ AP_RO_FAIL = 2,
+ AP_RO_UNSUPPORTED_UNKNOWN = 3, /* Deprecated */
+ AP_RO_UNSUPPORTED_NOT_TRIGGERED = 4,
+ AP_RO_UNSUPPORTED_TRIGGERED = 5,
+ AP_RO_PASS = 6,
+ AP_RO_IN_PROGRESS = 7,
+ /* All AP RO Verification V2 status are 20 or greater */
+ AP_RO_V2_SUCCESS = 20,
+ AP_RO_V2_FAILED_VERIFICATION = 21,
+ AP_RO_V2_INCONSISTENT_GSCVD = 22,
+ AP_RO_V2_INCONSISTENT_KEYBLOCK = 23,
+ AP_RO_V2_INCONSISTENT_KEY = 24,
+ AP_RO_V2_SPI_READ = 25,
+ AP_RO_V2_UNSUPPORTED_CRYPTO_ALGORITHM = 26,
+ AP_RO_V2_VERSION_MISMATCH = 27,
+ AP_RO_V2_OUT_OF_MEMORY = 28,
+ AP_RO_V2_INTERNAL = 29,
+ AP_RO_V2_TOO_BIG = 30,
+ AP_RO_V2_MISSING_GSCVD = 31,
+ AP_RO_V2_BOARD_ID_MISMATCH = 32,
+ AP_RO_V2_SETTING_NOT_PROVISIONED = 33,
+ /*
+ * Do not use values 34 and 35. They are ambiguous depending on
+ * ti50 FW version.
+ */
+ AP_RO_V2_NON_ZERO_GBB_FLAGS = 36,
+ AP_RO_V2_WRONG_ROOT_KEY = 37,
+ AP_RO_V2_UNKNOWN = 255,
+};
+
+#endif /* ! __CR50_INCLUDE_AP_RO_STATUS_H */