git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix compilation issues in aarch64 ports
[lunaix-os.git]
/
lunaix-os
/
arch
/
aarch64
/
includes
/
asm
/
hart.h
diff --git
a/lunaix-os/arch/aarch64/includes/asm/hart.h
b/lunaix-os/arch/aarch64/includes/asm/hart.h
index f9e7d0ac1c1113f480ab0014de6b71bb7ca8f1c7..fa1f4bfd165f7b30322d84bc398c9b98e27ff13c 100644
(file)
--- a/
lunaix-os/arch/aarch64/includes/asm/hart.h
+++ b/
lunaix-os/arch/aarch64/includes/asm/hart.h
@@
-3,74
+3,77
@@
#ifndef __ASM__
#include <lunaix/types.h>
#ifndef __ASM__
#include <lunaix/types.h>
+#include <lunaix/bits.h>
+#include <asm/aa64_spsr.h>
+
+#define SYNDROME_ETYPE BITFIELD(63, 56)
struct hart_state;
struct regcontext
{
union {
struct hart_state;
struct regcontext
{
union {
- reg_t x[3
2
];
+ reg_t x[3
1
];
struct {
struct {
- reg_t x[29];
+ reg_t x
_
[29];
reg_t fp;
reg_t lr;
reg_t fp;
reg_t lr;
- reg_t sp;
};
};
};
};
-} compact;
+} compact
align(8)
;
struct exec_param
{
struct hart_state* parent_state;
struct exec_param
{
struct hart_state* parent_state;
- reg_t vector;
+ reg_t spsr;
+ reg_t link;
+ struct {
+ reg_t sp_el0;
+ reg_t rsvd;
+ };
+
reg_t syndrome;
reg_t syndrome;
- reg_t elink;
- reg_t sp;
-} compact;
+} compact align(8);
struct hart_state
{
reg_t depth;
struct regcontext registers;
struct hart_state
{
reg_t depth;
struct regcontext registers;
- union
- {
- reg_t sp;
- volatile struct exec_param* execp;
- };
-} compact;
+ struct exec_param execp;
+} compact align(16);
static inline int
hart_vector_stamp(struct hart_state* hstate) {
static inline int
hart_vector_stamp(struct hart_state* hstate) {
- return
hstate->execp->vector
;
+ return
BITS_GET(hstate->execp.syndrome, SYNDROME_ETYPE)
;
}
static inline unsigned int
hart_ecause(struct hart_state* hstate) {
}
static inline unsigned int
hart_ecause(struct hart_state* hstate) {
- return hstate->execp
->
syndrome;
+ return hstate->execp
.
syndrome;
}
static inline struct hart_state*
hart_parent_state(struct hart_state* hstate)
{
}
static inline struct hart_state*
hart_parent_state(struct hart_state* hstate)
{
- return hstate->execp
->
parent_state;
+ return hstate->execp
.
parent_state;
}
static inline void
hart_push_state(struct hart_state* p_hstate, struct hart_state* hstate)
{
}
static inline void
hart_push_state(struct hart_state* p_hstate, struct hart_state* hstate)
{
- hstate->execp
->
parent_state = p_hstate;
+ hstate->execp
.
parent_state = p_hstate;
}
static inline ptr_t
hart_pc(struct hart_state* hstate)
{
}
static inline ptr_t
hart_pc(struct hart_state* hstate)
{
- return hstate->execp
->e
link;
+ return hstate->execp
.
link;
}
static inline ptr_t
hart_sp(struct hart_state* hstate)
{
}
static inline ptr_t
hart_sp(struct hart_state* hstate)
{
- return
hstate->execp->sp
;
+ return
__ptr(&hstate[-1])
;
}
static inline bool
}
static inline bool