Merge Android 13 QPR1 am: 17d98471e3 am: b314d986e7
Original change: https://android-review.googlesource.com/c/platform/external/nos/host/generic/+/2336947
Change-Id: I2aaa96dd4f2bbffb8146cd784023fc9a6befc8cc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/nugget/include/app_nugget.h b/nugget/include/app_nugget.h
index cd8bf33..cbeac47 100644
--- a/nugget/include/app_nugget.h
+++ b/nugget/include/app_nugget.h
@@ -299,15 +299,15 @@
uint32_t inv; /* must equal ~type when setting */
} __packed;
-#define NUGGET_PARAM_GET_EVENT_RECORD 0x0010
+#define NUGGET_PARAM_GET_EVENT_REPORT 0x0010
/*
- * This retrieves one pending event_record (defined in citadel_events.h).
+ * This retrieves one pending event_report (defined in citadel_events.h).
* If none are pending, it returns nothing.
*
* @param args <none>
* @param arg_len 0
- * @param reply struct event_record
- * @param reply_len sizeof struct event_record OR 0
+ * @param reply struct event_report
+ * @param reply_len sizeof struct event_report OR 0
*/
#define NUGGET_PARAM_AP_IS_REBOOTING 0x0011
@@ -564,6 +564,16 @@
* @param reply <none>
* @param reply_len 0
*/
+#define NUGGET_PARAM_GET_BIG_EVENT_REPORT 0x001b
+/*
+ * This retrieves one pending big_event_report (defined in citadel_events.h).
+ * If none are pending, it returns nothing.
+ *
+ * @param args <none>
+ * @param arg_len 0
+ * @param reply struct big_event_report
+ * @param reply_len sizeof struct big_event_report OR 0
+ */
/****************************************************************************/
/* Test related commands */
diff --git a/nugget/include/citadel_events.h b/nugget/include/citadel_events.h
index 24babee..00780ad 100644
--- a/nugget/include/citadel_events.h
+++ b/nugget/include/citadel_events.h
@@ -31,7 +31,7 @@
* When Citadel needs to tell the AP something without waiting to be asked, the
* process is as follows:
*
- * 1. Citadel adds an event_record to its internal queue, then asserts
+ * 1. Citadel adds an event_report to its internal queue, then asserts
* the CTDL_AP_IRQ signal to notify the AP.
*
* 2. The AP (citadeld) requests pending events from Citadel until they've
@@ -59,12 +59,14 @@
* Add to the list, but NEVER change or delete existing entries.
*/
enum event_id {
- EVENT_NONE = 0, // Unused ID, used as empty marker.
- EVENT_ALERT = 1, // Globalsec alert fired.
- EVENT_REBOOTED = 2, // Device rebooted.
- EVENT_UPGRADED = 3, // Device has upgraded.
- EVENT_ALERT_V2 = 4, // Globalsec Alertv2 fired
+ EVENT_NONE = 0, // Unused ID, used as empty marker.
+ EVENT_ALERT = 1, // Globalsec alert fired.
+ EVENT_REBOOTED = 2, // Device rebooted.
+ EVENT_UPGRADED = 3, // Device has upgraded.
+ EVENT_ALERT_V2 = 4, // Globalsec Alertv2 fired
EVENT_SEC_CH_STATE = 5, // Update GSA-GSC secure channel state.
+ EVENT_V1_NO_SUPPORT =
+ 6 // Report a VXX event that can't fit in struct event_report.
};
/*
@@ -76,9 +78,17 @@
UPGRADE_EN_FW_FAIL =2,
};
+/*
+ * Big event header flags.
+ */
+enum hdr_flags {
+ HDR_FLAG_EMPTY_SLOT = 0, // Used to determine empty slot.
+ HDR_FLAG_OCCUPIED_SLOT = 1 // Used to indicate an occupied slot.
+};
+
/* Please do not change the size of this struct */
-#define EVENT_RECORD_SIZE 64
-struct event_record {
+#define EVENT_REPORT_SIZE 64
+struct event_report {
uint64_t reset_count; /* zeroed by Citadel power cycle */
uint64_t uptime_usecs; /* since last Citadel reset */
uint32_t id;
@@ -117,9 +127,23 @@
} event;
} __packed;
/* Please do not change the size of this struct */
-static_assert(sizeof(struct event_record) == EVENT_RECORD_SIZE,
+static_assert(sizeof(struct event_report) == EVENT_REPORT_SIZE,
"Muting the Immutable");
+struct big_event_report {
+ struct hdr {
+ /* Redundant w.r.t. to v1 event records */
+ uint64_t reset_count;
+ uint64_t uptime_usecs;
+ uint32_t priority;
+
+ uint8_t version;
+ uint8_t flags;
+ uint16_t length;
+ } hdr;
+ uint8_t data[384];
+} __packed;
+
#ifdef __cplusplus
}
#endif