diff options
author | Jack Rosenthal <jrosenth@chromium.org> | 2022-06-27 14:44:15 -0600 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-07-01 10:21:12 +0000 |
commit | 380d1637e9240a6d2cfb8b45e4439c675524a9ba (patch) | |
tree | f81e031ea174fbbac6a1d84c34cbd2dc13768362 /core | |
parent | 8e4516c7c3de7a2eb72a02c2788bc0f5bab575de (diff) | |
download | chrome-ec-380d1637e9240a6d2cfb8b45e4439c675524a9ba.tar.gz |
core/minute-ia/panic.c: Format with clang-format
BUG=b:236386294
BRANCH=none
TEST=none
Change-Id: I977c77cb483c73846e13fbc19234bdd11aea6904
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3729856
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Diffstat (limited to 'core')
-rw-r--r-- | core/minute-ia/panic.c | 33 |
1 files changed, 12 insertions, 21 deletions
diff --git a/core/minute-ia/panic.c b/core/minute-ia/panic.c index b4299d9e17..598e0e91bb 100644 --- a/core/minute-ia/panic.c +++ b/core/minute-ia/panic.c @@ -57,13 +57,12 @@ void panic_data_print(const struct panic_data *pdata) else if (pdata->x86.vector <= 20) panic_printf("Reason: %s\n", panic_reason[pdata->x86.vector]); else if (panic_sw_reason_is_valid(pdata->x86.vector)) { - panic_printf("Software panic reason %s\n", - panic_sw_reasons[pdata->x86.vector - - PANIC_SW_BASE]); + panic_printf( + "Software panic reason %s\n", + panic_sw_reasons[pdata->x86.vector - PANIC_SW_BASE]); panic_printf("Software panic info 0x%x\n", pdata->x86.error_code); - } - else + } else panic_printf("Interrupt vector number: 0x%08X (unknown)\n", pdata->x86.vector); panic_printf("\n"); @@ -91,12 +90,8 @@ void panic_data_print(const struct panic_data *pdata) * order pushed to the stack by hardware: see "Intel 64 and IA-32 * Architectures Software Developer's Manual", Volume 3A, Figure 6-4. */ -void exception_panic( - uint32_t vector, - uint32_t error_code, - uint32_t eip, - uint32_t cs, - uint32_t eflags) +void exception_panic(uint32_t vector, uint32_t error_code, uint32_t eip, + uint32_t cs, uint32_t eflags) { /* * If a panic were to occur during the reset procedure, we want @@ -176,26 +171,22 @@ void exception_panic( __builtin_unreachable(); } -noreturn -void software_panic(uint32_t reason, uint32_t info) +noreturn void software_panic(uint32_t reason, uint32_t info) { uint16_t code_segment; /* Get the current code segment */ - __asm__ volatile ("movw %%cs, %0":"=m" (code_segment)); + __asm__ volatile("movw %%cs, %0" : "=m"(code_segment)); - exception_panic(reason, - info, - (uint32_t)__builtin_return_address(0), - code_segment, - 0); + exception_panic(reason, info, (uint32_t)__builtin_return_address(0), + code_segment, 0); __builtin_unreachable(); } void panic_set_reason(uint32_t reason, uint32_t info, uint8_t exception) { - struct panic_data * const pdata = get_panic_data_write(); + struct panic_data *const pdata = get_panic_data_write(); /* Setup panic data structure */ memset(pdata, 0, CONFIG_PANIC_DATA_SIZE); @@ -212,7 +203,7 @@ void panic_set_reason(uint32_t reason, uint32_t info, uint8_t exception) void panic_get_reason(uint32_t *reason, uint32_t *info, uint8_t *exception) { - struct panic_data * const pdata = panic_get_data(); + struct panic_data *const pdata = panic_get_data(); if (pdata && pdata->struct_version == 2) { *reason = pdata->x86.vector; |