2021-03-02 10:24:14 +08:00
|
|
|
/*
|
2022-04-05 18:59:24 +08:00
|
|
|
* Copyright (C) 2018 Intel Corporation.
|
2021-03-02 10:24:14 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
*/
|
|
|
|
|
2021-04-23 15:50:57 +08:00
|
|
|
#include <asm/cpu.h>
|
|
|
|
#include <asm/irq.h>
|
2021-03-02 10:24:14 +08:00
|
|
|
#include <debug/dump.h>
|
|
|
|
|
|
|
|
void dispatch_exception(struct intr_excp_ctx *ctx)
|
|
|
|
{
|
|
|
|
uint16_t pcpu_id = get_pcpu_id();
|
|
|
|
|
|
|
|
/* Dump exception context */
|
|
|
|
dump_exception(ctx, pcpu_id);
|
|
|
|
|
|
|
|
/* Halt the CPU */
|
|
|
|
cpu_dead();
|
|
|
|
}
|