blob: 7d5d362da506c72328b1d1923685996f443f33c7 [file] [log] [blame]
// Copyright Microsoft and CHERIoT Contributors.
// SPDX-License-Identifier: MIT
#pragma once
#ifdef SIMULATION
# include <stdint.h>
static void platform_simulation_exit(uint32_t code)
{
# ifdef IBEX_SAFE
// If we didn't exit with to-host, try writing a non-ASCII character to the
// UART. This is how we exit the CHERIoT Ibex simulator for the SAFE
// platform.
MMIO_CAPABILITY(Uart, uart)->blocking_write(0x80 + code);
# endif
}
#endif