diff options
author | Garret Kelly <gdk@google.com> | 2019-09-04 17:21:34 +0000 |
---|---|---|
committer | Garret Kelly <gdk@google.com> | 2019-09-04 17:21:34 +0000 |
commit | 24291a73fd5e817e95905c51d3e727e1483c9585 (patch) | |
tree | 90802fac75d82c810fa39f1369b46a7921f332a2 | |
parent | 617d97c731e37635cbb3e55b7b53c89acefc4432 (diff) | |
download | generic-24291a73fd5e817e95905c51d3e727e1483c9585.tar.gz |
Revert "Merge remote-tracking branch 'goog/upstream-qt-qpr1-pixel-dev' into MP-QT-QPR1-01"
This reverts commit 617d97c731e37635cbb3e55b7b53c89acefc4432.
Reason for revert: Broke AOSP merged build.
Change-Id: I540d4c5f237f8701fe526ed83945ec2e508fc8fe
-rw-r--r-- | .checkpatch.conf | 2 | ||||
-rw-r--r-- | citadel/updater/updater.cpp | 4 | ||||
-rw-r--r-- | nugget/include/citadel_events.h | 51 |
3 files changed, 22 insertions, 35 deletions
diff --git a/.checkpatch.conf b/.checkpatch.conf index f0db0f0..e8e9db6 100644 --- a/.checkpatch.conf +++ b/.checkpatch.conf @@ -5,5 +5,3 @@ --ignore FILE_PATH_CHANGES --ignore GIT_COMMIT_ID --ignore SPLIT_STRING ---ignore CONST_STRUCT ---ignore LEADING_SPACE diff --git a/citadel/updater/updater.cpp b/citadel/updater/updater.cpp index d14278a..93c0383 100644 --- a/citadel/updater/updater.cpp +++ b/citadel/updater/updater.cpp @@ -1018,8 +1018,8 @@ static uint32_t do_event(AppClient &app, int argc, char *argv[]) uint64_t usecs = evt.uptime_usecs - (secs * 1000000UL); printf("event record %" PRIu64 "/%" PRIu64 ".%06" PRIu64 ": ", evt.reset_count, secs, usecs); - printf("%d %d 0x%08x 0x%08x 0x%08x\n", evt.id, evt.priority, - evt.event.raw.w[0], evt.event.raw.w[1], evt.event.raw.w[2]); + printf("%d 0x%08x 0x%08x 0x%08x\n", evt.id, + evt.u.raw.w[0], evt.u.raw.w[1], evt.u.raw.w[2]); } return rv; diff --git a/nugget/include/citadel_events.h b/nugget/include/citadel_events.h index 154e638..336f3c5 100644 --- a/nugget/include/citadel_events.h +++ b/nugget/include/citadel_events.h @@ -44,58 +44,47 @@ extern "C" { * instead of changing things. */ -/* - * Event priority. Stored events of lower priority will be evicted to store - * higher-priority events if the queue is full. - */ -enum event_priority { - EVENT_PRIORITY_LOW = 0, - EVENT_PRIORITY_MEDIUM = 1, - EVENT_PRIORITY_HIGH = 2, -}; - -/* - * Event ID values live forever. - * 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. -}; - /* Please do not change the size of this struct */ #define EVENT_RECORD_SIZE 64 struct event_record { uint64_t reset_count; /* zeroed by Citadel power cycle */ uint64_t uptime_usecs; /* since last Citadel reset */ uint32_t id; - uint32_t priority; union { /* id-specific information goes here */ struct { uint32_t intr_sts[3]; } alert; struct { - uint32_t rstsrc; - uint32_t exitpd; - uint32_t which0; - uint32_t which1; - } rebooted; + uint32_t bad_thing; + } citadel; + struct { + uint32_t okay_thing; + } info; /* uninterpreted */ union { - uint32_t w[10]; - uint16_t h[20]; - uint8_t b[40]; + uint32_t w[11]; + uint16_t h[22]; + uint8_t b[44]; } raw; - } event; + } u; } __packed; /* Please do not change the size of this struct */ static_assert(sizeof(struct event_record) == EVENT_RECORD_SIZE, "Muting the Immutable"); +/* + * Event ID values live forever. + * Add to the list, but NEVER change or delete existing entries. +*/ +enum event_id { + EVENT_NONE = 0, /* No valid event exists with this ID */ + EVENT_ALERT = 1, /* Security alert reported */ + EVENT_CITADEL = 2, /* Bad: panic, stack overflow, etc. */ + EVENT_INFO = 3, /* FYI: normal reboot, etc. */ +}; + #ifdef __cplusplus } #endif |