summaryrefslogtreecommitdiff
path: root/libcpu/aarch64/common/psci_api.h
blob: 36566c3e6fcefa320d8ea1db446cc6cf30a04d6a (plain)
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
26
27
28
29
30
31
32
33
34
/*
 * Copyright (c) 2006-2022, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 */
#ifndef __PSCI_API_H__
#define __PSCI_API_H__

#include <rthw.h>
#include <rtthread.h>
#include <stdint.h>
#include "psci_api.h"

/** generic psci ops supported v0.1 v0.2 v1.0 v1.1 */
struct psci_ops_t
{
    uint32_t (*get_version)(void);
    int32_t (*cpu_suspend)(uint32_t state, unsigned long entry_point);
    int32_t (*cpu_off)(uint32_t state);
    int32_t (*cpu_on)(unsigned long cpuid, unsigned long entry_point);
    int32_t (*migrate)(unsigned long cpuid);

    void (*system_off)(void);
    void (*system_reset)(void);
};

extern struct psci_ops_t psci_ops;

extern int psci_init(void);

#endif // __PSCI_API_H__