Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Arm Trusted Firmware
Commits
b4e81a33
Commit
b4e81a33
authored
Oct 18, 2017
by
davidcunado-arm
Committed by
GitHub
Oct 18, 2017
Browse files
Merge pull request #1129 from robertovargas-arm/enable_O0
Fix use of MSR (immediate)
parents
38f5d3f3
e0f34eaa
Changes
1
Show whitespace changes
Inline
Side-by-side
include/lib/aarch64/arch_helpers.h
View file @
b4e81a33
...
...
@@ -31,11 +31,8 @@ static inline void write_ ## _name(uint64_t v) \
__asm__ volatile ("msr " #_reg_name ", %0" : : "r" (v)); \
}
#define _DEFINE_SYSREG_WRITE_CONST_FUNC(_name, _reg_name) \
static inline void write_ ## _name(const uint64_t v) \
{ \
__asm__ volatile ("msr " #_reg_name ", %0" : : "i" (v)); \
}
#define SYSREG_WRITE_CONST(reg_name, v) \
__asm__ volatile ("msr " #reg_name ", %0" : : "i" (v))
/* Define read function for system register */
#define DEFINE_SYSREG_READ_FUNC(_name) \
...
...
@@ -59,11 +56,6 @@ static inline void write_ ## _name(const uint64_t v) \
#define DEFINE_RENAME_SYSREG_WRITE_FUNC(_name, _reg_name) \
_DEFINE_SYSREG_WRITE_FUNC(_name, _reg_name)
/* Define write function for special system registers */
#define DEFINE_SYSREG_WRITE_CONST_FUNC(_name) \
_DEFINE_SYSREG_WRITE_CONST_FUNC(_name, _name)
/**********************************************************************
* Macros to create inline functions for system instructions
*********************************************************************/
...
...
@@ -178,8 +170,8 @@ void disable_mmu_icache_el3(void);
* Misc. accessor prototypes
******************************************************************************/
DEFINE_
SYSREG_WRITE_CONST
_FUNC
(
daifset
)
DEFINE_
SYSREG_WRITE_CONST
_FUNC
(
daifclr
)
#define write_daifclr(val)
SYSREG_WRITE_CONST
(daifclr, val
)
#define write_daifset(val)
SYSREG_WRITE_CONST
(daifset, val
)
DEFINE_SYSREG_READ_FUNC
(
par_el1
)
DEFINE_SYSREG_READ_FUNC
(
id_pfr1_el1
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment