summaryrefslogtreecommitdiffstats
path: root/src/arch/riscv/include/arch/smp/smp.h
blob: 353f8f5f36a2f45edf696cfc1221cf74a720cdb8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* SPDX-License-Identifier: GPL-2.0-only */
/* This file is part of the coreboot project. */

#ifndef _RISCV_SMP_H
#define _RISCV_SMP_H

/*
 * This function is used to pause smp. Only the hart with hartid equal
 * to working_hartid can be returned from smp_pause, other harts will
 * enter halt and wait for wakeup
 */
void smp_pause(int working_hartid);

/*
 * This function is used to wake up the harts that are halted by the
 * smp_pause function. And this function will not return, all hart will
 * jump to fn execution, and arg is the argument of the function fn.
 */
void smp_resume(void (*fn)(void *), void *arg);

#endif