XenevaOS
Loading...
Searching...
No Matches
aa64cpu.h
Go to the documentation of this file.
32#ifndef __AA64_CPU_H__
33#define __AA64_CPU_H__
34
35#include <stdint.h>
36#include <aurora.h>
37#include <time.h>
38
39#define CPU_IMPLEMENTER_ARM 0x41
40#define CPU_IMPLEMENTER_BROADCOM 0x42
41#define CPU_IMPLEMENTER_CAVIUM 0x43
42#define CPU_IMPLEMENTER_FUJITSU 0x46
43#define CPU_IMPLEMENTER_INTEL 0x49
44#define CPU_IMPLEMENTER_APPLIED_MICRO 0x50
45#define CPU_IMPLEMENTER_QUALCOMM 0x51
46#define CPU_IMPLEMENTER_MARVELL 0x56
47#define CPU_IMPLEMENTER_APPLE 0x61
48
49//#pragma pack(push,1)
86//#pragma pack(pop)
87
88/* Saved immediately on exception entry, before any C code can use NEON/FP.
89 * The assembly wrappers place this frame directly below AA64Registers. */
90typedef struct AU_ALIGN(16) _aa64_fp_frame_ {
91 uint8_t q[32][16];
92 uint64_t fpcr;
93 uint64_t fpsr;
95
96#if defined(__cplusplus)
97static_assert(sizeof(AA64Registers) == 272, "AA64 register frame layout changed");
98static_assert(sizeof(AA64FpFrame) == 528, "AA64 FP frame layout changed");
99#else
100_Static_assert(sizeof(AA64Registers) == 272, "AA64 register frame layout changed");
101_Static_assert(sizeof(AA64FpFrame) == 528, "AA64 FP frame layout changed");
102#endif
103
104static inline AA64FpFrame* AA64ExceptionFpFrame(AA64Registers* regs) {
105 return (AA64FpFrame*)((uint8_t*)regs - sizeof(AA64FpFrame));
106}
107
111extern void AA64CpuInitialize();
112
117extern void AA64CPUPostInitialize(KERNEL_BOOT_INFO* info);
118
124
130
135extern void AuAA64SyscallHandler(AA64Registers* regs);
136
142extern void aa64_calculate_ticks(uint64_t seconds,
143 uint64_t subsec,
144 uint64_t* out_seconds,
145 uint64_t* out_subsec);
146
148#endif
#define AU_ALIGN(x)
Definition aurora.h:42
#define AU_EXTERN
Definition aurora.h:54
#define AU_EXPORT
Definition aurora.h:40
void AuAA64SyscallHandler(AA64Registers *regs)
AuAA64SyscalHandler – common system call handler for aarch64.
Definition systable.c:303
void AA64CpuInitialize()
AA64CpuInitialize – initialize aa64 cpu.
Definition aa64cpu.c:248
uint64_t AA64CPUGetFreqencyHz()
Definition aa64cpu.c:317
AU_EXTERN AU_EXPORT void AA64SleepUS(uint32_t us)
AA64SleepUS – sleep for sometimes.
Definition aa64cpu.c:232
struct _aa64_regs_ AA64Registers
AA64FpFrame
Definition aa64cpu.h:94
AU_EXTERN AU_EXPORT void AA64SleepMS(uint32_t ms)
AA64SleepMS – sleep for sometimes.
Definition aa64cpu.c:240
void AA64CPUPostInitialize(KERNEL_BOOT_INFO *info)
AA64CPUPostInitialize – initilaize post cpu requirements.
Definition aa64cpu.c:297
void aa64_calculate_ticks(uint64_t seconds, uint64_t subsec, uint64_t *out_seconds, uint64_t *out_subsec)
aa64_calculate_ticks – calculate the number of ticks from given milliseconds
Definition aa64cpu.c:207
unsigned int uint32_t
Definition acefiex.h:163
COMPILER_DEPENDENT_INT64 int64_t
Definition acefiex.h:164
unsigned char uint8_t
Definition acefiex.h:161
COMPILER_DEPENDENT_UINT64 uint64_t
Definition acefiex.h:165
Definition aurora.h:166
Definition aa64cpu.h:50
int64_t elr
Definition aa64cpu.h:51
int64_t x23
Definition aa64cpu.h:62
int64_t x2
Definition aa64cpu.h:81
int64_t x26
Definition aa64cpu.h:57
int64_t x25
Definition aa64cpu.h:60
int64_t x16
Definition aa64cpu.h:67
int64_t x18
Definition aa64cpu.h:65
int64_t spsr
Definition aa64cpu.h:52
int64_t x1
Definition aa64cpu.h:84
int64_t x17
Definition aa64cpu.h:68
int64_t x11
Definition aa64cpu.h:74
int64_t x21
Definition aa64cpu.h:64
int64_t x4
Definition aa64cpu.h:79
int64_t x3
Definition aa64cpu.h:82
int64_t x24
Definition aa64cpu.h:59
int64_t x13
Definition aa64cpu.h:72
int64_t x0
Definition aa64cpu.h:83
int64_t x7
Definition aa64cpu.h:78
int64_t x19
Definition aa64cpu.h:66
int64_t x5
Definition aa64cpu.h:80
int64_t x8
Definition aa64cpu.h:75
int64_t x10
Definition aa64cpu.h:73
int64_t x30
Definition aa64cpu.h:53
int64_t x14
Definition aa64cpu.h:69
int64_t x6
Definition aa64cpu.h:77
int64_t x20
Definition aa64cpu.h:63
int64_t x29
Definition aa64cpu.h:56
int64_t x9
Definition aa64cpu.h:76
int64_t x12
Definition aa64cpu.h:71
int64_t EL0SP
Definition aa64cpu.h:54
int64_t x27
Definition aa64cpu.h:58
int64_t x22
Definition aa64cpu.h:61
int64_t x28
Definition aa64cpu.h:55
int64_t x15
Definition aa64cpu.h:70