forked from keystone-enclave/sm
-
Notifications
You must be signed in to change notification settings - Fork 1
/
cpu.h
25 lines (21 loc) · 658 Bytes
/
cpu.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
//******************************************************************************
// Copyright (c) 2018, The Regents of the University of California (Regents).
// All Rights Reserved. See LICENSE for license details.
//------------------------------------------------------------------------------
#ifndef __CPU_H__
#define __CPU_H__
#include "sm.h"
#include "enclave.h"
#define MAX_HARTS 16
/* hart state for regulating SBI */
struct cpu_state
{
int is_enclave;
enclave_id eid;
};
/* external functions */
int cpu_is_enclave_context();
int cpu_get_enclave_id();
void cpu_enter_enclave_context(enclave_id eid);
void cpu_exit_enclave_context();
#endif