summaryrefslogtreecommitdiffhomepage
path: root/src/coreboot-cpu-api.c
blob: 2f104c4069935e2ae49598d09baf1ebbc47bfabd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/* -------------------------------------------

    Copyright (C) 2024, Amlal EL Mahrouss, all rights reserved.

------------------------------------------- */

#include <lib/boot.h>

/// @brief Restarts the computer.
/// @param none.
void mp_restart_machine(void)
{
#ifdef __COMPILE_RISCV__
	volatile uint32_t* brd_pwr = (volatile uint32_t*)0x100000;
	*brd_pwr				   = 0x7777; // send reboot signal from DMA.

	while (1)
	{
		asm volatile("wfi");
	}
#endif
}