37#ifndef _RTEMS_SCORE_AARCH64_SYSTEM_REGISTERS_H
38#define _RTEMS_SCORE_AARCH64_SYSTEM_REGISTERS_H
48static inline uint64_t _AArch64_Read_actlr_el1(
void )
53 "mrs %0, ACTLR_EL1" :
"=&r" ( value ) : :
"memory"
59static inline void _AArch64_Write_actlr_el1( uint64_t value )
62 "msr ACTLR_EL1, %0" : :
"r" ( value ) :
"memory"
68static inline uint64_t _AArch64_Read_actlr_el2(
void )
73 "mrs %0, ACTLR_EL2" :
"=&r" ( value ) : :
"memory"
79static inline void _AArch64_Write_actlr_el2( uint64_t value )
82 "msr ACTLR_EL2, %0" : :
"r" ( value ) :
"memory"
88static inline uint64_t _AArch64_Read_actlr_el3(
void )
93 "mrs %0, ACTLR_EL3" :
"=&r" ( value ) : :
"memory"
99static inline void _AArch64_Write_actlr_el3( uint64_t value )
102 "msr ACTLR_EL3, %0" : :
"r" ( value ) :
"memory"
108static inline uint64_t _AArch64_Read_afsr0_el1(
void )
113 "mrs %0, AFSR0_EL1" :
"=&r" ( value ) : :
"memory"
119static inline void _AArch64_Write_afsr0_el1( uint64_t value )
122 "msr AFSR0_EL1, %0" : :
"r" ( value ) :
"memory"
128static inline uint64_t _AArch64_Read_afsr0_el2(
void )
133 "mrs %0, AFSR0_EL2" :
"=&r" ( value ) : :
"memory"
139static inline void _AArch64_Write_afsr0_el2( uint64_t value )
142 "msr AFSR0_EL2, %0" : :
"r" ( value ) :
"memory"
148static inline uint64_t _AArch64_Read_afsr0_el3(
void )
153 "mrs %0, AFSR0_EL3" :
"=&r" ( value ) : :
"memory"
159static inline void _AArch64_Write_afsr0_el3( uint64_t value )
162 "msr AFSR0_EL3, %0" : :
"r" ( value ) :
"memory"
168static inline uint64_t _AArch64_Read_afsr1_el1(
void )
173 "mrs %0, AFSR1_EL1" :
"=&r" ( value ) : :
"memory"
179static inline void _AArch64_Write_afsr1_el1( uint64_t value )
182 "msr AFSR1_EL1, %0" : :
"r" ( value ) :
"memory"
188static inline uint64_t _AArch64_Read_afsr1_el2(
void )
193 "mrs %0, AFSR1_EL2" :
"=&r" ( value ) : :
"memory"
199static inline void _AArch64_Write_afsr1_el2( uint64_t value )
202 "msr AFSR1_EL2, %0" : :
"r" ( value ) :
"memory"
208static inline uint64_t _AArch64_Read_afsr1_el3(
void )
213 "mrs %0, AFSR1_EL3" :
"=&r" ( value ) : :
"memory"
219static inline void _AArch64_Write_afsr1_el3( uint64_t value )
222 "msr AFSR1_EL3, %0" : :
"r" ( value ) :
"memory"
228static inline uint64_t _AArch64_Read_aidr_el1(
void )
233 "mrs %0, AIDR_EL1" :
"=&r" ( value ) : :
"memory"
241static inline uint64_t _AArch64_Read_amair_el1(
void )
246 "mrs %0, AMAIR_EL1" :
"=&r" ( value ) : :
"memory"
252static inline void _AArch64_Write_amair_el1( uint64_t value )
255 "msr AMAIR_EL1, %0" : :
"r" ( value ) :
"memory"
261static inline uint64_t _AArch64_Read_amair_el2(
void )
266 "mrs %0, AMAIR_EL2" :
"=&r" ( value ) : :
"memory"
272static inline void _AArch64_Write_amair_el2( uint64_t value )
275 "msr AMAIR_EL2, %0" : :
"r" ( value ) :
"memory"
281static inline uint64_t _AArch64_Read_amair_el3(
void )
286 "mrs %0, AMAIR_EL3" :
"=&r" ( value ) : :
"memory"
292static inline void _AArch64_Write_amair_el3( uint64_t value )
295 "msr AMAIR_EL3, %0" : :
"r" ( value ) :
"memory"
301static inline uint64_t _AArch64_Read_apdakeyhi_el1(
void )
306 "mrs %0, APDAKEYHI_EL1" :
"=&r" ( value ) : :
"memory"
312static inline void _AArch64_Write_apdakeyhi_el1( uint64_t value )
315 "msr APDAKEYHI_EL1, %0" : :
"r" ( value ) :
"memory"
321static inline uint64_t _AArch64_Read_apdakeylo_el1(
void )
326 "mrs %0, APDAKEYLO_EL1" :
"=&r" ( value ) : :
"memory"
332static inline void _AArch64_Write_apdakeylo_el1( uint64_t value )
335 "msr APDAKEYLO_EL1, %0" : :
"r" ( value ) :
"memory"
341static inline uint64_t _AArch64_Read_apdbkeyhi_el1(
void )
346 "mrs %0, APDBKEYHI_EL1" :
"=&r" ( value ) : :
"memory"
352static inline void _AArch64_Write_apdbkeyhi_el1( uint64_t value )
355 "msr APDBKEYHI_EL1, %0" : :
"r" ( value ) :
"memory"
361static inline uint64_t _AArch64_Read_apdbkeylo_el1(
void )
366 "mrs %0, APDBKEYLO_EL1" :
"=&r" ( value ) : :
"memory"
372static inline void _AArch64_Write_apdbkeylo_el1( uint64_t value )
375 "msr APDBKEYLO_EL1, %0" : :
"r" ( value ) :
"memory"
381static inline uint64_t _AArch64_Read_apgakeyhi_el1(
void )
386 "mrs %0, APGAKEYHI_EL1" :
"=&r" ( value ) : :
"memory"
392static inline void _AArch64_Write_apgakeyhi_el1( uint64_t value )
395 "msr APGAKEYHI_EL1, %0" : :
"r" ( value ) :
"memory"
401static inline uint64_t _AArch64_Read_apgakeylo_el1(
void )
406 "mrs %0, APGAKEYLO_EL1" :
"=&r" ( value ) : :
"memory"
412static inline void _AArch64_Write_apgakeylo_el1( uint64_t value )
415 "msr APGAKEYLO_EL1, %0" : :
"r" ( value ) :
"memory"
421static inline uint64_t _AArch64_Read_apiakeyhi_el1(
void )
426 "mrs %0, APIAKEYHI_EL1" :
"=&r" ( value ) : :
"memory"
432static inline void _AArch64_Write_apiakeyhi_el1( uint64_t value )
435 "msr APIAKEYHI_EL1, %0" : :
"r" ( value ) :
"memory"
441static inline uint64_t _AArch64_Read_apiakeylo_el1(
void )
446 "mrs %0, APIAKEYLO_EL1" :
"=&r" ( value ) : :
"memory"
452static inline void _AArch64_Write_apiakeylo_el1( uint64_t value )
455 "msr APIAKEYLO_EL1, %0" : :
"r" ( value ) :
"memory"
461static inline uint64_t _AArch64_Read_apibkeyhi_el1(
void )
466 "mrs %0, APIBKEYHI_EL1" :
"=&r" ( value ) : :
"memory"
472static inline void _AArch64_Write_apibkeyhi_el1( uint64_t value )
475 "msr APIBKEYHI_EL1, %0" : :
"r" ( value ) :
"memory"
481static inline uint64_t _AArch64_Read_apibkeylo_el1(
void )
486 "mrs %0, APIBKEYLO_EL1" :
"=&r" ( value ) : :
"memory"
492static inline void _AArch64_Write_apibkeylo_el1( uint64_t value )
495 "msr APIBKEYLO_EL1, %0" : :
"r" ( value ) :
"memory"
501#define AARCH64_CCSIDR2_EL1_NUMSETS( _val ) ( ( _val ) << 0 )
502#define AARCH64_CCSIDR2_EL1_NUMSETS_SHIFT 0
503#define AARCH64_CCSIDR2_EL1_NUMSETS_MASK 0xffffffU
504#define AARCH64_CCSIDR2_EL1_NUMSETS_GET( _reg ) \
505 ( ( ( _reg ) >> 0 ) & 0xffffffU )
507static inline uint64_t _AArch64_Read_ccsidr2_el1(
void )
512 "mrs %0, CCSIDR2_EL1" :
"=&r" ( value ) : :
"memory"
520#define AARCH64_CCSIDR_EL1_LINESIZE( _val ) ( ( _val ) << 0 )
521#define AARCH64_CCSIDR_EL1_LINESIZE_SHIFT 0
522#define AARCH64_CCSIDR_EL1_LINESIZE_MASK 0x7U
523#define AARCH64_CCSIDR_EL1_LINESIZE_GET( _reg ) \
524 ( ( ( _reg ) >> 0 ) & 0x7U )
526#define AARCH64_CCSIDR_EL1_ASSOCIATIVITY_0( _val ) ( ( _val ) << 3 )
527#define AARCH64_CCSIDR_EL1_ASSOCIATIVITY_SHIFT_0 3
528#define AARCH64_CCSIDR_EL1_ASSOCIATIVITY_MASK_0 0x1ff8U
529#define AARCH64_CCSIDR_EL1_ASSOCIATIVITY_GET_0( _reg ) \
530 ( ( ( _reg ) >> 3 ) & 0x3ffU )
532#define AARCH64_CCSIDR_EL1_ASSOCIATIVITY_1( _val ) ( ( _val ) << 3 )
533#define AARCH64_CCSIDR_EL1_ASSOCIATIVITY_SHIFT_1 3
534#define AARCH64_CCSIDR_EL1_ASSOCIATIVITY_MASK_1 0xfffff8U
535#define AARCH64_CCSIDR_EL1_ASSOCIATIVITY_GET_1( _reg ) \
536 ( ( ( _reg ) >> 3 ) & 0x1fffffU )
538#define AARCH64_CCSIDR_EL1_NUMSETS_0( _val ) ( ( _val ) << 13 )
539#define AARCH64_CCSIDR_EL1_NUMSETS_SHIFT_0 13
540#define AARCH64_CCSIDR_EL1_NUMSETS_MASK_0 0xfffe000U
541#define AARCH64_CCSIDR_EL1_NUMSETS_GET_0( _reg ) \
542 ( ( ( _reg ) >> 13 ) & 0x7fffU )
544#define AARCH64_CCSIDR_EL1_NUMSETS_1( _val ) ( ( _val ) << 32 )
545#define AARCH64_CCSIDR_EL1_NUMSETS_SHIFT_1 32
546#define AARCH64_CCSIDR_EL1_NUMSETS_MASK_1 0xffffff00000000ULL
547#define AARCH64_CCSIDR_EL1_NUMSETS_GET_1( _reg ) \
548 ( ( ( _reg ) >> 32 ) & 0xffffffULL )
550static inline uint64_t _AArch64_Read_ccsidr_el1(
void )
555 "mrs %0, CCSIDR_EL1" :
"=&r" ( value ) : :
"memory"
563#define AARCH64_CLIDR_EL1_CTYPE1( _val ) ( ( _val ) << 0 )
564#define AARCH64_CLIDR_EL1_CTYPE1_SHIFT 0
565#define AARCH64_CLIDR_EL1_CTYPE1_MASK ( 0x7U << 0 )
566#define AARCH64_CLIDR_EL1_CTYPE1_GET( _reg ) \
567 ( ( ( _reg ) >> 0 ) & 0x7U )
569#define AARCH64_CLIDR_EL1_CTYPE2( _val ) ( ( _val ) << 3 )
570#define AARCH64_CLIDR_EL1_CTYPE2_SHIFT 3
571#define AARCH64_CLIDR_EL1_CTYPE2_MASK ( 0x7U << 3 )
572#define AARCH64_CLIDR_EL1_CTYPE2_GET( _reg ) \
573 ( ( ( _reg ) >> 3 ) & 0x7U )
575#define AARCH64_CLIDR_EL1_CTYPE3( _val ) ( ( _val ) << 6 )
576#define AARCH64_CLIDR_EL1_CTYPE3_SHIFT 6
577#define AARCH64_CLIDR_EL1_CTYPE3_MASK ( 0x7U << 6 )
578#define AARCH64_CLIDR_EL1_CTYPE3_GET( _reg ) \
579 ( ( ( _reg ) >> 6 ) & 0x7U )
581#define AARCH64_CLIDR_EL1_CTYPE4( _val ) ( ( _val ) << 9 )
582#define AARCH64_CLIDR_EL1_CTYPE4_SHIFT 9
583#define AARCH64_CLIDR_EL1_CTYPE4_MASK ( 0x7U << 9 )
584#define AARCH64_CLIDR_EL1_CTYPE4_GET( _reg ) \
585 ( ( ( _reg ) >> 9 ) & 0x7U )
587#define AARCH64_CLIDR_EL1_CTYPE5( _val ) ( ( _val ) << 12 )
588#define AARCH64_CLIDR_EL1_CTYPE5_SHIFT 12
589#define AARCH64_CLIDR_EL1_CTYPE5_MASK ( 0x7U << 12 )
590#define AARCH64_CLIDR_EL1_CTYPE5_GET( _reg ) \
591 ( ( ( _reg ) >> 12 ) & 0x7U )
593#define AARCH64_CLIDR_EL1_CTYPE6( _val ) ( ( _val ) << 15 )
594#define AARCH64_CLIDR_EL1_CTYPE6_SHIFT 15
595#define AARCH64_CLIDR_EL1_CTYPE6_MASK ( 0x7U << 15 )
596#define AARCH64_CLIDR_EL1_CTYPE6_GET( _reg ) \
597 ( ( ( _reg ) >> 15 ) & 0x7U )
599#define AARCH64_CLIDR_EL1_CTYPE7( _val ) ( ( _val ) << 18 )
600#define AARCH64_CLIDR_EL1_CTYPE7_SHIFT 18
601#define AARCH64_CLIDR_EL1_CTYPE7_MASK ( 0x7U << 18 )
602#define AARCH64_CLIDR_EL1_CTYPE7_GET( _reg ) \
603 ( ( ( _reg ) >> 18 ) & 0x7U )
605#define AARCH64_CLIDR_EL1_LOUIS( _val ) ( ( _val ) << 21 )
606#define AARCH64_CLIDR_EL1_LOUIS_SHIFT 21
607#define AARCH64_CLIDR_EL1_LOUIS_MASK 0xe00000U
608#define AARCH64_CLIDR_EL1_LOUIS_GET( _reg ) \
609 ( ( ( _reg ) >> 21 ) & 0x7U )
611#define AARCH64_CLIDR_EL1_LOC( _val ) ( ( _val ) << 24 )
612#define AARCH64_CLIDR_EL1_LOC_SHIFT 24
613#define AARCH64_CLIDR_EL1_LOC_MASK 0x7000000U
614#define AARCH64_CLIDR_EL1_LOC_GET( _reg ) \
615 ( ( ( _reg ) >> 24 ) & 0x7U )
617#define AARCH64_CLIDR_EL1_LOUU( _val ) ( ( _val ) << 27 )
618#define AARCH64_CLIDR_EL1_LOUU_SHIFT 27
619#define AARCH64_CLIDR_EL1_LOUU_MASK 0x38000000U
620#define AARCH64_CLIDR_EL1_LOUU_GET( _reg ) \
621 ( ( ( _reg ) >> 27 ) & 0x7U )
623#define AARCH64_CLIDR_EL1_ICB( _val ) ( ( _val ) << 30 )
624#define AARCH64_CLIDR_EL1_ICB_SHIFT 30
625#define AARCH64_CLIDR_EL1_ICB_MASK 0x1c0000000ULL
626#define AARCH64_CLIDR_EL1_ICB_GET( _reg ) \
627 ( ( ( _reg ) >> 30 ) & 0x7ULL )
629static inline uint64_t _AArch64_Read_clidr_el1(
void )
634 "mrs %0, CLIDR_EL1" :
"=&r" ( value ) : :
"memory"
642#define AARCH64_CONTEXTIDR_EL1_PROCID( _val ) ( ( _val ) << 0 )
643#define AARCH64_CONTEXTIDR_EL1_PROCID_SHIFT 0
644#define AARCH64_CONTEXTIDR_EL1_PROCID_MASK 0xffffffffU
645#define AARCH64_CONTEXTIDR_EL1_PROCID_GET( _reg ) \
646 ( ( ( _reg ) >> 0 ) & 0xffffffffU )
648static inline uint64_t _AArch64_Read_contextidr_el1(
void )
653 "mrs %0, CONTEXTIDR_EL1" :
"=&r" ( value ) : :
"memory"
659static inline void _AArch64_Write_contextidr_el1( uint64_t value )
662 "msr CONTEXTIDR_EL1, %0" : :
"r" ( value ) :
"memory"
668#define AARCH64_CONTEXTIDR_EL2_PROCID( _val ) ( ( _val ) << 0 )
669#define AARCH64_CONTEXTIDR_EL2_PROCID_SHIFT 0
670#define AARCH64_CONTEXTIDR_EL2_PROCID_MASK 0xffffffffU
671#define AARCH64_CONTEXTIDR_EL2_PROCID_GET( _reg ) \
672 ( ( ( _reg ) >> 0 ) & 0xffffffffU )
674static inline uint64_t _AArch64_Read_contextidr_el2(
void )
679 "mrs %0, CONTEXTIDR_EL2" :
"=&r" ( value ) : :
"memory"
685static inline void _AArch64_Write_contextidr_el2( uint64_t value )
688 "msr CONTEXTIDR_EL2, %0" : :
"r" ( value ) :
"memory"
694#define AARCH64_CPACR_EL1_ZEN( _val ) ( ( _val ) << 16 )
695#define AARCH64_CPACR_EL1_ZEN_SHIFT 16
696#define AARCH64_CPACR_EL1_ZEN_MASK 0x30000U
697#define AARCH64_CPACR_EL1_ZEN_GET( _reg ) \
698 ( ( ( _reg ) >> 16 ) & 0x3U )
700#define AARCH64_CPACR_EL1_FPEN( _val ) ( ( _val ) << 20 )
701#define AARCH64_CPACR_EL1_FPEN_SHIFT 20
702#define AARCH64_CPACR_EL1_FPEN_MASK 0x300000U
703#define AARCH64_CPACR_EL1_FPEN_GET( _reg ) \
704 ( ( ( _reg ) >> 20 ) & 0x3U )
706#define AARCH64_CPACR_EL1_TTA 0x10000000U
708static inline uint64_t _AArch64_Read_cpacr_el1(
void )
713 "mrs %0, CPACR_EL1" :
"=&r" ( value ) : :
"memory"
719static inline void _AArch64_Write_cpacr_el1( uint64_t value )
722 "msr CPACR_EL1, %0" : :
"r" ( value ) :
"memory"
728#define AARCH64_CPTR_EL2_TZ 0x100U
730#define AARCH64_CPTR_EL2_TFP 0x400U
732#define AARCH64_CPTR_EL2_ZEN( _val ) ( ( _val ) << 16 )
733#define AARCH64_CPTR_EL2_ZEN_SHIFT 16
734#define AARCH64_CPTR_EL2_ZEN_MASK 0x30000U
735#define AARCH64_CPTR_EL2_ZEN_GET( _reg ) \
736 ( ( ( _reg ) >> 16 ) & 0x3U )
738#define AARCH64_CPTR_EL2_TTA_0 0x100000U
740#define AARCH64_CPTR_EL2_FPEN( _val ) ( ( _val ) << 20 )
741#define AARCH64_CPTR_EL2_FPEN_SHIFT 20
742#define AARCH64_CPTR_EL2_FPEN_MASK 0x300000U
743#define AARCH64_CPTR_EL2_FPEN_GET( _reg ) \
744 ( ( ( _reg ) >> 20 ) & 0x3U )
746#define AARCH64_CPTR_EL2_TTA_1 0x10000000U
748#define AARCH64_CPTR_EL2_TAM 0x40000000U
750#define AARCH64_CPTR_EL2_TCPAC 0x80000000U
752static inline uint64_t _AArch64_Read_cptr_el2(
void )
757 "mrs %0, CPTR_EL2" :
"=&r" ( value ) : :
"memory"
763static inline void _AArch64_Write_cptr_el2( uint64_t value )
766 "msr CPTR_EL2, %0" : :
"r" ( value ) :
"memory"
772#define AARCH64_CPTR_EL3_EZ 0x100U
774#define AARCH64_CPTR_EL3_TFP 0x400U
776#define AARCH64_CPTR_EL3_TTA 0x100000U
778#define AARCH64_CPTR_EL3_TAM 0x40000000U
780#define AARCH64_CPTR_EL3_TCPAC 0x80000000U
782static inline uint64_t _AArch64_Read_cptr_el3(
void )
787 "mrs %0, CPTR_EL3" :
"=&r" ( value ) : :
"memory"
793static inline void _AArch64_Write_cptr_el3( uint64_t value )
796 "msr CPTR_EL3, %0" : :
"r" ( value ) :
"memory"
802#define AARCH64_CSSELR_EL1_IND 0x1U
804#define AARCH64_CSSELR_EL1_LEVEL( _val ) ( ( _val ) << 1 )
805#define AARCH64_CSSELR_EL1_LEVEL_SHIFT 1
806#define AARCH64_CSSELR_EL1_LEVEL_MASK 0xeU
807#define AARCH64_CSSELR_EL1_LEVEL_GET( _reg ) \
808 ( ( ( _reg ) >> 1 ) & 0x7U )
810#define AARCH64_CSSELR_EL1_TND 0x10U
812static inline uint64_t _AArch64_Read_csselr_el1(
void )
817 "mrs %0, CSSELR_EL1" :
"=&r" ( value ) : :
"memory"
823static inline void _AArch64_Write_csselr_el1( uint64_t value )
826 "msr CSSELR_EL1, %0" : :
"r" ( value ) :
"memory"
832#define AARCH64_CTR_EL0_IMINLINE( _val ) ( ( _val ) << 0 )
833#define AARCH64_CTR_EL0_IMINLINE_SHIFT 0
834#define AARCH64_CTR_EL0_IMINLINE_MASK 0xfU
835#define AARCH64_CTR_EL0_IMINLINE_GET( _reg ) \
836 ( ( ( _reg ) >> 0 ) & 0xfU )
838#define AARCH64_CTR_EL0_L1IP( _val ) ( ( _val ) << 14 )
839#define AARCH64_CTR_EL0_L1IP_SHIFT 14
840#define AARCH64_CTR_EL0_L1IP_MASK 0xc000U
841#define AARCH64_CTR_EL0_L1IP_GET( _reg ) \
842 ( ( ( _reg ) >> 14 ) & 0x3U )
844#define AARCH64_CTR_EL0_DMINLINE( _val ) ( ( _val ) << 16 )
845#define AARCH64_CTR_EL0_DMINLINE_SHIFT 16
846#define AARCH64_CTR_EL0_DMINLINE_MASK 0xf0000U
847#define AARCH64_CTR_EL0_DMINLINE_GET( _reg ) \
848 ( ( ( _reg ) >> 16 ) & 0xfU )
850#define AARCH64_CTR_EL0_ERG( _val ) ( ( _val ) << 20 )
851#define AARCH64_CTR_EL0_ERG_SHIFT 20
852#define AARCH64_CTR_EL0_ERG_MASK 0xf00000U
853#define AARCH64_CTR_EL0_ERG_GET( _reg ) \
854 ( ( ( _reg ) >> 20 ) & 0xfU )
856#define AARCH64_CTR_EL0_CWG( _val ) ( ( _val ) << 24 )
857#define AARCH64_CTR_EL0_CWG_SHIFT 24
858#define AARCH64_CTR_EL0_CWG_MASK 0xf000000U
859#define AARCH64_CTR_EL0_CWG_GET( _reg ) \
860 ( ( ( _reg ) >> 24 ) & 0xfU )
862#define AARCH64_CTR_EL0_IDC 0x10000000U
864#define AARCH64_CTR_EL0_DIC 0x20000000U
866#define AARCH64_CTR_EL0_TMINLINE( _val ) ( ( _val ) << 32 )
867#define AARCH64_CTR_EL0_TMINLINE_SHIFT 32
868#define AARCH64_CTR_EL0_TMINLINE_MASK 0x3f00000000ULL
869#define AARCH64_CTR_EL0_TMINLINE_GET( _reg ) \
870 ( ( ( _reg ) >> 32 ) & 0x3fULL )
872static inline uint64_t _AArch64_Read_ctr_el0(
void )
877 "mrs %0, CTR_EL0" :
"=&r" ( value ) : :
"memory"
885static inline uint64_t _AArch64_Read_dacr32_el2(
void )
890 "mrs %0, DACR32_EL2" :
"=&r" ( value ) : :
"memory"
896static inline void _AArch64_Write_dacr32_el2( uint64_t value )
899 "msr DACR32_EL2, %0" : :
"r" ( value ) :
"memory"
905#define AARCH64_DCZID_EL0_BS( _val ) ( ( _val ) << 0 )
906#define AARCH64_DCZID_EL0_BS_SHIFT 0
907#define AARCH64_DCZID_EL0_BS_MASK 0xfU
908#define AARCH64_DCZID_EL0_BS_GET( _reg ) \
909 ( ( ( _reg ) >> 0 ) & 0xfU )
911#define AARCH64_DCZID_EL0_DZP 0x10U
913static inline uint64_t _AArch64_Read_dczid_el0(
void )
918 "mrs %0, DCZID_EL0" :
"=&r" ( value ) : :
"memory"
926#define AARCH64_ESR_EL1_DIRECTION 0x1U
928#define AARCH64_ESR_EL1_ERETA 0x1U
930#define AARCH64_ESR_EL1_IOF 0x1U
932#define AARCH64_ESR_EL1_TI 0x1U
934#define AARCH64_ESR_EL1_BTYPE( _val ) ( ( _val ) << 0 )
935#define AARCH64_ESR_EL1_BTYPE_SHIFT 0
936#define AARCH64_ESR_EL1_BTYPE_MASK 0x3U
937#define AARCH64_ESR_EL1_BTYPE_GET( _reg ) \
938 ( ( ( _reg ) >> 0 ) & 0x3U )
940#define AARCH64_ESR_EL1_DFSC( _val ) ( ( _val ) << 0 )
941#define AARCH64_ESR_EL1_DFSC_SHIFT 0
942#define AARCH64_ESR_EL1_DFSC_MASK 0x3fU
943#define AARCH64_ESR_EL1_DFSC_GET( _reg ) \
944 ( ( ( _reg ) >> 0 ) & 0x3fU )
946#define AARCH64_ESR_EL1_IFSC( _val ) ( ( _val ) << 0 )
947#define AARCH64_ESR_EL1_IFSC_SHIFT 0
948#define AARCH64_ESR_EL1_IFSC_MASK 0x3fU
949#define AARCH64_ESR_EL1_IFSC_GET( _reg ) \
950 ( ( ( _reg ) >> 0 ) & 0x3fU )
952#define AARCH64_ESR_EL1_COMMENT( _val ) ( ( _val ) << 0 )
953#define AARCH64_ESR_EL1_COMMENT_SHIFT 0
954#define AARCH64_ESR_EL1_COMMENT_MASK 0xffffU
955#define AARCH64_ESR_EL1_COMMENT_GET( _reg ) \
956 ( ( ( _reg ) >> 0 ) & 0xffffU )
958#define AARCH64_ESR_EL1_IMM16( _val ) ( ( _val ) << 0 )
959#define AARCH64_ESR_EL1_IMM16_SHIFT 0
960#define AARCH64_ESR_EL1_IMM16_MASK 0xffffU
961#define AARCH64_ESR_EL1_IMM16_GET( _reg ) \
962 ( ( ( _reg ) >> 0 ) & 0xffffU )
964#define AARCH64_ESR_EL1_ISS( _val ) ( ( _val ) << 0 )
965#define AARCH64_ESR_EL1_ISS_SHIFT 0
966#define AARCH64_ESR_EL1_ISS_MASK 0x1ffffffU
967#define AARCH64_ESR_EL1_ISS_GET( _reg ) \
968 ( ( ( _reg ) >> 0 ) & 0x1ffffffU )
970#define AARCH64_ESR_EL1_DZF 0x2U
972#define AARCH64_ESR_EL1_ERET 0x2U
974#define AARCH64_ESR_EL1_AM( _val ) ( ( _val ) << 1 )
975#define AARCH64_ESR_EL1_AM_SHIFT 1
976#define AARCH64_ESR_EL1_AM_MASK 0xeU
977#define AARCH64_ESR_EL1_AM_GET( _reg ) \
978 ( ( ( _reg ) >> 1 ) & 0x7U )
980#define AARCH64_ESR_EL1_CRM( _val ) ( ( _val ) << 1 )
981#define AARCH64_ESR_EL1_CRM_SHIFT 1
982#define AARCH64_ESR_EL1_CRM_MASK 0x1eU
983#define AARCH64_ESR_EL1_CRM_GET( _reg ) \
984 ( ( ( _reg ) >> 1 ) & 0xfU )
986#define AARCH64_ESR_EL1_OFF 0x4U
988#define AARCH64_ESR_EL1_UFF 0x8U
990#define AARCH64_ESR_EL1_IXF 0x10U
992#define AARCH64_ESR_EL1_OFFSET 0x10U
994#define AARCH64_ESR_EL1_RN( _val ) ( ( _val ) << 5 )
995#define AARCH64_ESR_EL1_RN_SHIFT 5
996#define AARCH64_ESR_EL1_RN_MASK 0x3e0U
997#define AARCH64_ESR_EL1_RN_GET( _reg ) \
998 ( ( ( _reg ) >> 5 ) & 0x1fU )
1000#define AARCH64_ESR_EL1_RT( _val ) ( ( _val ) << 5 )
1001#define AARCH64_ESR_EL1_RT_SHIFT 5
1002#define AARCH64_ESR_EL1_RT_MASK 0x3e0U
1003#define AARCH64_ESR_EL1_RT_GET( _reg ) \
1004 ( ( ( _reg ) >> 5 ) & 0x1fU )
1006#define AARCH64_ESR_EL1_EX 0x40U
1008#define AARCH64_ESR_EL1_WNR 0x40U
1010#define AARCH64_ESR_EL1_IDF 0x80U
1012#define AARCH64_ESR_EL1_S1PTW 0x80U
1014#define AARCH64_ESR_EL1_CM 0x100U
1016#define AARCH64_ESR_EL1_VECITR( _val ) ( ( _val ) << 8 )
1017#define AARCH64_ESR_EL1_VECITR_SHIFT 8
1018#define AARCH64_ESR_EL1_VECITR_MASK 0x700U
1019#define AARCH64_ESR_EL1_VECITR_GET( _reg ) \
1020 ( ( ( _reg ) >> 8 ) & 0x7U )
1022#define AARCH64_ESR_EL1_EA 0x200U
1024#define AARCH64_ESR_EL1_FNV 0x400U
1026#define AARCH64_ESR_EL1_AET( _val ) ( ( _val ) << 10 )
1027#define AARCH64_ESR_EL1_AET_SHIFT 10
1028#define AARCH64_ESR_EL1_AET_MASK 0x1c00U
1029#define AARCH64_ESR_EL1_AET_GET( _reg ) \
1030 ( ( ( _reg ) >> 10 ) & 0x7U )
1032#define AARCH64_ESR_EL1_CRN( _val ) ( ( _val ) << 10 )
1033#define AARCH64_ESR_EL1_CRN_SHIFT 10
1034#define AARCH64_ESR_EL1_CRN_MASK 0x3c00U
1035#define AARCH64_ESR_EL1_CRN_GET( _reg ) \
1036 ( ( ( _reg ) >> 10 ) & 0xfU )
1038#define AARCH64_ESR_EL1_RT2( _val ) ( ( _val ) << 10 )
1039#define AARCH64_ESR_EL1_RT2_SHIFT 10
1040#define AARCH64_ESR_EL1_RT2_MASK 0x7c00U
1041#define AARCH64_ESR_EL1_RT2_GET( _reg ) \
1042 ( ( ( _reg ) >> 10 ) & 0x1fU )
1044#define AARCH64_ESR_EL1_SET( _val ) ( ( _val ) << 11 )
1045#define AARCH64_ESR_EL1_SET_SHIFT 11
1046#define AARCH64_ESR_EL1_SET_MASK 0x1800U
1047#define AARCH64_ESR_EL1_SET_GET( _reg ) \
1048 ( ( ( _reg ) >> 11 ) & 0x3U )
1050#define AARCH64_ESR_EL1_IMM8( _val ) ( ( _val ) << 12 )
1051#define AARCH64_ESR_EL1_IMM8_SHIFT 12
1052#define AARCH64_ESR_EL1_IMM8_MASK 0xff000U
1053#define AARCH64_ESR_EL1_IMM8_GET( _reg ) \
1054 ( ( ( _reg ) >> 12 ) & 0xffU )
1056#define AARCH64_ESR_EL1_IESB 0x2000U
1058#define AARCH64_ESR_EL1_VNCR 0x2000U
1060#define AARCH64_ESR_EL1_AR 0x4000U
1062#define AARCH64_ESR_EL1_OP1( _val ) ( ( _val ) << 14 )
1063#define AARCH64_ESR_EL1_OP1_SHIFT 14
1064#define AARCH64_ESR_EL1_OP1_MASK 0x1c000U
1065#define AARCH64_ESR_EL1_OP1_GET( _reg ) \
1066 ( ( ( _reg ) >> 14 ) & 0x7U )
1068#define AARCH64_ESR_EL1_OPC1_0( _val ) ( ( _val ) << 14 )
1069#define AARCH64_ESR_EL1_OPC1_SHIFT_0 14
1070#define AARCH64_ESR_EL1_OPC1_MASK_0 0x1c000U
1071#define AARCH64_ESR_EL1_OPC1_GET_0( _reg ) \
1072 ( ( ( _reg ) >> 14 ) & 0x7U )
1074#define AARCH64_ESR_EL1_SF 0x8000U
1076#define AARCH64_ESR_EL1_OPC1_1( _val ) ( ( _val ) << 16 )
1077#define AARCH64_ESR_EL1_OPC1_SHIFT_1 16
1078#define AARCH64_ESR_EL1_OPC1_MASK_1 0xf0000U
1079#define AARCH64_ESR_EL1_OPC1_GET_1( _reg ) \
1080 ( ( ( _reg ) >> 16 ) & 0xfU )
1082#define AARCH64_ESR_EL1_SRT( _val ) ( ( _val ) << 16 )
1083#define AARCH64_ESR_EL1_SRT_SHIFT 16
1084#define AARCH64_ESR_EL1_SRT_MASK 0x1f0000U
1085#define AARCH64_ESR_EL1_SRT_GET( _reg ) \
1086 ( ( ( _reg ) >> 16 ) & 0x1fU )
1088#define AARCH64_ESR_EL1_OP2( _val ) ( ( _val ) << 17 )
1089#define AARCH64_ESR_EL1_OP2_SHIFT 17
1090#define AARCH64_ESR_EL1_OP2_MASK 0xe0000U
1091#define AARCH64_ESR_EL1_OP2_GET( _reg ) \
1092 ( ( ( _reg ) >> 17 ) & 0x7U )
1094#define AARCH64_ESR_EL1_OPC2( _val ) ( ( _val ) << 17 )
1095#define AARCH64_ESR_EL1_OPC2_SHIFT 17
1096#define AARCH64_ESR_EL1_OPC2_MASK 0xe0000U
1097#define AARCH64_ESR_EL1_OPC2_GET( _reg ) \
1098 ( ( ( _reg ) >> 17 ) & 0x7U )
1100#define AARCH64_ESR_EL1_CCKNOWNPASS 0x80000U
1102#define AARCH64_ESR_EL1_OP0( _val ) ( ( _val ) << 20 )
1103#define AARCH64_ESR_EL1_OP0_SHIFT 20
1104#define AARCH64_ESR_EL1_OP0_MASK 0x300000U
1105#define AARCH64_ESR_EL1_OP0_GET( _reg ) \
1106 ( ( ( _reg ) >> 20 ) & 0x3U )
1108#define AARCH64_ESR_EL1_COND( _val ) ( ( _val ) << 20 )
1109#define AARCH64_ESR_EL1_COND_SHIFT 20
1110#define AARCH64_ESR_EL1_COND_MASK 0xf00000U
1111#define AARCH64_ESR_EL1_COND_GET( _reg ) \
1112 ( ( ( _reg ) >> 20 ) & 0xfU )
1114#define AARCH64_ESR_EL1_SSE 0x200000U
1116#define AARCH64_ESR_EL1_SAS( _val ) ( ( _val ) << 22 )
1117#define AARCH64_ESR_EL1_SAS_SHIFT 22
1118#define AARCH64_ESR_EL1_SAS_MASK 0xc00000U
1119#define AARCH64_ESR_EL1_SAS_GET( _reg ) \
1120 ( ( ( _reg ) >> 22 ) & 0x3U )
1122#define AARCH64_ESR_EL1_TFV 0x800000U
1124#define AARCH64_ESR_EL1_CV 0x1000000U
1126#define AARCH64_ESR_EL1_IDS 0x1000000U
1128#define AARCH64_ESR_EL1_ISV 0x1000000U
1130#define AARCH64_ESR_EL1_IL 0x2000000U
1132#define AARCH64_ESR_EL1_EC( _val ) ( ( _val ) << 26 )
1133#define AARCH64_ESR_EL1_EC_SHIFT 26
1134#define AARCH64_ESR_EL1_EC_MASK 0xfc000000U
1135#define AARCH64_ESR_EL1_EC_GET( _reg ) \
1136 ( ( ( _reg ) >> 26 ) & 0x3fU )
1138static inline uint64_t _AArch64_Read_esr_el1(
void )
1143 "mrs %0, ESR_EL1" :
"=&r" ( value ) : :
"memory"
1149static inline void _AArch64_Write_esr_el1( uint64_t value )
1152 "msr ESR_EL1, %0" : :
"r" ( value ) :
"memory"
1158#define AARCH64_ESR_EL2_DIRECTION 0x1U
1160#define AARCH64_ESR_EL2_ERETA 0x1U
1162#define AARCH64_ESR_EL2_IOF 0x1U
1164#define AARCH64_ESR_EL2_TI 0x1U
1166#define AARCH64_ESR_EL2_BTYPE( _val ) ( ( _val ) << 0 )
1167#define AARCH64_ESR_EL2_BTYPE_SHIFT 0
1168#define AARCH64_ESR_EL2_BTYPE_MASK 0x3U
1169#define AARCH64_ESR_EL2_BTYPE_GET( _reg ) \
1170 ( ( ( _reg ) >> 0 ) & 0x3U )
1172#define AARCH64_ESR_EL2_DFSC( _val ) ( ( _val ) << 0 )
1173#define AARCH64_ESR_EL2_DFSC_SHIFT 0
1174#define AARCH64_ESR_EL2_DFSC_MASK 0x3fU
1175#define AARCH64_ESR_EL2_DFSC_GET( _reg ) \
1176 ( ( ( _reg ) >> 0 ) & 0x3fU )
1178#define AARCH64_ESR_EL2_IFSC( _val ) ( ( _val ) << 0 )
1179#define AARCH64_ESR_EL2_IFSC_SHIFT 0
1180#define AARCH64_ESR_EL2_IFSC_MASK 0x3fU
1181#define AARCH64_ESR_EL2_IFSC_GET( _reg ) \
1182 ( ( ( _reg ) >> 0 ) & 0x3fU )
1184#define AARCH64_ESR_EL2_COMMENT( _val ) ( ( _val ) << 0 )
1185#define AARCH64_ESR_EL2_COMMENT_SHIFT 0
1186#define AARCH64_ESR_EL2_COMMENT_MASK 0xffffU
1187#define AARCH64_ESR_EL2_COMMENT_GET( _reg ) \
1188 ( ( ( _reg ) >> 0 ) & 0xffffU )
1190#define AARCH64_ESR_EL2_IMM16( _val ) ( ( _val ) << 0 )
1191#define AARCH64_ESR_EL2_IMM16_SHIFT 0
1192#define AARCH64_ESR_EL2_IMM16_MASK 0xffffU
1193#define AARCH64_ESR_EL2_IMM16_GET( _reg ) \
1194 ( ( ( _reg ) >> 0 ) & 0xffffU )
1196#define AARCH64_ESR_EL2_ISS( _val ) ( ( _val ) << 0 )
1197#define AARCH64_ESR_EL2_ISS_SHIFT 0
1198#define AARCH64_ESR_EL2_ISS_MASK 0x1ffffffU
1199#define AARCH64_ESR_EL2_ISS_GET( _reg ) \
1200 ( ( ( _reg ) >> 0 ) & 0x1ffffffU )
1202#define AARCH64_ESR_EL2_DZF 0x2U
1204#define AARCH64_ESR_EL2_ERET 0x2U
1206#define AARCH64_ESR_EL2_AM( _val ) ( ( _val ) << 1 )
1207#define AARCH64_ESR_EL2_AM_SHIFT 1
1208#define AARCH64_ESR_EL2_AM_MASK 0xeU
1209#define AARCH64_ESR_EL2_AM_GET( _reg ) \
1210 ( ( ( _reg ) >> 1 ) & 0x7U )
1212#define AARCH64_ESR_EL2_CRM( _val ) ( ( _val ) << 1 )
1213#define AARCH64_ESR_EL2_CRM_SHIFT 1
1214#define AARCH64_ESR_EL2_CRM_MASK 0x1eU
1215#define AARCH64_ESR_EL2_CRM_GET( _reg ) \
1216 ( ( ( _reg ) >> 1 ) & 0xfU )
1218#define AARCH64_ESR_EL2_OFF 0x4U
1220#define AARCH64_ESR_EL2_UFF 0x8U
1222#define AARCH64_ESR_EL2_IXF 0x10U
1224#define AARCH64_ESR_EL2_OFFSET 0x10U
1226#define AARCH64_ESR_EL2_RN( _val ) ( ( _val ) << 5 )
1227#define AARCH64_ESR_EL2_RN_SHIFT 5
1228#define AARCH64_ESR_EL2_RN_MASK 0x3e0U
1229#define AARCH64_ESR_EL2_RN_GET( _reg ) \
1230 ( ( ( _reg ) >> 5 ) & 0x1fU )
1232#define AARCH64_ESR_EL2_RT( _val ) ( ( _val ) << 5 )
1233#define AARCH64_ESR_EL2_RT_SHIFT 5
1234#define AARCH64_ESR_EL2_RT_MASK 0x3e0U
1235#define AARCH64_ESR_EL2_RT_GET( _reg ) \
1236 ( ( ( _reg ) >> 5 ) & 0x1fU )
1238#define AARCH64_ESR_EL2_EX 0x40U
1240#define AARCH64_ESR_EL2_WNR 0x40U
1242#define AARCH64_ESR_EL2_IDF 0x80U
1244#define AARCH64_ESR_EL2_S1PTW 0x80U
1246#define AARCH64_ESR_EL2_CM 0x100U
1248#define AARCH64_ESR_EL2_VECITR( _val ) ( ( _val ) << 8 )
1249#define AARCH64_ESR_EL2_VECITR_SHIFT 8
1250#define AARCH64_ESR_EL2_VECITR_MASK 0x700U
1251#define AARCH64_ESR_EL2_VECITR_GET( _reg ) \
1252 ( ( ( _reg ) >> 8 ) & 0x7U )
1254#define AARCH64_ESR_EL2_EA 0x200U
1256#define AARCH64_ESR_EL2_FNV 0x400U
1258#define AARCH64_ESR_EL2_AET( _val ) ( ( _val ) << 10 )
1259#define AARCH64_ESR_EL2_AET_SHIFT 10
1260#define AARCH64_ESR_EL2_AET_MASK 0x1c00U
1261#define AARCH64_ESR_EL2_AET_GET( _reg ) \
1262 ( ( ( _reg ) >> 10 ) & 0x7U )
1264#define AARCH64_ESR_EL2_CRN( _val ) ( ( _val ) << 10 )
1265#define AARCH64_ESR_EL2_CRN_SHIFT 10
1266#define AARCH64_ESR_EL2_CRN_MASK 0x3c00U
1267#define AARCH64_ESR_EL2_CRN_GET( _reg ) \
1268 ( ( ( _reg ) >> 10 ) & 0xfU )
1270#define AARCH64_ESR_EL2_RT2( _val ) ( ( _val ) << 10 )
1271#define AARCH64_ESR_EL2_RT2_SHIFT 10
1272#define AARCH64_ESR_EL2_RT2_MASK 0x7c00U
1273#define AARCH64_ESR_EL2_RT2_GET( _reg ) \
1274 ( ( ( _reg ) >> 10 ) & 0x1fU )
1276#define AARCH64_ESR_EL2_SET( _val ) ( ( _val ) << 11 )
1277#define AARCH64_ESR_EL2_SET_SHIFT 11
1278#define AARCH64_ESR_EL2_SET_MASK 0x1800U
1279#define AARCH64_ESR_EL2_SET_GET( _reg ) \
1280 ( ( ( _reg ) >> 11 ) & 0x3U )
1282#define AARCH64_ESR_EL2_IMM8( _val ) ( ( _val ) << 12 )
1283#define AARCH64_ESR_EL2_IMM8_SHIFT 12
1284#define AARCH64_ESR_EL2_IMM8_MASK 0xff000U
1285#define AARCH64_ESR_EL2_IMM8_GET( _reg ) \
1286 ( ( ( _reg ) >> 12 ) & 0xffU )
1288#define AARCH64_ESR_EL2_IESB 0x2000U
1290#define AARCH64_ESR_EL2_VNCR 0x2000U
1292#define AARCH64_ESR_EL2_AR 0x4000U
1294#define AARCH64_ESR_EL2_OP1( _val ) ( ( _val ) << 14 )
1295#define AARCH64_ESR_EL2_OP1_SHIFT 14
1296#define AARCH64_ESR_EL2_OP1_MASK 0x1c000U
1297#define AARCH64_ESR_EL2_OP1_GET( _reg ) \
1298 ( ( ( _reg ) >> 14 ) & 0x7U )
1300#define AARCH64_ESR_EL2_OPC1_0( _val ) ( ( _val ) << 14 )
1301#define AARCH64_ESR_EL2_OPC1_SHIFT_0 14
1302#define AARCH64_ESR_EL2_OPC1_MASK_0 0x1c000U
1303#define AARCH64_ESR_EL2_OPC1_GET_0( _reg ) \
1304 ( ( ( _reg ) >> 14 ) & 0x7U )
1306#define AARCH64_ESR_EL2_SF 0x8000U
1308#define AARCH64_ESR_EL2_OPC1_1( _val ) ( ( _val ) << 16 )
1309#define AARCH64_ESR_EL2_OPC1_SHIFT_1 16
1310#define AARCH64_ESR_EL2_OPC1_MASK_1 0xf0000U
1311#define AARCH64_ESR_EL2_OPC1_GET_1( _reg ) \
1312 ( ( ( _reg ) >> 16 ) & 0xfU )
1314#define AARCH64_ESR_EL2_SRT( _val ) ( ( _val ) << 16 )
1315#define AARCH64_ESR_EL2_SRT_SHIFT 16
1316#define AARCH64_ESR_EL2_SRT_MASK 0x1f0000U
1317#define AARCH64_ESR_EL2_SRT_GET( _reg ) \
1318 ( ( ( _reg ) >> 16 ) & 0x1fU )
1320#define AARCH64_ESR_EL2_OP2( _val ) ( ( _val ) << 17 )
1321#define AARCH64_ESR_EL2_OP2_SHIFT 17
1322#define AARCH64_ESR_EL2_OP2_MASK 0xe0000U
1323#define AARCH64_ESR_EL2_OP2_GET( _reg ) \
1324 ( ( ( _reg ) >> 17 ) & 0x7U )
1326#define AARCH64_ESR_EL2_OPC2( _val ) ( ( _val ) << 17 )
1327#define AARCH64_ESR_EL2_OPC2_SHIFT 17
1328#define AARCH64_ESR_EL2_OPC2_MASK 0xe0000U
1329#define AARCH64_ESR_EL2_OPC2_GET( _reg ) \
1330 ( ( ( _reg ) >> 17 ) & 0x7U )
1332#define AARCH64_ESR_EL2_CCKNOWNPASS 0x80000U
1334#define AARCH64_ESR_EL2_OP0( _val ) ( ( _val ) << 20 )
1335#define AARCH64_ESR_EL2_OP0_SHIFT 20
1336#define AARCH64_ESR_EL2_OP0_MASK 0x300000U
1337#define AARCH64_ESR_EL2_OP0_GET( _reg ) \
1338 ( ( ( _reg ) >> 20 ) & 0x3U )
1340#define AARCH64_ESR_EL2_COND( _val ) ( ( _val ) << 20 )
1341#define AARCH64_ESR_EL2_COND_SHIFT 20
1342#define AARCH64_ESR_EL2_COND_MASK 0xf00000U
1343#define AARCH64_ESR_EL2_COND_GET( _reg ) \
1344 ( ( ( _reg ) >> 20 ) & 0xfU )
1346#define AARCH64_ESR_EL2_SSE 0x200000U
1348#define AARCH64_ESR_EL2_SAS( _val ) ( ( _val ) << 22 )
1349#define AARCH64_ESR_EL2_SAS_SHIFT 22
1350#define AARCH64_ESR_EL2_SAS_MASK 0xc00000U
1351#define AARCH64_ESR_EL2_SAS_GET( _reg ) \
1352 ( ( ( _reg ) >> 22 ) & 0x3U )
1354#define AARCH64_ESR_EL2_TFV 0x800000U
1356#define AARCH64_ESR_EL2_CV 0x1000000U
1358#define AARCH64_ESR_EL2_IDS 0x1000000U
1360#define AARCH64_ESR_EL2_ISV 0x1000000U
1362#define AARCH64_ESR_EL2_IL 0x2000000U
1364#define AARCH64_ESR_EL2_EC( _val ) ( ( _val ) << 26 )
1365#define AARCH64_ESR_EL2_EC_SHIFT 26
1366#define AARCH64_ESR_EL2_EC_MASK 0xfc000000U
1367#define AARCH64_ESR_EL2_EC_GET( _reg ) \
1368 ( ( ( _reg ) >> 26 ) & 0x3fU )
1370static inline uint64_t _AArch64_Read_esr_el2(
void )
1375 "mrs %0, ESR_EL2" :
"=&r" ( value ) : :
"memory"
1381static inline void _AArch64_Write_esr_el2( uint64_t value )
1384 "msr ESR_EL2, %0" : :
"r" ( value ) :
"memory"
1390#define AARCH64_ESR_EL3_DIRECTION 0x1U
1392#define AARCH64_ESR_EL3_ERETA 0x1U
1394#define AARCH64_ESR_EL3_IOF 0x1U
1396#define AARCH64_ESR_EL3_TI 0x1U
1398#define AARCH64_ESR_EL3_BTYPE( _val ) ( ( _val ) << 0 )
1399#define AARCH64_ESR_EL3_BTYPE_SHIFT 0
1400#define AARCH64_ESR_EL3_BTYPE_MASK 0x3U
1401#define AARCH64_ESR_EL3_BTYPE_GET( _reg ) \
1402 ( ( ( _reg ) >> 0 ) & 0x3U )
1404#define AARCH64_ESR_EL3_DFSC( _val ) ( ( _val ) << 0 )
1405#define AARCH64_ESR_EL3_DFSC_SHIFT 0
1406#define AARCH64_ESR_EL3_DFSC_MASK 0x3fU
1407#define AARCH64_ESR_EL3_DFSC_GET( _reg ) \
1408 ( ( ( _reg ) >> 0 ) & 0x3fU )
1410#define AARCH64_ESR_EL3_IFSC( _val ) ( ( _val ) << 0 )
1411#define AARCH64_ESR_EL3_IFSC_SHIFT 0
1412#define AARCH64_ESR_EL3_IFSC_MASK 0x3fU
1413#define AARCH64_ESR_EL3_IFSC_GET( _reg ) \
1414 ( ( ( _reg ) >> 0 ) & 0x3fU )
1416#define AARCH64_ESR_EL3_COMMENT( _val ) ( ( _val ) << 0 )
1417#define AARCH64_ESR_EL3_COMMENT_SHIFT 0
1418#define AARCH64_ESR_EL3_COMMENT_MASK 0xffffU
1419#define AARCH64_ESR_EL3_COMMENT_GET( _reg ) \
1420 ( ( ( _reg ) >> 0 ) & 0xffffU )
1422#define AARCH64_ESR_EL3_IMM16( _val ) ( ( _val ) << 0 )
1423#define AARCH64_ESR_EL3_IMM16_SHIFT 0
1424#define AARCH64_ESR_EL3_IMM16_MASK 0xffffU
1425#define AARCH64_ESR_EL3_IMM16_GET( _reg ) \
1426 ( ( ( _reg ) >> 0 ) & 0xffffU )
1428#define AARCH64_ESR_EL3_ISS( _val ) ( ( _val ) << 0 )
1429#define AARCH64_ESR_EL3_ISS_SHIFT 0
1430#define AARCH64_ESR_EL3_ISS_MASK 0x1ffffffU
1431#define AARCH64_ESR_EL3_ISS_GET( _reg ) \
1432 ( ( ( _reg ) >> 0 ) & 0x1ffffffU )
1434#define AARCH64_ESR_EL3_DZF 0x2U
1436#define AARCH64_ESR_EL3_ERET 0x2U
1438#define AARCH64_ESR_EL3_AM( _val ) ( ( _val ) << 1 )
1439#define AARCH64_ESR_EL3_AM_SHIFT 1
1440#define AARCH64_ESR_EL3_AM_MASK 0xeU
1441#define AARCH64_ESR_EL3_AM_GET( _reg ) \
1442 ( ( ( _reg ) >> 1 ) & 0x7U )
1444#define AARCH64_ESR_EL3_CRM( _val ) ( ( _val ) << 1 )
1445#define AARCH64_ESR_EL3_CRM_SHIFT 1
1446#define AARCH64_ESR_EL3_CRM_MASK 0x1eU
1447#define AARCH64_ESR_EL3_CRM_GET( _reg ) \
1448 ( ( ( _reg ) >> 1 ) & 0xfU )
1450#define AARCH64_ESR_EL3_OFF 0x4U
1452#define AARCH64_ESR_EL3_UFF 0x8U
1454#define AARCH64_ESR_EL3_IXF 0x10U
1456#define AARCH64_ESR_EL3_OFFSET 0x10U
1458#define AARCH64_ESR_EL3_RN( _val ) ( ( _val ) << 5 )
1459#define AARCH64_ESR_EL3_RN_SHIFT 5
1460#define AARCH64_ESR_EL3_RN_MASK 0x3e0U
1461#define AARCH64_ESR_EL3_RN_GET( _reg ) \
1462 ( ( ( _reg ) >> 5 ) & 0x1fU )
1464#define AARCH64_ESR_EL3_RT( _val ) ( ( _val ) << 5 )
1465#define AARCH64_ESR_EL3_RT_SHIFT 5
1466#define AARCH64_ESR_EL3_RT_MASK 0x3e0U
1467#define AARCH64_ESR_EL3_RT_GET( _reg ) \
1468 ( ( ( _reg ) >> 5 ) & 0x1fU )
1470#define AARCH64_ESR_EL3_EX 0x40U
1472#define AARCH64_ESR_EL3_WNR 0x40U
1474#define AARCH64_ESR_EL3_IDF 0x80U
1476#define AARCH64_ESR_EL3_S1PTW 0x80U
1478#define AARCH64_ESR_EL3_CM 0x100U
1480#define AARCH64_ESR_EL3_VECITR( _val ) ( ( _val ) << 8 )
1481#define AARCH64_ESR_EL3_VECITR_SHIFT 8
1482#define AARCH64_ESR_EL3_VECITR_MASK 0x700U
1483#define AARCH64_ESR_EL3_VECITR_GET( _reg ) \
1484 ( ( ( _reg ) >> 8 ) & 0x7U )
1486#define AARCH64_ESR_EL3_EA 0x200U
1488#define AARCH64_ESR_EL3_FNV 0x400U
1490#define AARCH64_ESR_EL3_AET( _val ) ( ( _val ) << 10 )
1491#define AARCH64_ESR_EL3_AET_SHIFT 10
1492#define AARCH64_ESR_EL3_AET_MASK 0x1c00U
1493#define AARCH64_ESR_EL3_AET_GET( _reg ) \
1494 ( ( ( _reg ) >> 10 ) & 0x7U )
1496#define AARCH64_ESR_EL3_CRN( _val ) ( ( _val ) << 10 )
1497#define AARCH64_ESR_EL3_CRN_SHIFT 10
1498#define AARCH64_ESR_EL3_CRN_MASK 0x3c00U
1499#define AARCH64_ESR_EL3_CRN_GET( _reg ) \
1500 ( ( ( _reg ) >> 10 ) & 0xfU )
1502#define AARCH64_ESR_EL3_RT2( _val ) ( ( _val ) << 10 )
1503#define AARCH64_ESR_EL3_RT2_SHIFT 10
1504#define AARCH64_ESR_EL3_RT2_MASK 0x7c00U
1505#define AARCH64_ESR_EL3_RT2_GET( _reg ) \
1506 ( ( ( _reg ) >> 10 ) & 0x1fU )
1508#define AARCH64_ESR_EL3_SET( _val ) ( ( _val ) << 11 )
1509#define AARCH64_ESR_EL3_SET_SHIFT 11
1510#define AARCH64_ESR_EL3_SET_MASK 0x1800U
1511#define AARCH64_ESR_EL3_SET_GET( _reg ) \
1512 ( ( ( _reg ) >> 11 ) & 0x3U )
1514#define AARCH64_ESR_EL3_IMM8( _val ) ( ( _val ) << 12 )
1515#define AARCH64_ESR_EL3_IMM8_SHIFT 12
1516#define AARCH64_ESR_EL3_IMM8_MASK 0xff000U
1517#define AARCH64_ESR_EL3_IMM8_GET( _reg ) \
1518 ( ( ( _reg ) >> 12 ) & 0xffU )
1520#define AARCH64_ESR_EL3_IESB 0x2000U
1522#define AARCH64_ESR_EL3_VNCR 0x2000U
1524#define AARCH64_ESR_EL3_AR 0x4000U
1526#define AARCH64_ESR_EL3_OP1( _val ) ( ( _val ) << 14 )
1527#define AARCH64_ESR_EL3_OP1_SHIFT 14
1528#define AARCH64_ESR_EL3_OP1_MASK 0x1c000U
1529#define AARCH64_ESR_EL3_OP1_GET( _reg ) \
1530 ( ( ( _reg ) >> 14 ) & 0x7U )
1532#define AARCH64_ESR_EL3_OPC1_0( _val ) ( ( _val ) << 14 )
1533#define AARCH64_ESR_EL3_OPC1_SHIFT_0 14
1534#define AARCH64_ESR_EL3_OPC1_MASK_0 0x1c000U
1535#define AARCH64_ESR_EL3_OPC1_GET_0( _reg ) \
1536 ( ( ( _reg ) >> 14 ) & 0x7U )
1538#define AARCH64_ESR_EL3_SF 0x8000U
1540#define AARCH64_ESR_EL3_OPC1_1( _val ) ( ( _val ) << 16 )
1541#define AARCH64_ESR_EL3_OPC1_SHIFT_1 16
1542#define AARCH64_ESR_EL3_OPC1_MASK_1 0xf0000U
1543#define AARCH64_ESR_EL3_OPC1_GET_1( _reg ) \
1544 ( ( ( _reg ) >> 16 ) & 0xfU )
1546#define AARCH64_ESR_EL3_SRT( _val ) ( ( _val ) << 16 )
1547#define AARCH64_ESR_EL3_SRT_SHIFT 16
1548#define AARCH64_ESR_EL3_SRT_MASK 0x1f0000U
1549#define AARCH64_ESR_EL3_SRT_GET( _reg ) \
1550 ( ( ( _reg ) >> 16 ) & 0x1fU )
1552#define AARCH64_ESR_EL3_OP2( _val ) ( ( _val ) << 17 )
1553#define AARCH64_ESR_EL3_OP2_SHIFT 17
1554#define AARCH64_ESR_EL3_OP2_MASK 0xe0000U
1555#define AARCH64_ESR_EL3_OP2_GET( _reg ) \
1556 ( ( ( _reg ) >> 17 ) & 0x7U )
1558#define AARCH64_ESR_EL3_OPC2( _val ) ( ( _val ) << 17 )
1559#define AARCH64_ESR_EL3_OPC2_SHIFT 17
1560#define AARCH64_ESR_EL3_OPC2_MASK 0xe0000U
1561#define AARCH64_ESR_EL3_OPC2_GET( _reg ) \
1562 ( ( ( _reg ) >> 17 ) & 0x7U )
1564#define AARCH64_ESR_EL3_CCKNOWNPASS 0x80000U
1566#define AARCH64_ESR_EL3_OP0( _val ) ( ( _val ) << 20 )
1567#define AARCH64_ESR_EL3_OP0_SHIFT 20
1568#define AARCH64_ESR_EL3_OP0_MASK 0x300000U
1569#define AARCH64_ESR_EL3_OP0_GET( _reg ) \
1570 ( ( ( _reg ) >> 20 ) & 0x3U )
1572#define AARCH64_ESR_EL3_COND( _val ) ( ( _val ) << 20 )
1573#define AARCH64_ESR_EL3_COND_SHIFT 20
1574#define AARCH64_ESR_EL3_COND_MASK 0xf00000U
1575#define AARCH64_ESR_EL3_COND_GET( _reg ) \
1576 ( ( ( _reg ) >> 20 ) & 0xfU )
1578#define AARCH64_ESR_EL3_SSE 0x200000U
1580#define AARCH64_ESR_EL3_SAS( _val ) ( ( _val ) << 22 )
1581#define AARCH64_ESR_EL3_SAS_SHIFT 22
1582#define AARCH64_ESR_EL3_SAS_MASK 0xc00000U
1583#define AARCH64_ESR_EL3_SAS_GET( _reg ) \
1584 ( ( ( _reg ) >> 22 ) & 0x3U )
1586#define AARCH64_ESR_EL3_TFV 0x800000U
1588#define AARCH64_ESR_EL3_CV 0x1000000U
1590#define AARCH64_ESR_EL3_IDS 0x1000000U
1592#define AARCH64_ESR_EL3_ISV 0x1000000U
1594#define AARCH64_ESR_EL3_IL 0x2000000U
1596#define AARCH64_ESR_EL3_EC( _val ) ( ( _val ) << 26 )
1597#define AARCH64_ESR_EL3_EC_SHIFT 26
1598#define AARCH64_ESR_EL3_EC_MASK 0xfc000000U
1599#define AARCH64_ESR_EL3_EC_GET( _reg ) \
1600 ( ( ( _reg ) >> 26 ) & 0x3fU )
1602static inline uint64_t _AArch64_Read_esr_el3(
void )
1607 "mrs %0, ESR_EL3" :
"=&r" ( value ) : :
"memory"
1613static inline void _AArch64_Write_esr_el3( uint64_t value )
1616 "msr ESR_EL3, %0" : :
"r" ( value ) :
"memory"
1622static inline uint64_t _AArch64_Read_far_el1(
void )
1627 "mrs %0, FAR_EL1" :
"=&r" ( value ) : :
"memory"
1633static inline void _AArch64_Write_far_el1( uint64_t value )
1636 "msr FAR_EL1, %0" : :
"r" ( value ) :
"memory"
1642static inline uint64_t _AArch64_Read_far_el2(
void )
1647 "mrs %0, FAR_EL2" :
"=&r" ( value ) : :
"memory"
1653static inline void _AArch64_Write_far_el2( uint64_t value )
1656 "msr FAR_EL2, %0" : :
"r" ( value ) :
"memory"
1662static inline uint64_t _AArch64_Read_far_el3(
void )
1667 "mrs %0, FAR_EL3" :
"=&r" ( value ) : :
"memory"
1673static inline void _AArch64_Write_far_el3( uint64_t value )
1676 "msr FAR_EL3, %0" : :
"r" ( value ) :
"memory"
1682#define AARCH64_FPEXC32_EL2_IOF 0x1U
1684#define AARCH64_FPEXC32_EL2_DZF 0x2U
1686#define AARCH64_FPEXC32_EL2_OFF 0x4U
1688#define AARCH64_FPEXC32_EL2_UFF 0x8U
1690#define AARCH64_FPEXC32_EL2_IXF 0x10U
1692#define AARCH64_FPEXC32_EL2_IDF 0x80U
1694#define AARCH64_FPEXC32_EL2_VECITR( _val ) ( ( _val ) << 8 )
1695#define AARCH64_FPEXC32_EL2_VECITR_SHIFT 8
1696#define AARCH64_FPEXC32_EL2_VECITR_MASK 0x700U
1697#define AARCH64_FPEXC32_EL2_VECITR_GET( _reg ) \
1698 ( ( ( _reg ) >> 8 ) & 0x7U )
1700#define AARCH64_FPEXC32_EL2_TFV 0x4000000U
1702#define AARCH64_FPEXC32_EL2_VV 0x8000000U
1704#define AARCH64_FPEXC32_EL2_FP2V 0x10000000U
1706#define AARCH64_FPEXC32_EL2_DEX 0x20000000U
1708#define AARCH64_FPEXC32_EL2_EN 0x40000000U
1710#define AARCH64_FPEXC32_EL2_EX 0x80000000U
1712static inline uint64_t _AArch64_Read_fpexc32_el2(
void )
1717 "mrs %0, FPEXC32_EL2" :
"=&r" ( value ) : :
"memory"
1723static inline void _AArch64_Write_fpexc32_el2( uint64_t value )
1726 "msr FPEXC32_EL2, %0" : :
"r" ( value ) :
"memory"
1732#define AARCH64_GCR_EL1_EXCLUDE( _val ) ( ( _val ) << 0 )
1733#define AARCH64_GCR_EL1_EXCLUDE_SHIFT 0
1734#define AARCH64_GCR_EL1_EXCLUDE_MASK 0xffffU
1735#define AARCH64_GCR_EL1_EXCLUDE_GET( _reg ) \
1736 ( ( ( _reg ) >> 0 ) & 0xffffU )
1738#define AARCH64_GCR_EL1_RRND 0x10000U
1740static inline uint64_t _AArch64_Read_gcr_el1(
void )
1745 "mrs %0, GCR_EL1" :
"=&r" ( value ) : :
"memory"
1751static inline void _AArch64_Write_gcr_el1( uint64_t value )
1754 "msr GCR_EL1, %0" : :
"r" ( value ) :
"memory"
1760#define AARCH64_GMID_EL1_BS( _val ) ( ( _val ) << 0 )
1761#define AARCH64_GMID_EL1_BS_SHIFT 0
1762#define AARCH64_GMID_EL1_BS_MASK 0xfU
1763#define AARCH64_GMID_EL1_BS_GET( _reg ) \
1764 ( ( ( _reg ) >> 0 ) & 0xfU )
1766static inline uint64_t _AArch64_Read_gmid_el1(
void )
1771 "mrs %0, GMID_EL1" :
"=&r" ( value ) : :
"memory"
1779static inline uint64_t _AArch64_Read_hacr_el2(
void )
1784 "mrs %0, HACR_EL2" :
"=&r" ( value ) : :
"memory"
1790static inline void _AArch64_Write_hacr_el2( uint64_t value )
1793 "msr HACR_EL2, %0" : :
"r" ( value ) :
"memory"
1799#define AARCH64_HAFGRTR_EL2_AMCNTEN0 0x1U
1801#define AARCH64_HAFGRTR_EL2_AMCNTEN1 0x20000U
1803#define AARCH64_HAFGRTR_EL2_AMEVCNTR10_EL0 0x40000U
1805#define AARCH64_HAFGRTR_EL2_AMEVTYPER10_EL0 0x80000U
1807#define AARCH64_HAFGRTR_EL2_AMEVCNTR11_EL0 0x100000U
1809#define AARCH64_HAFGRTR_EL2_AMEVTYPER11_EL0 0x200000U
1811#define AARCH64_HAFGRTR_EL2_AMEVCNTR12_EL0 0x400000U
1813#define AARCH64_HAFGRTR_EL2_AMEVTYPER12_EL0 0x800000U
1815#define AARCH64_HAFGRTR_EL2_AMEVCNTR13_EL0 0x1000000U
1817#define AARCH64_HAFGRTR_EL2_AMEVTYPER13_EL0 0x2000000U
1819#define AARCH64_HAFGRTR_EL2_AMEVCNTR14_EL0 0x4000000U
1821#define AARCH64_HAFGRTR_EL2_AMEVTYPER14_EL0 0x8000000U
1823#define AARCH64_HAFGRTR_EL2_AMEVCNTR15_EL0 0x10000000U
1825#define AARCH64_HAFGRTR_EL2_AMEVTYPER15_EL0 0x20000000U
1827#define AARCH64_HAFGRTR_EL2_AMEVCNTR16_EL0 0x40000000U
1829#define AARCH64_HAFGRTR_EL2_AMEVTYPER16_EL0 0x80000000U
1831#define AARCH64_HAFGRTR_EL2_AMEVCNTR17_EL0 0x100000000ULL
1833#define AARCH64_HAFGRTR_EL2_AMEVTYPER17_EL0 0x200000000ULL
1835#define AARCH64_HAFGRTR_EL2_AMEVCNTR18_EL0 0x400000000ULL
1837#define AARCH64_HAFGRTR_EL2_AMEVTYPER18_EL0 0x800000000ULL
1839#define AARCH64_HAFGRTR_EL2_AMEVCNTR19_EL0 0x1000000000ULL
1841#define AARCH64_HAFGRTR_EL2_AMEVTYPER19_EL0 0x2000000000ULL
1843#define AARCH64_HAFGRTR_EL2_AMEVCNTR110_EL0 0x4000000000ULL
1845#define AARCH64_HAFGRTR_EL2_AMEVTYPER110_EL0 0x8000000000ULL
1847#define AARCH64_HAFGRTR_EL2_AMEVCNTR111_EL0 0x10000000000ULL
1849#define AARCH64_HAFGRTR_EL2_AMEVTYPER111_EL0 0x20000000000ULL
1851#define AARCH64_HAFGRTR_EL2_AMEVCNTR112_EL0 0x40000000000ULL
1853#define AARCH64_HAFGRTR_EL2_AMEVTYPER112_EL0 0x80000000000ULL
1855#define AARCH64_HAFGRTR_EL2_AMEVCNTR113_EL0 0x100000000000ULL
1857#define AARCH64_HAFGRTR_EL2_AMEVTYPER113_EL0 0x200000000000ULL
1859#define AARCH64_HAFGRTR_EL2_AMEVCNTR114_EL0 0x400000000000ULL
1861#define AARCH64_HAFGRTR_EL2_AMEVTYPER114_EL0 0x800000000000ULL
1863#define AARCH64_HAFGRTR_EL2_AMEVCNTR115_EL0 0x1000000000000ULL
1865#define AARCH64_HAFGRTR_EL2_AMEVTYPER115_EL0 0x2000000000000ULL
1867static inline uint64_t _AArch64_Read_hafgrtr_el2(
void )
1872 "mrs %0, HAFGRTR_EL2" :
"=&r" ( value ) : :
"memory"
1878static inline void _AArch64_Write_hafgrtr_el2( uint64_t value )
1881 "msr HAFGRTR_EL2, %0" : :
"r" ( value ) :
"memory"
1887#define AARCH64_HCR_EL2_VM 0x1U
1889#define AARCH64_HCR_EL2_SWIO 0x2U
1891#define AARCH64_HCR_EL2_PTW 0x4U
1893#define AARCH64_HCR_EL2_FMO 0x8U
1895#define AARCH64_HCR_EL2_IMO 0x10U
1897#define AARCH64_HCR_EL2_AMO 0x20U
1899#define AARCH64_HCR_EL2_VF 0x40U
1901#define AARCH64_HCR_EL2_VI 0x80U
1903#define AARCH64_HCR_EL2_VSE 0x100U
1905#define AARCH64_HCR_EL2_FB 0x200U
1907#define AARCH64_HCR_EL2_BSU( _val ) ( ( _val ) << 10 )
1908#define AARCH64_HCR_EL2_BSU_SHIFT 10
1909#define AARCH64_HCR_EL2_BSU_MASK 0xc00U
1910#define AARCH64_HCR_EL2_BSU_GET( _reg ) \
1911 ( ( ( _reg ) >> 10 ) & 0x3U )
1913#define AARCH64_HCR_EL2_DC 0x1000U
1915#define AARCH64_HCR_EL2_TWI 0x2000U
1917#define AARCH64_HCR_EL2_TWE 0x4000U
1919#define AARCH64_HCR_EL2_TID0 0x8000U
1921#define AARCH64_HCR_EL2_TID1 0x10000U
1923#define AARCH64_HCR_EL2_TID2 0x20000U
1925#define AARCH64_HCR_EL2_TID3 0x40000U
1927#define AARCH64_HCR_EL2_TSC 0x80000U
1929#define AARCH64_HCR_EL2_TIDCP 0x100000U
1931#define AARCH64_HCR_EL2_TACR 0x200000U
1933#define AARCH64_HCR_EL2_TSW 0x400000U
1935#define AARCH64_HCR_EL2_TPCP 0x800000U
1937#define AARCH64_HCR_EL2_TPU 0x1000000U
1939#define AARCH64_HCR_EL2_TTLB 0x2000000U
1941#define AARCH64_HCR_EL2_TVM 0x4000000U
1943#define AARCH64_HCR_EL2_TGE 0x8000000U
1945#define AARCH64_HCR_EL2_TDZ 0x10000000U
1947#define AARCH64_HCR_EL2_HCD 0x20000000U
1949#define AARCH64_HCR_EL2_TRVM 0x40000000U
1951#define AARCH64_HCR_EL2_RW 0x80000000U
1953#define AARCH64_HCR_EL2_CD 0x100000000ULL
1955#define AARCH64_HCR_EL2_ID 0x200000000ULL
1957#define AARCH64_HCR_EL2_E2H 0x400000000ULL
1959#define AARCH64_HCR_EL2_TLOR 0x800000000ULL
1961#define AARCH64_HCR_EL2_TERR 0x1000000000ULL
1963#define AARCH64_HCR_EL2_TEA 0x2000000000ULL
1965#define AARCH64_HCR_EL2_MIOCNCE 0x4000000000ULL
1967#define AARCH64_HCR_EL2_APK 0x10000000000ULL
1969#define AARCH64_HCR_EL2_API 0x20000000000ULL
1971#define AARCH64_HCR_EL2_NV 0x40000000000ULL
1973#define AARCH64_HCR_EL2_NV1 0x80000000000ULL
1975#define AARCH64_HCR_EL2_AT 0x100000000000ULL
1977#define AARCH64_HCR_EL2_NV2 0x200000000000ULL
1979#define AARCH64_HCR_EL2_FWB 0x400000000000ULL
1981#define AARCH64_HCR_EL2_FIEN 0x800000000000ULL
1983#define AARCH64_HCR_EL2_TID4 0x2000000000000ULL
1985#define AARCH64_HCR_EL2_TICAB 0x4000000000000ULL
1987#define AARCH64_HCR_EL2_AMVOFFEN 0x8000000000000ULL
1989#define AARCH64_HCR_EL2_TOCU 0x10000000000000ULL
1991#define AARCH64_HCR_EL2_ENSCXT 0x20000000000000ULL
1993#define AARCH64_HCR_EL2_TTLBIS 0x40000000000000ULL
1995#define AARCH64_HCR_EL2_TTLBOS 0x80000000000000ULL
1997#define AARCH64_HCR_EL2_ATA 0x100000000000000ULL
1999#define AARCH64_HCR_EL2_DCT 0x200000000000000ULL
2001#define AARCH64_HCR_EL2_TID5 0x400000000000000ULL
2003#define AARCH64_HCR_EL2_TWEDEN 0x800000000000000ULL
2005#define AARCH64_HCR_EL2_TWEDEL( _val ) ( ( _val ) << 60 )
2006#define AARCH64_HCR_EL2_TWEDEL_SHIFT 60
2007#define AARCH64_HCR_EL2_TWEDEL_MASK 0xf000000000000000ULL
2008#define AARCH64_HCR_EL2_TWEDEL_GET( _reg ) \
2009 ( ( ( _reg ) >> 60 ) & 0xfULL )
2011static inline uint64_t _AArch64_Read_hcr_el2(
void )
2016 "mrs %0, HCR_EL2" :
"=&r" ( value ) : :
"memory"
2022static inline void _AArch64_Write_hcr_el2( uint64_t value )
2025 "msr HCR_EL2, %0" : :
"r" ( value ) :
"memory"
2031#define AARCH64_HDFGRTR_EL2_DBGBCRN_EL1 0x1U
2033#define AARCH64_HDFGRTR_EL2_DBGBVRN_EL1 0x2U
2035#define AARCH64_HDFGRTR_EL2_DBGWCRN_EL1 0x4U
2037#define AARCH64_HDFGRTR_EL2_DBGWVRN_EL1 0x8U
2039#define AARCH64_HDFGRTR_EL2_MDSCR_EL1 0x10U
2041#define AARCH64_HDFGRTR_EL2_DBGCLAIM 0x20U
2043#define AARCH64_HDFGRTR_EL2_DBGAUTHSTATUS_EL1 0x40U
2045#define AARCH64_HDFGRTR_EL2_DBGPRCR_EL1 0x80U
2047#define AARCH64_HDFGRTR_EL2_OSLSR_EL1 0x200U
2049#define AARCH64_HDFGRTR_EL2_OSECCR_EL1 0x400U
2051#define AARCH64_HDFGRTR_EL2_OSDLR_EL1 0x800U
2053#define AARCH64_HDFGRTR_EL2_PMEVCNTRN_EL0 0x1000U
2055#define AARCH64_HDFGRTR_EL2_PMEVTYPERN_EL0 0x2000U
2057#define AARCH64_HDFGRTR_EL2_PMCCFILTR_EL0 0x4000U
2059#define AARCH64_HDFGRTR_EL2_PMCCNTR_EL0 0x8000U
2061#define AARCH64_HDFGRTR_EL2_PMCNTEN 0x10000U
2063#define AARCH64_HDFGRTR_EL2_PMINTEN 0x20000U
2065#define AARCH64_HDFGRTR_EL2_PMOVS 0x40000U
2067#define AARCH64_HDFGRTR_EL2_PMSELR_EL0 0x80000U
2069#define AARCH64_HDFGRTR_EL2_PMMIR_EL1 0x400000U
2071#define AARCH64_HDFGRTR_EL2_PMBLIMITR_EL1 0x800000U
2073#define AARCH64_HDFGRTR_EL2_PMBPTR_EL1 0x1000000U
2075#define AARCH64_HDFGRTR_EL2_PMBSR_EL1 0x2000000U
2077#define AARCH64_HDFGRTR_EL2_PMSCR_EL1 0x4000000U
2079#define AARCH64_HDFGRTR_EL2_PMSEVFR_EL1 0x8000000U
2081#define AARCH64_HDFGRTR_EL2_PMSFCR_EL1 0x10000000U
2083#define AARCH64_HDFGRTR_EL2_PMSICR_EL1 0x20000000U
2085#define AARCH64_HDFGRTR_EL2_PMSIDR_EL1 0x40000000U
2087#define AARCH64_HDFGRTR_EL2_PMSIRR_EL1 0x80000000U
2089#define AARCH64_HDFGRTR_EL2_PMSLATFR_EL1 0x100000000ULL
2091#define AARCH64_HDFGRTR_EL2_TRC 0x200000000ULL
2093#define AARCH64_HDFGRTR_EL2_TRCAUTHSTATUS 0x400000000ULL
2095#define AARCH64_HDFGRTR_EL2_TRCAUXCTLR 0x800000000ULL
2097#define AARCH64_HDFGRTR_EL2_TRCCLAIM 0x1000000000ULL
2099#define AARCH64_HDFGRTR_EL2_TRCCNTVRN 0x2000000000ULL
2101#define AARCH64_HDFGRTR_EL2_TRCID 0x10000000000ULL
2103#define AARCH64_HDFGRTR_EL2_TRCIMSPECN 0x20000000000ULL
2105#define AARCH64_HDFGRTR_EL2_TRCOSLSR 0x80000000000ULL
2107#define AARCH64_HDFGRTR_EL2_TRCPRGCTLR 0x100000000000ULL
2109#define AARCH64_HDFGRTR_EL2_TRCSEQSTR 0x200000000000ULL
2111#define AARCH64_HDFGRTR_EL2_TRCSSCSRN 0x400000000000ULL
2113#define AARCH64_HDFGRTR_EL2_TRCSTATR 0x800000000000ULL
2115#define AARCH64_HDFGRTR_EL2_TRCVICTLR 0x1000000000000ULL
2117#define AARCH64_HDFGRTR_EL2_PMUSERENR_EL0 0x200000000000000ULL
2119#define AARCH64_HDFGRTR_EL2_PMCEIDN_EL0 0x400000000000000ULL
2121static inline uint64_t _AArch64_Read_hdfgrtr_el2(
void )
2126 "mrs %0, HDFGRTR_EL2" :
"=&r" ( value ) : :
"memory"
2132static inline void _AArch64_Write_hdfgrtr_el2( uint64_t value )
2135 "msr HDFGRTR_EL2, %0" : :
"r" ( value ) :
"memory"
2141#define AARCH64_HDFGWTR_EL2_DBGBCRN_EL1 0x1U
2143#define AARCH64_HDFGWTR_EL2_DBGBVRN_EL1 0x2U
2145#define AARCH64_HDFGWTR_EL2_DBGWCRN_EL1 0x4U
2147#define AARCH64_HDFGWTR_EL2_DBGWVRN_EL1 0x8U
2149#define AARCH64_HDFGWTR_EL2_MDSCR_EL1 0x10U
2151#define AARCH64_HDFGWTR_EL2_DBGCLAIM 0x20U
2153#define AARCH64_HDFGWTR_EL2_DBGPRCR_EL1 0x80U
2155#define AARCH64_HDFGWTR_EL2_OSLAR_EL1 0x100U
2157#define AARCH64_HDFGWTR_EL2_OSECCR_EL1 0x400U
2159#define AARCH64_HDFGWTR_EL2_OSDLR_EL1 0x800U
2161#define AARCH64_HDFGWTR_EL2_PMEVCNTRN_EL0 0x1000U
2163#define AARCH64_HDFGWTR_EL2_PMEVTYPERN_EL0 0x2000U
2165#define AARCH64_HDFGWTR_EL2_PMCCFILTR_EL0 0x4000U
2167#define AARCH64_HDFGWTR_EL2_PMCCNTR_EL0 0x8000U
2169#define AARCH64_HDFGWTR_EL2_PMCNTEN 0x10000U
2171#define AARCH64_HDFGWTR_EL2_PMINTEN 0x20000U
2173#define AARCH64_HDFGWTR_EL2_PMOVS 0x40000U
2175#define AARCH64_HDFGWTR_EL2_PMSELR_EL0 0x80000U
2177#define AARCH64_HDFGWTR_EL2_PMSWINC_EL0 0x100000U
2179#define AARCH64_HDFGWTR_EL2_PMCR_EL0 0x200000U
2181#define AARCH64_HDFGWTR_EL2_PMBLIMITR_EL1 0x800000U
2183#define AARCH64_HDFGWTR_EL2_PMBPTR_EL1 0x1000000U
2185#define AARCH64_HDFGWTR_EL2_PMBSR_EL1 0x2000000U
2187#define AARCH64_HDFGWTR_EL2_PMSCR_EL1 0x4000000U
2189#define AARCH64_HDFGWTR_EL2_PMSEVFR_EL1 0x8000000U
2191#define AARCH64_HDFGWTR_EL2_PMSFCR_EL1 0x10000000U
2193#define AARCH64_HDFGWTR_EL2_PMSICR_EL1 0x20000000U
2195#define AARCH64_HDFGWTR_EL2_PMSIRR_EL1 0x80000000U
2197#define AARCH64_HDFGWTR_EL2_PMSLATFR_EL1 0x100000000ULL
2199#define AARCH64_HDFGWTR_EL2_TRC 0x200000000ULL
2201#define AARCH64_HDFGWTR_EL2_TRCAUXCTLR 0x800000000ULL
2203#define AARCH64_HDFGWTR_EL2_TRCCLAIM 0x1000000000ULL
2205#define AARCH64_HDFGWTR_EL2_TRCCNTVRN 0x2000000000ULL
2207#define AARCH64_HDFGWTR_EL2_TRCIMSPECN 0x20000000000ULL
2209#define AARCH64_HDFGWTR_EL2_TRCOSLAR 0x40000000000ULL
2211#define AARCH64_HDFGWTR_EL2_TRCPRGCTLR 0x100000000000ULL
2213#define AARCH64_HDFGWTR_EL2_TRCSEQSTR 0x200000000000ULL
2215#define AARCH64_HDFGWTR_EL2_TRCSSCSRN 0x400000000000ULL
2217#define AARCH64_HDFGWTR_EL2_TRCVICTLR 0x1000000000000ULL
2219#define AARCH64_HDFGWTR_EL2_TRFCR_EL1 0x2000000000000ULL
2221#define AARCH64_HDFGWTR_EL2_PMUSERENR_EL0 0x200000000000000ULL
2223static inline uint64_t _AArch64_Read_hdfgwtr_el2(
void )
2228 "mrs %0, HDFGWTR_EL2" :
"=&r" ( value ) : :
"memory"
2234static inline void _AArch64_Write_hdfgwtr_el2( uint64_t value )
2237 "msr HDFGWTR_EL2, %0" : :
"r" ( value ) :
"memory"
2243#define AARCH64_HFGITR_EL2_ICIALLUIS 0x1U
2245#define AARCH64_HFGITR_EL2_ICIALLU 0x2U
2247#define AARCH64_HFGITR_EL2_ICIVAU 0x4U
2249#define AARCH64_HFGITR_EL2_DCIVAC 0x8U
2251#define AARCH64_HFGITR_EL2_DCISW 0x10U
2253#define AARCH64_HFGITR_EL2_DCCSW 0x20U
2255#define AARCH64_HFGITR_EL2_DCCISW 0x40U
2257#define AARCH64_HFGITR_EL2_DCCVAU 0x80U
2259#define AARCH64_HFGITR_EL2_DCCVAP 0x100U
2261#define AARCH64_HFGITR_EL2_DCCVADP 0x200U
2263#define AARCH64_HFGITR_EL2_DCCIVAC 0x400U
2265#define AARCH64_HFGITR_EL2_DCZVA 0x800U
2267#define AARCH64_HFGITR_EL2_ATS1E1R 0x1000U
2269#define AARCH64_HFGITR_EL2_ATS1E1W 0x2000U
2271#define AARCH64_HFGITR_EL2_ATS1E0R 0x4000U
2273#define AARCH64_HFGITR_EL2_ATS1E0W 0x8000U
2275#define AARCH64_HFGITR_EL2_ATS1E1RP 0x10000U
2277#define AARCH64_HFGITR_EL2_ATS1E1WP 0x20000U
2279#define AARCH64_HFGITR_EL2_TLBIVMALLE1OS 0x40000U
2281#define AARCH64_HFGITR_EL2_TLBIVAE1OS 0x80000U
2283#define AARCH64_HFGITR_EL2_TLBIASIDE1OS 0x100000U
2285#define AARCH64_HFGITR_EL2_TLBIVAAE1OS 0x200000U
2287#define AARCH64_HFGITR_EL2_TLBIVALE1OS 0x400000U
2289#define AARCH64_HFGITR_EL2_TLBIVAALE1OS 0x800000U
2291#define AARCH64_HFGITR_EL2_TLBIRVAE1OS 0x1000000U
2293#define AARCH64_HFGITR_EL2_TLBIRVAAE1OS 0x2000000U
2295#define AARCH64_HFGITR_EL2_TLBIRVALE1OS 0x4000000U
2297#define AARCH64_HFGITR_EL2_TLBIRVAALE1OS 0x8000000U
2299#define AARCH64_HFGITR_EL2_TLBIVMALLE1IS 0x10000000U
2301#define AARCH64_HFGITR_EL2_TLBIVAE1IS 0x20000000U
2303#define AARCH64_HFGITR_EL2_TLBIASIDE1IS 0x40000000U
2305#define AARCH64_HFGITR_EL2_TLBIVAAE1IS 0x80000000U
2307#define AARCH64_HFGITR_EL2_TLBIVALE1IS 0x100000000ULL
2309#define AARCH64_HFGITR_EL2_TLBIVAALE1IS 0x200000000ULL
2311#define AARCH64_HFGITR_EL2_TLBIRVAE1IS 0x400000000ULL
2313#define AARCH64_HFGITR_EL2_TLBIRVAAE1IS 0x800000000ULL
2315#define AARCH64_HFGITR_EL2_TLBIRVALE1IS 0x1000000000ULL
2317#define AARCH64_HFGITR_EL2_TLBIRVAALE1IS 0x2000000000ULL
2319#define AARCH64_HFGITR_EL2_TLBIRVAE1 0x4000000000ULL
2321#define AARCH64_HFGITR_EL2_TLBIRVAAE1 0x8000000000ULL
2323#define AARCH64_HFGITR_EL2_TLBIRVALE1 0x10000000000ULL
2325#define AARCH64_HFGITR_EL2_TLBIRVAALE1 0x20000000000ULL
2327#define AARCH64_HFGITR_EL2_TLBIVMALLE1 0x40000000000ULL
2329#define AARCH64_HFGITR_EL2_TLBIVAE1 0x80000000000ULL
2331#define AARCH64_HFGITR_EL2_TLBIASIDE1 0x100000000000ULL
2333#define AARCH64_HFGITR_EL2_TLBIVAAE1 0x200000000000ULL
2335#define AARCH64_HFGITR_EL2_TLBIVALE1 0x400000000000ULL
2337#define AARCH64_HFGITR_EL2_TLBIVAALE1 0x800000000000ULL
2339#define AARCH64_HFGITR_EL2_CFPRCTX 0x1000000000000ULL
2341#define AARCH64_HFGITR_EL2_DVPRCTX 0x2000000000000ULL
2343#define AARCH64_HFGITR_EL2_CPPRCTX 0x4000000000000ULL
2345#define AARCH64_HFGITR_EL2_ERET 0x8000000000000ULL
2347#define AARCH64_HFGITR_EL2_SVC_EL0 0x10000000000000ULL
2349#define AARCH64_HFGITR_EL2_SVC_EL1 0x20000000000000ULL
2351#define AARCH64_HFGITR_EL2_DCCVAC 0x40000000000000ULL
2353static inline uint64_t _AArch64_Read_hfgitr_el2(
void )
2358 "mrs %0, HFGITR_EL2" :
"=&r" ( value ) : :
"memory"
2364static inline void _AArch64_Write_hfgitr_el2( uint64_t value )
2367 "msr HFGITR_EL2, %0" : :
"r" ( value ) :
"memory"
2373#define AARCH64_HFGRTR_EL2_AFSR0_EL1 0x1U
2375#define AARCH64_HFGRTR_EL2_AFSR1_EL1 0x2U
2377#define AARCH64_HFGRTR_EL2_AIDR_EL1 0x4U
2379#define AARCH64_HFGRTR_EL2_AMAIR_EL1 0x8U
2381#define AARCH64_HFGRTR_EL2_APDAKEY 0x10U
2383#define AARCH64_HFGRTR_EL2_APDBKEY 0x20U
2385#define AARCH64_HFGRTR_EL2_APGAKEY 0x40U
2387#define AARCH64_HFGRTR_EL2_APIAKEY 0x80U
2389#define AARCH64_HFGRTR_EL2_APIBKEY 0x100U
2391#define AARCH64_HFGRTR_EL2_CCSIDR_EL1 0x200U
2393#define AARCH64_HFGRTR_EL2_CLIDR_EL1 0x400U
2395#define AARCH64_HFGRTR_EL2_CONTEXTIDR_EL1 0x800U
2397#define AARCH64_HFGRTR_EL2_CPACR_EL1 0x1000U
2399#define AARCH64_HFGRTR_EL2_CSSELR_EL1 0x2000U
2401#define AARCH64_HFGRTR_EL2_CTR_EL0 0x4000U
2403#define AARCH64_HFGRTR_EL2_DCZID_EL0 0x8000U
2405#define AARCH64_HFGRTR_EL2_ESR_EL1 0x10000U
2407#define AARCH64_HFGRTR_EL2_FAR_EL1 0x20000U
2409#define AARCH64_HFGRTR_EL2_ISR_EL1 0x40000U
2411#define AARCH64_HFGRTR_EL2_LORC_EL1 0x80000U
2413#define AARCH64_HFGRTR_EL2_LOREA_EL1 0x100000U
2415#define AARCH64_HFGRTR_EL2_LORID_EL1 0x200000U
2417#define AARCH64_HFGRTR_EL2_LORN_EL1 0x400000U
2419#define AARCH64_HFGRTR_EL2_LORSA_EL1 0x800000U
2421#define AARCH64_HFGRTR_EL2_MAIR_EL1 0x1000000U
2423#define AARCH64_HFGRTR_EL2_MIDR_EL1 0x2000000U
2425#define AARCH64_HFGRTR_EL2_MPIDR_EL1 0x4000000U
2427#define AARCH64_HFGRTR_EL2_PAR_EL1 0x8000000U
2429#define AARCH64_HFGRTR_EL2_REVIDR_EL1 0x10000000U
2431#define AARCH64_HFGRTR_EL2_SCTLR_EL1 0x20000000U
2433#define AARCH64_HFGRTR_EL2_SCXTNUM_EL1 0x40000000U
2435#define AARCH64_HFGRTR_EL2_SCXTNUM_EL0 0x80000000U
2437#define AARCH64_HFGRTR_EL2_TCR_EL1 0x100000000ULL
2439#define AARCH64_HFGRTR_EL2_TPIDR_EL1 0x200000000ULL
2441#define AARCH64_HFGRTR_EL2_TPIDRRO_EL0 0x400000000ULL
2443#define AARCH64_HFGRTR_EL2_TPIDR_EL0 0x800000000ULL
2445#define AARCH64_HFGRTR_EL2_TTBR0_EL1 0x1000000000ULL
2447#define AARCH64_HFGRTR_EL2_TTBR1_EL1 0x2000000000ULL
2449#define AARCH64_HFGRTR_EL2_VBAR_EL1 0x4000000000ULL
2451#define AARCH64_HFGRTR_EL2_ICC_IGRPENN_EL1 0x8000000000ULL
2453#define AARCH64_HFGRTR_EL2_ERRIDR_EL1 0x10000000000ULL
2455#define AARCH64_HFGRTR_EL2_ERRSELR_EL1 0x20000000000ULL
2457#define AARCH64_HFGRTR_EL2_ERXFR_EL1 0x40000000000ULL
2459#define AARCH64_HFGRTR_EL2_ERXCTLR_EL1 0x80000000000ULL
2461#define AARCH64_HFGRTR_EL2_ERXSTATUS_EL1 0x100000000000ULL
2463#define AARCH64_HFGRTR_EL2_ERXMISCN_EL1 0x200000000000ULL
2465#define AARCH64_HFGRTR_EL2_ERXPFGF_EL1 0x400000000000ULL
2467#define AARCH64_HFGRTR_EL2_ERXPFGCTL_EL1 0x800000000000ULL
2469#define AARCH64_HFGRTR_EL2_ERXPFGCDN_EL1 0x1000000000000ULL
2471#define AARCH64_HFGRTR_EL2_ERXADDR_EL1 0x2000000000000ULL
2473static inline uint64_t _AArch64_Read_hfgrtr_el2(
void )
2478 "mrs %0, HFGRTR_EL2" :
"=&r" ( value ) : :
"memory"
2484static inline void _AArch64_Write_hfgrtr_el2( uint64_t value )
2487 "msr HFGRTR_EL2, %0" : :
"r" ( value ) :
"memory"
2493#define AARCH64_HFGWTR_EL2_AFSR0_EL1 0x1U
2495#define AARCH64_HFGWTR_EL2_AFSR1_EL1 0x2U
2497#define AARCH64_HFGWTR_EL2_AMAIR_EL1 0x8U
2499#define AARCH64_HFGWTR_EL2_APDAKEY 0x10U
2501#define AARCH64_HFGWTR_EL2_APDBKEY 0x20U
2503#define AARCH64_HFGWTR_EL2_APGAKEY 0x40U
2505#define AARCH64_HFGWTR_EL2_APIAKEY 0x80U
2507#define AARCH64_HFGWTR_EL2_APIBKEY 0x100U
2509#define AARCH64_HFGWTR_EL2_CONTEXTIDR_EL1 0x800U
2511#define AARCH64_HFGWTR_EL2_CPACR_EL1 0x1000U
2513#define AARCH64_HFGWTR_EL2_CSSELR_EL1 0x2000U
2515#define AARCH64_HFGWTR_EL2_ESR_EL1 0x10000U
2517#define AARCH64_HFGWTR_EL2_FAR_EL1 0x20000U
2519#define AARCH64_HFGWTR_EL2_LORC_EL1 0x80000U
2521#define AARCH64_HFGWTR_EL2_LOREA_EL1 0x100000U
2523#define AARCH64_HFGWTR_EL2_LORN_EL1 0x400000U
2525#define AARCH64_HFGWTR_EL2_LORSA_EL1 0x800000U
2527#define AARCH64_HFGWTR_EL2_MAIR_EL1 0x1000000U
2529#define AARCH64_HFGWTR_EL2_PAR_EL1 0x8000000U
2531#define AARCH64_HFGWTR_EL2_SCTLR_EL1 0x20000000U
2533#define AARCH64_HFGWTR_EL2_SCXTNUM_EL1 0x40000000U
2535#define AARCH64_HFGWTR_EL2_SCXTNUM_EL0 0x80000000U
2537#define AARCH64_HFGWTR_EL2_TCR_EL1 0x100000000ULL
2539#define AARCH64_HFGWTR_EL2_TPIDR_EL1 0x200000000ULL
2541#define AARCH64_HFGWTR_EL2_TPIDRRO_EL0 0x400000000ULL
2543#define AARCH64_HFGWTR_EL2_TPIDR_EL0 0x800000000ULL
2545#define AARCH64_HFGWTR_EL2_TTBR0_EL1 0x1000000000ULL
2547#define AARCH64_HFGWTR_EL2_TTBR1_EL1 0x2000000000ULL
2549#define AARCH64_HFGWTR_EL2_VBAR_EL1 0x4000000000ULL
2551#define AARCH64_HFGWTR_EL2_ICC_IGRPENN_EL1 0x8000000000ULL
2553#define AARCH64_HFGWTR_EL2_ERRSELR_EL1 0x20000000000ULL
2555#define AARCH64_HFGWTR_EL2_ERXCTLR_EL1 0x80000000000ULL
2557#define AARCH64_HFGWTR_EL2_ERXSTATUS_EL1 0x100000000000ULL
2559#define AARCH64_HFGWTR_EL2_ERXMISCN_EL1 0x200000000000ULL
2561#define AARCH64_HFGWTR_EL2_ERXPFGCTL_EL1 0x800000000000ULL
2563#define AARCH64_HFGWTR_EL2_ERXPFGCDN_EL1 0x1000000000000ULL
2565#define AARCH64_HFGWTR_EL2_ERXADDR_EL1 0x2000000000000ULL
2567static inline uint64_t _AArch64_Read_hfgwtr_el2(
void )
2572 "mrs %0, HFGWTR_EL2" :
"=&r" ( value ) : :
"memory"
2578static inline void _AArch64_Write_hfgwtr_el2( uint64_t value )
2581 "msr HFGWTR_EL2, %0" : :
"r" ( value ) :
"memory"
2587#define AARCH64_HPFAR_EL2_FIPA_47_12( _val ) ( ( _val ) << 4 )
2588#define AARCH64_HPFAR_EL2_FIPA_47_12_SHIFT 4
2589#define AARCH64_HPFAR_EL2_FIPA_47_12_MASK 0xfffffffff0ULL
2590#define AARCH64_HPFAR_EL2_FIPA_47_12_GET( _reg ) \
2591 ( ( ( _reg ) >> 4 ) & 0xfffffffffULL )
2593#define AARCH64_HPFAR_EL2_FIPA_51_48( _val ) ( ( _val ) << 40 )
2594#define AARCH64_HPFAR_EL2_FIPA_51_48_SHIFT 40
2595#define AARCH64_HPFAR_EL2_FIPA_51_48_MASK 0xf0000000000ULL
2596#define AARCH64_HPFAR_EL2_FIPA_51_48_GET( _reg ) \
2597 ( ( ( _reg ) >> 40 ) & 0xfULL )
2599#define AARCH64_HPFAR_EL2_NS 0x8000000000000000ULL
2601static inline uint64_t _AArch64_Read_hpfar_el2(
void )
2606 "mrs %0, HPFAR_EL2" :
"=&r" ( value ) : :
"memory"
2612static inline void _AArch64_Write_hpfar_el2( uint64_t value )
2615 "msr HPFAR_EL2, %0" : :
"r" ( value ) :
"memory"
2621static inline uint64_t _AArch64_Read_hstr_el2(
void )
2626 "mrs %0, HSTR_EL2" :
"=&r" ( value ) : :
"memory"
2632static inline void _AArch64_Write_hstr_el2( uint64_t value )
2635 "msr HSTR_EL2, %0" : :
"r" ( value ) :
"memory"
2641static inline uint64_t _AArch64_Read_id_aa64afr0_el1(
void )
2646 "mrs %0, ID_AA64AFR0_EL1" :
"=&r" ( value ) : :
"memory"
2654static inline uint64_t _AArch64_Read_id_aa64afr1_el1(
void )
2659 "mrs %0, ID_AA64AFR1_EL1" :
"=&r" ( value ) : :
"memory"
2667#define AARCH64_ID_AA64DFR0_EL1_DEBUGVER( _val ) ( ( _val ) << 0 )
2668#define AARCH64_ID_AA64DFR0_EL1_DEBUGVER_SHIFT 0
2669#define AARCH64_ID_AA64DFR0_EL1_DEBUGVER_MASK 0xfU
2670#define AARCH64_ID_AA64DFR0_EL1_DEBUGVER_GET( _reg ) \
2671 ( ( ( _reg ) >> 0 ) & 0xfU )
2673#define AARCH64_ID_AA64DFR0_EL1_TRACEVER( _val ) ( ( _val ) << 4 )
2674#define AARCH64_ID_AA64DFR0_EL1_TRACEVER_SHIFT 4
2675#define AARCH64_ID_AA64DFR0_EL1_TRACEVER_MASK 0xf0U
2676#define AARCH64_ID_AA64DFR0_EL1_TRACEVER_GET( _reg ) \
2677 ( ( ( _reg ) >> 4 ) & 0xfU )
2679#define AARCH64_ID_AA64DFR0_EL1_PMUVER( _val ) ( ( _val ) << 8 )
2680#define AARCH64_ID_AA64DFR0_EL1_PMUVER_SHIFT 8
2681#define AARCH64_ID_AA64DFR0_EL1_PMUVER_MASK 0xf00U
2682#define AARCH64_ID_AA64DFR0_EL1_PMUVER_GET( _reg ) \
2683 ( ( ( _reg ) >> 8 ) & 0xfU )
2685#define AARCH64_ID_AA64DFR0_EL1_BRPS( _val ) ( ( _val ) << 12 )
2686#define AARCH64_ID_AA64DFR0_EL1_BRPS_SHIFT 12
2687#define AARCH64_ID_AA64DFR0_EL1_BRPS_MASK 0xf000U
2688#define AARCH64_ID_AA64DFR0_EL1_BRPS_GET( _reg ) \
2689 ( ( ( _reg ) >> 12 ) & 0xfU )
2691#define AARCH64_ID_AA64DFR0_EL1_WRPS( _val ) ( ( _val ) << 20 )
2692#define AARCH64_ID_AA64DFR0_EL1_WRPS_SHIFT 20
2693#define AARCH64_ID_AA64DFR0_EL1_WRPS_MASK 0xf00000U
2694#define AARCH64_ID_AA64DFR0_EL1_WRPS_GET( _reg ) \
2695 ( ( ( _reg ) >> 20 ) & 0xfU )
2697#define AARCH64_ID_AA64DFR0_EL1_CTX_CMPS( _val ) ( ( _val ) << 28 )
2698#define AARCH64_ID_AA64DFR0_EL1_CTX_CMPS_SHIFT 28
2699#define AARCH64_ID_AA64DFR0_EL1_CTX_CMPS_MASK 0xf0000000U
2700#define AARCH64_ID_AA64DFR0_EL1_CTX_CMPS_GET( _reg ) \
2701 ( ( ( _reg ) >> 28 ) & 0xfU )
2703#define AARCH64_ID_AA64DFR0_EL1_PMSVER( _val ) ( ( _val ) << 32 )
2704#define AARCH64_ID_AA64DFR0_EL1_PMSVER_SHIFT 32
2705#define AARCH64_ID_AA64DFR0_EL1_PMSVER_MASK 0xf00000000ULL
2706#define AARCH64_ID_AA64DFR0_EL1_PMSVER_GET( _reg ) \
2707 ( ( ( _reg ) >> 32 ) & 0xfULL )
2709#define AARCH64_ID_AA64DFR0_EL1_DOUBLELOCK( _val ) ( ( _val ) << 36 )
2710#define AARCH64_ID_AA64DFR0_EL1_DOUBLELOCK_SHIFT 36
2711#define AARCH64_ID_AA64DFR0_EL1_DOUBLELOCK_MASK 0xf000000000ULL
2712#define AARCH64_ID_AA64DFR0_EL1_DOUBLELOCK_GET( _reg ) \
2713 ( ( ( _reg ) >> 36 ) & 0xfULL )
2715#define AARCH64_ID_AA64DFR0_EL1_TRACEFILT( _val ) ( ( _val ) << 40 )
2716#define AARCH64_ID_AA64DFR0_EL1_TRACEFILT_SHIFT 40
2717#define AARCH64_ID_AA64DFR0_EL1_TRACEFILT_MASK 0xf0000000000ULL
2718#define AARCH64_ID_AA64DFR0_EL1_TRACEFILT_GET( _reg ) \
2719 ( ( ( _reg ) >> 40 ) & 0xfULL )
2721#define AARCH64_ID_AA64DFR0_EL1_MTPMU( _val ) ( ( _val ) << 48 )
2722#define AARCH64_ID_AA64DFR0_EL1_MTPMU_SHIFT 48
2723#define AARCH64_ID_AA64DFR0_EL1_MTPMU_MASK 0xf000000000000ULL
2724#define AARCH64_ID_AA64DFR0_EL1_MTPMU_GET( _reg ) \
2725 ( ( ( _reg ) >> 48 ) & 0xfULL )
2727static inline uint64_t _AArch64_Read_id_aa64dfr0_el1(
void )
2732 "mrs %0, ID_AA64DFR0_EL1" :
"=&r" ( value ) : :
"memory"
2740static inline uint64_t _AArch64_Read_id_aa64dfr1_el1(
void )
2745 "mrs %0, ID_AA64DFR1_EL1" :
"=&r" ( value ) : :
"memory"
2753#define AARCH64_ID_AA64ISAR0_EL1_AES( _val ) ( ( _val ) << 4 )
2754#define AARCH64_ID_AA64ISAR0_EL1_AES_SHIFT 4
2755#define AARCH64_ID_AA64ISAR0_EL1_AES_MASK 0xf0U
2756#define AARCH64_ID_AA64ISAR0_EL1_AES_GET( _reg ) \
2757 ( ( ( _reg ) >> 4 ) & 0xfU )
2759#define AARCH64_ID_AA64ISAR0_EL1_SHA1( _val ) ( ( _val ) << 8 )
2760#define AARCH64_ID_AA64ISAR0_EL1_SHA1_SHIFT 8
2761#define AARCH64_ID_AA64ISAR0_EL1_SHA1_MASK 0xf00U
2762#define AARCH64_ID_AA64ISAR0_EL1_SHA1_GET( _reg ) \
2763 ( ( ( _reg ) >> 8 ) & 0xfU )
2765#define AARCH64_ID_AA64ISAR0_EL1_SHA2( _val ) ( ( _val ) << 12 )
2766#define AARCH64_ID_AA64ISAR0_EL1_SHA2_SHIFT 12
2767#define AARCH64_ID_AA64ISAR0_EL1_SHA2_MASK 0xf000U
2768#define AARCH64_ID_AA64ISAR0_EL1_SHA2_GET( _reg ) \
2769 ( ( ( _reg ) >> 12 ) & 0xfU )
2771#define AARCH64_ID_AA64ISAR0_EL1_CRC32( _val ) ( ( _val ) << 16 )
2772#define AARCH64_ID_AA64ISAR0_EL1_CRC32_SHIFT 16
2773#define AARCH64_ID_AA64ISAR0_EL1_CRC32_MASK 0xf0000U
2774#define AARCH64_ID_AA64ISAR0_EL1_CRC32_GET( _reg ) \
2775 ( ( ( _reg ) >> 16 ) & 0xfU )
2777#define AARCH64_ID_AA64ISAR0_EL1_ATOMIC( _val ) ( ( _val ) << 20 )
2778#define AARCH64_ID_AA64ISAR0_EL1_ATOMIC_SHIFT 20
2779#define AARCH64_ID_AA64ISAR0_EL1_ATOMIC_MASK 0xf00000U
2780#define AARCH64_ID_AA64ISAR0_EL1_ATOMIC_GET( _reg ) \
2781 ( ( ( _reg ) >> 20 ) & 0xfU )
2783#define AARCH64_ID_AA64ISAR0_EL1_RDM( _val ) ( ( _val ) << 28 )
2784#define AARCH64_ID_AA64ISAR0_EL1_RDM_SHIFT 28
2785#define AARCH64_ID_AA64ISAR0_EL1_RDM_MASK 0xf0000000U
2786#define AARCH64_ID_AA64ISAR0_EL1_RDM_GET( _reg ) \
2787 ( ( ( _reg ) >> 28 ) & 0xfU )
2789#define AARCH64_ID_AA64ISAR0_EL1_SHA3( _val ) ( ( _val ) << 32 )
2790#define AARCH64_ID_AA64ISAR0_EL1_SHA3_SHIFT 32
2791#define AARCH64_ID_AA64ISAR0_EL1_SHA3_MASK 0xf00000000ULL
2792#define AARCH64_ID_AA64ISAR0_EL1_SHA3_GET( _reg ) \
2793 ( ( ( _reg ) >> 32 ) & 0xfULL )
2795#define AARCH64_ID_AA64ISAR0_EL1_SM3( _val ) ( ( _val ) << 36 )
2796#define AARCH64_ID_AA64ISAR0_EL1_SM3_SHIFT 36
2797#define AARCH64_ID_AA64ISAR0_EL1_SM3_MASK 0xf000000000ULL
2798#define AARCH64_ID_AA64ISAR0_EL1_SM3_GET( _reg ) \
2799 ( ( ( _reg ) >> 36 ) & 0xfULL )
2801#define AARCH64_ID_AA64ISAR0_EL1_SM4( _val ) ( ( _val ) << 40 )
2802#define AARCH64_ID_AA64ISAR0_EL1_SM4_SHIFT 40
2803#define AARCH64_ID_AA64ISAR0_EL1_SM4_MASK 0xf0000000000ULL
2804#define AARCH64_ID_AA64ISAR0_EL1_SM4_GET( _reg ) \
2805 ( ( ( _reg ) >> 40 ) & 0xfULL )
2807#define AARCH64_ID_AA64ISAR0_EL1_DP( _val ) ( ( _val ) << 44 )
2808#define AARCH64_ID_AA64ISAR0_EL1_DP_SHIFT 44
2809#define AARCH64_ID_AA64ISAR0_EL1_DP_MASK 0xf00000000000ULL
2810#define AARCH64_ID_AA64ISAR0_EL1_DP_GET( _reg ) \
2811 ( ( ( _reg ) >> 44 ) & 0xfULL )
2813#define AARCH64_ID_AA64ISAR0_EL1_FHM( _val ) ( ( _val ) << 48 )
2814#define AARCH64_ID_AA64ISAR0_EL1_FHM_SHIFT 48
2815#define AARCH64_ID_AA64ISAR0_EL1_FHM_MASK 0xf000000000000ULL
2816#define AARCH64_ID_AA64ISAR0_EL1_FHM_GET( _reg ) \
2817 ( ( ( _reg ) >> 48 ) & 0xfULL )
2819#define AARCH64_ID_AA64ISAR0_EL1_TS( _val ) ( ( _val ) << 52 )
2820#define AARCH64_ID_AA64ISAR0_EL1_TS_SHIFT 52
2821#define AARCH64_ID_AA64ISAR0_EL1_TS_MASK 0xf0000000000000ULL
2822#define AARCH64_ID_AA64ISAR0_EL1_TS_GET( _reg ) \
2823 ( ( ( _reg ) >> 52 ) & 0xfULL )
2825#define AARCH64_ID_AA64ISAR0_EL1_TLB( _val ) ( ( _val ) << 56 )
2826#define AARCH64_ID_AA64ISAR0_EL1_TLB_SHIFT 56
2827#define AARCH64_ID_AA64ISAR0_EL1_TLB_MASK 0xf00000000000000ULL
2828#define AARCH64_ID_AA64ISAR0_EL1_TLB_GET( _reg ) \
2829 ( ( ( _reg ) >> 56 ) & 0xfULL )
2831#define AARCH64_ID_AA64ISAR0_EL1_RNDR( _val ) ( ( _val ) << 60 )
2832#define AARCH64_ID_AA64ISAR0_EL1_RNDR_SHIFT 60
2833#define AARCH64_ID_AA64ISAR0_EL1_RNDR_MASK 0xf000000000000000ULL
2834#define AARCH64_ID_AA64ISAR0_EL1_RNDR_GET( _reg ) \
2835 ( ( ( _reg ) >> 60 ) & 0xfULL )
2837static inline uint64_t _AArch64_Read_id_aa64isar0_el1(
void )
2842 "mrs %0, ID_AA64ISAR0_EL1" :
"=&r" ( value ) : :
"memory"
2850#define AARCH64_ID_AA64ISAR1_EL1_DPB( _val ) ( ( _val ) << 0 )
2851#define AARCH64_ID_AA64ISAR1_EL1_DPB_SHIFT 0
2852#define AARCH64_ID_AA64ISAR1_EL1_DPB_MASK 0xfU
2853#define AARCH64_ID_AA64ISAR1_EL1_DPB_GET( _reg ) \
2854 ( ( ( _reg ) >> 0 ) & 0xfU )
2856#define AARCH64_ID_AA64ISAR1_EL1_APA( _val ) ( ( _val ) << 4 )
2857#define AARCH64_ID_AA64ISAR1_EL1_APA_SHIFT 4
2858#define AARCH64_ID_AA64ISAR1_EL1_APA_MASK 0xf0U
2859#define AARCH64_ID_AA64ISAR1_EL1_APA_GET( _reg ) \
2860 ( ( ( _reg ) >> 4 ) & 0xfU )
2862#define AARCH64_ID_AA64ISAR1_EL1_API( _val ) ( ( _val ) << 8 )
2863#define AARCH64_ID_AA64ISAR1_EL1_API_SHIFT 8
2864#define AARCH64_ID_AA64ISAR1_EL1_API_MASK 0xf00U
2865#define AARCH64_ID_AA64ISAR1_EL1_API_GET( _reg ) \
2866 ( ( ( _reg ) >> 8 ) & 0xfU )
2868#define AARCH64_ID_AA64ISAR1_EL1_JSCVT( _val ) ( ( _val ) << 12 )
2869#define AARCH64_ID_AA64ISAR1_EL1_JSCVT_SHIFT 12
2870#define AARCH64_ID_AA64ISAR1_EL1_JSCVT_MASK 0xf000U
2871#define AARCH64_ID_AA64ISAR1_EL1_JSCVT_GET( _reg ) \
2872 ( ( ( _reg ) >> 12 ) & 0xfU )
2874#define AARCH64_ID_AA64ISAR1_EL1_FCMA( _val ) ( ( _val ) << 16 )
2875#define AARCH64_ID_AA64ISAR1_EL1_FCMA_SHIFT 16
2876#define AARCH64_ID_AA64ISAR1_EL1_FCMA_MASK 0xf0000U
2877#define AARCH64_ID_AA64ISAR1_EL1_FCMA_GET( _reg ) \
2878 ( ( ( _reg ) >> 16 ) & 0xfU )
2880#define AARCH64_ID_AA64ISAR1_EL1_LRCPC( _val ) ( ( _val ) << 20 )
2881#define AARCH64_ID_AA64ISAR1_EL1_LRCPC_SHIFT 20
2882#define AARCH64_ID_AA64ISAR1_EL1_LRCPC_MASK 0xf00000U
2883#define AARCH64_ID_AA64ISAR1_EL1_LRCPC_GET( _reg ) \
2884 ( ( ( _reg ) >> 20 ) & 0xfU )
2886#define AARCH64_ID_AA64ISAR1_EL1_GPA( _val ) ( ( _val ) << 24 )
2887#define AARCH64_ID_AA64ISAR1_EL1_GPA_SHIFT 24
2888#define AARCH64_ID_AA64ISAR1_EL1_GPA_MASK 0xf000000U
2889#define AARCH64_ID_AA64ISAR1_EL1_GPA_GET( _reg ) \
2890 ( ( ( _reg ) >> 24 ) & 0xfU )
2892#define AARCH64_ID_AA64ISAR1_EL1_GPI( _val ) ( ( _val ) << 28 )
2893#define AARCH64_ID_AA64ISAR1_EL1_GPI_SHIFT 28
2894#define AARCH64_ID_AA64ISAR1_EL1_GPI_MASK 0xf0000000U
2895#define AARCH64_ID_AA64ISAR1_EL1_GPI_GET( _reg ) \
2896 ( ( ( _reg ) >> 28 ) & 0xfU )
2898#define AARCH64_ID_AA64ISAR1_EL1_FRINTTS( _val ) ( ( _val ) << 32 )
2899#define AARCH64_ID_AA64ISAR1_EL1_FRINTTS_SHIFT 32
2900#define AARCH64_ID_AA64ISAR1_EL1_FRINTTS_MASK 0xf00000000ULL
2901#define AARCH64_ID_AA64ISAR1_EL1_FRINTTS_GET( _reg ) \
2902 ( ( ( _reg ) >> 32 ) & 0xfULL )
2904#define AARCH64_ID_AA64ISAR1_EL1_SB( _val ) ( ( _val ) << 36 )
2905#define AARCH64_ID_AA64ISAR1_EL1_SB_SHIFT 36
2906#define AARCH64_ID_AA64ISAR1_EL1_SB_MASK 0xf000000000ULL
2907#define AARCH64_ID_AA64ISAR1_EL1_SB_GET( _reg ) \
2908 ( ( ( _reg ) >> 36 ) & 0xfULL )
2910#define AARCH64_ID_AA64ISAR1_EL1_SPECRES( _val ) ( ( _val ) << 40 )
2911#define AARCH64_ID_AA64ISAR1_EL1_SPECRES_SHIFT 40
2912#define AARCH64_ID_AA64ISAR1_EL1_SPECRES_MASK 0xf0000000000ULL
2913#define AARCH64_ID_AA64ISAR1_EL1_SPECRES_GET( _reg ) \
2914 ( ( ( _reg ) >> 40 ) & 0xfULL )
2916#define AARCH64_ID_AA64ISAR1_EL1_BF16( _val ) ( ( _val ) << 44 )
2917#define AARCH64_ID_AA64ISAR1_EL1_BF16_SHIFT 44
2918#define AARCH64_ID_AA64ISAR1_EL1_BF16_MASK 0xf00000000000ULL
2919#define AARCH64_ID_AA64ISAR1_EL1_BF16_GET( _reg ) \
2920 ( ( ( _reg ) >> 44 ) & 0xfULL )
2922#define AARCH64_ID_AA64ISAR1_EL1_DGH( _val ) ( ( _val ) << 48 )
2923#define AARCH64_ID_AA64ISAR1_EL1_DGH_SHIFT 48
2924#define AARCH64_ID_AA64ISAR1_EL1_DGH_MASK 0xf000000000000ULL
2925#define AARCH64_ID_AA64ISAR1_EL1_DGH_GET( _reg ) \
2926 ( ( ( _reg ) >> 48 ) & 0xfULL )
2928#define AARCH64_ID_AA64ISAR1_EL1_I8MM( _val ) ( ( _val ) << 52 )
2929#define AARCH64_ID_AA64ISAR1_EL1_I8MM_SHIFT 52
2930#define AARCH64_ID_AA64ISAR1_EL1_I8MM_MASK 0xf0000000000000ULL
2931#define AARCH64_ID_AA64ISAR1_EL1_I8MM_GET( _reg ) \
2932 ( ( ( _reg ) >> 52 ) & 0xfULL )
2934static inline uint64_t _AArch64_Read_id_aa64isar1_el1(
void )
2939 "mrs %0, ID_AA64ISAR1_EL1" :
"=&r" ( value ) : :
"memory"
2947#define AARCH64_ID_AA64MMFR0_EL1_PARANGE( _val ) ( ( _val ) << 0 )
2948#define AARCH64_ID_AA64MMFR0_EL1_PARANGE_SHIFT 0
2949#define AARCH64_ID_AA64MMFR0_EL1_PARANGE_MASK 0xfU
2950#define AARCH64_ID_AA64MMFR0_EL1_PARANGE_GET( _reg ) \
2951 ( ( ( _reg ) >> 0 ) & 0xfU )
2953#define AARCH64_ID_AA64MMFR0_EL1_ASIDBITS( _val ) ( ( _val ) << 4 )
2954#define AARCH64_ID_AA64MMFR0_EL1_ASIDBITS_SHIFT 4
2955#define AARCH64_ID_AA64MMFR0_EL1_ASIDBITS_MASK 0xf0U
2956#define AARCH64_ID_AA64MMFR0_EL1_ASIDBITS_GET( _reg ) \
2957 ( ( ( _reg ) >> 4 ) & 0xfU )
2959#define AARCH64_ID_AA64MMFR0_EL1_BIGEND( _val ) ( ( _val ) << 8 )
2960#define AARCH64_ID_AA64MMFR0_EL1_BIGEND_SHIFT 8
2961#define AARCH64_ID_AA64MMFR0_EL1_BIGEND_MASK 0xf00U
2962#define AARCH64_ID_AA64MMFR0_EL1_BIGEND_GET( _reg ) \
2963 ( ( ( _reg ) >> 8 ) & 0xfU )
2965#define AARCH64_ID_AA64MMFR0_EL1_SNSMEM( _val ) ( ( _val ) << 12 )
2966#define AARCH64_ID_AA64MMFR0_EL1_SNSMEM_SHIFT 12
2967#define AARCH64_ID_AA64MMFR0_EL1_SNSMEM_MASK 0xf000U
2968#define AARCH64_ID_AA64MMFR0_EL1_SNSMEM_GET( _reg ) \
2969 ( ( ( _reg ) >> 12 ) & 0xfU )
2971#define AARCH64_ID_AA64MMFR0_EL1_BIGENDEL0( _val ) ( ( _val ) << 16 )
2972#define AARCH64_ID_AA64MMFR0_EL1_BIGENDEL0_SHIFT 16
2973#define AARCH64_ID_AA64MMFR0_EL1_BIGENDEL0_MASK 0xf0000U
2974#define AARCH64_ID_AA64MMFR0_EL1_BIGENDEL0_GET( _reg ) \
2975 ( ( ( _reg ) >> 16 ) & 0xfU )
2977#define AARCH64_ID_AA64MMFR0_EL1_TGRAN16( _val ) ( ( _val ) << 20 )
2978#define AARCH64_ID_AA64MMFR0_EL1_TGRAN16_SHIFT 20
2979#define AARCH64_ID_AA64MMFR0_EL1_TGRAN16_MASK 0xf00000U
2980#define AARCH64_ID_AA64MMFR0_EL1_TGRAN16_GET( _reg ) \
2981 ( ( ( _reg ) >> 20 ) & 0xfU )
2983#define AARCH64_ID_AA64MMFR0_EL1_TGRAN64( _val ) ( ( _val ) << 24 )
2984#define AARCH64_ID_AA64MMFR0_EL1_TGRAN64_SHIFT 24
2985#define AARCH64_ID_AA64MMFR0_EL1_TGRAN64_MASK 0xf000000U
2986#define AARCH64_ID_AA64MMFR0_EL1_TGRAN64_GET( _reg ) \
2987 ( ( ( _reg ) >> 24 ) & 0xfU )
2989#define AARCH64_ID_AA64MMFR0_EL1_TGRAN4( _val ) ( ( _val ) << 28 )
2990#define AARCH64_ID_AA64MMFR0_EL1_TGRAN4_SHIFT 28
2991#define AARCH64_ID_AA64MMFR0_EL1_TGRAN4_MASK 0xf0000000U
2992#define AARCH64_ID_AA64MMFR0_EL1_TGRAN4_GET( _reg ) \
2993 ( ( ( _reg ) >> 28 ) & 0xfU )
2995#define AARCH64_ID_AA64MMFR0_EL1_TGRAN16_2( _val ) ( ( _val ) << 32 )
2996#define AARCH64_ID_AA64MMFR0_EL1_TGRAN16_2_SHIFT 32
2997#define AARCH64_ID_AA64MMFR0_EL1_TGRAN16_2_MASK 0xf00000000ULL
2998#define AARCH64_ID_AA64MMFR0_EL1_TGRAN16_2_GET( _reg ) \
2999 ( ( ( _reg ) >> 32 ) & 0xfULL )
3001#define AARCH64_ID_AA64MMFR0_EL1_TGRAN64_2( _val ) ( ( _val ) << 36 )
3002#define AARCH64_ID_AA64MMFR0_EL1_TGRAN64_2_SHIFT 36
3003#define AARCH64_ID_AA64MMFR0_EL1_TGRAN64_2_MASK 0xf000000000ULL
3004#define AARCH64_ID_AA64MMFR0_EL1_TGRAN64_2_GET( _reg ) \
3005 ( ( ( _reg ) >> 36 ) & 0xfULL )
3007#define AARCH64_ID_AA64MMFR0_EL1_TGRAN4_2( _val ) ( ( _val ) << 40 )
3008#define AARCH64_ID_AA64MMFR0_EL1_TGRAN4_2_SHIFT 40
3009#define AARCH64_ID_AA64MMFR0_EL1_TGRAN4_2_MASK 0xf0000000000ULL
3010#define AARCH64_ID_AA64MMFR0_EL1_TGRAN4_2_GET( _reg ) \
3011 ( ( ( _reg ) >> 40 ) & 0xfULL )
3013#define AARCH64_ID_AA64MMFR0_EL1_EXS( _val ) ( ( _val ) << 44 )
3014#define AARCH64_ID_AA64MMFR0_EL1_EXS_SHIFT 44
3015#define AARCH64_ID_AA64MMFR0_EL1_EXS_MASK 0xf00000000000ULL
3016#define AARCH64_ID_AA64MMFR0_EL1_EXS_GET( _reg ) \
3017 ( ( ( _reg ) >> 44 ) & 0xfULL )
3019#define AARCH64_ID_AA64MMFR0_EL1_FGT( _val ) ( ( _val ) << 56 )
3020#define AARCH64_ID_AA64MMFR0_EL1_FGT_SHIFT 56
3021#define AARCH64_ID_AA64MMFR0_EL1_FGT_MASK 0xf00000000000000ULL
3022#define AARCH64_ID_AA64MMFR0_EL1_FGT_GET( _reg ) \
3023 ( ( ( _reg ) >> 56 ) & 0xfULL )
3025#define AARCH64_ID_AA64MMFR0_EL1_ECV( _val ) ( ( _val ) << 60 )
3026#define AARCH64_ID_AA64MMFR0_EL1_ECV_SHIFT 60
3027#define AARCH64_ID_AA64MMFR0_EL1_ECV_MASK 0xf000000000000000ULL
3028#define AARCH64_ID_AA64MMFR0_EL1_ECV_GET( _reg ) \
3029 ( ( ( _reg ) >> 60 ) & 0xfULL )
3031static inline uint64_t _AArch64_Read_id_aa64mmfr0_el1(
void )
3036 "mrs %0, ID_AA64MMFR0_EL1" :
"=&r" ( value ) : :
"memory"
3044#define AARCH64_ID_AA64MMFR1_EL1_HAFDBS( _val ) ( ( _val ) << 0 )
3045#define AARCH64_ID_AA64MMFR1_EL1_HAFDBS_SHIFT 0
3046#define AARCH64_ID_AA64MMFR1_EL1_HAFDBS_MASK 0xfU
3047#define AARCH64_ID_AA64MMFR1_EL1_HAFDBS_GET( _reg ) \
3048 ( ( ( _reg ) >> 0 ) & 0xfU )
3050#define AARCH64_ID_AA64MMFR1_EL1_VMIDBITS( _val ) ( ( _val ) << 4 )
3051#define AARCH64_ID_AA64MMFR1_EL1_VMIDBITS_SHIFT 4
3052#define AARCH64_ID_AA64MMFR1_EL1_VMIDBITS_MASK 0xf0U
3053#define AARCH64_ID_AA64MMFR1_EL1_VMIDBITS_GET( _reg ) \
3054 ( ( ( _reg ) >> 4 ) & 0xfU )
3056#define AARCH64_ID_AA64MMFR1_EL1_VH( _val ) ( ( _val ) << 8 )
3057#define AARCH64_ID_AA64MMFR1_EL1_VH_SHIFT 8
3058#define AARCH64_ID_AA64MMFR1_EL1_VH_MASK 0xf00U
3059#define AARCH64_ID_AA64MMFR1_EL1_VH_GET( _reg ) \
3060 ( ( ( _reg ) >> 8 ) & 0xfU )
3062#define AARCH64_ID_AA64MMFR1_EL1_HPDS( _val ) ( ( _val ) << 12 )
3063#define AARCH64_ID_AA64MMFR1_EL1_HPDS_SHIFT 12
3064#define AARCH64_ID_AA64MMFR1_EL1_HPDS_MASK 0xf000U
3065#define AARCH64_ID_AA64MMFR1_EL1_HPDS_GET( _reg ) \
3066 ( ( ( _reg ) >> 12 ) & 0xfU )
3068#define AARCH64_ID_AA64MMFR1_EL1_LO( _val ) ( ( _val ) << 16 )
3069#define AARCH64_ID_AA64MMFR1_EL1_LO_SHIFT 16
3070#define AARCH64_ID_AA64MMFR1_EL1_LO_MASK 0xf0000U
3071#define AARCH64_ID_AA64MMFR1_EL1_LO_GET( _reg ) \
3072 ( ( ( _reg ) >> 16 ) & 0xfU )
3074#define AARCH64_ID_AA64MMFR1_EL1_PAN( _val ) ( ( _val ) << 20 )
3075#define AARCH64_ID_AA64MMFR1_EL1_PAN_SHIFT 20
3076#define AARCH64_ID_AA64MMFR1_EL1_PAN_MASK 0xf00000U
3077#define AARCH64_ID_AA64MMFR1_EL1_PAN_GET( _reg ) \
3078 ( ( ( _reg ) >> 20 ) & 0xfU )
3080#define AARCH64_ID_AA64MMFR1_EL1_SPECSEI( _val ) ( ( _val ) << 24 )
3081#define AARCH64_ID_AA64MMFR1_EL1_SPECSEI_SHIFT 24
3082#define AARCH64_ID_AA64MMFR1_EL1_SPECSEI_MASK 0xf000000U
3083#define AARCH64_ID_AA64MMFR1_EL1_SPECSEI_GET( _reg ) \
3084 ( ( ( _reg ) >> 24 ) & 0xfU )
3086#define AARCH64_ID_AA64MMFR1_EL1_XNX( _val ) ( ( _val ) << 28 )
3087#define AARCH64_ID_AA64MMFR1_EL1_XNX_SHIFT 28
3088#define AARCH64_ID_AA64MMFR1_EL1_XNX_MASK 0xf0000000U
3089#define AARCH64_ID_AA64MMFR1_EL1_XNX_GET( _reg ) \
3090 ( ( ( _reg ) >> 28 ) & 0xfU )
3092#define AARCH64_ID_AA64MMFR1_EL1_TWED( _val ) ( ( _val ) << 32 )
3093#define AARCH64_ID_AA64MMFR1_EL1_TWED_SHIFT 32
3094#define AARCH64_ID_AA64MMFR1_EL1_TWED_MASK 0xf00000000ULL
3095#define AARCH64_ID_AA64MMFR1_EL1_TWED_GET( _reg ) \
3096 ( ( ( _reg ) >> 32 ) & 0xfULL )
3098#define AARCH64_ID_AA64MMFR1_EL1_ETS( _val ) ( ( _val ) << 36 )
3099#define AARCH64_ID_AA64MMFR1_EL1_ETS_SHIFT 36
3100#define AARCH64_ID_AA64MMFR1_EL1_ETS_MASK 0xf000000000ULL
3101#define AARCH64_ID_AA64MMFR1_EL1_ETS_GET( _reg ) \
3102 ( ( ( _reg ) >> 36 ) & 0xfULL )
3104static inline uint64_t _AArch64_Read_id_aa64mmfr1_el1(
void )
3109 "mrs %0, ID_AA64MMFR1_EL1" :
"=&r" ( value ) : :
"memory"
3117#define AARCH64_ID_AA64MMFR2_EL1_CNP( _val ) ( ( _val ) << 0 )
3118#define AARCH64_ID_AA64MMFR2_EL1_CNP_SHIFT 0
3119#define AARCH64_ID_AA64MMFR2_EL1_CNP_MASK 0xfU
3120#define AARCH64_ID_AA64MMFR2_EL1_CNP_GET( _reg ) \
3121 ( ( ( _reg ) >> 0 ) & 0xfU )
3123#define AARCH64_ID_AA64MMFR2_EL1_UAO( _val ) ( ( _val ) << 4 )
3124#define AARCH64_ID_AA64MMFR2_EL1_UAO_SHIFT 4
3125#define AARCH64_ID_AA64MMFR2_EL1_UAO_MASK 0xf0U
3126#define AARCH64_ID_AA64MMFR2_EL1_UAO_GET( _reg ) \
3127 ( ( ( _reg ) >> 4 ) & 0xfU )
3129#define AARCH64_ID_AA64MMFR2_EL1_LSM( _val ) ( ( _val ) << 8 )
3130#define AARCH64_ID_AA64MMFR2_EL1_LSM_SHIFT 8
3131#define AARCH64_ID_AA64MMFR2_EL1_LSM_MASK 0xf00U
3132#define AARCH64_ID_AA64MMFR2_EL1_LSM_GET( _reg ) \
3133 ( ( ( _reg ) >> 8 ) & 0xfU )
3135#define AARCH64_ID_AA64MMFR2_EL1_IESB( _val ) ( ( _val ) << 12 )
3136#define AARCH64_ID_AA64MMFR2_EL1_IESB_SHIFT 12
3137#define AARCH64_ID_AA64MMFR2_EL1_IESB_MASK 0xf000U
3138#define AARCH64_ID_AA64MMFR2_EL1_IESB_GET( _reg ) \
3139 ( ( ( _reg ) >> 12 ) & 0xfU )
3141#define AARCH64_ID_AA64MMFR2_EL1_VARANGE( _val ) ( ( _val ) << 16 )
3142#define AARCH64_ID_AA64MMFR2_EL1_VARANGE_SHIFT 16
3143#define AARCH64_ID_AA64MMFR2_EL1_VARANGE_MASK 0xf0000U
3144#define AARCH64_ID_AA64MMFR2_EL1_VARANGE_GET( _reg ) \
3145 ( ( ( _reg ) >> 16 ) & 0xfU )
3147#define AARCH64_ID_AA64MMFR2_EL1_CCIDX( _val ) ( ( _val ) << 20 )
3148#define AARCH64_ID_AA64MMFR2_EL1_CCIDX_SHIFT 20
3149#define AARCH64_ID_AA64MMFR2_EL1_CCIDX_MASK 0xf00000U
3150#define AARCH64_ID_AA64MMFR2_EL1_CCIDX_GET( _reg ) \
3151 ( ( ( _reg ) >> 20 ) & 0xfU )
3153#define AARCH64_ID_AA64MMFR2_EL1_NV( _val ) ( ( _val ) << 24 )
3154#define AARCH64_ID_AA64MMFR2_EL1_NV_SHIFT 24
3155#define AARCH64_ID_AA64MMFR2_EL1_NV_MASK 0xf000000U
3156#define AARCH64_ID_AA64MMFR2_EL1_NV_GET( _reg ) \
3157 ( ( ( _reg ) >> 24 ) & 0xfU )
3159#define AARCH64_ID_AA64MMFR2_EL1_ST( _val ) ( ( _val ) << 28 )
3160#define AARCH64_ID_AA64MMFR2_EL1_ST_SHIFT 28
3161#define AARCH64_ID_AA64MMFR2_EL1_ST_MASK 0xf0000000U
3162#define AARCH64_ID_AA64MMFR2_EL1_ST_GET( _reg ) \
3163 ( ( ( _reg ) >> 28 ) & 0xfU )
3165#define AARCH64_ID_AA64MMFR2_EL1_AT( _val ) ( ( _val ) << 32 )
3166#define AARCH64_ID_AA64MMFR2_EL1_AT_SHIFT 32
3167#define AARCH64_ID_AA64MMFR2_EL1_AT_MASK 0xf00000000ULL
3168#define AARCH64_ID_AA64MMFR2_EL1_AT_GET( _reg ) \
3169 ( ( ( _reg ) >> 32 ) & 0xfULL )
3171#define AARCH64_ID_AA64MMFR2_EL1_IDS( _val ) ( ( _val ) << 36 )
3172#define AARCH64_ID_AA64MMFR2_EL1_IDS_SHIFT 36
3173#define AARCH64_ID_AA64MMFR2_EL1_IDS_MASK 0xf000000000ULL
3174#define AARCH64_ID_AA64MMFR2_EL1_IDS_GET( _reg ) \
3175 ( ( ( _reg ) >> 36 ) & 0xfULL )
3177#define AARCH64_ID_AA64MMFR2_EL1_FWB( _val ) ( ( _val ) << 40 )
3178#define AARCH64_ID_AA64MMFR2_EL1_FWB_SHIFT 40
3179#define AARCH64_ID_AA64MMFR2_EL1_FWB_MASK 0xf0000000000ULL
3180#define AARCH64_ID_AA64MMFR2_EL1_FWB_GET( _reg ) \
3181 ( ( ( _reg ) >> 40 ) & 0xfULL )
3183#define AARCH64_ID_AA64MMFR2_EL1_TTL( _val ) ( ( _val ) << 48 )
3184#define AARCH64_ID_AA64MMFR2_EL1_TTL_SHIFT 48
3185#define AARCH64_ID_AA64MMFR2_EL1_TTL_MASK 0xf000000000000ULL
3186#define AARCH64_ID_AA64MMFR2_EL1_TTL_GET( _reg ) \
3187 ( ( ( _reg ) >> 48 ) & 0xfULL )
3189#define AARCH64_ID_AA64MMFR2_EL1_BBM( _val ) ( ( _val ) << 52 )
3190#define AARCH64_ID_AA64MMFR2_EL1_BBM_SHIFT 52
3191#define AARCH64_ID_AA64MMFR2_EL1_BBM_MASK 0xf0000000000000ULL
3192#define AARCH64_ID_AA64MMFR2_EL1_BBM_GET( _reg ) \
3193 ( ( ( _reg ) >> 52 ) & 0xfULL )
3195#define AARCH64_ID_AA64MMFR2_EL1_EVT( _val ) ( ( _val ) << 56 )
3196#define AARCH64_ID_AA64MMFR2_EL1_EVT_SHIFT 56
3197#define AARCH64_ID_AA64MMFR2_EL1_EVT_MASK 0xf00000000000000ULL
3198#define AARCH64_ID_AA64MMFR2_EL1_EVT_GET( _reg ) \
3199 ( ( ( _reg ) >> 56 ) & 0xfULL )
3201#define AARCH64_ID_AA64MMFR2_EL1_E0PD( _val ) ( ( _val ) << 60 )
3202#define AARCH64_ID_AA64MMFR2_EL1_E0PD_SHIFT 60
3203#define AARCH64_ID_AA64MMFR2_EL1_E0PD_MASK 0xf000000000000000ULL
3204#define AARCH64_ID_AA64MMFR2_EL1_E0PD_GET( _reg ) \
3205 ( ( ( _reg ) >> 60 ) & 0xfULL )
3207static inline uint64_t _AArch64_Read_id_aa64mmfr2_el1(
void )
3212 "mrs %0, ID_AA64MMFR2_EL1" :
"=&r" ( value ) : :
"memory"
3220#define AARCH64_ID_AA64PFR0_EL1_EL0( _val ) ( ( _val ) << 0 )
3221#define AARCH64_ID_AA64PFR0_EL1_EL0_SHIFT 0
3222#define AARCH64_ID_AA64PFR0_EL1_EL0_MASK 0xfU
3223#define AARCH64_ID_AA64PFR0_EL1_EL0_GET( _reg ) \
3224 ( ( ( _reg ) >> 0 ) & 0xfU )
3226#define AARCH64_ID_AA64PFR0_EL1_EL1( _val ) ( ( _val ) << 4 )
3227#define AARCH64_ID_AA64PFR0_EL1_EL1_SHIFT 4
3228#define AARCH64_ID_AA64PFR0_EL1_EL1_MASK 0xf0U
3229#define AARCH64_ID_AA64PFR0_EL1_EL1_GET( _reg ) \
3230 ( ( ( _reg ) >> 4 ) & 0xfU )
3232#define AARCH64_ID_AA64PFR0_EL1_EL2( _val ) ( ( _val ) << 8 )
3233#define AARCH64_ID_AA64PFR0_EL1_EL2_SHIFT 8
3234#define AARCH64_ID_AA64PFR0_EL1_EL2_MASK 0xf00U
3235#define AARCH64_ID_AA64PFR0_EL1_EL2_GET( _reg ) \
3236 ( ( ( _reg ) >> 8 ) & 0xfU )
3238#define AARCH64_ID_AA64PFR0_EL1_EL3( _val ) ( ( _val ) << 12 )
3239#define AARCH64_ID_AA64PFR0_EL1_EL3_SHIFT 12
3240#define AARCH64_ID_AA64PFR0_EL1_EL3_MASK 0xf000U
3241#define AARCH64_ID_AA64PFR0_EL1_EL3_GET( _reg ) \
3242 ( ( ( _reg ) >> 12 ) & 0xfU )
3244#define AARCH64_ID_AA64PFR0_EL1_FP( _val ) ( ( _val ) << 16 )
3245#define AARCH64_ID_AA64PFR0_EL1_FP_SHIFT 16
3246#define AARCH64_ID_AA64PFR0_EL1_FP_MASK 0xf0000U
3247#define AARCH64_ID_AA64PFR0_EL1_FP_GET( _reg ) \
3248 ( ( ( _reg ) >> 16 ) & 0xfU )
3250#define AARCH64_ID_AA64PFR0_EL1_ADVSIMD( _val ) ( ( _val ) << 20 )
3251#define AARCH64_ID_AA64PFR0_EL1_ADVSIMD_SHIFT 20
3252#define AARCH64_ID_AA64PFR0_EL1_ADVSIMD_MASK 0xf00000U
3253#define AARCH64_ID_AA64PFR0_EL1_ADVSIMD_GET( _reg ) \
3254 ( ( ( _reg ) >> 20 ) & 0xfU )
3256#define AARCH64_ID_AA64PFR0_EL1_GIC( _val ) ( ( _val ) << 24 )
3257#define AARCH64_ID_AA64PFR0_EL1_GIC_SHIFT 24
3258#define AARCH64_ID_AA64PFR0_EL1_GIC_MASK 0xf000000U
3259#define AARCH64_ID_AA64PFR0_EL1_GIC_GET( _reg ) \
3260 ( ( ( _reg ) >> 24 ) & 0xfU )
3262#define AARCH64_ID_AA64PFR0_EL1_RAS( _val ) ( ( _val ) << 28 )
3263#define AARCH64_ID_AA64PFR0_EL1_RAS_SHIFT 28
3264#define AARCH64_ID_AA64PFR0_EL1_RAS_MASK 0xf0000000U
3265#define AARCH64_ID_AA64PFR0_EL1_RAS_GET( _reg ) \
3266 ( ( ( _reg ) >> 28 ) & 0xfU )
3268#define AARCH64_ID_AA64PFR0_EL1_SVE( _val ) ( ( _val ) << 32 )
3269#define AARCH64_ID_AA64PFR0_EL1_SVE_SHIFT 32
3270#define AARCH64_ID_AA64PFR0_EL1_SVE_MASK 0xf00000000ULL
3271#define AARCH64_ID_AA64PFR0_EL1_SVE_GET( _reg ) \
3272 ( ( ( _reg ) >> 32 ) & 0xfULL )
3274#define AARCH64_ID_AA64PFR0_EL1_SEL2( _val ) ( ( _val ) << 36 )
3275#define AARCH64_ID_AA64PFR0_EL1_SEL2_SHIFT 36
3276#define AARCH64_ID_AA64PFR0_EL1_SEL2_MASK 0xf000000000ULL
3277#define AARCH64_ID_AA64PFR0_EL1_SEL2_GET( _reg ) \
3278 ( ( ( _reg ) >> 36 ) & 0xfULL )
3280#define AARCH64_ID_AA64PFR0_EL1_MPAM( _val ) ( ( _val ) << 40 )
3281#define AARCH64_ID_AA64PFR0_EL1_MPAM_SHIFT 40
3282#define AARCH64_ID_AA64PFR0_EL1_MPAM_MASK 0xf0000000000ULL
3283#define AARCH64_ID_AA64PFR0_EL1_MPAM_GET( _reg ) \
3284 ( ( ( _reg ) >> 40 ) & 0xfULL )
3286#define AARCH64_ID_AA64PFR0_EL1_AMU( _val ) ( ( _val ) << 44 )
3287#define AARCH64_ID_AA64PFR0_EL1_AMU_SHIFT 44
3288#define AARCH64_ID_AA64PFR0_EL1_AMU_MASK 0xf00000000000ULL
3289#define AARCH64_ID_AA64PFR0_EL1_AMU_GET( _reg ) \
3290 ( ( ( _reg ) >> 44 ) & 0xfULL )
3292#define AARCH64_ID_AA64PFR0_EL1_DIT( _val ) ( ( _val ) << 48 )
3293#define AARCH64_ID_AA64PFR0_EL1_DIT_SHIFT 48
3294#define AARCH64_ID_AA64PFR0_EL1_DIT_MASK 0xf000000000000ULL
3295#define AARCH64_ID_AA64PFR0_EL1_DIT_GET( _reg ) \
3296 ( ( ( _reg ) >> 48 ) & 0xfULL )
3298#define AARCH64_ID_AA64PFR0_EL1_CSV2( _val ) ( ( _val ) << 56 )
3299#define AARCH64_ID_AA64PFR0_EL1_CSV2_SHIFT 56
3300#define AARCH64_ID_AA64PFR0_EL1_CSV2_MASK 0xf00000000000000ULL
3301#define AARCH64_ID_AA64PFR0_EL1_CSV2_GET( _reg ) \
3302 ( ( ( _reg ) >> 56 ) & 0xfULL )
3304#define AARCH64_ID_AA64PFR0_EL1_CSV3( _val ) ( ( _val ) << 60 )
3305#define AARCH64_ID_AA64PFR0_EL1_CSV3_SHIFT 60
3306#define AARCH64_ID_AA64PFR0_EL1_CSV3_MASK 0xf000000000000000ULL
3307#define AARCH64_ID_AA64PFR0_EL1_CSV3_GET( _reg ) \
3308 ( ( ( _reg ) >> 60 ) & 0xfULL )
3310static inline uint64_t _AArch64_Read_id_aa64pfr0_el1(
void )
3315 "mrs %0, ID_AA64PFR0_EL1" :
"=&r" ( value ) : :
"memory"
3323#define AARCH64_ID_AA64PFR1_EL1_BT( _val ) ( ( _val ) << 0 )
3324#define AARCH64_ID_AA64PFR1_EL1_BT_SHIFT 0
3325#define AARCH64_ID_AA64PFR1_EL1_BT_MASK 0xfU
3326#define AARCH64_ID_AA64PFR1_EL1_BT_GET( _reg ) \
3327 ( ( ( _reg ) >> 0 ) & 0xfU )
3329#define AARCH64_ID_AA64PFR1_EL1_SSBS( _val ) ( ( _val ) << 4 )
3330#define AARCH64_ID_AA64PFR1_EL1_SSBS_SHIFT 4
3331#define AARCH64_ID_AA64PFR1_EL1_SSBS_MASK 0xf0U
3332#define AARCH64_ID_AA64PFR1_EL1_SSBS_GET( _reg ) \
3333 ( ( ( _reg ) >> 4 ) & 0xfU )
3335#define AARCH64_ID_AA64PFR1_EL1_MTE( _val ) ( ( _val ) << 8 )
3336#define AARCH64_ID_AA64PFR1_EL1_MTE_SHIFT 8
3337#define AARCH64_ID_AA64PFR1_EL1_MTE_MASK 0xf00U
3338#define AARCH64_ID_AA64PFR1_EL1_MTE_GET( _reg ) \
3339 ( ( ( _reg ) >> 8 ) & 0xfU )
3341#define AARCH64_ID_AA64PFR1_EL1_RAS_FRAC( _val ) ( ( _val ) << 12 )
3342#define AARCH64_ID_AA64PFR1_EL1_RAS_FRAC_SHIFT 12
3343#define AARCH64_ID_AA64PFR1_EL1_RAS_FRAC_MASK 0xf000U
3344#define AARCH64_ID_AA64PFR1_EL1_RAS_FRAC_GET( _reg ) \
3345 ( ( ( _reg ) >> 12 ) & 0xfU )
3347#define AARCH64_ID_AA64PFR1_EL1_MPAM_FRAC( _val ) ( ( _val ) << 16 )
3348#define AARCH64_ID_AA64PFR1_EL1_MPAM_FRAC_SHIFT 16
3349#define AARCH64_ID_AA64PFR1_EL1_MPAM_FRAC_MASK 0xf0000U
3350#define AARCH64_ID_AA64PFR1_EL1_MPAM_FRAC_GET( _reg ) \
3351 ( ( ( _reg ) >> 16 ) & 0xfU )
3353static inline uint64_t _AArch64_Read_id_aa64pfr1_el1(
void )
3358 "mrs %0, ID_AA64PFR1_EL1" :
"=&r" ( value ) : :
"memory"
3366static inline uint64_t _AArch64_Read_id_afr0_el1(
void )
3371 "mrs %0, ID_AFR0_EL1" :
"=&r" ( value ) : :
"memory"
3379#define AARCH64_ID_DFR0_EL1_COPDBG( _val ) ( ( _val ) << 0 )
3380#define AARCH64_ID_DFR0_EL1_COPDBG_SHIFT 0
3381#define AARCH64_ID_DFR0_EL1_COPDBG_MASK 0xfU
3382#define AARCH64_ID_DFR0_EL1_COPDBG_GET( _reg ) \
3383 ( ( ( _reg ) >> 0 ) & 0xfU )
3385#define AARCH64_ID_DFR0_EL1_COPSDBG( _val ) ( ( _val ) << 4 )
3386#define AARCH64_ID_DFR0_EL1_COPSDBG_SHIFT 4
3387#define AARCH64_ID_DFR0_EL1_COPSDBG_MASK 0xf0U
3388#define AARCH64_ID_DFR0_EL1_COPSDBG_GET( _reg ) \
3389 ( ( ( _reg ) >> 4 ) & 0xfU )
3391#define AARCH64_ID_DFR0_EL1_MMAPDBG( _val ) ( ( _val ) << 8 )
3392#define AARCH64_ID_DFR0_EL1_MMAPDBG_SHIFT 8
3393#define AARCH64_ID_DFR0_EL1_MMAPDBG_MASK 0xf00U
3394#define AARCH64_ID_DFR0_EL1_MMAPDBG_GET( _reg ) \
3395 ( ( ( _reg ) >> 8 ) & 0xfU )
3397#define AARCH64_ID_DFR0_EL1_COPTRC( _val ) ( ( _val ) << 12 )
3398#define AARCH64_ID_DFR0_EL1_COPTRC_SHIFT 12
3399#define AARCH64_ID_DFR0_EL1_COPTRC_MASK 0xf000U
3400#define AARCH64_ID_DFR0_EL1_COPTRC_GET( _reg ) \
3401 ( ( ( _reg ) >> 12 ) & 0xfU )
3403#define AARCH64_ID_DFR0_EL1_MMAPTRC( _val ) ( ( _val ) << 16 )
3404#define AARCH64_ID_DFR0_EL1_MMAPTRC_SHIFT 16
3405#define AARCH64_ID_DFR0_EL1_MMAPTRC_MASK 0xf0000U
3406#define AARCH64_ID_DFR0_EL1_MMAPTRC_GET( _reg ) \
3407 ( ( ( _reg ) >> 16 ) & 0xfU )
3409#define AARCH64_ID_DFR0_EL1_MPROFDBG( _val ) ( ( _val ) << 20 )
3410#define AARCH64_ID_DFR0_EL1_MPROFDBG_SHIFT 20
3411#define AARCH64_ID_DFR0_EL1_MPROFDBG_MASK 0xf00000U
3412#define AARCH64_ID_DFR0_EL1_MPROFDBG_GET( _reg ) \
3413 ( ( ( _reg ) >> 20 ) & 0xfU )
3415#define AARCH64_ID_DFR0_EL1_PERFMON( _val ) ( ( _val ) << 24 )
3416#define AARCH64_ID_DFR0_EL1_PERFMON_SHIFT 24
3417#define AARCH64_ID_DFR0_EL1_PERFMON_MASK 0xf000000U
3418#define AARCH64_ID_DFR0_EL1_PERFMON_GET( _reg ) \
3419 ( ( ( _reg ) >> 24 ) & 0xfU )
3421#define AARCH64_ID_DFR0_EL1_TRACEFILT( _val ) ( ( _val ) << 28 )
3422#define AARCH64_ID_DFR0_EL1_TRACEFILT_SHIFT 28
3423#define AARCH64_ID_DFR0_EL1_TRACEFILT_MASK 0xf0000000U
3424#define AARCH64_ID_DFR0_EL1_TRACEFILT_GET( _reg ) \
3425 ( ( ( _reg ) >> 28 ) & 0xfU )
3427static inline uint64_t _AArch64_Read_id_dfr0_el1(
void )
3432 "mrs %0, ID_DFR0_EL1" :
"=&r" ( value ) : :
"memory"
3440#define AARCH64_ID_DFR1_EL1_MTPMU( _val ) ( ( _val ) << 0 )
3441#define AARCH64_ID_DFR1_EL1_MTPMU_SHIFT 0
3442#define AARCH64_ID_DFR1_EL1_MTPMU_MASK 0xfU
3443#define AARCH64_ID_DFR1_EL1_MTPMU_GET( _reg ) \
3444 ( ( ( _reg ) >> 0 ) & 0xfU )
3446static inline uint64_t _AArch64_Read_id_dfr1_el1(
void )
3451 "mrs %0, ID_DFR1_EL1" :
"=&r" ( value ) : :
"memory"
3459#define AARCH64_ID_ISAR0_EL1_SWAP( _val ) ( ( _val ) << 0 )
3460#define AARCH64_ID_ISAR0_EL1_SWAP_SHIFT 0
3461#define AARCH64_ID_ISAR0_EL1_SWAP_MASK 0xfU
3462#define AARCH64_ID_ISAR0_EL1_SWAP_GET( _reg ) \
3463 ( ( ( _reg ) >> 0 ) & 0xfU )
3465#define AARCH64_ID_ISAR0_EL1_BITCOUNT( _val ) ( ( _val ) << 4 )
3466#define AARCH64_ID_ISAR0_EL1_BITCOUNT_SHIFT 4
3467#define AARCH64_ID_ISAR0_EL1_BITCOUNT_MASK 0xf0U
3468#define AARCH64_ID_ISAR0_EL1_BITCOUNT_GET( _reg ) \
3469 ( ( ( _reg ) >> 4 ) & 0xfU )
3471#define AARCH64_ID_ISAR0_EL1_BITFIELD( _val ) ( ( _val ) << 8 )
3472#define AARCH64_ID_ISAR0_EL1_BITFIELD_SHIFT 8
3473#define AARCH64_ID_ISAR0_EL1_BITFIELD_MASK 0xf00U
3474#define AARCH64_ID_ISAR0_EL1_BITFIELD_GET( _reg ) \
3475 ( ( ( _reg ) >> 8 ) & 0xfU )
3477#define AARCH64_ID_ISAR0_EL1_CMPBRANCH( _val ) ( ( _val ) << 12 )
3478#define AARCH64_ID_ISAR0_EL1_CMPBRANCH_SHIFT 12
3479#define AARCH64_ID_ISAR0_EL1_CMPBRANCH_MASK 0xf000U
3480#define AARCH64_ID_ISAR0_EL1_CMPBRANCH_GET( _reg ) \
3481 ( ( ( _reg ) >> 12 ) & 0xfU )
3483#define AARCH64_ID_ISAR0_EL1_COPROC( _val ) ( ( _val ) << 16 )
3484#define AARCH64_ID_ISAR0_EL1_COPROC_SHIFT 16
3485#define AARCH64_ID_ISAR0_EL1_COPROC_MASK 0xf0000U
3486#define AARCH64_ID_ISAR0_EL1_COPROC_GET( _reg ) \
3487 ( ( ( _reg ) >> 16 ) & 0xfU )
3489#define AARCH64_ID_ISAR0_EL1_DEBUG( _val ) ( ( _val ) << 20 )
3490#define AARCH64_ID_ISAR0_EL1_DEBUG_SHIFT 20
3491#define AARCH64_ID_ISAR0_EL1_DEBUG_MASK 0xf00000U
3492#define AARCH64_ID_ISAR0_EL1_DEBUG_GET( _reg ) \
3493 ( ( ( _reg ) >> 20 ) & 0xfU )
3495#define AARCH64_ID_ISAR0_EL1_DIVIDE( _val ) ( ( _val ) << 24 )
3496#define AARCH64_ID_ISAR0_EL1_DIVIDE_SHIFT 24
3497#define AARCH64_ID_ISAR0_EL1_DIVIDE_MASK 0xf000000U
3498#define AARCH64_ID_ISAR0_EL1_DIVIDE_GET( _reg ) \
3499 ( ( ( _reg ) >> 24 ) & 0xfU )
3501static inline uint64_t _AArch64_Read_id_isar0_el1(
void )
3506 "mrs %0, ID_ISAR0_EL1" :
"=&r" ( value ) : :
"memory"
3514#define AARCH64_ID_ISAR1_EL1_ENDIAN( _val ) ( ( _val ) << 0 )
3515#define AARCH64_ID_ISAR1_EL1_ENDIAN_SHIFT 0
3516#define AARCH64_ID_ISAR1_EL1_ENDIAN_MASK 0xfU
3517#define AARCH64_ID_ISAR1_EL1_ENDIAN_GET( _reg ) \
3518 ( ( ( _reg ) >> 0 ) & 0xfU )
3520#define AARCH64_ID_ISAR1_EL1_EXCEPT( _val ) ( ( _val ) << 4 )
3521#define AARCH64_ID_ISAR1_EL1_EXCEPT_SHIFT 4
3522#define AARCH64_ID_ISAR1_EL1_EXCEPT_MASK 0xf0U
3523#define AARCH64_ID_ISAR1_EL1_EXCEPT_GET( _reg ) \
3524 ( ( ( _reg ) >> 4 ) & 0xfU )
3526#define AARCH64_ID_ISAR1_EL1_EXCEPT_AR( _val ) ( ( _val ) << 8 )
3527#define AARCH64_ID_ISAR1_EL1_EXCEPT_AR_SHIFT 8
3528#define AARCH64_ID_ISAR1_EL1_EXCEPT_AR_MASK 0xf00U
3529#define AARCH64_ID_ISAR1_EL1_EXCEPT_AR_GET( _reg ) \
3530 ( ( ( _reg ) >> 8 ) & 0xfU )
3532#define AARCH64_ID_ISAR1_EL1_EXTEND( _val ) ( ( _val ) << 12 )
3533#define AARCH64_ID_ISAR1_EL1_EXTEND_SHIFT 12
3534#define AARCH64_ID_ISAR1_EL1_EXTEND_MASK 0xf000U
3535#define AARCH64_ID_ISAR1_EL1_EXTEND_GET( _reg ) \
3536 ( ( ( _reg ) >> 12 ) & 0xfU )
3538#define AARCH64_ID_ISAR1_EL1_IFTHEN( _val ) ( ( _val ) << 16 )
3539#define AARCH64_ID_ISAR1_EL1_IFTHEN_SHIFT 16
3540#define AARCH64_ID_ISAR1_EL1_IFTHEN_MASK 0xf0000U
3541#define AARCH64_ID_ISAR1_EL1_IFTHEN_GET( _reg ) \
3542 ( ( ( _reg ) >> 16 ) & 0xfU )
3544#define AARCH64_ID_ISAR1_EL1_IMMEDIATE( _val ) ( ( _val ) << 20 )
3545#define AARCH64_ID_ISAR1_EL1_IMMEDIATE_SHIFT 20
3546#define AARCH64_ID_ISAR1_EL1_IMMEDIATE_MASK 0xf00000U
3547#define AARCH64_ID_ISAR1_EL1_IMMEDIATE_GET( _reg ) \
3548 ( ( ( _reg ) >> 20 ) & 0xfU )
3550#define AARCH64_ID_ISAR1_EL1_INTERWORK( _val ) ( ( _val ) << 24 )
3551#define AARCH64_ID_ISAR1_EL1_INTERWORK_SHIFT 24
3552#define AARCH64_ID_ISAR1_EL1_INTERWORK_MASK 0xf000000U
3553#define AARCH64_ID_ISAR1_EL1_INTERWORK_GET( _reg ) \
3554 ( ( ( _reg ) >> 24 ) & 0xfU )
3556#define AARCH64_ID_ISAR1_EL1_JAZELLE( _val ) ( ( _val ) << 28 )
3557#define AARCH64_ID_ISAR1_EL1_JAZELLE_SHIFT 28
3558#define AARCH64_ID_ISAR1_EL1_JAZELLE_MASK 0xf0000000U
3559#define AARCH64_ID_ISAR1_EL1_JAZELLE_GET( _reg ) \
3560 ( ( ( _reg ) >> 28 ) & 0xfU )
3562static inline uint64_t _AArch64_Read_id_isar1_el1(
void )
3567 "mrs %0, ID_ISAR1_EL1" :
"=&r" ( value ) : :
"memory"
3575#define AARCH64_ID_ISAR2_EL1_LOADSTORE( _val ) ( ( _val ) << 0 )
3576#define AARCH64_ID_ISAR2_EL1_LOADSTORE_SHIFT 0
3577#define AARCH64_ID_ISAR2_EL1_LOADSTORE_MASK 0xfU
3578#define AARCH64_ID_ISAR2_EL1_LOADSTORE_GET( _reg ) \
3579 ( ( ( _reg ) >> 0 ) & 0xfU )
3581#define AARCH64_ID_ISAR2_EL1_MEMHINT( _val ) ( ( _val ) << 4 )
3582#define AARCH64_ID_ISAR2_EL1_MEMHINT_SHIFT 4
3583#define AARCH64_ID_ISAR2_EL1_MEMHINT_MASK 0xf0U
3584#define AARCH64_ID_ISAR2_EL1_MEMHINT_GET( _reg ) \
3585 ( ( ( _reg ) >> 4 ) & 0xfU )
3587#define AARCH64_ID_ISAR2_EL1_MULTIACCESSINT( _val ) ( ( _val ) << 8 )
3588#define AARCH64_ID_ISAR2_EL1_MULTIACCESSINT_SHIFT 8
3589#define AARCH64_ID_ISAR2_EL1_MULTIACCESSINT_MASK 0xf00U
3590#define AARCH64_ID_ISAR2_EL1_MULTIACCESSINT_GET( _reg ) \
3591 ( ( ( _reg ) >> 8 ) & 0xfU )
3593#define AARCH64_ID_ISAR2_EL1_MULT( _val ) ( ( _val ) << 12 )
3594#define AARCH64_ID_ISAR2_EL1_MULT_SHIFT 12
3595#define AARCH64_ID_ISAR2_EL1_MULT_MASK 0xf000U
3596#define AARCH64_ID_ISAR2_EL1_MULT_GET( _reg ) \
3597 ( ( ( _reg ) >> 12 ) & 0xfU )
3599#define AARCH64_ID_ISAR2_EL1_MULTS( _val ) ( ( _val ) << 16 )
3600#define AARCH64_ID_ISAR2_EL1_MULTS_SHIFT 16
3601#define AARCH64_ID_ISAR2_EL1_MULTS_MASK 0xf0000U
3602#define AARCH64_ID_ISAR2_EL1_MULTS_GET( _reg ) \
3603 ( ( ( _reg ) >> 16 ) & 0xfU )
3605#define AARCH64_ID_ISAR2_EL1_MULTU( _val ) ( ( _val ) << 20 )
3606#define AARCH64_ID_ISAR2_EL1_MULTU_SHIFT 20
3607#define AARCH64_ID_ISAR2_EL1_MULTU_MASK 0xf00000U
3608#define AARCH64_ID_ISAR2_EL1_MULTU_GET( _reg ) \
3609 ( ( ( _reg ) >> 20 ) & 0xfU )
3611#define AARCH64_ID_ISAR2_EL1_PSR_AR( _val ) ( ( _val ) << 24 )
3612#define AARCH64_ID_ISAR2_EL1_PSR_AR_SHIFT 24
3613#define AARCH64_ID_ISAR2_EL1_PSR_AR_MASK 0xf000000U
3614#define AARCH64_ID_ISAR2_EL1_PSR_AR_GET( _reg ) \
3615 ( ( ( _reg ) >> 24 ) & 0xfU )
3617#define AARCH64_ID_ISAR2_EL1_REVERSAL( _val ) ( ( _val ) << 28 )
3618#define AARCH64_ID_ISAR2_EL1_REVERSAL_SHIFT 28
3619#define AARCH64_ID_ISAR2_EL1_REVERSAL_MASK 0xf0000000U
3620#define AARCH64_ID_ISAR2_EL1_REVERSAL_GET( _reg ) \
3621 ( ( ( _reg ) >> 28 ) & 0xfU )
3623static inline uint64_t _AArch64_Read_id_isar2_el1(
void )
3628 "mrs %0, ID_ISAR2_EL1" :
"=&r" ( value ) : :
"memory"
3636#define AARCH64_ID_ISAR3_EL1_SATURATE( _val ) ( ( _val ) << 0 )
3637#define AARCH64_ID_ISAR3_EL1_SATURATE_SHIFT 0
3638#define AARCH64_ID_ISAR3_EL1_SATURATE_MASK 0xfU
3639#define AARCH64_ID_ISAR3_EL1_SATURATE_GET( _reg ) \
3640 ( ( ( _reg ) >> 0 ) & 0xfU )
3642#define AARCH64_ID_ISAR3_EL1_SIMD( _val ) ( ( _val ) << 4 )
3643#define AARCH64_ID_ISAR3_EL1_SIMD_SHIFT 4
3644#define AARCH64_ID_ISAR3_EL1_SIMD_MASK 0xf0U
3645#define AARCH64_ID_ISAR3_EL1_SIMD_GET( _reg ) \
3646 ( ( ( _reg ) >> 4 ) & 0xfU )
3648#define AARCH64_ID_ISAR3_EL1_SVC( _val ) ( ( _val ) << 8 )
3649#define AARCH64_ID_ISAR3_EL1_SVC_SHIFT 8
3650#define AARCH64_ID_ISAR3_EL1_SVC_MASK 0xf00U
3651#define AARCH64_ID_ISAR3_EL1_SVC_GET( _reg ) \
3652 ( ( ( _reg ) >> 8 ) & 0xfU )
3654#define AARCH64_ID_ISAR3_EL1_SYNCHPRIM( _val ) ( ( _val ) << 12 )
3655#define AARCH64_ID_ISAR3_EL1_SYNCHPRIM_SHIFT 12
3656#define AARCH64_ID_ISAR3_EL1_SYNCHPRIM_MASK 0xf000U
3657#define AARCH64_ID_ISAR3_EL1_SYNCHPRIM_GET( _reg ) \
3658 ( ( ( _reg ) >> 12 ) & 0xfU )
3660#define AARCH64_ID_ISAR3_EL1_TABBRANCH( _val ) ( ( _val ) << 16 )
3661#define AARCH64_ID_ISAR3_EL1_TABBRANCH_SHIFT 16
3662#define AARCH64_ID_ISAR3_EL1_TABBRANCH_MASK 0xf0000U
3663#define AARCH64_ID_ISAR3_EL1_TABBRANCH_GET( _reg ) \
3664 ( ( ( _reg ) >> 16 ) & 0xfU )
3666#define AARCH64_ID_ISAR3_EL1_T32COPY( _val ) ( ( _val ) << 20 )
3667#define AARCH64_ID_ISAR3_EL1_T32COPY_SHIFT 20
3668#define AARCH64_ID_ISAR3_EL1_T32COPY_MASK 0xf00000U
3669#define AARCH64_ID_ISAR3_EL1_T32COPY_GET( _reg ) \
3670 ( ( ( _reg ) >> 20 ) & 0xfU )
3672#define AARCH64_ID_ISAR3_EL1_TRUENOP( _val ) ( ( _val ) << 24 )
3673#define AARCH64_ID_ISAR3_EL1_TRUENOP_SHIFT 24
3674#define AARCH64_ID_ISAR3_EL1_TRUENOP_MASK 0xf000000U
3675#define AARCH64_ID_ISAR3_EL1_TRUENOP_GET( _reg ) \
3676 ( ( ( _reg ) >> 24 ) & 0xfU )
3678#define AARCH64_ID_ISAR3_EL1_T32EE( _val ) ( ( _val ) << 28 )
3679#define AARCH64_ID_ISAR3_EL1_T32EE_SHIFT 28
3680#define AARCH64_ID_ISAR3_EL1_T32EE_MASK 0xf0000000U
3681#define AARCH64_ID_ISAR3_EL1_T32EE_GET( _reg ) \
3682 ( ( ( _reg ) >> 28 ) & 0xfU )
3684static inline uint64_t _AArch64_Read_id_isar3_el1(
void )
3689 "mrs %0, ID_ISAR3_EL1" :
"=&r" ( value ) : :
"memory"
3697#define AARCH64_ID_ISAR4_EL1_UNPRIV( _val ) ( ( _val ) << 0 )
3698#define AARCH64_ID_ISAR4_EL1_UNPRIV_SHIFT 0
3699#define AARCH64_ID_ISAR4_EL1_UNPRIV_MASK 0xfU
3700#define AARCH64_ID_ISAR4_EL1_UNPRIV_GET( _reg ) \
3701 ( ( ( _reg ) >> 0 ) & 0xfU )
3703#define AARCH64_ID_ISAR4_EL1_WITHSHIFTS( _val ) ( ( _val ) << 4 )
3704#define AARCH64_ID_ISAR4_EL1_WITHSHIFTS_SHIFT 4
3705#define AARCH64_ID_ISAR4_EL1_WITHSHIFTS_MASK 0xf0U
3706#define AARCH64_ID_ISAR4_EL1_WITHSHIFTS_GET( _reg ) \
3707 ( ( ( _reg ) >> 4 ) & 0xfU )
3709#define AARCH64_ID_ISAR4_EL1_WRITEBACK( _val ) ( ( _val ) << 8 )
3710#define AARCH64_ID_ISAR4_EL1_WRITEBACK_SHIFT 8
3711#define AARCH64_ID_ISAR4_EL1_WRITEBACK_MASK 0xf00U
3712#define AARCH64_ID_ISAR4_EL1_WRITEBACK_GET( _reg ) \
3713 ( ( ( _reg ) >> 8 ) & 0xfU )
3715#define AARCH64_ID_ISAR4_EL1_SMC( _val ) ( ( _val ) << 12 )
3716#define AARCH64_ID_ISAR4_EL1_SMC_SHIFT 12
3717#define AARCH64_ID_ISAR4_EL1_SMC_MASK 0xf000U
3718#define AARCH64_ID_ISAR4_EL1_SMC_GET( _reg ) \
3719 ( ( ( _reg ) >> 12 ) & 0xfU )
3721#define AARCH64_ID_ISAR4_EL1_BARRIER( _val ) ( ( _val ) << 16 )
3722#define AARCH64_ID_ISAR4_EL1_BARRIER_SHIFT 16
3723#define AARCH64_ID_ISAR4_EL1_BARRIER_MASK 0xf0000U
3724#define AARCH64_ID_ISAR4_EL1_BARRIER_GET( _reg ) \
3725 ( ( ( _reg ) >> 16 ) & 0xfU )
3727#define AARCH64_ID_ISAR4_EL1_SYNCHPRIM_FRAC( _val ) ( ( _val ) << 20 )
3728#define AARCH64_ID_ISAR4_EL1_SYNCHPRIM_FRAC_SHIFT 20
3729#define AARCH64_ID_ISAR4_EL1_SYNCHPRIM_FRAC_MASK 0xf00000U
3730#define AARCH64_ID_ISAR4_EL1_SYNCHPRIM_FRAC_GET( _reg ) \
3731 ( ( ( _reg ) >> 20 ) & 0xfU )
3733#define AARCH64_ID_ISAR4_EL1_PSR_M( _val ) ( ( _val ) << 24 )
3734#define AARCH64_ID_ISAR4_EL1_PSR_M_SHIFT 24
3735#define AARCH64_ID_ISAR4_EL1_PSR_M_MASK 0xf000000U
3736#define AARCH64_ID_ISAR4_EL1_PSR_M_GET( _reg ) \
3737 ( ( ( _reg ) >> 24 ) & 0xfU )
3739#define AARCH64_ID_ISAR4_EL1_SWP_FRAC( _val ) ( ( _val ) << 28 )
3740#define AARCH64_ID_ISAR4_EL1_SWP_FRAC_SHIFT 28
3741#define AARCH64_ID_ISAR4_EL1_SWP_FRAC_MASK 0xf0000000U
3742#define AARCH64_ID_ISAR4_EL1_SWP_FRAC_GET( _reg ) \
3743 ( ( ( _reg ) >> 28 ) & 0xfU )
3745static inline uint64_t _AArch64_Read_id_isar4_el1(
void )
3750 "mrs %0, ID_ISAR4_EL1" :
"=&r" ( value ) : :
"memory"
3758#define AARCH64_ID_ISAR5_EL1_SEVL( _val ) ( ( _val ) << 0 )
3759#define AARCH64_ID_ISAR5_EL1_SEVL_SHIFT 0
3760#define AARCH64_ID_ISAR5_EL1_SEVL_MASK 0xfU
3761#define AARCH64_ID_ISAR5_EL1_SEVL_GET( _reg ) \
3762 ( ( ( _reg ) >> 0 ) & 0xfU )
3764#define AARCH64_ID_ISAR5_EL1_AES( _val ) ( ( _val ) << 4 )
3765#define AARCH64_ID_ISAR5_EL1_AES_SHIFT 4
3766#define AARCH64_ID_ISAR5_EL1_AES_MASK 0xf0U
3767#define AARCH64_ID_ISAR5_EL1_AES_GET( _reg ) \
3768 ( ( ( _reg ) >> 4 ) & 0xfU )
3770#define AARCH64_ID_ISAR5_EL1_SHA1( _val ) ( ( _val ) << 8 )
3771#define AARCH64_ID_ISAR5_EL1_SHA1_SHIFT 8
3772#define AARCH64_ID_ISAR5_EL1_SHA1_MASK 0xf00U
3773#define AARCH64_ID_ISAR5_EL1_SHA1_GET( _reg ) \
3774 ( ( ( _reg ) >> 8 ) & 0xfU )
3776#define AARCH64_ID_ISAR5_EL1_SHA2( _val ) ( ( _val ) << 12 )
3777#define AARCH64_ID_ISAR5_EL1_SHA2_SHIFT 12
3778#define AARCH64_ID_ISAR5_EL1_SHA2_MASK 0xf000U
3779#define AARCH64_ID_ISAR5_EL1_SHA2_GET( _reg ) \
3780 ( ( ( _reg ) >> 12 ) & 0xfU )
3782#define AARCH64_ID_ISAR5_EL1_CRC32( _val ) ( ( _val ) << 16 )
3783#define AARCH64_ID_ISAR5_EL1_CRC32_SHIFT 16
3784#define AARCH64_ID_ISAR5_EL1_CRC32_MASK 0xf0000U
3785#define AARCH64_ID_ISAR5_EL1_CRC32_GET( _reg ) \
3786 ( ( ( _reg ) >> 16 ) & 0xfU )
3788#define AARCH64_ID_ISAR5_EL1_RDM( _val ) ( ( _val ) << 24 )
3789#define AARCH64_ID_ISAR5_EL1_RDM_SHIFT 24
3790#define AARCH64_ID_ISAR5_EL1_RDM_MASK 0xf000000U
3791#define AARCH64_ID_ISAR5_EL1_RDM_GET( _reg ) \
3792 ( ( ( _reg ) >> 24 ) & 0xfU )
3794#define AARCH64_ID_ISAR5_EL1_VCMA( _val ) ( ( _val ) << 28 )
3795#define AARCH64_ID_ISAR5_EL1_VCMA_SHIFT 28
3796#define AARCH64_ID_ISAR5_EL1_VCMA_MASK 0xf0000000U
3797#define AARCH64_ID_ISAR5_EL1_VCMA_GET( _reg ) \
3798 ( ( ( _reg ) >> 28 ) & 0xfU )
3800static inline uint64_t _AArch64_Read_id_isar5_el1(
void )
3805 "mrs %0, ID_ISAR5_EL1" :
"=&r" ( value ) : :
"memory"
3813#define AARCH64_ID_ISAR6_EL1_JSCVT( _val ) ( ( _val ) << 0 )
3814#define AARCH64_ID_ISAR6_EL1_JSCVT_SHIFT 0
3815#define AARCH64_ID_ISAR6_EL1_JSCVT_MASK 0xfU
3816#define AARCH64_ID_ISAR6_EL1_JSCVT_GET( _reg ) \
3817 ( ( ( _reg ) >> 0 ) & 0xfU )
3819#define AARCH64_ID_ISAR6_EL1_DP( _val ) ( ( _val ) << 4 )
3820#define AARCH64_ID_ISAR6_EL1_DP_SHIFT 4
3821#define AARCH64_ID_ISAR6_EL1_DP_MASK 0xf0U
3822#define AARCH64_ID_ISAR6_EL1_DP_GET( _reg ) \
3823 ( ( ( _reg ) >> 4 ) & 0xfU )
3825#define AARCH64_ID_ISAR6_EL1_FHM( _val ) ( ( _val ) << 8 )
3826#define AARCH64_ID_ISAR6_EL1_FHM_SHIFT 8
3827#define AARCH64_ID_ISAR6_EL1_FHM_MASK 0xf00U
3828#define AARCH64_ID_ISAR6_EL1_FHM_GET( _reg ) \
3829 ( ( ( _reg ) >> 8 ) & 0xfU )
3831#define AARCH64_ID_ISAR6_EL1_SB( _val ) ( ( _val ) << 12 )
3832#define AARCH64_ID_ISAR6_EL1_SB_SHIFT 12
3833#define AARCH64_ID_ISAR6_EL1_SB_MASK 0xf000U
3834#define AARCH64_ID_ISAR6_EL1_SB_GET( _reg ) \
3835 ( ( ( _reg ) >> 12 ) & 0xfU )
3837#define AARCH64_ID_ISAR6_EL1_SPECRES( _val ) ( ( _val ) << 16 )
3838#define AARCH64_ID_ISAR6_EL1_SPECRES_SHIFT 16
3839#define AARCH64_ID_ISAR6_EL1_SPECRES_MASK 0xf0000U
3840#define AARCH64_ID_ISAR6_EL1_SPECRES_GET( _reg ) \
3841 ( ( ( _reg ) >> 16 ) & 0xfU )
3843#define AARCH64_ID_ISAR6_EL1_BF16( _val ) ( ( _val ) << 20 )
3844#define AARCH64_ID_ISAR6_EL1_BF16_SHIFT 20
3845#define AARCH64_ID_ISAR6_EL1_BF16_MASK 0xf00000U
3846#define AARCH64_ID_ISAR6_EL1_BF16_GET( _reg ) \
3847 ( ( ( _reg ) >> 20 ) & 0xfU )
3849#define AARCH64_ID_ISAR6_EL1_I8MM( _val ) ( ( _val ) << 24 )
3850#define AARCH64_ID_ISAR6_EL1_I8MM_SHIFT 24
3851#define AARCH64_ID_ISAR6_EL1_I8MM_MASK 0xf000000U
3852#define AARCH64_ID_ISAR6_EL1_I8MM_GET( _reg ) \
3853 ( ( ( _reg ) >> 24 ) & 0xfU )
3855static inline uint64_t _AArch64_Read_id_isar6_el1(
void )
3860 "mrs %0, ID_ISAR6_EL1" :
"=&r" ( value ) : :
"memory"
3868#define AARCH64_ID_MMFR0_EL1_VMSA( _val ) ( ( _val ) << 0 )
3869#define AARCH64_ID_MMFR0_EL1_VMSA_SHIFT 0
3870#define AARCH64_ID_MMFR0_EL1_VMSA_MASK 0xfU
3871#define AARCH64_ID_MMFR0_EL1_VMSA_GET( _reg ) \
3872 ( ( ( _reg ) >> 0 ) & 0xfU )
3874#define AARCH64_ID_MMFR0_EL1_PMSA( _val ) ( ( _val ) << 4 )
3875#define AARCH64_ID_MMFR0_EL1_PMSA_SHIFT 4
3876#define AARCH64_ID_MMFR0_EL1_PMSA_MASK 0xf0U
3877#define AARCH64_ID_MMFR0_EL1_PMSA_GET( _reg ) \
3878 ( ( ( _reg ) >> 4 ) & 0xfU )
3880#define AARCH64_ID_MMFR0_EL1_OUTERSHR( _val ) ( ( _val ) << 8 )
3881#define AARCH64_ID_MMFR0_EL1_OUTERSHR_SHIFT 8
3882#define AARCH64_ID_MMFR0_EL1_OUTERSHR_MASK 0xf00U
3883#define AARCH64_ID_MMFR0_EL1_OUTERSHR_GET( _reg ) \
3884 ( ( ( _reg ) >> 8 ) & 0xfU )
3886#define AARCH64_ID_MMFR0_EL1_SHARELVL( _val ) ( ( _val ) << 12 )
3887#define AARCH64_ID_MMFR0_EL1_SHARELVL_SHIFT 12
3888#define AARCH64_ID_MMFR0_EL1_SHARELVL_MASK 0xf000U
3889#define AARCH64_ID_MMFR0_EL1_SHARELVL_GET( _reg ) \
3890 ( ( ( _reg ) >> 12 ) & 0xfU )
3892#define AARCH64_ID_MMFR0_EL1_TCM( _val ) ( ( _val ) << 16 )
3893#define AARCH64_ID_MMFR0_EL1_TCM_SHIFT 16
3894#define AARCH64_ID_MMFR0_EL1_TCM_MASK 0xf0000U
3895#define AARCH64_ID_MMFR0_EL1_TCM_GET( _reg ) \
3896 ( ( ( _reg ) >> 16 ) & 0xfU )
3898#define AARCH64_ID_MMFR0_EL1_AUXREG( _val ) ( ( _val ) << 20 )
3899#define AARCH64_ID_MMFR0_EL1_AUXREG_SHIFT 20
3900#define AARCH64_ID_MMFR0_EL1_AUXREG_MASK 0xf00000U
3901#define AARCH64_ID_MMFR0_EL1_AUXREG_GET( _reg ) \
3902 ( ( ( _reg ) >> 20 ) & 0xfU )
3904#define AARCH64_ID_MMFR0_EL1_FCSE( _val ) ( ( _val ) << 24 )
3905#define AARCH64_ID_MMFR0_EL1_FCSE_SHIFT 24
3906#define AARCH64_ID_MMFR0_EL1_FCSE_MASK 0xf000000U
3907#define AARCH64_ID_MMFR0_EL1_FCSE_GET( _reg ) \
3908 ( ( ( _reg ) >> 24 ) & 0xfU )
3910#define AARCH64_ID_MMFR0_EL1_INNERSHR( _val ) ( ( _val ) << 28 )
3911#define AARCH64_ID_MMFR0_EL1_INNERSHR_SHIFT 28
3912#define AARCH64_ID_MMFR0_EL1_INNERSHR_MASK 0xf0000000U
3913#define AARCH64_ID_MMFR0_EL1_INNERSHR_GET( _reg ) \
3914 ( ( ( _reg ) >> 28 ) & 0xfU )
3916static inline uint64_t _AArch64_Read_id_mmfr0_el1(
void )
3921 "mrs %0, ID_MMFR0_EL1" :
"=&r" ( value ) : :
"memory"
3929#define AARCH64_ID_MMFR1_EL1_L1HVDVA( _val ) ( ( _val ) << 0 )
3930#define AARCH64_ID_MMFR1_EL1_L1HVDVA_SHIFT 0
3931#define AARCH64_ID_MMFR1_EL1_L1HVDVA_MASK 0xfU
3932#define AARCH64_ID_MMFR1_EL1_L1HVDVA_GET( _reg ) \
3933 ( ( ( _reg ) >> 0 ) & 0xfU )
3935#define AARCH64_ID_MMFR1_EL1_L1UNIVA( _val ) ( ( _val ) << 4 )
3936#define AARCH64_ID_MMFR1_EL1_L1UNIVA_SHIFT 4
3937#define AARCH64_ID_MMFR1_EL1_L1UNIVA_MASK 0xf0U
3938#define AARCH64_ID_MMFR1_EL1_L1UNIVA_GET( _reg ) \
3939 ( ( ( _reg ) >> 4 ) & 0xfU )
3941#define AARCH64_ID_MMFR1_EL1_L1HVDSW( _val ) ( ( _val ) << 8 )
3942#define AARCH64_ID_MMFR1_EL1_L1HVDSW_SHIFT 8
3943#define AARCH64_ID_MMFR1_EL1_L1HVDSW_MASK 0xf00U
3944#define AARCH64_ID_MMFR1_EL1_L1HVDSW_GET( _reg ) \
3945 ( ( ( _reg ) >> 8 ) & 0xfU )
3947#define AARCH64_ID_MMFR1_EL1_L1UNISW( _val ) ( ( _val ) << 12 )
3948#define AARCH64_ID_MMFR1_EL1_L1UNISW_SHIFT 12
3949#define AARCH64_ID_MMFR1_EL1_L1UNISW_MASK 0xf000U
3950#define AARCH64_ID_MMFR1_EL1_L1UNISW_GET( _reg ) \
3951 ( ( ( _reg ) >> 12 ) & 0xfU )
3953#define AARCH64_ID_MMFR1_EL1_L1HVD( _val ) ( ( _val ) << 16 )
3954#define AARCH64_ID_MMFR1_EL1_L1HVD_SHIFT 16
3955#define AARCH64_ID_MMFR1_EL1_L1HVD_MASK 0xf0000U
3956#define AARCH64_ID_MMFR1_EL1_L1HVD_GET( _reg ) \
3957 ( ( ( _reg ) >> 16 ) & 0xfU )
3959#define AARCH64_ID_MMFR1_EL1_L1UNI( _val ) ( ( _val ) << 20 )
3960#define AARCH64_ID_MMFR1_EL1_L1UNI_SHIFT 20
3961#define AARCH64_ID_MMFR1_EL1_L1UNI_MASK 0xf00000U
3962#define AARCH64_ID_MMFR1_EL1_L1UNI_GET( _reg ) \
3963 ( ( ( _reg ) >> 20 ) & 0xfU )
3965#define AARCH64_ID_MMFR1_EL1_L1TSTCLN( _val ) ( ( _val ) << 24 )
3966#define AARCH64_ID_MMFR1_EL1_L1TSTCLN_SHIFT 24
3967#define AARCH64_ID_MMFR1_EL1_L1TSTCLN_MASK 0xf000000U
3968#define AARCH64_ID_MMFR1_EL1_L1TSTCLN_GET( _reg ) \
3969 ( ( ( _reg ) >> 24 ) & 0xfU )
3971#define AARCH64_ID_MMFR1_EL1_BPRED( _val ) ( ( _val ) << 28 )
3972#define AARCH64_ID_MMFR1_EL1_BPRED_SHIFT 28
3973#define AARCH64_ID_MMFR1_EL1_BPRED_MASK 0xf0000000U
3974#define AARCH64_ID_MMFR1_EL1_BPRED_GET( _reg ) \
3975 ( ( ( _reg ) >> 28 ) & 0xfU )
3977static inline uint64_t _AArch64_Read_id_mmfr1_el1(
void )
3982 "mrs %0, ID_MMFR1_EL1" :
"=&r" ( value ) : :
"memory"
3990#define AARCH64_ID_MMFR2_EL1_L1HVDFG( _val ) ( ( _val ) << 0 )
3991#define AARCH64_ID_MMFR2_EL1_L1HVDFG_SHIFT 0
3992#define AARCH64_ID_MMFR2_EL1_L1HVDFG_MASK 0xfU
3993#define AARCH64_ID_MMFR2_EL1_L1HVDFG_GET( _reg ) \
3994 ( ( ( _reg ) >> 0 ) & 0xfU )
3996#define AARCH64_ID_MMFR2_EL1_L1HVDBG( _val ) ( ( _val ) << 4 )
3997#define AARCH64_ID_MMFR2_EL1_L1HVDBG_SHIFT 4
3998#define AARCH64_ID_MMFR2_EL1_L1HVDBG_MASK 0xf0U
3999#define AARCH64_ID_MMFR2_EL1_L1HVDBG_GET( _reg ) \
4000 ( ( ( _reg ) >> 4 ) & 0xfU )
4002#define AARCH64_ID_MMFR2_EL1_L1HVDRNG( _val ) ( ( _val ) << 8 )
4003#define AARCH64_ID_MMFR2_EL1_L1HVDRNG_SHIFT 8
4004#define AARCH64_ID_MMFR2_EL1_L1HVDRNG_MASK 0xf00U
4005#define AARCH64_ID_MMFR2_EL1_L1HVDRNG_GET( _reg ) \
4006 ( ( ( _reg ) >> 8 ) & 0xfU )
4008#define AARCH64_ID_MMFR2_EL1_HVDTLB( _val ) ( ( _val ) << 12 )
4009#define AARCH64_ID_MMFR2_EL1_HVDTLB_SHIFT 12
4010#define AARCH64_ID_MMFR2_EL1_HVDTLB_MASK 0xf000U
4011#define AARCH64_ID_MMFR2_EL1_HVDTLB_GET( _reg ) \
4012 ( ( ( _reg ) >> 12 ) & 0xfU )
4014#define AARCH64_ID_MMFR2_EL1_UNITLB( _val ) ( ( _val ) << 16 )
4015#define AARCH64_ID_MMFR2_EL1_UNITLB_SHIFT 16
4016#define AARCH64_ID_MMFR2_EL1_UNITLB_MASK 0xf0000U
4017#define AARCH64_ID_MMFR2_EL1_UNITLB_GET( _reg ) \
4018 ( ( ( _reg ) >> 16 ) & 0xfU )
4020#define AARCH64_ID_MMFR2_EL1_MEMBARR( _val ) ( ( _val ) << 20 )
4021#define AARCH64_ID_MMFR2_EL1_MEMBARR_SHIFT 20
4022#define AARCH64_ID_MMFR2_EL1_MEMBARR_MASK 0xf00000U
4023#define AARCH64_ID_MMFR2_EL1_MEMBARR_GET( _reg ) \
4024 ( ( ( _reg ) >> 20 ) & 0xfU )
4026#define AARCH64_ID_MMFR2_EL1_WFISTALL( _val ) ( ( _val ) << 24 )
4027#define AARCH64_ID_MMFR2_EL1_WFISTALL_SHIFT 24
4028#define AARCH64_ID_MMFR2_EL1_WFISTALL_MASK 0xf000000U
4029#define AARCH64_ID_MMFR2_EL1_WFISTALL_GET( _reg ) \
4030 ( ( ( _reg ) >> 24 ) & 0xfU )
4032#define AARCH64_ID_MMFR2_EL1_HWACCFLG( _val ) ( ( _val ) << 28 )
4033#define AARCH64_ID_MMFR2_EL1_HWACCFLG_SHIFT 28
4034#define AARCH64_ID_MMFR2_EL1_HWACCFLG_MASK 0xf0000000U
4035#define AARCH64_ID_MMFR2_EL1_HWACCFLG_GET( _reg ) \
4036 ( ( ( _reg ) >> 28 ) & 0xfU )
4038static inline uint64_t _AArch64_Read_id_mmfr2_el1(
void )
4043 "mrs %0, ID_MMFR2_EL1" :
"=&r" ( value ) : :
"memory"
4051#define AARCH64_ID_MMFR3_EL1_CMAINTVA( _val ) ( ( _val ) << 0 )
4052#define AARCH64_ID_MMFR3_EL1_CMAINTVA_SHIFT 0
4053#define AARCH64_ID_MMFR3_EL1_CMAINTVA_MASK 0xfU
4054#define AARCH64_ID_MMFR3_EL1_CMAINTVA_GET( _reg ) \
4055 ( ( ( _reg ) >> 0 ) & 0xfU )
4057#define AARCH64_ID_MMFR3_EL1_CMAINTSW( _val ) ( ( _val ) << 4 )
4058#define AARCH64_ID_MMFR3_EL1_CMAINTSW_SHIFT 4
4059#define AARCH64_ID_MMFR3_EL1_CMAINTSW_MASK 0xf0U
4060#define AARCH64_ID_MMFR3_EL1_CMAINTSW_GET( _reg ) \
4061 ( ( ( _reg ) >> 4 ) & 0xfU )
4063#define AARCH64_ID_MMFR3_EL1_BPMAINT( _val ) ( ( _val ) << 8 )
4064#define AARCH64_ID_MMFR3_EL1_BPMAINT_SHIFT 8
4065#define AARCH64_ID_MMFR3_EL1_BPMAINT_MASK 0xf00U
4066#define AARCH64_ID_MMFR3_EL1_BPMAINT_GET( _reg ) \
4067 ( ( ( _reg ) >> 8 ) & 0xfU )
4069#define AARCH64_ID_MMFR3_EL1_MAINTBCST( _val ) ( ( _val ) << 12 )
4070#define AARCH64_ID_MMFR3_EL1_MAINTBCST_SHIFT 12
4071#define AARCH64_ID_MMFR3_EL1_MAINTBCST_MASK 0xf000U
4072#define AARCH64_ID_MMFR3_EL1_MAINTBCST_GET( _reg ) \
4073 ( ( ( _reg ) >> 12 ) & 0xfU )
4075#define AARCH64_ID_MMFR3_EL1_PAN( _val ) ( ( _val ) << 16 )
4076#define AARCH64_ID_MMFR3_EL1_PAN_SHIFT 16
4077#define AARCH64_ID_MMFR3_EL1_PAN_MASK 0xf0000U
4078#define AARCH64_ID_MMFR3_EL1_PAN_GET( _reg ) \
4079 ( ( ( _reg ) >> 16 ) & 0xfU )
4081#define AARCH64_ID_MMFR3_EL1_COHWALK( _val ) ( ( _val ) << 20 )
4082#define AARCH64_ID_MMFR3_EL1_COHWALK_SHIFT 20
4083#define AARCH64_ID_MMFR3_EL1_COHWALK_MASK 0xf00000U
4084#define AARCH64_ID_MMFR3_EL1_COHWALK_GET( _reg ) \
4085 ( ( ( _reg ) >> 20 ) & 0xfU )
4087#define AARCH64_ID_MMFR3_EL1_CMEMSZ( _val ) ( ( _val ) << 24 )
4088#define AARCH64_ID_MMFR3_EL1_CMEMSZ_SHIFT 24
4089#define AARCH64_ID_MMFR3_EL1_CMEMSZ_MASK 0xf000000U
4090#define AARCH64_ID_MMFR3_EL1_CMEMSZ_GET( _reg ) \
4091 ( ( ( _reg ) >> 24 ) & 0xfU )
4093#define AARCH64_ID_MMFR3_EL1_SUPERSEC( _val ) ( ( _val ) << 28 )
4094#define AARCH64_ID_MMFR3_EL1_SUPERSEC_SHIFT 28
4095#define AARCH64_ID_MMFR3_EL1_SUPERSEC_MASK 0xf0000000U
4096#define AARCH64_ID_MMFR3_EL1_SUPERSEC_GET( _reg ) \
4097 ( ( ( _reg ) >> 28 ) & 0xfU )
4099static inline uint64_t _AArch64_Read_id_mmfr3_el1(
void )
4104 "mrs %0, ID_MMFR3_EL1" :
"=&r" ( value ) : :
"memory"
4112#define AARCH64_ID_MMFR4_EL1_SPECSEI( _val ) ( ( _val ) << 0 )
4113#define AARCH64_ID_MMFR4_EL1_SPECSEI_SHIFT 0
4114#define AARCH64_ID_MMFR4_EL1_SPECSEI_MASK 0xfU
4115#define AARCH64_ID_MMFR4_EL1_SPECSEI_GET( _reg ) \
4116 ( ( ( _reg ) >> 0 ) & 0xfU )
4118#define AARCH64_ID_MMFR4_EL1_AC2( _val ) ( ( _val ) << 4 )
4119#define AARCH64_ID_MMFR4_EL1_AC2_SHIFT 4
4120#define AARCH64_ID_MMFR4_EL1_AC2_MASK 0xf0U
4121#define AARCH64_ID_MMFR4_EL1_AC2_GET( _reg ) \
4122 ( ( ( _reg ) >> 4 ) & 0xfU )
4124#define AARCH64_ID_MMFR4_EL1_XNX( _val ) ( ( _val ) << 8 )
4125#define AARCH64_ID_MMFR4_EL1_XNX_SHIFT 8
4126#define AARCH64_ID_MMFR4_EL1_XNX_MASK 0xf00U
4127#define AARCH64_ID_MMFR4_EL1_XNX_GET( _reg ) \
4128 ( ( ( _reg ) >> 8 ) & 0xfU )
4130#define AARCH64_ID_MMFR4_EL1_CNP( _val ) ( ( _val ) << 12 )
4131#define AARCH64_ID_MMFR4_EL1_CNP_SHIFT 12
4132#define AARCH64_ID_MMFR4_EL1_CNP_MASK 0xf000U
4133#define AARCH64_ID_MMFR4_EL1_CNP_GET( _reg ) \
4134 ( ( ( _reg ) >> 12 ) & 0xfU )
4136#define AARCH64_ID_MMFR4_EL1_HPDS( _val ) ( ( _val ) << 16 )
4137#define AARCH64_ID_MMFR4_EL1_HPDS_SHIFT 16
4138#define AARCH64_ID_MMFR4_EL1_HPDS_MASK 0xf0000U
4139#define AARCH64_ID_MMFR4_EL1_HPDS_GET( _reg ) \
4140 ( ( ( _reg ) >> 16 ) & 0xfU )
4142#define AARCH64_ID_MMFR4_EL1_LSM( _val ) ( ( _val ) << 20 )
4143#define AARCH64_ID_MMFR4_EL1_LSM_SHIFT 20
4144#define AARCH64_ID_MMFR4_EL1_LSM_MASK 0xf00000U
4145#define AARCH64_ID_MMFR4_EL1_LSM_GET( _reg ) \
4146 ( ( ( _reg ) >> 20 ) & 0xfU )
4148#define AARCH64_ID_MMFR4_EL1_CCIDX( _val ) ( ( _val ) << 24 )
4149#define AARCH64_ID_MMFR4_EL1_CCIDX_SHIFT 24
4150#define AARCH64_ID_MMFR4_EL1_CCIDX_MASK 0xf000000U
4151#define AARCH64_ID_MMFR4_EL1_CCIDX_GET( _reg ) \
4152 ( ( ( _reg ) >> 24 ) & 0xfU )
4154#define AARCH64_ID_MMFR4_EL1_EVT( _val ) ( ( _val ) << 28 )
4155#define AARCH64_ID_MMFR4_EL1_EVT_SHIFT 28
4156#define AARCH64_ID_MMFR4_EL1_EVT_MASK 0xf0000000U
4157#define AARCH64_ID_MMFR4_EL1_EVT_GET( _reg ) \
4158 ( ( ( _reg ) >> 28 ) & 0xfU )
4160static inline uint64_t _AArch64_Read_id_mmfr4_el1(
void )
4165 "mrs %0, ID_MMFR4_EL1" :
"=&r" ( value ) : :
"memory"
4173#define AARCH64_ID_MMFR5_EL1_ETS( _val ) ( ( _val ) << 0 )
4174#define AARCH64_ID_MMFR5_EL1_ETS_SHIFT 0
4175#define AARCH64_ID_MMFR5_EL1_ETS_MASK 0xfU
4176#define AARCH64_ID_MMFR5_EL1_ETS_GET( _reg ) \
4177 ( ( ( _reg ) >> 0 ) & 0xfU )
4179static inline uint64_t _AArch64_Read_id_mmfr5_el1(
void )
4184 "mrs %0, ID_MMFR5_EL1" :
"=&r" ( value ) : :
"memory"
4192#define AARCH64_ID_PFR0_EL1_STATE0( _val ) ( ( _val ) << 0 )
4193#define AARCH64_ID_PFR0_EL1_STATE0_SHIFT 0
4194#define AARCH64_ID_PFR0_EL1_STATE0_MASK 0xfU
4195#define AARCH64_ID_PFR0_EL1_STATE0_GET( _reg ) \
4196 ( ( ( _reg ) >> 0 ) & 0xfU )
4198#define AARCH64_ID_PFR0_EL1_STATE1( _val ) ( ( _val ) << 4 )
4199#define AARCH64_ID_PFR0_EL1_STATE1_SHIFT 4
4200#define AARCH64_ID_PFR0_EL1_STATE1_MASK 0xf0U
4201#define AARCH64_ID_PFR0_EL1_STATE1_GET( _reg ) \
4202 ( ( ( _reg ) >> 4 ) & 0xfU )
4204#define AARCH64_ID_PFR0_EL1_STATE2( _val ) ( ( _val ) << 8 )
4205#define AARCH64_ID_PFR0_EL1_STATE2_SHIFT 8
4206#define AARCH64_ID_PFR0_EL1_STATE2_MASK 0xf00U
4207#define AARCH64_ID_PFR0_EL1_STATE2_GET( _reg ) \
4208 ( ( ( _reg ) >> 8 ) & 0xfU )
4210#define AARCH64_ID_PFR0_EL1_STATE3( _val ) ( ( _val ) << 12 )
4211#define AARCH64_ID_PFR0_EL1_STATE3_SHIFT 12
4212#define AARCH64_ID_PFR0_EL1_STATE3_MASK 0xf000U
4213#define AARCH64_ID_PFR0_EL1_STATE3_GET( _reg ) \
4214 ( ( ( _reg ) >> 12 ) & 0xfU )
4216#define AARCH64_ID_PFR0_EL1_CSV2( _val ) ( ( _val ) << 16 )
4217#define AARCH64_ID_PFR0_EL1_CSV2_SHIFT 16
4218#define AARCH64_ID_PFR0_EL1_CSV2_MASK 0xf0000U
4219#define AARCH64_ID_PFR0_EL1_CSV2_GET( _reg ) \
4220 ( ( ( _reg ) >> 16 ) & 0xfU )
4222#define AARCH64_ID_PFR0_EL1_AMU( _val ) ( ( _val ) << 20 )
4223#define AARCH64_ID_PFR0_EL1_AMU_SHIFT 20
4224#define AARCH64_ID_PFR0_EL1_AMU_MASK 0xf00000U
4225#define AARCH64_ID_PFR0_EL1_AMU_GET( _reg ) \
4226 ( ( ( _reg ) >> 20 ) & 0xfU )
4228#define AARCH64_ID_PFR0_EL1_DIT( _val ) ( ( _val ) << 24 )
4229#define AARCH64_ID_PFR0_EL1_DIT_SHIFT 24
4230#define AARCH64_ID_PFR0_EL1_DIT_MASK 0xf000000U
4231#define AARCH64_ID_PFR0_EL1_DIT_GET( _reg ) \
4232 ( ( ( _reg ) >> 24 ) & 0xfU )
4234#define AARCH64_ID_PFR0_EL1_RAS( _val ) ( ( _val ) << 28 )
4235#define AARCH64_ID_PFR0_EL1_RAS_SHIFT 28
4236#define AARCH64_ID_PFR0_EL1_RAS_MASK 0xf0000000U
4237#define AARCH64_ID_PFR0_EL1_RAS_GET( _reg ) \
4238 ( ( ( _reg ) >> 28 ) & 0xfU )
4240static inline uint64_t _AArch64_Read_id_pfr0_el1(
void )
4245 "mrs %0, ID_PFR0_EL1" :
"=&r" ( value ) : :
"memory"
4253#define AARCH64_ID_PFR1_EL1_PROGMOD( _val ) ( ( _val ) << 0 )
4254#define AARCH64_ID_PFR1_EL1_PROGMOD_SHIFT 0
4255#define AARCH64_ID_PFR1_EL1_PROGMOD_MASK 0xfU
4256#define AARCH64_ID_PFR1_EL1_PROGMOD_GET( _reg ) \
4257 ( ( ( _reg ) >> 0 ) & 0xfU )
4259#define AARCH64_ID_PFR1_EL1_SECURITY( _val ) ( ( _val ) << 4 )
4260#define AARCH64_ID_PFR1_EL1_SECURITY_SHIFT 4
4261#define AARCH64_ID_PFR1_EL1_SECURITY_MASK 0xf0U
4262#define AARCH64_ID_PFR1_EL1_SECURITY_GET( _reg ) \
4263 ( ( ( _reg ) >> 4 ) & 0xfU )
4265#define AARCH64_ID_PFR1_EL1_MPROGMOD( _val ) ( ( _val ) << 8 )
4266#define AARCH64_ID_PFR1_EL1_MPROGMOD_SHIFT 8
4267#define AARCH64_ID_PFR1_EL1_MPROGMOD_MASK 0xf00U
4268#define AARCH64_ID_PFR1_EL1_MPROGMOD_GET( _reg ) \
4269 ( ( ( _reg ) >> 8 ) & 0xfU )
4271#define AARCH64_ID_PFR1_EL1_VIRTUALIZATION( _val ) ( ( _val ) << 12 )
4272#define AARCH64_ID_PFR1_EL1_VIRTUALIZATION_SHIFT 12
4273#define AARCH64_ID_PFR1_EL1_VIRTUALIZATION_MASK 0xf000U
4274#define AARCH64_ID_PFR1_EL1_VIRTUALIZATION_GET( _reg ) \
4275 ( ( ( _reg ) >> 12 ) & 0xfU )
4277#define AARCH64_ID_PFR1_EL1_GENTIMER( _val ) ( ( _val ) << 16 )
4278#define AARCH64_ID_PFR1_EL1_GENTIMER_SHIFT 16
4279#define AARCH64_ID_PFR1_EL1_GENTIMER_MASK 0xf0000U
4280#define AARCH64_ID_PFR1_EL1_GENTIMER_GET( _reg ) \
4281 ( ( ( _reg ) >> 16 ) & 0xfU )
4283#define AARCH64_ID_PFR1_EL1_SEC_FRAC( _val ) ( ( _val ) << 20 )
4284#define AARCH64_ID_PFR1_EL1_SEC_FRAC_SHIFT 20
4285#define AARCH64_ID_PFR1_EL1_SEC_FRAC_MASK 0xf00000U
4286#define AARCH64_ID_PFR1_EL1_SEC_FRAC_GET( _reg ) \
4287 ( ( ( _reg ) >> 20 ) & 0xfU )
4289#define AARCH64_ID_PFR1_EL1_VIRT_FRAC( _val ) ( ( _val ) << 24 )
4290#define AARCH64_ID_PFR1_EL1_VIRT_FRAC_SHIFT 24
4291#define AARCH64_ID_PFR1_EL1_VIRT_FRAC_MASK 0xf000000U
4292#define AARCH64_ID_PFR1_EL1_VIRT_FRAC_GET( _reg ) \
4293 ( ( ( _reg ) >> 24 ) & 0xfU )
4295#define AARCH64_ID_PFR1_EL1_GIC( _val ) ( ( _val ) << 28 )
4296#define AARCH64_ID_PFR1_EL1_GIC_SHIFT 28
4297#define AARCH64_ID_PFR1_EL1_GIC_MASK 0xf0000000U
4298#define AARCH64_ID_PFR1_EL1_GIC_GET( _reg ) \
4299 ( ( ( _reg ) >> 28 ) & 0xfU )
4301static inline uint64_t _AArch64_Read_id_pfr1_el1(
void )
4306 "mrs %0, ID_PFR1_EL1" :
"=&r" ( value ) : :
"memory"
4314#define AARCH64_ID_PFR2_EL1_CSV3( _val ) ( ( _val ) << 0 )
4315#define AARCH64_ID_PFR2_EL1_CSV3_SHIFT 0
4316#define AARCH64_ID_PFR2_EL1_CSV3_MASK 0xfU
4317#define AARCH64_ID_PFR2_EL1_CSV3_GET( _reg ) \
4318 ( ( ( _reg ) >> 0 ) & 0xfU )
4320#define AARCH64_ID_PFR2_EL1_SSBS( _val ) ( ( _val ) << 4 )
4321#define AARCH64_ID_PFR2_EL1_SSBS_SHIFT 4
4322#define AARCH64_ID_PFR2_EL1_SSBS_MASK 0xf0U
4323#define AARCH64_ID_PFR2_EL1_SSBS_GET( _reg ) \
4324 ( ( ( _reg ) >> 4 ) & 0xfU )
4326#define AARCH64_ID_PFR2_EL1_RAS_FRAC( _val ) ( ( _val ) << 8 )
4327#define AARCH64_ID_PFR2_EL1_RAS_FRAC_SHIFT 8
4328#define AARCH64_ID_PFR2_EL1_RAS_FRAC_MASK 0xf00U
4329#define AARCH64_ID_PFR2_EL1_RAS_FRAC_GET( _reg ) \
4330 ( ( ( _reg ) >> 8 ) & 0xfU )
4332static inline uint64_t _AArch64_Read_id_pfr2_el1(
void )
4337 "mrs %0, ID_PFR2_EL1" :
"=&r" ( value ) : :
"memory"
4345#define AARCH64_IFSR32_EL2_FS_3_0( _val ) ( ( _val ) << 0 )
4346#define AARCH64_IFSR32_EL2_FS_3_0_SHIFT 0
4347#define AARCH64_IFSR32_EL2_FS_3_0_MASK 0xfU
4348#define AARCH64_IFSR32_EL2_FS_3_0_GET( _reg ) \
4349 ( ( ( _reg ) >> 0 ) & 0xfU )
4351#define AARCH64_IFSR32_EL2_STATUS( _val ) ( ( _val ) << 0 )
4352#define AARCH64_IFSR32_EL2_STATUS_SHIFT 0
4353#define AARCH64_IFSR32_EL2_STATUS_MASK 0x3fU
4354#define AARCH64_IFSR32_EL2_STATUS_GET( _reg ) \
4355 ( ( ( _reg ) >> 0 ) & 0x3fU )
4357#define AARCH64_IFSR32_EL2_LPAE 0x200U
4359#define AARCH64_IFSR32_EL2_FS_4 0x400U
4361#define AARCH64_IFSR32_EL2_EXT 0x1000U
4363#define AARCH64_IFSR32_EL2_FNV 0x10000U
4365static inline uint64_t _AArch64_Read_ifsr32_el2(
void )
4370 "mrs %0, IFSR32_EL2" :
"=&r" ( value ) : :
"memory"
4376static inline void _AArch64_Write_ifsr32_el2( uint64_t value )
4379 "msr IFSR32_EL2, %0" : :
"r" ( value ) :
"memory"
4385#define AARCH64_ISR_EL1_F 0x40U
4387#define AARCH64_ISR_EL1_I 0x80U
4389#define AARCH64_ISR_EL1_A 0x100U
4391static inline uint64_t _AArch64_Read_isr_el1(
void )
4396 "mrs %0, ISR_EL1" :
"=&r" ( value ) : :
"memory"
4404#define AARCH64_LORC_EL1_EN 0x1U
4406#define AARCH64_LORC_EL1_DS( _val ) ( ( _val ) << 2 )
4407#define AARCH64_LORC_EL1_DS_SHIFT 2
4408#define AARCH64_LORC_EL1_DS_MASK 0x3fcU
4409#define AARCH64_LORC_EL1_DS_GET( _reg ) \
4410 ( ( ( _reg ) >> 2 ) & 0xffU )
4412static inline uint64_t _AArch64_Read_lorc_el1(
void )
4417 "mrs %0, LORC_EL1" :
"=&r" ( value ) : :
"memory"
4423static inline void _AArch64_Write_lorc_el1( uint64_t value )
4426 "msr LORC_EL1, %0" : :
"r" ( value ) :
"memory"
4432#define AARCH64_LOREA_EL1_EA_47_16( _val ) ( ( _val ) << 16 )
4433#define AARCH64_LOREA_EL1_EA_47_16_SHIFT 16
4434#define AARCH64_LOREA_EL1_EA_47_16_MASK 0xffffffff0000ULL
4435#define AARCH64_LOREA_EL1_EA_47_16_GET( _reg ) \
4436 ( ( ( _reg ) >> 16 ) & 0xffffffffULL )
4438#define AARCH64_LOREA_EL1_EA_51_48( _val ) ( ( _val ) << 48 )
4439#define AARCH64_LOREA_EL1_EA_51_48_SHIFT 48
4440#define AARCH64_LOREA_EL1_EA_51_48_MASK 0xf000000000000ULL
4441#define AARCH64_LOREA_EL1_EA_51_48_GET( _reg ) \
4442 ( ( ( _reg ) >> 48 ) & 0xfULL )
4444static inline uint64_t _AArch64_Read_lorea_el1(
void )
4449 "mrs %0, LOREA_EL1" :
"=&r" ( value ) : :
"memory"
4455static inline void _AArch64_Write_lorea_el1( uint64_t value )
4458 "msr LOREA_EL1, %0" : :
"r" ( value ) :
"memory"
4464#define AARCH64_LORID_EL1_LR( _val ) ( ( _val ) << 0 )
4465#define AARCH64_LORID_EL1_LR_SHIFT 0
4466#define AARCH64_LORID_EL1_LR_MASK 0xffU
4467#define AARCH64_LORID_EL1_LR_GET( _reg ) \
4468 ( ( ( _reg ) >> 0 ) & 0xffU )
4470#define AARCH64_LORID_EL1_LD( _val ) ( ( _val ) << 16 )
4471#define AARCH64_LORID_EL1_LD_SHIFT 16
4472#define AARCH64_LORID_EL1_LD_MASK 0xff0000U
4473#define AARCH64_LORID_EL1_LD_GET( _reg ) \
4474 ( ( ( _reg ) >> 16 ) & 0xffU )
4476static inline uint64_t _AArch64_Read_lorid_el1(
void )
4481 "mrs %0, LORID_EL1" :
"=&r" ( value ) : :
"memory"
4489#define AARCH64_LORN_EL1_NUM( _val ) ( ( _val ) << 0 )
4490#define AARCH64_LORN_EL1_NUM_SHIFT 0
4491#define AARCH64_LORN_EL1_NUM_MASK 0xffU
4492#define AARCH64_LORN_EL1_NUM_GET( _reg ) \
4493 ( ( ( _reg ) >> 0 ) & 0xffU )
4495static inline uint64_t _AArch64_Read_lorn_el1(
void )
4500 "mrs %0, LORN_EL1" :
"=&r" ( value ) : :
"memory"
4506static inline void _AArch64_Write_lorn_el1( uint64_t value )
4509 "msr LORN_EL1, %0" : :
"r" ( value ) :
"memory"
4515#define AARCH64_LORSA_EL1_VALID 0x1U
4517#define AARCH64_LORSA_EL1_SA_47_16( _val ) ( ( _val ) << 16 )
4518#define AARCH64_LORSA_EL1_SA_47_16_SHIFT 16
4519#define AARCH64_LORSA_EL1_SA_47_16_MASK 0xffffffff0000ULL
4520#define AARCH64_LORSA_EL1_SA_47_16_GET( _reg ) \
4521 ( ( ( _reg ) >> 16 ) & 0xffffffffULL )
4523#define AARCH64_LORSA_EL1_SA_51_48( _val ) ( ( _val ) << 48 )
4524#define AARCH64_LORSA_EL1_SA_51_48_SHIFT 48
4525#define AARCH64_LORSA_EL1_SA_51_48_MASK 0xf000000000000ULL
4526#define AARCH64_LORSA_EL1_SA_51_48_GET( _reg ) \
4527 ( ( ( _reg ) >> 48 ) & 0xfULL )
4529static inline uint64_t _AArch64_Read_lorsa_el1(
void )
4534 "mrs %0, LORSA_EL1" :
"=&r" ( value ) : :
"memory"
4540static inline void _AArch64_Write_lorsa_el1( uint64_t value )
4543 "msr LORSA_EL1, %0" : :
"r" ( value ) :
"memory"
4549#define AARCH64_MAIR_EL1_ATTR0( _val ) ( ( _val ) << 0 )
4550#define AARCH64_MAIR_EL1_ATTR1( _val ) ( ( _val ) << 8 )
4551#define AARCH64_MAIR_EL1_ATTR2( _val ) ( ( _val ) << 16 )
4552#define AARCH64_MAIR_EL1_ATTR3( _val ) ( ( _val ) << 24 )
4553#define AARCH64_MAIR_EL1_ATTR4( _val ) ( ( _val ) << 32 )
4554#define AARCH64_MAIR_EL1_ATTR5( _val ) ( ( _val ) << 40 )
4555#define AARCH64_MAIR_EL1_ATTR6( _val ) ( ( _val ) << 48 )
4556#define AARCH64_MAIR_EL1_ATTR7( _val ) ( ( _val ) << 56 )
4558static inline uint64_t _AArch64_Read_mair_el1(
void )
4563 "mrs %0, MAIR_EL1" :
"=&r" ( value ) : :
"memory"
4569static inline void _AArch64_Write_mair_el1( uint64_t value )
4572 "msr MAIR_EL1, %0" : :
"r" ( value ) :
"memory"
4578static inline uint64_t _AArch64_Read_mair_el2(
void )
4583 "mrs %0, MAIR_EL2" :
"=&r" ( value ) : :
"memory"
4589static inline void _AArch64_Write_mair_el2( uint64_t value )
4592 "msr MAIR_EL2, %0" : :
"r" ( value ) :
"memory"
4598static inline uint64_t _AArch64_Read_mair_el3(
void )
4603 "mrs %0, MAIR_EL3" :
"=&r" ( value ) : :
"memory"
4609static inline void _AArch64_Write_mair_el3( uint64_t value )
4612 "msr MAIR_EL3, %0" : :
"r" ( value ) :
"memory"
4618#define AARCH64_MIDR_EL1_REVISION( _val ) ( ( _val ) << 0 )
4619#define AARCH64_MIDR_EL1_REVISION_SHIFT 0
4620#define AARCH64_MIDR_EL1_REVISION_MASK 0xfU
4621#define AARCH64_MIDR_EL1_REVISION_GET( _reg ) \
4622 ( ( ( _reg ) >> 0 ) & 0xfU )
4624#define AARCH64_MIDR_EL1_PARTNUM( _val ) ( ( _val ) << 4 )
4625#define AARCH64_MIDR_EL1_PARTNUM_SHIFT 4
4626#define AARCH64_MIDR_EL1_PARTNUM_MASK 0xfff0U
4627#define AARCH64_MIDR_EL1_PARTNUM_GET( _reg ) \
4628 ( ( ( _reg ) >> 4 ) & 0xfffU )
4630#define AARCH64_MIDR_EL1_ARCHITECTURE( _val ) ( ( _val ) << 16 )
4631#define AARCH64_MIDR_EL1_ARCHITECTURE_SHIFT 16
4632#define AARCH64_MIDR_EL1_ARCHITECTURE_MASK 0xf0000U
4633#define AARCH64_MIDR_EL1_ARCHITECTURE_GET( _reg ) \
4634 ( ( ( _reg ) >> 16 ) & 0xfU )
4636#define AARCH64_MIDR_EL1_VARIANT( _val ) ( ( _val ) << 20 )
4637#define AARCH64_MIDR_EL1_VARIANT_SHIFT 20
4638#define AARCH64_MIDR_EL1_VARIANT_MASK 0xf00000U
4639#define AARCH64_MIDR_EL1_VARIANT_GET( _reg ) \
4640 ( ( ( _reg ) >> 20 ) & 0xfU )
4642#define AARCH64_MIDR_EL1_IMPLEMENTER( _val ) ( ( _val ) << 24 )
4643#define AARCH64_MIDR_EL1_IMPLEMENTER_SHIFT 24
4644#define AARCH64_MIDR_EL1_IMPLEMENTER_MASK 0xff000000U
4645#define AARCH64_MIDR_EL1_IMPLEMENTER_GET( _reg ) \
4646 ( ( ( _reg ) >> 24 ) & 0xffU )
4648static inline uint64_t _AArch64_Read_midr_el1(
void )
4653 "mrs %0, MIDR_EL1" :
"=&r" ( value ) : :
"memory"
4661#define AARCH64_MPIDR_EL1_AFF0( _val ) ( ( _val ) << 0 )
4662#define AARCH64_MPIDR_EL1_AFF0_SHIFT 0
4663#define AARCH64_MPIDR_EL1_AFF0_MASK 0xffU
4664#define AARCH64_MPIDR_EL1_AFF0_GET( _reg ) \
4665 ( ( ( _reg ) >> 0 ) & 0xffU )
4667#define AARCH64_MPIDR_EL1_AFF1( _val ) ( ( _val ) << 8 )
4668#define AARCH64_MPIDR_EL1_AFF1_SHIFT 8
4669#define AARCH64_MPIDR_EL1_AFF1_MASK 0xff00U
4670#define AARCH64_MPIDR_EL1_AFF1_GET( _reg ) \
4671 ( ( ( _reg ) >> 8 ) & 0xffU )
4673#define AARCH64_MPIDR_EL1_AFF2( _val ) ( ( _val ) << 16 )
4674#define AARCH64_MPIDR_EL1_AFF2_SHIFT 16
4675#define AARCH64_MPIDR_EL1_AFF2_MASK 0xff0000U
4676#define AARCH64_MPIDR_EL1_AFF2_GET( _reg ) \
4677 ( ( ( _reg ) >> 16 ) & 0xffU )
4679#define AARCH64_MPIDR_EL1_MT 0x1000000U
4681#define AARCH64_MPIDR_EL1_U 0x40000000U
4683#define AARCH64_MPIDR_EL1_AFF3( _val ) ( ( _val ) << 32 )
4684#define AARCH64_MPIDR_EL1_AFF3_SHIFT 32
4685#define AARCH64_MPIDR_EL1_AFF3_MASK 0xff00000000ULL
4686#define AARCH64_MPIDR_EL1_AFF3_GET( _reg ) \
4687 ( ( ( _reg ) >> 32 ) & 0xffULL )
4689static inline uint64_t _AArch64_Read_mpidr_el1(
void )
4694 "mrs %0, MPIDR_EL1" :
"=&r" ( value ) : :
"memory"
4702#define AARCH64_MVFR0_EL1_SIMDREG( _val ) ( ( _val ) << 0 )
4703#define AARCH64_MVFR0_EL1_SIMDREG_SHIFT 0
4704#define AARCH64_MVFR0_EL1_SIMDREG_MASK 0xfU
4705#define AARCH64_MVFR0_EL1_SIMDREG_GET( _reg ) \
4706 ( ( ( _reg ) >> 0 ) & 0xfU )
4708#define AARCH64_MVFR0_EL1_FPSP( _val ) ( ( _val ) << 4 )
4709#define AARCH64_MVFR0_EL1_FPSP_SHIFT 4
4710#define AARCH64_MVFR0_EL1_FPSP_MASK 0xf0U
4711#define AARCH64_MVFR0_EL1_FPSP_GET( _reg ) \
4712 ( ( ( _reg ) >> 4 ) & 0xfU )
4714#define AARCH64_MVFR0_EL1_FPDP( _val ) ( ( _val ) << 8 )
4715#define AARCH64_MVFR0_EL1_FPDP_SHIFT 8
4716#define AARCH64_MVFR0_EL1_FPDP_MASK 0xf00U
4717#define AARCH64_MVFR0_EL1_FPDP_GET( _reg ) \
4718 ( ( ( _reg ) >> 8 ) & 0xfU )
4720#define AARCH64_MVFR0_EL1_FPTRAP( _val ) ( ( _val ) << 12 )
4721#define AARCH64_MVFR0_EL1_FPTRAP_SHIFT 12
4722#define AARCH64_MVFR0_EL1_FPTRAP_MASK 0xf000U
4723#define AARCH64_MVFR0_EL1_FPTRAP_GET( _reg ) \
4724 ( ( ( _reg ) >> 12 ) & 0xfU )
4726#define AARCH64_MVFR0_EL1_FPDIVIDE( _val ) ( ( _val ) << 16 )
4727#define AARCH64_MVFR0_EL1_FPDIVIDE_SHIFT 16
4728#define AARCH64_MVFR0_EL1_FPDIVIDE_MASK 0xf0000U
4729#define AARCH64_MVFR0_EL1_FPDIVIDE_GET( _reg ) \
4730 ( ( ( _reg ) >> 16 ) & 0xfU )
4732#define AARCH64_MVFR0_EL1_FPSQRT( _val ) ( ( _val ) << 20 )
4733#define AARCH64_MVFR0_EL1_FPSQRT_SHIFT 20
4734#define AARCH64_MVFR0_EL1_FPSQRT_MASK 0xf00000U
4735#define AARCH64_MVFR0_EL1_FPSQRT_GET( _reg ) \
4736 ( ( ( _reg ) >> 20 ) & 0xfU )
4738#define AARCH64_MVFR0_EL1_FPSHVEC( _val ) ( ( _val ) << 24 )
4739#define AARCH64_MVFR0_EL1_FPSHVEC_SHIFT 24
4740#define AARCH64_MVFR0_EL1_FPSHVEC_MASK 0xf000000U
4741#define AARCH64_MVFR0_EL1_FPSHVEC_GET( _reg ) \
4742 ( ( ( _reg ) >> 24 ) & 0xfU )
4744#define AARCH64_MVFR0_EL1_FPROUND( _val ) ( ( _val ) << 28 )
4745#define AARCH64_MVFR0_EL1_FPROUND_SHIFT 28
4746#define AARCH64_MVFR0_EL1_FPROUND_MASK 0xf0000000U
4747#define AARCH64_MVFR0_EL1_FPROUND_GET( _reg ) \
4748 ( ( ( _reg ) >> 28 ) & 0xfU )
4750static inline uint64_t _AArch64_Read_mvfr0_el1(
void )
4755 "mrs %0, MVFR0_EL1" :
"=&r" ( value ) : :
"memory"
4763#define AARCH64_MVFR1_EL1_FPFTZ( _val ) ( ( _val ) << 0 )
4764#define AARCH64_MVFR1_EL1_FPFTZ_SHIFT 0
4765#define AARCH64_MVFR1_EL1_FPFTZ_MASK 0xfU
4766#define AARCH64_MVFR1_EL1_FPFTZ_GET( _reg ) \
4767 ( ( ( _reg ) >> 0 ) & 0xfU )
4769#define AARCH64_MVFR1_EL1_FPDNAN( _val ) ( ( _val ) << 4 )
4770#define AARCH64_MVFR1_EL1_FPDNAN_SHIFT 4
4771#define AARCH64_MVFR1_EL1_FPDNAN_MASK 0xf0U
4772#define AARCH64_MVFR1_EL1_FPDNAN_GET( _reg ) \
4773 ( ( ( _reg ) >> 4 ) & 0xfU )
4775#define AARCH64_MVFR1_EL1_SIMDLS( _val ) ( ( _val ) << 8 )
4776#define AARCH64_MVFR1_EL1_SIMDLS_SHIFT 8
4777#define AARCH64_MVFR1_EL1_SIMDLS_MASK 0xf00U
4778#define AARCH64_MVFR1_EL1_SIMDLS_GET( _reg ) \
4779 ( ( ( _reg ) >> 8 ) & 0xfU )
4781#define AARCH64_MVFR1_EL1_SIMDINT( _val ) ( ( _val ) << 12 )
4782#define AARCH64_MVFR1_EL1_SIMDINT_SHIFT 12
4783#define AARCH64_MVFR1_EL1_SIMDINT_MASK 0xf000U
4784#define AARCH64_MVFR1_EL1_SIMDINT_GET( _reg ) \
4785 ( ( ( _reg ) >> 12 ) & 0xfU )
4787#define AARCH64_MVFR1_EL1_SIMDSP( _val ) ( ( _val ) << 16 )
4788#define AARCH64_MVFR1_EL1_SIMDSP_SHIFT 16
4789#define AARCH64_MVFR1_EL1_SIMDSP_MASK 0xf0000U
4790#define AARCH64_MVFR1_EL1_SIMDSP_GET( _reg ) \
4791 ( ( ( _reg ) >> 16 ) & 0xfU )
4793#define AARCH64_MVFR1_EL1_SIMDHP( _val ) ( ( _val ) << 20 )
4794#define AARCH64_MVFR1_EL1_SIMDHP_SHIFT 20
4795#define AARCH64_MVFR1_EL1_SIMDHP_MASK 0xf00000U
4796#define AARCH64_MVFR1_EL1_SIMDHP_GET( _reg ) \
4797 ( ( ( _reg ) >> 20 ) & 0xfU )
4799#define AARCH64_MVFR1_EL1_FPHP( _val ) ( ( _val ) << 24 )
4800#define AARCH64_MVFR1_EL1_FPHP_SHIFT 24
4801#define AARCH64_MVFR1_EL1_FPHP_MASK 0xf000000U
4802#define AARCH64_MVFR1_EL1_FPHP_GET( _reg ) \
4803 ( ( ( _reg ) >> 24 ) & 0xfU )
4805#define AARCH64_MVFR1_EL1_SIMDFMAC( _val ) ( ( _val ) << 28 )
4806#define AARCH64_MVFR1_EL1_SIMDFMAC_SHIFT 28
4807#define AARCH64_MVFR1_EL1_SIMDFMAC_MASK 0xf0000000U
4808#define AARCH64_MVFR1_EL1_SIMDFMAC_GET( _reg ) \
4809 ( ( ( _reg ) >> 28 ) & 0xfU )
4811static inline uint64_t _AArch64_Read_mvfr1_el1(
void )
4816 "mrs %0, MVFR1_EL1" :
"=&r" ( value ) : :
"memory"
4824#define AARCH64_MVFR2_EL1_SIMDMISC( _val ) ( ( _val ) << 0 )
4825#define AARCH64_MVFR2_EL1_SIMDMISC_SHIFT 0
4826#define AARCH64_MVFR2_EL1_SIMDMISC_MASK 0xfU
4827#define AARCH64_MVFR2_EL1_SIMDMISC_GET( _reg ) \
4828 ( ( ( _reg ) >> 0 ) & 0xfU )
4830#define AARCH64_MVFR2_EL1_FPMISC( _val ) ( ( _val ) << 4 )
4831#define AARCH64_MVFR2_EL1_FPMISC_SHIFT 4
4832#define AARCH64_MVFR2_EL1_FPMISC_MASK 0xf0U
4833#define AARCH64_MVFR2_EL1_FPMISC_GET( _reg ) \
4834 ( ( ( _reg ) >> 4 ) & 0xfU )
4836static inline uint64_t _AArch64_Read_mvfr2_el1(
void )
4841 "mrs %0, MVFR2_EL1" :
"=&r" ( value ) : :
"memory"
4849#define AARCH64_PAR_EL1_F 0x1U
4851#define AARCH64_PAR_EL1_FST( _val ) ( ( _val ) << 1 )
4852#define AARCH64_PAR_EL1_FST_SHIFT 1
4853#define AARCH64_PAR_EL1_FST_MASK 0x7eU
4854#define AARCH64_PAR_EL1_FST_GET( _reg ) \
4855 ( ( ( _reg ) >> 1 ) & 0x3fU )
4857#define AARCH64_PAR_EL1_SH( _val ) ( ( _val ) << 7 )
4858#define AARCH64_PAR_EL1_SH_SHIFT 7
4859#define AARCH64_PAR_EL1_SH_MASK 0x180U
4860#define AARCH64_PAR_EL1_SH_GET( _reg ) \
4861 ( ( ( _reg ) >> 7 ) & 0x3U )
4863#define AARCH64_PAR_EL1_PTW 0x100U
4865#define AARCH64_PAR_EL1_NS 0x200U
4867#define AARCH64_PAR_EL1_S 0x200U
4869#define AARCH64_PAR_EL1_PA_47_12( _val ) ( ( _val ) << 12 )
4870#define AARCH64_PAR_EL1_PA_47_12_SHIFT 12
4871#define AARCH64_PAR_EL1_PA_47_12_MASK 0xfffffffff000ULL
4872#define AARCH64_PAR_EL1_PA_47_12_GET( _reg ) \
4873 ( ( ( _reg ) >> 12 ) & 0xfffffffffULL )
4875#define AARCH64_PAR_EL1_PA_51_48( _val ) ( ( _val ) << 48 )
4876#define AARCH64_PAR_EL1_PA_51_48_SHIFT 48
4877#define AARCH64_PAR_EL1_PA_51_48_MASK 0xf000000000000ULL
4878#define AARCH64_PAR_EL1_PA_51_48_GET( _reg ) \
4879 ( ( ( _reg ) >> 48 ) & 0xfULL )
4881#define AARCH64_PAR_EL1_ATTR( _val ) ( ( _val ) << 56 )
4882#define AARCH64_PAR_EL1_ATTR_SHIFT 56
4883#define AARCH64_PAR_EL1_ATTR_MASK 0xff00000000000000ULL
4884#define AARCH64_PAR_EL1_ATTR_GET( _reg ) \
4885 ( ( ( _reg ) >> 56 ) & 0xffULL )
4887static inline uint64_t _AArch64_Read_par_el1(
void )
4892 "mrs %0, PAR_EL1" :
"=&r" ( value ) : :
"memory"
4898static inline void _AArch64_Write_par_el1( uint64_t value )
4901 "msr PAR_EL1, %0" : :
"r" ( value ) :
"memory"
4907static inline uint64_t _AArch64_Read_revidr_el1(
void )
4912 "mrs %0, REVIDR_EL1" :
"=&r" ( value ) : :
"memory"
4920#define AARCH64_RGSR_EL1_TAG( _val ) ( ( _val ) << 0 )
4921#define AARCH64_RGSR_EL1_TAG_SHIFT 0
4922#define AARCH64_RGSR_EL1_TAG_MASK 0xfU
4923#define AARCH64_RGSR_EL1_TAG_GET( _reg ) \
4924 ( ( ( _reg ) >> 0 ) & 0xfU )
4926#define AARCH64_RGSR_EL1_SEED( _val ) ( ( _val ) << 8 )
4927#define AARCH64_RGSR_EL1_SEED_SHIFT 8
4928#define AARCH64_RGSR_EL1_SEED_MASK 0xffff00U
4929#define AARCH64_RGSR_EL1_SEED_GET( _reg ) \
4930 ( ( ( _reg ) >> 8 ) & 0xffffU )
4932static inline uint64_t _AArch64_Read_rgsr_el1(
void )
4937 "mrs %0, RGSR_EL1" :
"=&r" ( value ) : :
"memory"
4943static inline void _AArch64_Write_rgsr_el1( uint64_t value )
4946 "msr RGSR_EL1, %0" : :
"r" ( value ) :
"memory"
4952#define AARCH64_RMR_EL1_AA64 0x1U
4954#define AARCH64_RMR_EL1_RR 0x2U
4956static inline uint64_t _AArch64_Read_rmr_el1(
void )
4961 "mrs %0, RMR_EL1" :
"=&r" ( value ) : :
"memory"
4967static inline void _AArch64_Write_rmr_el1( uint64_t value )
4970 "msr RMR_EL1, %0" : :
"r" ( value ) :
"memory"
4976#define AARCH64_RMR_EL2_AA64 0x1U
4978#define AARCH64_RMR_EL2_RR 0x2U
4980static inline uint64_t _AArch64_Read_rmr_el2(
void )
4985 "mrs %0, RMR_EL2" :
"=&r" ( value ) : :
"memory"
4991static inline void _AArch64_Write_rmr_el2( uint64_t value )
4994 "msr RMR_EL2, %0" : :
"r" ( value ) :
"memory"
5000#define AARCH64_RMR_EL3_AA64 0x1U
5002#define AARCH64_RMR_EL3_RR 0x2U
5004static inline uint64_t _AArch64_Read_rmr_el3(
void )
5009 "mrs %0, RMR_EL3" :
"=&r" ( value ) : :
"memory"
5015static inline void _AArch64_Write_rmr_el3( uint64_t value )
5018 "msr RMR_EL3, %0" : :
"r" ( value ) :
"memory"
5024static inline uint64_t _AArch64_Read_rndr(
void )
5029 "mrs %0, RNDR" :
"=&r" ( value ) : :
"memory"
5037static inline uint64_t _AArch64_Read_rndrrs(
void )
5042 "mrs %0, RNDRRS" :
"=&r" ( value ) : :
"memory"
5050static inline uint64_t _AArch64_Read_rvbar_el1(
void )
5055 "mrs %0, RVBAR_EL1" :
"=&r" ( value ) : :
"memory"
5063static inline uint64_t _AArch64_Read_rvbar_el2(
void )
5068 "mrs %0, RVBAR_EL2" :
"=&r" ( value ) : :
"memory"
5076static inline uint64_t _AArch64_Read_rvbar_el3(
void )
5081 "mrs %0, RVBAR_EL3" :
"=&r" ( value ) : :
"memory"
5089#define AARCH64_SCR_EL3_NS 0x1U
5091#define AARCH64_SCR_EL3_IRQ 0x2U
5093#define AARCH64_SCR_EL3_FIQ 0x4U
5095#define AARCH64_SCR_EL3_EA 0x8U
5097#define AARCH64_SCR_EL3_SMD 0x80U
5099#define AARCH64_SCR_EL3_HCE 0x100U
5101#define AARCH64_SCR_EL3_SIF 0x200U
5103#define AARCH64_SCR_EL3_RW 0x400U
5105#define AARCH64_SCR_EL3_ST 0x800U
5107#define AARCH64_SCR_EL3_TWI 0x1000U
5109#define AARCH64_SCR_EL3_TWE 0x2000U
5111#define AARCH64_SCR_EL3_TLOR 0x4000U
5113#define AARCH64_SCR_EL3_TERR 0x8000U
5115#define AARCH64_SCR_EL3_APK 0x10000U
5117#define AARCH64_SCR_EL3_API 0x20000U
5119#define AARCH64_SCR_EL3_EEL2 0x40000U
5121#define AARCH64_SCR_EL3_EASE 0x80000U
5123#define AARCH64_SCR_EL3_NMEA 0x100000U
5125#define AARCH64_SCR_EL3_FIEN 0x200000U
5127#define AARCH64_SCR_EL3_ENSCXT 0x2000000U
5129#define AARCH64_SCR_EL3_ATA 0x4000000U
5131#define AARCH64_SCR_EL3_FGTEN 0x8000000U
5133#define AARCH64_SCR_EL3_ECVEN 0x10000000U
5135#define AARCH64_SCR_EL3_TWEDEN 0x20000000U
5137#define AARCH64_SCR_EL3_TWEDEL( _val ) ( ( _val ) << 30 )
5138#define AARCH64_SCR_EL3_TWEDEL_SHIFT 30
5139#define AARCH64_SCR_EL3_TWEDEL_MASK 0x3c0000000ULL
5140#define AARCH64_SCR_EL3_TWEDEL_GET( _reg ) \
5141 ( ( ( _reg ) >> 30 ) & 0xfULL )
5143#define AARCH64_SCR_EL3_AMVOFFEN 0x800000000ULL
5145static inline uint64_t _AArch64_Read_scr_el3(
void )
5150 "mrs %0, SCR_EL3" :
"=&r" ( value ) : :
"memory"
5156static inline void _AArch64_Write_scr_el3( uint64_t value )
5159 "msr SCR_EL3, %0" : :
"r" ( value ) :
"memory"
5165#define AARCH64_SCTLR_EL1_M 0x1U
5167#define AARCH64_SCTLR_EL1_A 0x2U
5169#define AARCH64_SCTLR_EL1_C 0x4U
5171#define AARCH64_SCTLR_EL1_SA 0x8U
5173#define AARCH64_SCTLR_EL1_SA0 0x10U
5175#define AARCH64_SCTLR_EL1_CP15BEN 0x20U
5177#define AARCH64_SCTLR_EL1_NAA 0x40U
5179#define AARCH64_SCTLR_EL1_ITD 0x80U
5181#define AARCH64_SCTLR_EL1_SED 0x100U
5183#define AARCH64_SCTLR_EL1_UMA 0x200U
5185#define AARCH64_SCTLR_EL1_ENRCTX 0x400U
5187#define AARCH64_SCTLR_EL1_EOS 0x800U
5189#define AARCH64_SCTLR_EL1_I 0x1000U
5191#define AARCH64_SCTLR_EL1_ENDB 0x2000U
5193#define AARCH64_SCTLR_EL1_DZE 0x4000U
5195#define AARCH64_SCTLR_EL1_UCT 0x8000U
5197#define AARCH64_SCTLR_EL1_NTWI 0x10000U
5199#define AARCH64_SCTLR_EL1_NTWE 0x40000U
5201#define AARCH64_SCTLR_EL1_WXN 0x80000U
5203#define AARCH64_SCTLR_EL1_TSCXT 0x100000U
5205#define AARCH64_SCTLR_EL1_IESB 0x200000U
5207#define AARCH64_SCTLR_EL1_EIS 0x400000U
5209#define AARCH64_SCTLR_EL1_SPAN 0x800000U
5211#define AARCH64_SCTLR_EL1_E0E 0x1000000U
5213#define AARCH64_SCTLR_EL1_EE 0x2000000U
5215#define AARCH64_SCTLR_EL1_UCI 0x4000000U
5217#define AARCH64_SCTLR_EL1_ENDA 0x8000000U
5219#define AARCH64_SCTLR_EL1_NTLSMD 0x10000000U
5221#define AARCH64_SCTLR_EL1_LSMAOE 0x20000000U
5223#define AARCH64_SCTLR_EL1_ENIB 0x40000000U
5225#define AARCH64_SCTLR_EL1_ENIA 0x80000000U
5227#define AARCH64_SCTLR_EL1_BT0 0x800000000ULL
5229#define AARCH64_SCTLR_EL1_BT1 0x1000000000ULL
5231#define AARCH64_SCTLR_EL1_ITFSB 0x2000000000ULL
5233#define AARCH64_SCTLR_EL1_TCF0( _val ) ( ( _val ) << 38 )
5234#define AARCH64_SCTLR_EL1_TCF0_SHIFT 38
5235#define AARCH64_SCTLR_EL1_TCF0_MASK 0xc000000000ULL
5236#define AARCH64_SCTLR_EL1_TCF0_GET( _reg ) \
5237 ( ( ( _reg ) >> 38 ) & 0x3ULL )
5239#define AARCH64_SCTLR_EL1_TCF( _val ) ( ( _val ) << 40 )
5240#define AARCH64_SCTLR_EL1_TCF_SHIFT 40
5241#define AARCH64_SCTLR_EL1_TCF_MASK 0x30000000000ULL
5242#define AARCH64_SCTLR_EL1_TCF_GET( _reg ) \
5243 ( ( ( _reg ) >> 40 ) & 0x3ULL )
5245#define AARCH64_SCTLR_EL1_ATA0 0x40000000000ULL
5247#define AARCH64_SCTLR_EL1_ATA 0x80000000000ULL
5249#define AARCH64_SCTLR_EL1_DSSBS 0x100000000000ULL
5251#define AARCH64_SCTLR_EL1_TWEDEN 0x200000000000ULL
5253#define AARCH64_SCTLR_EL1_TWEDEL( _val ) ( ( _val ) << 46 )
5254#define AARCH64_SCTLR_EL1_TWEDEL_SHIFT 46
5255#define AARCH64_SCTLR_EL1_TWEDEL_MASK 0x3c00000000000ULL
5256#define AARCH64_SCTLR_EL1_TWEDEL_GET( _reg ) \
5257 ( ( ( _reg ) >> 46 ) & 0xfULL )
5259static inline uint64_t _AArch64_Read_sctlr_el1(
void )
5264 "mrs %0, SCTLR_EL1" :
"=&r" ( value ) : :
"memory"
5270static inline void _AArch64_Write_sctlr_el1( uint64_t value )
5273 "msr SCTLR_EL1, %0" : :
"r" ( value ) :
"memory"
5279#define AARCH64_SCTLR_EL2_M 0x1U
5281#define AARCH64_SCTLR_EL2_A 0x2U
5283#define AARCH64_SCTLR_EL2_C 0x4U
5285#define AARCH64_SCTLR_EL2_SA 0x8U
5287#define AARCH64_SCTLR_EL2_SA0 0x10U
5289#define AARCH64_SCTLR_EL2_CP15BEN 0x20U
5291#define AARCH64_SCTLR_EL2_NAA 0x40U
5293#define AARCH64_SCTLR_EL2_ITD 0x80U
5295#define AARCH64_SCTLR_EL2_SED 0x100U
5297#define AARCH64_SCTLR_EL2_ENRCTX 0x400U
5299#define AARCH64_SCTLR_EL2_EOS 0x800U
5301#define AARCH64_SCTLR_EL2_I 0x1000U
5303#define AARCH64_SCTLR_EL2_ENDB 0x2000U
5305#define AARCH64_SCTLR_EL2_DZE 0x4000U
5307#define AARCH64_SCTLR_EL2_UCT 0x8000U
5309#define AARCH64_SCTLR_EL2_NTWI 0x10000U
5311#define AARCH64_SCTLR_EL2_NTWE 0x40000U
5313#define AARCH64_SCTLR_EL2_WXN 0x80000U
5315#define AARCH64_SCTLR_EL2_TSCXT 0x100000U
5317#define AARCH64_SCTLR_EL2_IESB 0x200000U
5319#define AARCH64_SCTLR_EL2_EIS 0x400000U
5321#define AARCH64_SCTLR_EL2_SPAN 0x800000U
5323#define AARCH64_SCTLR_EL2_E0E 0x1000000U
5325#define AARCH64_SCTLR_EL2_EE 0x2000000U
5327#define AARCH64_SCTLR_EL2_UCI 0x4000000U
5329#define AARCH64_SCTLR_EL2_ENDA 0x8000000U
5331#define AARCH64_SCTLR_EL2_NTLSMD 0x10000000U
5333#define AARCH64_SCTLR_EL2_LSMAOE 0x20000000U
5335#define AARCH64_SCTLR_EL2_ENIB 0x40000000U
5337#define AARCH64_SCTLR_EL2_ENIA 0x80000000U
5339#define AARCH64_SCTLR_EL2_BT0 0x800000000ULL
5341#define AARCH64_SCTLR_EL2_BT 0x1000000000ULL
5343#define AARCH64_SCTLR_EL2_BT1 0x1000000000ULL
5345#define AARCH64_SCTLR_EL2_ITFSB 0x2000000000ULL
5347#define AARCH64_SCTLR_EL2_TCF0( _val ) ( ( _val ) << 38 )
5348#define AARCH64_SCTLR_EL2_TCF0_SHIFT 38
5349#define AARCH64_SCTLR_EL2_TCF0_MASK 0xc000000000ULL
5350#define AARCH64_SCTLR_EL2_TCF0_GET( _reg ) \
5351 ( ( ( _reg ) >> 38 ) & 0x3ULL )
5353#define AARCH64_SCTLR_EL2_TCF( _val ) ( ( _val ) << 40 )
5354#define AARCH64_SCTLR_EL2_TCF_SHIFT 40
5355#define AARCH64_SCTLR_EL2_TCF_MASK 0x30000000000ULL
5356#define AARCH64_SCTLR_EL2_TCF_GET( _reg ) \
5357 ( ( ( _reg ) >> 40 ) & 0x3ULL )
5359#define AARCH64_SCTLR_EL2_ATA0 0x40000000000ULL
5361#define AARCH64_SCTLR_EL2_ATA 0x80000000000ULL
5363#define AARCH64_SCTLR_EL2_DSSBS 0x100000000000ULL
5365#define AARCH64_SCTLR_EL2_TWEDEN 0x200000000000ULL
5367#define AARCH64_SCTLR_EL2_TWEDEL( _val ) ( ( _val ) << 46 )
5368#define AARCH64_SCTLR_EL2_TWEDEL_SHIFT 46
5369#define AARCH64_SCTLR_EL2_TWEDEL_MASK 0x3c00000000000ULL
5370#define AARCH64_SCTLR_EL2_TWEDEL_GET( _reg ) \
5371 ( ( ( _reg ) >> 46 ) & 0xfULL )
5373static inline uint64_t _AArch64_Read_sctlr_el2(
void )
5378 "mrs %0, SCTLR_EL2" :
"=&r" ( value ) : :
"memory"
5384static inline void _AArch64_Write_sctlr_el2( uint64_t value )
5387 "msr SCTLR_EL2, %0" : :
"r" ( value ) :
"memory"
5393#define AARCH64_SCTLR_EL3_M 0x1U
5395#define AARCH64_SCTLR_EL3_A 0x2U
5397#define AARCH64_SCTLR_EL3_C 0x4U
5399#define AARCH64_SCTLR_EL3_SA 0x8U
5401#define AARCH64_SCTLR_EL3_NAA 0x40U
5403#define AARCH64_SCTLR_EL3_EOS 0x800U
5405#define AARCH64_SCTLR_EL3_I 0x1000U
5407#define AARCH64_SCTLR_EL3_ENDB 0x2000U
5409#define AARCH64_SCTLR_EL3_WXN 0x80000U
5411#define AARCH64_SCTLR_EL3_IESB 0x200000U
5413#define AARCH64_SCTLR_EL3_EIS 0x400000U
5415#define AARCH64_SCTLR_EL3_EE 0x2000000U
5417#define AARCH64_SCTLR_EL3_ENDA 0x8000000U
5419#define AARCH64_SCTLR_EL3_ENIB 0x40000000U
5421#define AARCH64_SCTLR_EL3_ENIA 0x80000000U
5423#define AARCH64_SCTLR_EL3_BT 0x1000000000ULL
5425#define AARCH64_SCTLR_EL3_ITFSB 0x2000000000ULL
5427#define AARCH64_SCTLR_EL3_TCF( _val ) ( ( _val ) << 40 )
5428#define AARCH64_SCTLR_EL3_TCF_SHIFT 40
5429#define AARCH64_SCTLR_EL3_TCF_MASK 0x30000000000ULL
5430#define AARCH64_SCTLR_EL3_TCF_GET( _reg ) \
5431 ( ( ( _reg ) >> 40 ) & 0x3ULL )
5433#define AARCH64_SCTLR_EL3_ATA 0x80000000000ULL
5435#define AARCH64_SCTLR_EL3_DSSBS 0x100000000000ULL
5437static inline uint64_t _AArch64_Read_sctlr_el3(
void )
5442 "mrs %0, SCTLR_EL3" :
"=&r" ( value ) : :
"memory"
5448static inline void _AArch64_Write_sctlr_el3( uint64_t value )
5451 "msr SCTLR_EL3, %0" : :
"r" ( value ) :
"memory"
5457static inline uint64_t _AArch64_Read_scxtnum_el0(
void )
5462 "mrs %0, SCXTNUM_EL0" :
"=&r" ( value ) : :
"memory"
5468static inline void _AArch64_Write_scxtnum_el0( uint64_t value )
5471 "msr SCXTNUM_EL0, %0" : :
"r" ( value ) :
"memory"
5477static inline uint64_t _AArch64_Read_scxtnum_el1(
void )
5482 "mrs %0, SCXTNUM_EL1" :
"=&r" ( value ) : :
"memory"
5488static inline void _AArch64_Write_scxtnum_el1( uint64_t value )
5491 "msr SCXTNUM_EL1, %0" : :
"r" ( value ) :
"memory"
5497static inline uint64_t _AArch64_Read_scxtnum_el2(
void )
5502 "mrs %0, SCXTNUM_EL2" :
"=&r" ( value ) : :
"memory"
5508static inline void _AArch64_Write_scxtnum_el2( uint64_t value )
5511 "msr SCXTNUM_EL2, %0" : :
"r" ( value ) :
"memory"
5517static inline uint64_t _AArch64_Read_scxtnum_el3(
void )
5522 "mrs %0, SCXTNUM_EL3" :
"=&r" ( value ) : :
"memory"
5528static inline void _AArch64_Write_scxtnum_el3( uint64_t value )
5531 "msr SCXTNUM_EL3, %0" : :
"r" ( value ) :
"memory"
5537#define AARCH64_TCR_EL1_T0SZ( _val ) ( ( _val ) << 0 )
5538#define AARCH64_TCR_EL1_T0SZ_SHIFT 0
5539#define AARCH64_TCR_EL1_T0SZ_MASK 0x3fU
5540#define AARCH64_TCR_EL1_T0SZ_GET( _reg ) \
5541 ( ( ( _reg ) >> 0 ) & 0x3fU )
5543#define AARCH64_TCR_EL1_EPD0 0x80U
5545#define AARCH64_TCR_EL1_IRGN0( _val ) ( ( _val ) << 8 )
5546#define AARCH64_TCR_EL1_IRGN0_SHIFT 8
5547#define AARCH64_TCR_EL1_IRGN0_MASK 0x300U
5548#define AARCH64_TCR_EL1_IRGN0_GET( _reg ) \
5549 ( ( ( _reg ) >> 8 ) & 0x3U )
5551#define AARCH64_TCR_EL1_ORGN0( _val ) ( ( _val ) << 10 )
5552#define AARCH64_TCR_EL1_ORGN0_SHIFT 10
5553#define AARCH64_TCR_EL1_ORGN0_MASK 0xc00U
5554#define AARCH64_TCR_EL1_ORGN0_GET( _reg ) \
5555 ( ( ( _reg ) >> 10 ) & 0x3U )
5557#define AARCH64_TCR_EL1_SH0( _val ) ( ( _val ) << 12 )
5558#define AARCH64_TCR_EL1_SH0_SHIFT 12
5559#define AARCH64_TCR_EL1_SH0_MASK 0x3000U
5560#define AARCH64_TCR_EL1_SH0_GET( _reg ) \
5561 ( ( ( _reg ) >> 12 ) & 0x3U )
5563#define AARCH64_TCR_EL1_TG0( _val ) ( ( _val ) << 14 )
5564#define AARCH64_TCR_EL1_TG0_SHIFT 14
5565#define AARCH64_TCR_EL1_TG0_MASK 0xc000U
5566#define AARCH64_TCR_EL1_TG0_GET( _reg ) \
5567 ( ( ( _reg ) >> 14 ) & 0x3U )
5569#define AARCH64_TCR_EL1_T1SZ( _val ) ( ( _val ) << 16 )
5570#define AARCH64_TCR_EL1_T1SZ_SHIFT 16
5571#define AARCH64_TCR_EL1_T1SZ_MASK 0x3f0000U
5572#define AARCH64_TCR_EL1_T1SZ_GET( _reg ) \
5573 ( ( ( _reg ) >> 16 ) & 0x3fU )
5575#define AARCH64_TCR_EL1_A1 0x400000U
5577#define AARCH64_TCR_EL1_EPD1 0x800000U
5579#define AARCH64_TCR_EL1_IRGN1( _val ) ( ( _val ) << 24 )
5580#define AARCH64_TCR_EL1_IRGN1_SHIFT 24
5581#define AARCH64_TCR_EL1_IRGN1_MASK 0x3000000U
5582#define AARCH64_TCR_EL1_IRGN1_GET( _reg ) \
5583 ( ( ( _reg ) >> 24 ) & 0x3U )
5585#define AARCH64_TCR_EL1_ORGN1( _val ) ( ( _val ) << 26 )
5586#define AARCH64_TCR_EL1_ORGN1_SHIFT 26
5587#define AARCH64_TCR_EL1_ORGN1_MASK 0xc000000U
5588#define AARCH64_TCR_EL1_ORGN1_GET( _reg ) \
5589 ( ( ( _reg ) >> 26 ) & 0x3U )
5591#define AARCH64_TCR_EL1_SH1( _val ) ( ( _val ) << 28 )
5592#define AARCH64_TCR_EL1_SH1_SHIFT 28
5593#define AARCH64_TCR_EL1_SH1_MASK 0x30000000U
5594#define AARCH64_TCR_EL1_SH1_GET( _reg ) \
5595 ( ( ( _reg ) >> 28 ) & 0x3U )
5597#define AARCH64_TCR_EL1_TG1( _val ) ( ( _val ) << 30 )
5598#define AARCH64_TCR_EL1_TG1_SHIFT 30
5599#define AARCH64_TCR_EL1_TG1_MASK 0xc0000000U
5600#define AARCH64_TCR_EL1_TG1_GET( _reg ) \
5601 ( ( ( _reg ) >> 30 ) & 0x3U )
5603#define AARCH64_TCR_EL1_IPS( _val ) ( ( _val ) << 32 )
5604#define AARCH64_TCR_EL1_IPS_SHIFT 32
5605#define AARCH64_TCR_EL1_IPS_MASK 0x700000000ULL
5606#define AARCH64_TCR_EL1_IPS_GET( _reg ) \
5607 ( ( ( _reg ) >> 32 ) & 0x7ULL )
5609#define AARCH64_TCR_EL1_AS 0x1000000000ULL
5611#define AARCH64_TCR_EL1_TBI0 0x2000000000ULL
5613#define AARCH64_TCR_EL1_TBI1 0x4000000000ULL
5615#define AARCH64_TCR_EL1_HA 0x8000000000ULL
5617#define AARCH64_TCR_EL1_HD 0x10000000000ULL
5619#define AARCH64_TCR_EL1_HPD0 0x20000000000ULL
5621#define AARCH64_TCR_EL1_HPD1 0x40000000000ULL
5623#define AARCH64_TCR_EL1_HWU059 0x80000000000ULL
5625#define AARCH64_TCR_EL1_HWU060 0x100000000000ULL
5627#define AARCH64_TCR_EL1_HWU061 0x200000000000ULL
5629#define AARCH64_TCR_EL1_HWU062 0x400000000000ULL
5631#define AARCH64_TCR_EL1_HWU159 0x800000000000ULL
5633#define AARCH64_TCR_EL1_HWU160 0x1000000000000ULL
5635#define AARCH64_TCR_EL1_HWU161 0x2000000000000ULL
5637#define AARCH64_TCR_EL1_HWU162 0x4000000000000ULL
5639#define AARCH64_TCR_EL1_TBID0 0x8000000000000ULL
5641#define AARCH64_TCR_EL1_TBID1 0x10000000000000ULL
5643#define AARCH64_TCR_EL1_NFD0 0x20000000000000ULL
5645#define AARCH64_TCR_EL1_NFD1 0x40000000000000ULL
5647#define AARCH64_TCR_EL1_E0PD0 0x80000000000000ULL
5649#define AARCH64_TCR_EL1_E0PD1 0x100000000000000ULL
5651#define AARCH64_TCR_EL1_TCMA0 0x200000000000000ULL
5653#define AARCH64_TCR_EL1_TCMA1 0x400000000000000ULL
5655static inline uint64_t _AArch64_Read_tcr_el1(
void )
5660 "mrs %0, TCR_EL1" :
"=&r" ( value ) : :
"memory"
5666static inline void _AArch64_Write_tcr_el1( uint64_t value )
5669 "msr TCR_EL1, %0" : :
"r" ( value ) :
"memory"
5675#define AARCH64_TCR_EL2_T0SZ( _val ) ( ( _val ) << 0 )
5676#define AARCH64_TCR_EL2_T0SZ_SHIFT 0
5677#define AARCH64_TCR_EL2_T0SZ_MASK 0x3fU
5678#define AARCH64_TCR_EL2_T0SZ_GET( _reg ) \
5679 ( ( ( _reg ) >> 0 ) & 0x3fU )
5681#define AARCH64_TCR_EL2_EPD0 0x80U
5683#define AARCH64_TCR_EL2_IRGN0( _val ) ( ( _val ) << 8 )
5684#define AARCH64_TCR_EL2_IRGN0_SHIFT 8
5685#define AARCH64_TCR_EL2_IRGN0_MASK 0x300U
5686#define AARCH64_TCR_EL2_IRGN0_GET( _reg ) \
5687 ( ( ( _reg ) >> 8 ) & 0x3U )
5689#define AARCH64_TCR_EL2_ORGN0( _val ) ( ( _val ) << 10 )
5690#define AARCH64_TCR_EL2_ORGN0_SHIFT 10
5691#define AARCH64_TCR_EL2_ORGN0_MASK 0xc00U
5692#define AARCH64_TCR_EL2_ORGN0_GET( _reg ) \
5693 ( ( ( _reg ) >> 10 ) & 0x3U )
5695#define AARCH64_TCR_EL2_SH0( _val ) ( ( _val ) << 12 )
5696#define AARCH64_TCR_EL2_SH0_SHIFT 12
5697#define AARCH64_TCR_EL2_SH0_MASK 0x3000U
5698#define AARCH64_TCR_EL2_SH0_GET( _reg ) \
5699 ( ( ( _reg ) >> 12 ) & 0x3U )
5701#define AARCH64_TCR_EL2_TG0( _val ) ( ( _val ) << 14 )
5702#define AARCH64_TCR_EL2_TG0_SHIFT 14
5703#define AARCH64_TCR_EL2_TG0_MASK 0xc000U
5704#define AARCH64_TCR_EL2_TG0_GET( _reg ) \
5705 ( ( ( _reg ) >> 14 ) & 0x3U )
5707#define AARCH64_TCR_EL2_PS( _val ) ( ( _val ) << 16 )
5708#define AARCH64_TCR_EL2_PS_SHIFT 16
5709#define AARCH64_TCR_EL2_PS_MASK 0x70000U
5710#define AARCH64_TCR_EL2_PS_GET( _reg ) \
5711 ( ( ( _reg ) >> 16 ) & 0x7U )
5713#define AARCH64_TCR_EL2_T1SZ( _val ) ( ( _val ) << 16 )
5714#define AARCH64_TCR_EL2_T1SZ_SHIFT 16
5715#define AARCH64_TCR_EL2_T1SZ_MASK 0x3f0000U
5716#define AARCH64_TCR_EL2_T1SZ_GET( _reg ) \
5717 ( ( ( _reg ) >> 16 ) & 0x3fU )
5719#define AARCH64_TCR_EL2_TBI 0x100000U
5721#define AARCH64_TCR_EL2_HA_0 0x200000U
5723#define AARCH64_TCR_EL2_A1 0x400000U
5725#define AARCH64_TCR_EL2_HD_0 0x400000U
5727#define AARCH64_TCR_EL2_EPD1 0x800000U
5729#define AARCH64_TCR_EL2_HPD 0x1000000U
5731#define AARCH64_TCR_EL2_IRGN1( _val ) ( ( _val ) << 24 )
5732#define AARCH64_TCR_EL2_IRGN1_SHIFT 24
5733#define AARCH64_TCR_EL2_IRGN1_MASK 0x3000000U
5734#define AARCH64_TCR_EL2_IRGN1_GET( _reg ) \
5735 ( ( ( _reg ) >> 24 ) & 0x3U )
5737#define AARCH64_TCR_EL2_HWU59 0x2000000U
5739#define AARCH64_TCR_EL2_HWU60 0x4000000U
5741#define AARCH64_TCR_EL2_ORGN1( _val ) ( ( _val ) << 26 )
5742#define AARCH64_TCR_EL2_ORGN1_SHIFT 26
5743#define AARCH64_TCR_EL2_ORGN1_MASK 0xc000000U
5744#define AARCH64_TCR_EL2_ORGN1_GET( _reg ) \
5745 ( ( ( _reg ) >> 26 ) & 0x3U )
5747#define AARCH64_TCR_EL2_HWU61 0x8000000U
5749#define AARCH64_TCR_EL2_HWU62 0x10000000U
5751#define AARCH64_TCR_EL2_SH1( _val ) ( ( _val ) << 28 )
5752#define AARCH64_TCR_EL2_SH1_SHIFT 28
5753#define AARCH64_TCR_EL2_SH1_MASK 0x30000000U
5754#define AARCH64_TCR_EL2_SH1_GET( _reg ) \
5755 ( ( ( _reg ) >> 28 ) & 0x3U )
5757#define AARCH64_TCR_EL2_TBID 0x20000000U
5759#define AARCH64_TCR_EL2_TCMA 0x40000000U
5761#define AARCH64_TCR_EL2_TG1( _val ) ( ( _val ) << 30 )
5762#define AARCH64_TCR_EL2_TG1_SHIFT 30
5763#define AARCH64_TCR_EL2_TG1_MASK 0xc0000000U
5764#define AARCH64_TCR_EL2_TG1_GET( _reg ) \
5765 ( ( ( _reg ) >> 30 ) & 0x3U )
5767#define AARCH64_TCR_EL2_IPS( _val ) ( ( _val ) << 32 )
5768#define AARCH64_TCR_EL2_IPS_SHIFT 32
5769#define AARCH64_TCR_EL2_IPS_MASK 0x700000000ULL
5770#define AARCH64_TCR_EL2_IPS_GET( _reg ) \
5771 ( ( ( _reg ) >> 32 ) & 0x7ULL )
5773#define AARCH64_TCR_EL2_AS 0x1000000000ULL
5775#define AARCH64_TCR_EL2_TBI0 0x2000000000ULL
5777#define AARCH64_TCR_EL2_TBI1 0x4000000000ULL
5779#define AARCH64_TCR_EL2_HA_1 0x8000000000ULL
5781#define AARCH64_TCR_EL2_HD_1 0x10000000000ULL
5783#define AARCH64_TCR_EL2_HPD0 0x20000000000ULL
5785#define AARCH64_TCR_EL2_HPD1 0x40000000000ULL
5787#define AARCH64_TCR_EL2_HWU059 0x80000000000ULL
5789#define AARCH64_TCR_EL2_HWU060 0x100000000000ULL
5791#define AARCH64_TCR_EL2_HWU061 0x200000000000ULL
5793#define AARCH64_TCR_EL2_HWU062 0x400000000000ULL
5795#define AARCH64_TCR_EL2_HWU159 0x800000000000ULL
5797#define AARCH64_TCR_EL2_HWU160 0x1000000000000ULL
5799#define AARCH64_TCR_EL2_HWU161 0x2000000000000ULL
5801#define AARCH64_TCR_EL2_HWU162 0x4000000000000ULL
5803#define AARCH64_TCR_EL2_TBID0 0x8000000000000ULL
5805#define AARCH64_TCR_EL2_TBID1 0x10000000000000ULL
5807#define AARCH64_TCR_EL2_NFD0 0x20000000000000ULL
5809#define AARCH64_TCR_EL2_NFD1 0x40000000000000ULL
5811#define AARCH64_TCR_EL2_E0PD0 0x80000000000000ULL
5813#define AARCH64_TCR_EL2_E0PD1 0x100000000000000ULL
5815#define AARCH64_TCR_EL2_TCMA0 0x200000000000000ULL
5817#define AARCH64_TCR_EL2_TCMA1 0x400000000000000ULL
5819static inline uint64_t _AArch64_Read_tcr_el2(
void )
5824 "mrs %0, TCR_EL2" :
"=&r" ( value ) : :
"memory"
5830static inline void _AArch64_Write_tcr_el2( uint64_t value )
5833 "msr TCR_EL2, %0" : :
"r" ( value ) :
"memory"
5839#define AARCH64_TCR_EL3_T0SZ( _val ) ( ( _val ) << 0 )
5840#define AARCH64_TCR_EL3_T0SZ_SHIFT 0
5841#define AARCH64_TCR_EL3_T0SZ_MASK 0x3fU
5842#define AARCH64_TCR_EL3_T0SZ_GET( _reg ) \
5843 ( ( ( _reg ) >> 0 ) & 0x3fU )
5845#define AARCH64_TCR_EL3_IRGN0( _val ) ( ( _val ) << 8 )
5846#define AARCH64_TCR_EL3_IRGN0_SHIFT 8
5847#define AARCH64_TCR_EL3_IRGN0_MASK 0x300U
5848#define AARCH64_TCR_EL3_IRGN0_GET( _reg ) \
5849 ( ( ( _reg ) >> 8 ) & 0x3U )
5851#define AARCH64_TCR_EL3_ORGN0( _val ) ( ( _val ) << 10 )
5852#define AARCH64_TCR_EL3_ORGN0_SHIFT 10
5853#define AARCH64_TCR_EL3_ORGN0_MASK 0xc00U
5854#define AARCH64_TCR_EL3_ORGN0_GET( _reg ) \
5855 ( ( ( _reg ) >> 10 ) & 0x3U )
5857#define AARCH64_TCR_EL3_SH0( _val ) ( ( _val ) << 12 )
5858#define AARCH64_TCR_EL3_SH0_SHIFT 12
5859#define AARCH64_TCR_EL3_SH0_MASK 0x3000U
5860#define AARCH64_TCR_EL3_SH0_GET( _reg ) \
5861 ( ( ( _reg ) >> 12 ) & 0x3U )
5863#define AARCH64_TCR_EL3_TG0( _val ) ( ( _val ) << 14 )
5864#define AARCH64_TCR_EL3_TG0_SHIFT 14
5865#define AARCH64_TCR_EL3_TG0_MASK 0xc000U
5866#define AARCH64_TCR_EL3_TG0_GET( _reg ) \
5867 ( ( ( _reg ) >> 14 ) & 0x3U )
5869#define AARCH64_TCR_EL3_PS( _val ) ( ( _val ) << 16 )
5870#define AARCH64_TCR_EL3_PS_SHIFT 16
5871#define AARCH64_TCR_EL3_PS_MASK 0x70000U
5872#define AARCH64_TCR_EL3_PS_GET( _reg ) \
5873 ( ( ( _reg ) >> 16 ) & 0x7U )
5875#define AARCH64_TCR_EL3_TBI 0x100000U
5877#define AARCH64_TCR_EL3_HA 0x200000U
5879#define AARCH64_TCR_EL3_HD 0x400000U
5881#define AARCH64_TCR_EL3_HPD 0x1000000U
5883#define AARCH64_TCR_EL3_HWU59 0x2000000U
5885#define AARCH64_TCR_EL3_HWU60 0x4000000U
5887#define AARCH64_TCR_EL3_HWU61 0x8000000U
5889#define AARCH64_TCR_EL3_HWU62 0x10000000U
5891#define AARCH64_TCR_EL3_TBID 0x20000000U
5893#define AARCH64_TCR_EL3_TCMA 0x40000000U
5895static inline uint64_t _AArch64_Read_tcr_el3(
void )
5900 "mrs %0, TCR_EL3" :
"=&r" ( value ) : :
"memory"
5906static inline void _AArch64_Write_tcr_el3( uint64_t value )
5909 "msr TCR_EL3, %0" : :
"r" ( value ) :
"memory"
5915#define AARCH64_TFSRE0_EL1_TF0 0x1U
5917#define AARCH64_TFSRE0_EL1_TF1 0x2U
5919static inline uint64_t _AArch64_Read_tfsre0_el1(
void )
5924 "mrs %0, TFSRE0_EL1" :
"=&r" ( value ) : :
"memory"
5930static inline void _AArch64_Write_tfsre0_el1( uint64_t value )
5933 "msr TFSRE0_EL1, %0" : :
"r" ( value ) :
"memory"
5939#define AARCH64_TFSR_EL1_TF0 0x1U
5941#define AARCH64_TFSR_EL1_TF1 0x2U
5943static inline uint64_t _AArch64_Read_tfsr_el1(
void )
5948 "mrs %0, TFSR_EL1" :
"=&r" ( value ) : :
"memory"
5954static inline void _AArch64_Write_tfsr_el1( uint64_t value )
5957 "msr TFSR_EL1, %0" : :
"r" ( value ) :
"memory"
5963#define AARCH64_TFSR_EL2_TF0 0x1U
5965#define AARCH64_TFSR_EL2_TF1 0x2U
5967static inline uint64_t _AArch64_Read_tfsr_el2(
void )
5972 "mrs %0, TFSR_EL2" :
"=&r" ( value ) : :
"memory"
5978static inline void _AArch64_Write_tfsr_el2( uint64_t value )
5981 "msr TFSR_EL2, %0" : :
"r" ( value ) :
"memory"
5987#define AARCH64_TFSR_EL3_TF0 0x1U
5989static inline uint64_t _AArch64_Read_tfsr_el3(
void )
5994 "mrs %0, TFSR_EL3" :
"=&r" ( value ) : :
"memory"
6000static inline void _AArch64_Write_tfsr_el3( uint64_t value )
6003 "msr TFSR_EL3, %0" : :
"r" ( value ) :
"memory"
6009static inline uint64_t _AArch64_Read_tpidr_el0(
void )
6014 "mrs %0, TPIDR_EL0" :
"=&r" ( value ) : :
"memory"
6020static inline void _AArch64_Write_tpidr_el0( uint64_t value )
6023 "msr TPIDR_EL0, %0" : :
"r" ( value ) :
"memory"
6029static inline uint64_t _AArch64_Read_tpidr_el1(
void )
6034 "mrs %0, TPIDR_EL1" :
"=&r" ( value ) : :
"memory"
6040static inline void _AArch64_Write_tpidr_el1( uint64_t value )
6043 "msr TPIDR_EL1, %0" : :
"r" ( value ) :
"memory"
6049static inline uint64_t _AArch64_Read_tpidr_el2(
void )
6054 "mrs %0, TPIDR_EL2" :
"=&r" ( value ) : :
"memory"
6060static inline void _AArch64_Write_tpidr_el2( uint64_t value )
6063 "msr TPIDR_EL2, %0" : :
"r" ( value ) :
"memory"
6069static inline uint64_t _AArch64_Read_tpidr_el3(
void )
6074 "mrs %0, TPIDR_EL3" :
"=&r" ( value ) : :
"memory"
6080static inline void _AArch64_Write_tpidr_el3( uint64_t value )
6083 "msr TPIDR_EL3, %0" : :
"r" ( value ) :
"memory"
6089static inline uint64_t _AArch64_Read_tpidrro_el0(
void )
6094 "mrs %0, TPIDRRO_EL0" :
"=&r" ( value ) : :
"memory"
6100static inline void _AArch64_Write_tpidrro_el0( uint64_t value )
6103 "msr TPIDRRO_EL0, %0" : :
"r" ( value ) :
"memory"
6109#define AARCH64_TTBR0_EL1_CNP 0x1U
6111#define AARCH64_TTBR0_EL1_BADDR( _val ) ( ( _val ) << 1 )
6112#define AARCH64_TTBR0_EL1_BADDR_SHIFT 1
6113#define AARCH64_TTBR0_EL1_BADDR_MASK 0xfffffffffffeULL
6114#define AARCH64_TTBR0_EL1_BADDR_GET( _reg ) \
6115 ( ( ( _reg ) >> 1 ) & 0x7fffffffffffULL )
6117#define AARCH64_TTBR0_EL1_ASID( _val ) ( ( _val ) << 48 )
6118#define AARCH64_TTBR0_EL1_ASID_SHIFT 48
6119#define AARCH64_TTBR0_EL1_ASID_MASK 0xffff000000000000ULL
6120#define AARCH64_TTBR0_EL1_ASID_GET( _reg ) \
6121 ( ( ( _reg ) >> 48 ) & 0xffffULL )
6123static inline uint64_t _AArch64_Read_ttbr0_el1(
void )
6128 "mrs %0, TTBR0_EL1" :
"=&r" ( value ) : :
"memory"
6134static inline void _AArch64_Write_ttbr0_el1( uint64_t value )
6137 "msr TTBR0_EL1, %0" : :
"r" ( value ) :
"memory"
6143#define AARCH64_TTBR0_EL2_CNP 0x1U
6145#define AARCH64_TTBR0_EL2_BADDR( _val ) ( ( _val ) << 1 )
6146#define AARCH64_TTBR0_EL2_BADDR_SHIFT 1
6147#define AARCH64_TTBR0_EL2_BADDR_MASK 0xfffffffffffeULL
6148#define AARCH64_TTBR0_EL2_BADDR_GET( _reg ) \
6149 ( ( ( _reg ) >> 1 ) & 0x7fffffffffffULL )
6151#define AARCH64_TTBR0_EL2_ASID( _val ) ( ( _val ) << 48 )
6152#define AARCH64_TTBR0_EL2_ASID_SHIFT 48
6153#define AARCH64_TTBR0_EL2_ASID_MASK 0xffff000000000000ULL
6154#define AARCH64_TTBR0_EL2_ASID_GET( _reg ) \
6155 ( ( ( _reg ) >> 48 ) & 0xffffULL )
6157static inline uint64_t _AArch64_Read_ttbr0_el2(
void )
6162 "mrs %0, TTBR0_EL2" :
"=&r" ( value ) : :
"memory"
6168static inline void _AArch64_Write_ttbr0_el2( uint64_t value )
6171 "msr TTBR0_EL2, %0" : :
"r" ( value ) :
"memory"
6177#define AARCH64_TTBR0_EL3_CNP 0x1U
6179#define AARCH64_TTBR0_EL3_BADDR( _val ) ( ( _val ) << 1 )
6180#define AARCH64_TTBR0_EL3_BADDR_SHIFT 1
6181#define AARCH64_TTBR0_EL3_BADDR_MASK 0xfffffffffffeULL
6182#define AARCH64_TTBR0_EL3_BADDR_GET( _reg ) \
6183 ( ( ( _reg ) >> 1 ) & 0x7fffffffffffULL )
6185static inline uint64_t _AArch64_Read_ttbr0_el3(
void )
6190 "mrs %0, TTBR0_EL3" :
"=&r" ( value ) : :
"memory"
6196static inline void _AArch64_Write_ttbr0_el3( uint64_t value )
6199 "msr TTBR0_EL3, %0" : :
"r" ( value ) :
"memory"
6205#define AARCH64_TTBR1_EL1_CNP 0x1U
6207#define AARCH64_TTBR1_EL1_BADDR( _val ) ( ( _val ) << 1 )
6208#define AARCH64_TTBR1_EL1_BADDR_SHIFT 1
6209#define AARCH64_TTBR1_EL1_BADDR_MASK 0xfffffffffffeULL
6210#define AARCH64_TTBR1_EL1_BADDR_GET( _reg ) \
6211 ( ( ( _reg ) >> 1 ) & 0x7fffffffffffULL )
6213#define AARCH64_TTBR1_EL1_ASID( _val ) ( ( _val ) << 48 )
6214#define AARCH64_TTBR1_EL1_ASID_SHIFT 48
6215#define AARCH64_TTBR1_EL1_ASID_MASK 0xffff000000000000ULL
6216#define AARCH64_TTBR1_EL1_ASID_GET( _reg ) \
6217 ( ( ( _reg ) >> 48 ) & 0xffffULL )
6219static inline uint64_t _AArch64_Read_ttbr1_el1(
void )
6224 "mrs %0, TTBR1_EL1" :
"=&r" ( value ) : :
"memory"
6230static inline void _AArch64_Write_ttbr1_el1( uint64_t value )
6233 "msr TTBR1_EL1, %0" : :
"r" ( value ) :
"memory"
6239#define AARCH64_TTBR1_EL2_CNP 0x1U
6241#define AARCH64_TTBR1_EL2_BADDR( _val ) ( ( _val ) << 1 )
6242#define AARCH64_TTBR1_EL2_BADDR_SHIFT 1
6243#define AARCH64_TTBR1_EL2_BADDR_MASK 0xfffffffffffeULL
6244#define AARCH64_TTBR1_EL2_BADDR_GET( _reg ) \
6245 ( ( ( _reg ) >> 1 ) & 0x7fffffffffffULL )
6247#define AARCH64_TTBR1_EL2_ASID( _val ) ( ( _val ) << 48 )
6248#define AARCH64_TTBR1_EL2_ASID_SHIFT 48
6249#define AARCH64_TTBR1_EL2_ASID_MASK 0xffff000000000000ULL
6250#define AARCH64_TTBR1_EL2_ASID_GET( _reg ) \
6251 ( ( ( _reg ) >> 48 ) & 0xffffULL )
6253static inline uint64_t _AArch64_Read_ttbr1_el2(
void )
6258 "mrs %0, TTBR1_EL2" :
"=&r" ( value ) : :
"memory"
6264static inline void _AArch64_Write_ttbr1_el2( uint64_t value )
6267 "msr TTBR1_EL2, %0" : :
"r" ( value ) :
"memory"
6273static inline uint64_t _AArch64_Read_vbar_el1(
void )
6278 "mrs %0, VBAR_EL1" :
"=&r" ( value ) : :
"memory"
6284static inline void _AArch64_Write_vbar_el1( uint64_t value )
6287 "msr VBAR_EL1, %0" : :
"r" ( value ) :
"memory"
6293static inline uint64_t _AArch64_Read_vbar_el2(
void )
6298 "mrs %0, VBAR_EL2" :
"=&r" ( value ) : :
"memory"
6304static inline void _AArch64_Write_vbar_el2( uint64_t value )
6307 "msr VBAR_EL2, %0" : :
"r" ( value ) :
"memory"
6313static inline uint64_t _AArch64_Read_vbar_el3(
void )
6318 "mrs %0, VBAR_EL3" :
"=&r" ( value ) : :
"memory"
6324static inline void _AArch64_Write_vbar_el3( uint64_t value )
6327 "msr VBAR_EL3, %0" : :
"r" ( value ) :
"memory"
6333#define AARCH64_VMPIDR_EL2_AFF0( _val ) ( ( _val ) << 0 )
6334#define AARCH64_VMPIDR_EL2_AFF0_SHIFT 0
6335#define AARCH64_VMPIDR_EL2_AFF0_MASK 0xffU
6336#define AARCH64_VMPIDR_EL2_AFF0_GET( _reg ) \
6337 ( ( ( _reg ) >> 0 ) & 0xffU )
6339#define AARCH64_VMPIDR_EL2_AFF1( _val ) ( ( _val ) << 8 )
6340#define AARCH64_VMPIDR_EL2_AFF1_SHIFT 8
6341#define AARCH64_VMPIDR_EL2_AFF1_MASK 0xff00U
6342#define AARCH64_VMPIDR_EL2_AFF1_GET( _reg ) \
6343 ( ( ( _reg ) >> 8 ) & 0xffU )
6345#define AARCH64_VMPIDR_EL2_AFF2( _val ) ( ( _val ) << 16 )
6346#define AARCH64_VMPIDR_EL2_AFF2_SHIFT 16
6347#define AARCH64_VMPIDR_EL2_AFF2_MASK 0xff0000U
6348#define AARCH64_VMPIDR_EL2_AFF2_GET( _reg ) \
6349 ( ( ( _reg ) >> 16 ) & 0xffU )
6351#define AARCH64_VMPIDR_EL2_MT 0x1000000U
6353#define AARCH64_VMPIDR_EL2_U 0x40000000U
6355#define AARCH64_VMPIDR_EL2_AFF3( _val ) ( ( _val ) << 32 )
6356#define AARCH64_VMPIDR_EL2_AFF3_SHIFT 32
6357#define AARCH64_VMPIDR_EL2_AFF3_MASK 0xff00000000ULL
6358#define AARCH64_VMPIDR_EL2_AFF3_GET( _reg ) \
6359 ( ( ( _reg ) >> 32 ) & 0xffULL )
6361static inline uint64_t _AArch64_Read_vmpidr_el2(
void )
6366 "mrs %0, VMPIDR_EL2" :
"=&r" ( value ) : :
"memory"
6372static inline void _AArch64_Write_vmpidr_el2( uint64_t value )
6375 "msr VMPIDR_EL2, %0" : :
"r" ( value ) :
"memory"
6381#define AARCH64_VNCR_EL2_BADDR( _val ) ( ( _val ) << 12 )
6382#define AARCH64_VNCR_EL2_BADDR_SHIFT 12
6383#define AARCH64_VNCR_EL2_BADDR_MASK 0x1ffffffffff000ULL
6384#define AARCH64_VNCR_EL2_BADDR_GET( _reg ) \
6385 ( ( ( _reg ) >> 12 ) & 0x1ffffffffffULL )
6387#define AARCH64_VNCR_EL2_RESS( _val ) ( ( _val ) << 53 )
6388#define AARCH64_VNCR_EL2_RESS_SHIFT 53
6389#define AARCH64_VNCR_EL2_RESS_MASK 0xffe0000000000000ULL
6390#define AARCH64_VNCR_EL2_RESS_GET( _reg ) \
6391 ( ( ( _reg ) >> 53 ) & 0x7ffULL )
6393static inline uint64_t _AArch64_Read_vncr_el2(
void )
6398 "mrs %0, VNCR_EL2" :
"=&r" ( value ) : :
"memory"
6404static inline void _AArch64_Write_vncr_el2( uint64_t value )
6407 "msr VNCR_EL2, %0" : :
"r" ( value ) :
"memory"
6413#define AARCH64_VPIDR_EL2_REVISION( _val ) ( ( _val ) << 0 )
6414#define AARCH64_VPIDR_EL2_REVISION_SHIFT 0
6415#define AARCH64_VPIDR_EL2_REVISION_MASK 0xfU
6416#define AARCH64_VPIDR_EL2_REVISION_GET( _reg ) \
6417 ( ( ( _reg ) >> 0 ) & 0xfU )
6419#define AARCH64_VPIDR_EL2_PARTNUM( _val ) ( ( _val ) << 4 )
6420#define AARCH64_VPIDR_EL2_PARTNUM_SHIFT 4
6421#define AARCH64_VPIDR_EL2_PARTNUM_MASK 0xfff0U
6422#define AARCH64_VPIDR_EL2_PARTNUM_GET( _reg ) \
6423 ( ( ( _reg ) >> 4 ) & 0xfffU )
6425#define AARCH64_VPIDR_EL2_ARCHITECTURE( _val ) ( ( _val ) << 16 )
6426#define AARCH64_VPIDR_EL2_ARCHITECTURE_SHIFT 16
6427#define AARCH64_VPIDR_EL2_ARCHITECTURE_MASK 0xf0000U
6428#define AARCH64_VPIDR_EL2_ARCHITECTURE_GET( _reg ) \
6429 ( ( ( _reg ) >> 16 ) & 0xfU )
6431#define AARCH64_VPIDR_EL2_VARIANT( _val ) ( ( _val ) << 20 )
6432#define AARCH64_VPIDR_EL2_VARIANT_SHIFT 20
6433#define AARCH64_VPIDR_EL2_VARIANT_MASK 0xf00000U
6434#define AARCH64_VPIDR_EL2_VARIANT_GET( _reg ) \
6435 ( ( ( _reg ) >> 20 ) & 0xfU )
6437#define AARCH64_VPIDR_EL2_IMPLEMENTER( _val ) ( ( _val ) << 24 )
6438#define AARCH64_VPIDR_EL2_IMPLEMENTER_SHIFT 24
6439#define AARCH64_VPIDR_EL2_IMPLEMENTER_MASK 0xff000000U
6440#define AARCH64_VPIDR_EL2_IMPLEMENTER_GET( _reg ) \
6441 ( ( ( _reg ) >> 24 ) & 0xffU )
6443static inline uint64_t _AArch64_Read_vpidr_el2(
void )
6448 "mrs %0, VPIDR_EL2" :
"=&r" ( value ) : :
"memory"
6454static inline void _AArch64_Write_vpidr_el2( uint64_t value )
6457 "msr VPIDR_EL2, %0" : :
"r" ( value ) :
"memory"
6463#define AARCH64_VSTCR_EL2_T0SZ( _val ) ( ( _val ) << 0 )
6464#define AARCH64_VSTCR_EL2_T0SZ_SHIFT 0
6465#define AARCH64_VSTCR_EL2_T0SZ_MASK 0x3fU
6466#define AARCH64_VSTCR_EL2_T0SZ_GET( _reg ) \
6467 ( ( ( _reg ) >> 0 ) & 0x3fU )
6469#define AARCH64_VSTCR_EL2_SL0( _val ) ( ( _val ) << 6 )
6470#define AARCH64_VSTCR_EL2_SL0_SHIFT 6
6471#define AARCH64_VSTCR_EL2_SL0_MASK 0xc0U
6472#define AARCH64_VSTCR_EL2_SL0_GET( _reg ) \
6473 ( ( ( _reg ) >> 6 ) & 0x3U )
6475#define AARCH64_VSTCR_EL2_TG0( _val ) ( ( _val ) << 14 )
6476#define AARCH64_VSTCR_EL2_TG0_SHIFT 14
6477#define AARCH64_VSTCR_EL2_TG0_MASK 0xc000U
6478#define AARCH64_VSTCR_EL2_TG0_GET( _reg ) \
6479 ( ( ( _reg ) >> 14 ) & 0x3U )
6481#define AARCH64_VSTCR_EL2_SW 0x20000000U
6483#define AARCH64_VSTCR_EL2_SA 0x40000000U
6485static inline uint64_t _AArch64_Read_vstcr_el2(
void )
6490 "mrs %0, VSTCR_EL2" :
"=&r" ( value ) : :
"memory"
6496static inline void _AArch64_Write_vstcr_el2( uint64_t value )
6499 "msr VSTCR_EL2, %0" : :
"r" ( value ) :
"memory"
6505#define AARCH64_VSTTBR_EL2_CNP 0x1U
6507#define AARCH64_VSTTBR_EL2_BADDR( _val ) ( ( _val ) << 1 )
6508#define AARCH64_VSTTBR_EL2_BADDR_SHIFT 1
6509#define AARCH64_VSTTBR_EL2_BADDR_MASK 0xfffffffffffeULL
6510#define AARCH64_VSTTBR_EL2_BADDR_GET( _reg ) \
6511 ( ( ( _reg ) >> 1 ) & 0x7fffffffffffULL )
6513static inline uint64_t _AArch64_Read_vsttbr_el2(
void )
6518 "mrs %0, VSTTBR_EL2" :
"=&r" ( value ) : :
"memory"
6524static inline void _AArch64_Write_vsttbr_el2( uint64_t value )
6527 "msr VSTTBR_EL2, %0" : :
"r" ( value ) :
"memory"
6533#define AARCH64_VTCR_EL2_T0SZ( _val ) ( ( _val ) << 0 )
6534#define AARCH64_VTCR_EL2_T0SZ_SHIFT 0
6535#define AARCH64_VTCR_EL2_T0SZ_MASK 0x3fU
6536#define AARCH64_VTCR_EL2_T0SZ_GET( _reg ) \
6537 ( ( ( _reg ) >> 0 ) & 0x3fU )
6539#define AARCH64_VTCR_EL2_SL0( _val ) ( ( _val ) << 6 )
6540#define AARCH64_VTCR_EL2_SL0_SHIFT 6
6541#define AARCH64_VTCR_EL2_SL0_MASK 0xc0U
6542#define AARCH64_VTCR_EL2_SL0_GET( _reg ) \
6543 ( ( ( _reg ) >> 6 ) & 0x3U )
6545#define AARCH64_VTCR_EL2_IRGN0( _val ) ( ( _val ) << 8 )
6546#define AARCH64_VTCR_EL2_IRGN0_SHIFT 8
6547#define AARCH64_VTCR_EL2_IRGN0_MASK 0x300U
6548#define AARCH64_VTCR_EL2_IRGN0_GET( _reg ) \
6549 ( ( ( _reg ) >> 8 ) & 0x3U )
6551#define AARCH64_VTCR_EL2_ORGN0( _val ) ( ( _val ) << 10 )
6552#define AARCH64_VTCR_EL2_ORGN0_SHIFT 10
6553#define AARCH64_VTCR_EL2_ORGN0_MASK 0xc00U
6554#define AARCH64_VTCR_EL2_ORGN0_GET( _reg ) \
6555 ( ( ( _reg ) >> 10 ) & 0x3U )
6557#define AARCH64_VTCR_EL2_SH0( _val ) ( ( _val ) << 12 )
6558#define AARCH64_VTCR_EL2_SH0_SHIFT 12
6559#define AARCH64_VTCR_EL2_SH0_MASK 0x3000U
6560#define AARCH64_VTCR_EL2_SH0_GET( _reg ) \
6561 ( ( ( _reg ) >> 12 ) & 0x3U )
6563#define AARCH64_VTCR_EL2_TG0( _val ) ( ( _val ) << 14 )
6564#define AARCH64_VTCR_EL2_TG0_SHIFT 14
6565#define AARCH64_VTCR_EL2_TG0_MASK 0xc000U
6566#define AARCH64_VTCR_EL2_TG0_GET( _reg ) \
6567 ( ( ( _reg ) >> 14 ) & 0x3U )
6569#define AARCH64_VTCR_EL2_PS( _val ) ( ( _val ) << 16 )
6570#define AARCH64_VTCR_EL2_PS_SHIFT 16
6571#define AARCH64_VTCR_EL2_PS_MASK 0x70000U
6572#define AARCH64_VTCR_EL2_PS_GET( _reg ) \
6573 ( ( ( _reg ) >> 16 ) & 0x7U )
6575#define AARCH64_VTCR_EL2_VS 0x80000U
6577#define AARCH64_VTCR_EL2_HA 0x200000U
6579#define AARCH64_VTCR_EL2_HD 0x400000U
6581#define AARCH64_VTCR_EL2_HWU59 0x2000000U
6583#define AARCH64_VTCR_EL2_HWU60 0x4000000U
6585#define AARCH64_VTCR_EL2_HWU61 0x8000000U
6587#define AARCH64_VTCR_EL2_HWU62 0x10000000U
6589#define AARCH64_VTCR_EL2_NSW 0x20000000U
6591#define AARCH64_VTCR_EL2_NSA 0x40000000U
6593static inline uint64_t _AArch64_Read_vtcr_el2(
void )
6598 "mrs %0, VTCR_EL2" :
"=&r" ( value ) : :
"memory"
6604static inline void _AArch64_Write_vtcr_el2( uint64_t value )
6607 "msr VTCR_EL2, %0" : :
"r" ( value ) :
"memory"
6613#define AARCH64_VTTBR_EL2_CNP 0x1U
6615#define AARCH64_VTTBR_EL2_BADDR( _val ) ( ( _val ) << 1 )
6616#define AARCH64_VTTBR_EL2_BADDR_SHIFT 1
6617#define AARCH64_VTTBR_EL2_BADDR_MASK 0xfffffffffffeULL
6618#define AARCH64_VTTBR_EL2_BADDR_GET( _reg ) \
6619 ( ( ( _reg ) >> 1 ) & 0x7fffffffffffULL )
6621#define AARCH64_VTTBR_EL2_VMID_7_0( _val ) ( ( _val ) << 48 )
6622#define AARCH64_VTTBR_EL2_VMID_7_0_SHIFT 48
6623#define AARCH64_VTTBR_EL2_VMID_7_0_MASK 0xff000000000000ULL
6624#define AARCH64_VTTBR_EL2_VMID_7_0_GET( _reg ) \
6625 ( ( ( _reg ) >> 48 ) & 0xffULL )
6627#define AARCH64_VTTBR_EL2_VMID_15_8( _val ) ( ( _val ) << 56 )
6628#define AARCH64_VTTBR_EL2_VMID_15_8_SHIFT 56
6629#define AARCH64_VTTBR_EL2_VMID_15_8_MASK 0xff00000000000000ULL
6630#define AARCH64_VTTBR_EL2_VMID_15_8_GET( _reg ) \
6631 ( ( ( _reg ) >> 56 ) & 0xffULL )
6633static inline uint64_t _AArch64_Read_vttbr_el2(
void )
6638 "mrs %0, VTTBR_EL2" :
"=&r" ( value ) : :
"memory"
6644static inline void _AArch64_Write_vttbr_el2( uint64_t value )
6647 "msr VTTBR_EL2, %0" : :
"r" ( value ) :
"memory"
6653#define AARCH64_DBGAUTHSTATUS_EL1_NSID( _val ) ( ( _val ) << 0 )
6654#define AARCH64_DBGAUTHSTATUS_EL1_NSID_SHIFT 0
6655#define AARCH64_DBGAUTHSTATUS_EL1_NSID_MASK 0x3U
6656#define AARCH64_DBGAUTHSTATUS_EL1_NSID_GET( _reg ) \
6657 ( ( ( _reg ) >> 0 ) & 0x3U )
6659#define AARCH64_DBGAUTHSTATUS_EL1_NSNID( _val ) ( ( _val ) << 2 )
6660#define AARCH64_DBGAUTHSTATUS_EL1_NSNID_SHIFT 2
6661#define AARCH64_DBGAUTHSTATUS_EL1_NSNID_MASK 0xcU
6662#define AARCH64_DBGAUTHSTATUS_EL1_NSNID_GET( _reg ) \
6663 ( ( ( _reg ) >> 2 ) & 0x3U )
6665#define AARCH64_DBGAUTHSTATUS_EL1_SID( _val ) ( ( _val ) << 4 )
6666#define AARCH64_DBGAUTHSTATUS_EL1_SID_SHIFT 4
6667#define AARCH64_DBGAUTHSTATUS_EL1_SID_MASK 0x30U
6668#define AARCH64_DBGAUTHSTATUS_EL1_SID_GET( _reg ) \
6669 ( ( ( _reg ) >> 4 ) & 0x3U )
6671#define AARCH64_DBGAUTHSTATUS_EL1_SNID( _val ) ( ( _val ) << 6 )
6672#define AARCH64_DBGAUTHSTATUS_EL1_SNID_SHIFT 6
6673#define AARCH64_DBGAUTHSTATUS_EL1_SNID_MASK 0xc0U
6674#define AARCH64_DBGAUTHSTATUS_EL1_SNID_GET( _reg ) \
6675 ( ( ( _reg ) >> 6 ) & 0x3U )
6677static inline uint64_t _AArch64_Read_dbgauthstatus_el1(
void )
6682 "mrs %0, DBGAUTHSTATUS_EL1" :
"=&r" ( value ) : :
"memory"
6690#define AARCH64_DBGBCR_N_EL1_E 0x1U
6692#define AARCH64_DBGBCR_N_EL1_PMC( _val ) ( ( _val ) << 1 )
6693#define AARCH64_DBGBCR_N_EL1_PMC_SHIFT 1
6694#define AARCH64_DBGBCR_N_EL1_PMC_MASK 0x6U
6695#define AARCH64_DBGBCR_N_EL1_PMC_GET( _reg ) \
6696 ( ( ( _reg ) >> 1 ) & 0x3U )
6698#define AARCH64_DBGBCR_N_EL1_BAS( _val ) ( ( _val ) << 5 )
6699#define AARCH64_DBGBCR_N_EL1_BAS_SHIFT 5
6700#define AARCH64_DBGBCR_N_EL1_BAS_MASK 0x1e0U
6701#define AARCH64_DBGBCR_N_EL1_BAS_GET( _reg ) \
6702 ( ( ( _reg ) >> 5 ) & 0xfU )
6704#define AARCH64_DBGBCR_N_EL1_HMC 0x2000U
6706#define AARCH64_DBGBCR_N_EL1_SSC( _val ) ( ( _val ) << 14 )
6707#define AARCH64_DBGBCR_N_EL1_SSC_SHIFT 14
6708#define AARCH64_DBGBCR_N_EL1_SSC_MASK 0xc000U
6709#define AARCH64_DBGBCR_N_EL1_SSC_GET( _reg ) \
6710 ( ( ( _reg ) >> 14 ) & 0x3U )
6712#define AARCH64_DBGBCR_N_EL1_LBN( _val ) ( ( _val ) << 16 )
6713#define AARCH64_DBGBCR_N_EL1_LBN_SHIFT 16
6714#define AARCH64_DBGBCR_N_EL1_LBN_MASK 0xf0000U
6715#define AARCH64_DBGBCR_N_EL1_LBN_GET( _reg ) \
6716 ( ( ( _reg ) >> 16 ) & 0xfU )
6718#define AARCH64_DBGBCR_N_EL1_BT( _val ) ( ( _val ) << 20 )
6719#define AARCH64_DBGBCR_N_EL1_BT_SHIFT 20
6720#define AARCH64_DBGBCR_N_EL1_BT_MASK 0xf00000U
6721#define AARCH64_DBGBCR_N_EL1_BT_GET( _reg ) \
6722 ( ( ( _reg ) >> 20 ) & 0xfU )
6724static inline uint64_t _AArch64_Read_dbgbcr0_el1(
void )
6729 "mrs %0, DBGBCR0_EL1" :
"=&r" ( value ) : :
"memory"
6735static inline void _AArch64_Write_dbgbcr0_el1( uint64_t value )
6738 "msr DBGBCR0_EL1, %0" : :
"r" ( value ) :
"memory"
6742static inline uint64_t _AArch64_Read_dbgbcr1_el1(
void )
6747 "mrs %0, DBGBCR1_EL1" :
"=&r" ( value ) : :
"memory"
6753static inline void _AArch64_Write_dbgbcr1_el1( uint64_t value )
6756 "msr DBGBCR1_EL1, %0" : :
"r" ( value ) :
"memory"
6760static inline uint64_t _AArch64_Read_dbgbcr2_el1(
void )
6765 "mrs %0, DBGBCR2_EL1" :
"=&r" ( value ) : :
"memory"
6771static inline void _AArch64_Write_dbgbcr2_el1( uint64_t value )
6774 "msr DBGBCR2_EL1, %0" : :
"r" ( value ) :
"memory"
6778static inline uint64_t _AArch64_Read_dbgbcr3_el1(
void )
6783 "mrs %0, DBGBCR3_EL1" :
"=&r" ( value ) : :
"memory"
6789static inline void _AArch64_Write_dbgbcr3_el1( uint64_t value )
6792 "msr DBGBCR3_EL1, %0" : :
"r" ( value ) :
"memory"
6796static inline uint64_t _AArch64_Read_dbgbcr4_el1(
void )
6801 "mrs %0, DBGBCR4_EL1" :
"=&r" ( value ) : :
"memory"
6807static inline void _AArch64_Write_dbgbcr4_el1( uint64_t value )
6810 "msr DBGBCR4_EL1, %0" : :
"r" ( value ) :
"memory"
6814static inline uint64_t _AArch64_Read_dbgbcr5_el1(
void )
6819 "mrs %0, DBGBCR5_EL1" :
"=&r" ( value ) : :
"memory"
6825static inline void _AArch64_Write_dbgbcr5_el1( uint64_t value )
6828 "msr DBGBCR5_EL1, %0" : :
"r" ( value ) :
"memory"
6832static inline uint64_t _AArch64_Read_dbgbcr6_el1(
void )
6837 "mrs %0, DBGBCR6_EL1" :
"=&r" ( value ) : :
"memory"
6843static inline void _AArch64_Write_dbgbcr6_el1( uint64_t value )
6846 "msr DBGBCR6_EL1, %0" : :
"r" ( value ) :
"memory"
6850static inline uint64_t _AArch64_Read_dbgbcr7_el1(
void )
6855 "mrs %0, DBGBCR7_EL1" :
"=&r" ( value ) : :
"memory"
6861static inline void _AArch64_Write_dbgbcr7_el1( uint64_t value )
6864 "msr DBGBCR7_EL1, %0" : :
"r" ( value ) :
"memory"
6868static inline uint64_t _AArch64_Read_dbgbcr8_el1(
void )
6873 "mrs %0, DBGBCR8_EL1" :
"=&r" ( value ) : :
"memory"
6879static inline void _AArch64_Write_dbgbcr8_el1( uint64_t value )
6882 "msr DBGBCR8_EL1, %0" : :
"r" ( value ) :
"memory"
6886static inline uint64_t _AArch64_Read_dbgbcr9_el1(
void )
6891 "mrs %0, DBGBCR9_EL1" :
"=&r" ( value ) : :
"memory"
6897static inline void _AArch64_Write_dbgbcr9_el1( uint64_t value )
6900 "msr DBGBCR9_EL1, %0" : :
"r" ( value ) :
"memory"
6904static inline uint64_t _AArch64_Read_dbgbcr10_el1(
void )
6909 "mrs %0, DBGBCR10_EL1" :
"=&r" ( value ) : :
"memory"
6915static inline void _AArch64_Write_dbgbcr10_el1( uint64_t value )
6918 "msr DBGBCR10_EL1, %0" : :
"r" ( value ) :
"memory"
6922static inline uint64_t _AArch64_Read_dbgbcr11_el1(
void )
6927 "mrs %0, DBGBCR11_EL1" :
"=&r" ( value ) : :
"memory"
6933static inline void _AArch64_Write_dbgbcr11_el1( uint64_t value )
6936 "msr DBGBCR11_EL1, %0" : :
"r" ( value ) :
"memory"
6940static inline uint64_t _AArch64_Read_dbgbcr12_el1(
void )
6945 "mrs %0, DBGBCR12_EL1" :
"=&r" ( value ) : :
"memory"
6951static inline void _AArch64_Write_dbgbcr12_el1( uint64_t value )
6954 "msr DBGBCR12_EL1, %0" : :
"r" ( value ) :
"memory"
6958static inline uint64_t _AArch64_Read_dbgbcr13_el1(
void )
6963 "mrs %0, DBGBCR13_EL1" :
"=&r" ( value ) : :
"memory"
6969static inline void _AArch64_Write_dbgbcr13_el1( uint64_t value )
6972 "msr DBGBCR13_EL1, %0" : :
"r" ( value ) :
"memory"
6976static inline uint64_t _AArch64_Read_dbgbcr14_el1(
void )
6981 "mrs %0, DBGBCR14_EL1" :
"=&r" ( value ) : :
"memory"
6987static inline void _AArch64_Write_dbgbcr14_el1( uint64_t value )
6990 "msr DBGBCR14_EL1, %0" : :
"r" ( value ) :
"memory"
6994static inline uint64_t _AArch64_Read_dbgbcr15_el1(
void )
6999 "mrs %0, DBGBCR15_EL1" :
"=&r" ( value ) : :
"memory"
7005static inline void _AArch64_Write_dbgbcr15_el1( uint64_t value )
7008 "msr DBGBCR15_EL1, %0" : :
"r" ( value ) :
"memory"
7014#define AARCH64_DBGBVR_N_EL1_CONTEXTID( _val ) ( ( _val ) << 0 )
7015#define AARCH64_DBGBVR_N_EL1_CONTEXTID_SHIFT 0
7016#define AARCH64_DBGBVR_N_EL1_CONTEXTID_MASK 0xffffffffU
7017#define AARCH64_DBGBVR_N_EL1_CONTEXTID_GET( _reg ) \
7018 ( ( ( _reg ) >> 0 ) & 0xffffffffU )
7020#define AARCH64_DBGBVR_N_EL1_VA_48_2( _val ) ( ( _val ) << 2 )
7021#define AARCH64_DBGBVR_N_EL1_VA_48_2_SHIFT 2
7022#define AARCH64_DBGBVR_N_EL1_VA_48_2_MASK 0x1fffffffffffcULL
7023#define AARCH64_DBGBVR_N_EL1_VA_48_2_GET( _reg ) \
7024 ( ( ( _reg ) >> 2 ) & 0x7fffffffffffULL )
7026#define AARCH64_DBGBVR_N_EL1_VMID_7_0( _val ) ( ( _val ) << 32 )
7027#define AARCH64_DBGBVR_N_EL1_VMID_7_0_SHIFT 32
7028#define AARCH64_DBGBVR_N_EL1_VMID_7_0_MASK 0xff00000000ULL
7029#define AARCH64_DBGBVR_N_EL1_VMID_7_0_GET( _reg ) \
7030 ( ( ( _reg ) >> 32 ) & 0xffULL )
7032#define AARCH64_DBGBVR_N_EL1_CONTEXTID2( _val ) ( ( _val ) << 32 )
7033#define AARCH64_DBGBVR_N_EL1_CONTEXTID2_SHIFT 32
7034#define AARCH64_DBGBVR_N_EL1_CONTEXTID2_MASK 0xffffffff00000000ULL
7035#define AARCH64_DBGBVR_N_EL1_CONTEXTID2_GET( _reg ) \
7036 ( ( ( _reg ) >> 32 ) & 0xffffffffULL )
7038#define AARCH64_DBGBVR_N_EL1_VMID_15_8( _val ) ( ( _val ) << 40 )
7039#define AARCH64_DBGBVR_N_EL1_VMID_15_8_SHIFT 40
7040#define AARCH64_DBGBVR_N_EL1_VMID_15_8_MASK 0xff0000000000ULL
7041#define AARCH64_DBGBVR_N_EL1_VMID_15_8_GET( _reg ) \
7042 ( ( ( _reg ) >> 40 ) & 0xffULL )
7044#define AARCH64_DBGBVR_N_EL1_VA_52_49( _val ) ( ( _val ) << 49 )
7045#define AARCH64_DBGBVR_N_EL1_VA_52_49_SHIFT 49
7046#define AARCH64_DBGBVR_N_EL1_VA_52_49_MASK 0x1e000000000000ULL
7047#define AARCH64_DBGBVR_N_EL1_VA_52_49_GET( _reg ) \
7048 ( ( ( _reg ) >> 49 ) & 0xfULL )
7050#define AARCH64_DBGBVR_N_EL1_RESS_14_4( _val ) ( ( _val ) << 53 )
7051#define AARCH64_DBGBVR_N_EL1_RESS_14_4_SHIFT 53
7052#define AARCH64_DBGBVR_N_EL1_RESS_14_4_MASK 0xffe0000000000000ULL
7053#define AARCH64_DBGBVR_N_EL1_RESS_14_4_GET( _reg ) \
7054 ( ( ( _reg ) >> 53 ) & 0x7ffULL )
7056static inline uint64_t _AArch64_Read_dbgbvr0_el1(
void )
7061 "mrs %0, DBGBVR0_EL1" :
"=&r" ( value ) : :
"memory"
7067static inline void _AArch64_Write_dbgbvr0_el1( uint64_t value )
7070 "msr DBGBVR0_EL1, %0" : :
"r" ( value ) :
"memory"
7074static inline uint64_t _AArch64_Read_dbgbvr1_el1(
void )
7079 "mrs %0, DBGBVR1_EL1" :
"=&r" ( value ) : :
"memory"
7085static inline void _AArch64_Write_dbgbvr1_el1( uint64_t value )
7088 "msr DBGBVR1_EL1, %0" : :
"r" ( value ) :
"memory"
7092static inline uint64_t _AArch64_Read_dbgbvr2_el1(
void )
7097 "mrs %0, DBGBVR2_EL1" :
"=&r" ( value ) : :
"memory"
7103static inline void _AArch64_Write_dbgbvr2_el1( uint64_t value )
7106 "msr DBGBVR2_EL1, %0" : :
"r" ( value ) :
"memory"
7110static inline uint64_t _AArch64_Read_dbgbvr3_el1(
void )
7115 "mrs %0, DBGBVR3_EL1" :
"=&r" ( value ) : :
"memory"
7121static inline void _AArch64_Write_dbgbvr3_el1( uint64_t value )
7124 "msr DBGBVR3_EL1, %0" : :
"r" ( value ) :
"memory"
7128static inline uint64_t _AArch64_Read_dbgbvr4_el1(
void )
7133 "mrs %0, DBGBVR4_EL1" :
"=&r" ( value ) : :
"memory"
7139static inline void _AArch64_Write_dbgbvr4_el1( uint64_t value )
7142 "msr DBGBVR4_EL1, %0" : :
"r" ( value ) :
"memory"
7146static inline uint64_t _AArch64_Read_dbgbvr5_el1(
void )
7151 "mrs %0, DBGBVR5_EL1" :
"=&r" ( value ) : :
"memory"
7157static inline void _AArch64_Write_dbgbvr5_el1( uint64_t value )
7160 "msr DBGBVR5_EL1, %0" : :
"r" ( value ) :
"memory"
7164static inline uint64_t _AArch64_Read_dbgbvr6_el1(
void )
7169 "mrs %0, DBGBVR6_EL1" :
"=&r" ( value ) : :
"memory"
7175static inline void _AArch64_Write_dbgbvr6_el1( uint64_t value )
7178 "msr DBGBVR6_EL1, %0" : :
"r" ( value ) :
"memory"
7182static inline uint64_t _AArch64_Read_dbgbvr7_el1(
void )
7187 "mrs %0, DBGBVR7_EL1" :
"=&r" ( value ) : :
"memory"
7193static inline void _AArch64_Write_dbgbvr7_el1( uint64_t value )
7196 "msr DBGBVR7_EL1, %0" : :
"r" ( value ) :
"memory"
7200static inline uint64_t _AArch64_Read_dbgbvr8_el1(
void )
7205 "mrs %0, DBGBVR8_EL1" :
"=&r" ( value ) : :
"memory"
7211static inline void _AArch64_Write_dbgbvr8_el1( uint64_t value )
7214 "msr DBGBVR8_EL1, %0" : :
"r" ( value ) :
"memory"
7218static inline uint64_t _AArch64_Read_dbgbvr9_el1(
void )
7223 "mrs %0, DBGBVR9_EL1" :
"=&r" ( value ) : :
"memory"
7229static inline void _AArch64_Write_dbgbvr9_el1( uint64_t value )
7232 "msr DBGBVR9_EL1, %0" : :
"r" ( value ) :
"memory"
7236static inline uint64_t _AArch64_Read_dbgbvr10_el1(
void )
7241 "mrs %0, DBGBVR10_EL1" :
"=&r" ( value ) : :
"memory"
7247static inline void _AArch64_Write_dbgbvr10_el1( uint64_t value )
7250 "msr DBGBVR10_EL1, %0" : :
"r" ( value ) :
"memory"
7254static inline uint64_t _AArch64_Read_dbgbvr11_el1(
void )
7259 "mrs %0, DBGBVR11_EL1" :
"=&r" ( value ) : :
"memory"
7265static inline void _AArch64_Write_dbgbvr11_el1( uint64_t value )
7268 "msr DBGBVR11_EL1, %0" : :
"r" ( value ) :
"memory"
7272static inline uint64_t _AArch64_Read_dbgbvr12_el1(
void )
7277 "mrs %0, DBGBVR12_EL1" :
"=&r" ( value ) : :
"memory"
7283static inline void _AArch64_Write_dbgbvr12_el1( uint64_t value )
7286 "msr DBGBVR12_EL1, %0" : :
"r" ( value ) :
"memory"
7290static inline uint64_t _AArch64_Read_dbgbvr13_el1(
void )
7295 "mrs %0, DBGBVR13_EL1" :
"=&r" ( value ) : :
"memory"
7301static inline void _AArch64_Write_dbgbvr13_el1( uint64_t value )
7304 "msr DBGBVR13_EL1, %0" : :
"r" ( value ) :
"memory"
7308static inline uint64_t _AArch64_Read_dbgbvr14_el1(
void )
7313 "mrs %0, DBGBVR14_EL1" :
"=&r" ( value ) : :
"memory"
7319static inline void _AArch64_Write_dbgbvr14_el1( uint64_t value )
7322 "msr DBGBVR14_EL1, %0" : :
"r" ( value ) :
"memory"
7326static inline uint64_t _AArch64_Read_dbgbvr15_el1(
void )
7331 "mrs %0, DBGBVR15_EL1" :
"=&r" ( value ) : :
"memory"
7337static inline void _AArch64_Write_dbgbvr15_el1( uint64_t value )
7340 "msr DBGBVR15_EL1, %0" : :
"r" ( value ) :
"memory"
7346#define AARCH64_DBGCLAIMCLR_EL1_CLAIM( _val ) ( ( _val ) << 0 )
7347#define AARCH64_DBGCLAIMCLR_EL1_CLAIM_SHIFT 0
7348#define AARCH64_DBGCLAIMCLR_EL1_CLAIM_MASK 0xffU
7349#define AARCH64_DBGCLAIMCLR_EL1_CLAIM_GET( _reg ) \
7350 ( ( ( _reg ) >> 0 ) & 0xffU )
7352static inline uint64_t _AArch64_Read_dbgclaimclr_el1(
void )
7357 "mrs %0, DBGCLAIMCLR_EL1" :
"=&r" ( value ) : :
"memory"
7363static inline void _AArch64_Write_dbgclaimclr_el1( uint64_t value )
7366 "msr DBGCLAIMCLR_EL1, %0" : :
"r" ( value ) :
"memory"
7372#define AARCH64_DBGCLAIMSET_EL1_CLAIM( _val ) ( ( _val ) << 0 )
7373#define AARCH64_DBGCLAIMSET_EL1_CLAIM_SHIFT 0
7374#define AARCH64_DBGCLAIMSET_EL1_CLAIM_MASK 0xffU
7375#define AARCH64_DBGCLAIMSET_EL1_CLAIM_GET( _reg ) \
7376 ( ( ( _reg ) >> 0 ) & 0xffU )
7378static inline uint64_t _AArch64_Read_dbgclaimset_el1(
void )
7383 "mrs %0, DBGCLAIMSET_EL1" :
"=&r" ( value ) : :
"memory"
7389static inline void _AArch64_Write_dbgclaimset_el1( uint64_t value )
7392 "msr DBGCLAIMSET_EL1, %0" : :
"r" ( value ) :
"memory"
7398#define AARCH64_DBGDTR_EL0_LOWWORD( _val ) ( ( _val ) << 0 )
7399#define AARCH64_DBGDTR_EL0_LOWWORD_SHIFT 0
7400#define AARCH64_DBGDTR_EL0_LOWWORD_MASK 0xffffffffU
7401#define AARCH64_DBGDTR_EL0_LOWWORD_GET( _reg ) \
7402 ( ( ( _reg ) >> 0 ) & 0xffffffffU )
7404#define AARCH64_DBGDTR_EL0_HIGHWORD( _val ) ( ( _val ) << 32 )
7405#define AARCH64_DBGDTR_EL0_HIGHWORD_SHIFT 32
7406#define AARCH64_DBGDTR_EL0_HIGHWORD_MASK 0xffffffff00000000ULL
7407#define AARCH64_DBGDTR_EL0_HIGHWORD_GET( _reg ) \
7408 ( ( ( _reg ) >> 32 ) & 0xffffffffULL )
7410static inline uint64_t _AArch64_Read_dbgdtr_el0(
void )
7415 "mrs %0, DBGDTR_EL0" :
"=&r" ( value ) : :
"memory"
7421static inline void _AArch64_Write_dbgdtr_el0( uint64_t value )
7424 "msr DBGDTR_EL0, %0" : :
"r" ( value ) :
"memory"
7430static inline uint64_t _AArch64_Read_dbgdtrrx_el0(
void )
7435 "mrs %0, DBGDTRRX_EL0" :
"=&r" ( value ) : :
"memory"
7443static inline void _AArch64_Write_dbgdtrtx_el0( uint64_t value )
7446 "msr DBGDTRTX_EL0, %0" : :
"r" ( value ) :
"memory"
7452#define AARCH64_DBGPRCR_EL1_CORENPDRQ 0x1U
7454static inline uint64_t _AArch64_Read_dbgprcr_el1(
void )
7459 "mrs %0, DBGPRCR_EL1" :
"=&r" ( value ) : :
"memory"
7465static inline void _AArch64_Write_dbgprcr_el1( uint64_t value )
7468 "msr DBGPRCR_EL1, %0" : :
"r" ( value ) :
"memory"
7474#define AARCH64_DBGVCR32_EL2_SU 0x2U
7476#define AARCH64_DBGVCR32_EL2_U 0x2U
7478#define AARCH64_DBGVCR32_EL2_S 0x4U
7480#define AARCH64_DBGVCR32_EL2_SS 0x4U
7482#define AARCH64_DBGVCR32_EL2_P 0x8U
7484#define AARCH64_DBGVCR32_EL2_SP 0x8U
7486#define AARCH64_DBGVCR32_EL2_D 0x10U
7488#define AARCH64_DBGVCR32_EL2_SD 0x10U
7490#define AARCH64_DBGVCR32_EL2_I 0x40U
7492#define AARCH64_DBGVCR32_EL2_SI 0x40U
7494#define AARCH64_DBGVCR32_EL2_F 0x80U
7496#define AARCH64_DBGVCR32_EL2_SF 0x80U
7498#define AARCH64_DBGVCR32_EL2_NSU 0x2000000U
7500#define AARCH64_DBGVCR32_EL2_NSS 0x4000000U
7502#define AARCH64_DBGVCR32_EL2_NSP 0x8000000U
7504#define AARCH64_DBGVCR32_EL2_NSD 0x10000000U
7506#define AARCH64_DBGVCR32_EL2_NSI 0x40000000U
7508#define AARCH64_DBGVCR32_EL2_NSF 0x80000000U
7510static inline uint64_t _AArch64_Read_dbgvcr32_el2(
void )
7515 "mrs %0, DBGVCR32_EL2" :
"=&r" ( value ) : :
"memory"
7521static inline void _AArch64_Write_dbgvcr32_el2( uint64_t value )
7524 "msr DBGVCR32_EL2, %0" : :
"r" ( value ) :
"memory"
7530#define AARCH64_DBGWCR_N_EL1_E 0x1U
7532#define AARCH64_DBGWCR_N_EL1_PAC( _val ) ( ( _val ) << 1 )
7533#define AARCH64_DBGWCR_N_EL1_PAC_SHIFT 1
7534#define AARCH64_DBGWCR_N_EL1_PAC_MASK 0x6U
7535#define AARCH64_DBGWCR_N_EL1_PAC_GET( _reg ) \
7536 ( ( ( _reg ) >> 1 ) & 0x3U )
7538#define AARCH64_DBGWCR_N_EL1_LSC( _val ) ( ( _val ) << 3 )
7539#define AARCH64_DBGWCR_N_EL1_LSC_SHIFT 3
7540#define AARCH64_DBGWCR_N_EL1_LSC_MASK 0x18U
7541#define AARCH64_DBGWCR_N_EL1_LSC_GET( _reg ) \
7542 ( ( ( _reg ) >> 3 ) & 0x3U )
7544#define AARCH64_DBGWCR_N_EL1_BAS( _val ) ( ( _val ) << 5 )
7545#define AARCH64_DBGWCR_N_EL1_BAS_SHIFT 5
7546#define AARCH64_DBGWCR_N_EL1_BAS_MASK 0x1fe0U
7547#define AARCH64_DBGWCR_N_EL1_BAS_GET( _reg ) \
7548 ( ( ( _reg ) >> 5 ) & 0xffU )
7550#define AARCH64_DBGWCR_N_EL1_HMC 0x2000U
7552#define AARCH64_DBGWCR_N_EL1_SSC( _val ) ( ( _val ) << 14 )
7553#define AARCH64_DBGWCR_N_EL1_SSC_SHIFT 14
7554#define AARCH64_DBGWCR_N_EL1_SSC_MASK 0xc000U
7555#define AARCH64_DBGWCR_N_EL1_SSC_GET( _reg ) \
7556 ( ( ( _reg ) >> 14 ) & 0x3U )
7558#define AARCH64_DBGWCR_N_EL1_LBN( _val ) ( ( _val ) << 16 )
7559#define AARCH64_DBGWCR_N_EL1_LBN_SHIFT 16
7560#define AARCH64_DBGWCR_N_EL1_LBN_MASK 0xf0000U
7561#define AARCH64_DBGWCR_N_EL1_LBN_GET( _reg ) \
7562 ( ( ( _reg ) >> 16 ) & 0xfU )
7564#define AARCH64_DBGWCR_N_EL1_WT 0x100000U
7566#define AARCH64_DBGWCR_N_EL1_MASK( _val ) ( ( _val ) << 24 )
7567#define AARCH64_DBGWCR_N_EL1_MASK_SHIFT 24
7568#define AARCH64_DBGWCR_N_EL1_MASK_MASK 0x1f000000U
7569#define AARCH64_DBGWCR_N_EL1_MASK_GET( _reg ) \
7570 ( ( ( _reg ) >> 24 ) & 0x1fU )
7572static inline uint64_t _AArch64_Read_dbgwcr0_el1(
void )
7577 "mrs %0, DBGWCR0_EL1" :
"=&r" ( value ) : :
"memory"
7583static inline void _AArch64_Write_dbgwcr0_el1( uint64_t value )
7586 "msr DBGWCR0_EL1, %0" : :
"r" ( value ) :
"memory"
7590static inline uint64_t _AArch64_Read_dbgwcr1_el1(
void )
7595 "mrs %0, DBGWCR1_EL1" :
"=&r" ( value ) : :
"memory"
7601static inline void _AArch64_Write_dbgwcr1_el1( uint64_t value )
7604 "msr DBGWCR1_EL1, %0" : :
"r" ( value ) :
"memory"
7608static inline uint64_t _AArch64_Read_dbgwcr2_el1(
void )
7613 "mrs %0, DBGWCR2_EL1" :
"=&r" ( value ) : :
"memory"
7619static inline void _AArch64_Write_dbgwcr2_el1( uint64_t value )
7622 "msr DBGWCR2_EL1, %0" : :
"r" ( value ) :
"memory"
7626static inline uint64_t _AArch64_Read_dbgwcr3_el1(
void )
7631 "mrs %0, DBGWCR3_EL1" :
"=&r" ( value ) : :
"memory"
7637static inline void _AArch64_Write_dbgwcr3_el1( uint64_t value )
7640 "msr DBGWCR3_EL1, %0" : :
"r" ( value ) :
"memory"
7644static inline uint64_t _AArch64_Read_dbgwcr4_el1(
void )
7649 "mrs %0, DBGWCR4_EL1" :
"=&r" ( value ) : :
"memory"
7655static inline void _AArch64_Write_dbgwcr4_el1( uint64_t value )
7658 "msr DBGWCR4_EL1, %0" : :
"r" ( value ) :
"memory"
7662static inline uint64_t _AArch64_Read_dbgwcr5_el1(
void )
7667 "mrs %0, DBGWCR5_EL1" :
"=&r" ( value ) : :
"memory"
7673static inline void _AArch64_Write_dbgwcr5_el1( uint64_t value )
7676 "msr DBGWCR5_EL1, %0" : :
"r" ( value ) :
"memory"
7680static inline uint64_t _AArch64_Read_dbgwcr6_el1(
void )
7685 "mrs %0, DBGWCR6_EL1" :
"=&r" ( value ) : :
"memory"
7691static inline void _AArch64_Write_dbgwcr6_el1( uint64_t value )
7694 "msr DBGWCR6_EL1, %0" : :
"r" ( value ) :
"memory"
7698static inline uint64_t _AArch64_Read_dbgwcr7_el1(
void )
7703 "mrs %0, DBGWCR7_EL1" :
"=&r" ( value ) : :
"memory"
7709static inline void _AArch64_Write_dbgwcr7_el1( uint64_t value )
7712 "msr DBGWCR7_EL1, %0" : :
"r" ( value ) :
"memory"
7716static inline uint64_t _AArch64_Read_dbgwcr8_el1(
void )
7721 "mrs %0, DBGWCR8_EL1" :
"=&r" ( value ) : :
"memory"
7727static inline void _AArch64_Write_dbgwcr8_el1( uint64_t value )
7730 "msr DBGWCR8_EL1, %0" : :
"r" ( value ) :
"memory"
7734static inline uint64_t _AArch64_Read_dbgwcr9_el1(
void )
7739 "mrs %0, DBGWCR9_EL1" :
"=&r" ( value ) : :
"memory"
7745static inline void _AArch64_Write_dbgwcr9_el1( uint64_t value )
7748 "msr DBGWCR9_EL1, %0" : :
"r" ( value ) :
"memory"
7752static inline uint64_t _AArch64_Read_dbgwcr10_el1(
void )
7757 "mrs %0, DBGWCR10_EL1" :
"=&r" ( value ) : :
"memory"
7763static inline void _AArch64_Write_dbgwcr10_el1( uint64_t value )
7766 "msr DBGWCR10_EL1, %0" : :
"r" ( value ) :
"memory"
7770static inline uint64_t _AArch64_Read_dbgwcr11_el1(
void )
7775 "mrs %0, DBGWCR11_EL1" :
"=&r" ( value ) : :
"memory"
7781static inline void _AArch64_Write_dbgwcr11_el1( uint64_t value )
7784 "msr DBGWCR11_EL1, %0" : :
"r" ( value ) :
"memory"
7788static inline uint64_t _AArch64_Read_dbgwcr12_el1(
void )
7793 "mrs %0, DBGWCR12_EL1" :
"=&r" ( value ) : :
"memory"
7799static inline void _AArch64_Write_dbgwcr12_el1( uint64_t value )
7802 "msr DBGWCR12_EL1, %0" : :
"r" ( value ) :
"memory"
7806static inline uint64_t _AArch64_Read_dbgwcr13_el1(
void )
7811 "mrs %0, DBGWCR13_EL1" :
"=&r" ( value ) : :
"memory"
7817static inline void _AArch64_Write_dbgwcr13_el1( uint64_t value )
7820 "msr DBGWCR13_EL1, %0" : :
"r" ( value ) :
"memory"
7824static inline uint64_t _AArch64_Read_dbgwcr14_el1(
void )
7829 "mrs %0, DBGWCR14_EL1" :
"=&r" ( value ) : :
"memory"
7835static inline void _AArch64_Write_dbgwcr14_el1( uint64_t value )
7838 "msr DBGWCR14_EL1, %0" : :
"r" ( value ) :
"memory"
7842static inline uint64_t _AArch64_Read_dbgwcr15_el1(
void )
7847 "mrs %0, DBGWCR15_EL1" :
"=&r" ( value ) : :
"memory"
7853static inline void _AArch64_Write_dbgwcr15_el1( uint64_t value )
7856 "msr DBGWCR15_EL1, %0" : :
"r" ( value ) :
"memory"
7862#define AARCH64_DBGWVR_N_EL1_VA_48_2( _val ) ( ( _val ) << 2 )
7863#define AARCH64_DBGWVR_N_EL1_VA_48_2_SHIFT 2
7864#define AARCH64_DBGWVR_N_EL1_VA_48_2_MASK 0x1fffffffffffcULL
7865#define AARCH64_DBGWVR_N_EL1_VA_48_2_GET( _reg ) \
7866 ( ( ( _reg ) >> 2 ) & 0x7fffffffffffULL )
7868#define AARCH64_DBGWVR_N_EL1_VA_52_49( _val ) ( ( _val ) << 49 )
7869#define AARCH64_DBGWVR_N_EL1_VA_52_49_SHIFT 49
7870#define AARCH64_DBGWVR_N_EL1_VA_52_49_MASK 0x1e000000000000ULL
7871#define AARCH64_DBGWVR_N_EL1_VA_52_49_GET( _reg ) \
7872 ( ( ( _reg ) >> 49 ) & 0xfULL )
7874#define AARCH64_DBGWVR_N_EL1_RESS_14_4( _val ) ( ( _val ) << 53 )
7875#define AARCH64_DBGWVR_N_EL1_RESS_14_4_SHIFT 53
7876#define AARCH64_DBGWVR_N_EL1_RESS_14_4_MASK 0xffe0000000000000ULL
7877#define AARCH64_DBGWVR_N_EL1_RESS_14_4_GET( _reg ) \
7878 ( ( ( _reg ) >> 53 ) & 0x7ffULL )
7880static inline uint64_t _AArch64_Read_dbgwvr0_el1(
void )
7885 "mrs %0, DBGWVR0_EL1" :
"=&r" ( value ) : :
"memory"
7891static inline void _AArch64_Write_dbgwvr0_el1( uint64_t value )
7894 "msr DBGWVR0_EL1, %0" : :
"r" ( value ) :
"memory"
7898static inline uint64_t _AArch64_Read_dbgwvr1_el1(
void )
7903 "mrs %0, DBGWVR1_EL1" :
"=&r" ( value ) : :
"memory"
7909static inline void _AArch64_Write_dbgwvr1_el1( uint64_t value )
7912 "msr DBGWVR1_EL1, %0" : :
"r" ( value ) :
"memory"
7916static inline uint64_t _AArch64_Read_dbgwvr2_el1(
void )
7921 "mrs %0, DBGWVR2_EL1" :
"=&r" ( value ) : :
"memory"
7927static inline void _AArch64_Write_dbgwvr2_el1( uint64_t value )
7930 "msr DBGWVR2_EL1, %0" : :
"r" ( value ) :
"memory"
7934static inline uint64_t _AArch64_Read_dbgwvr3_el1(
void )
7939 "mrs %0, DBGWVR3_EL1" :
"=&r" ( value ) : :
"memory"
7945static inline void _AArch64_Write_dbgwvr3_el1( uint64_t value )
7948 "msr DBGWVR3_EL1, %0" : :
"r" ( value ) :
"memory"
7952static inline uint64_t _AArch64_Read_dbgwvr4_el1(
void )
7957 "mrs %0, DBGWVR4_EL1" :
"=&r" ( value ) : :
"memory"
7963static inline void _AArch64_Write_dbgwvr4_el1( uint64_t value )
7966 "msr DBGWVR4_EL1, %0" : :
"r" ( value ) :
"memory"
7970static inline uint64_t _AArch64_Read_dbgwvr5_el1(
void )
7975 "mrs %0, DBGWVR5_EL1" :
"=&r" ( value ) : :
"memory"
7981static inline void _AArch64_Write_dbgwvr5_el1( uint64_t value )
7984 "msr DBGWVR5_EL1, %0" : :
"r" ( value ) :
"memory"
7988static inline uint64_t _AArch64_Read_dbgwvr6_el1(
void )
7993 "mrs %0, DBGWVR6_EL1" :
"=&r" ( value ) : :
"memory"
7999static inline void _AArch64_Write_dbgwvr6_el1( uint64_t value )
8002 "msr DBGWVR6_EL1, %0" : :
"r" ( value ) :
"memory"
8006static inline uint64_t _AArch64_Read_dbgwvr7_el1(
void )
8011 "mrs %0, DBGWVR7_EL1" :
"=&r" ( value ) : :
"memory"
8017static inline void _AArch64_Write_dbgwvr7_el1( uint64_t value )
8020 "msr DBGWVR7_EL1, %0" : :
"r" ( value ) :
"memory"
8024static inline uint64_t _AArch64_Read_dbgwvr8_el1(
void )
8029 "mrs %0, DBGWVR8_EL1" :
"=&r" ( value ) : :
"memory"
8035static inline void _AArch64_Write_dbgwvr8_el1( uint64_t value )
8038 "msr DBGWVR8_EL1, %0" : :
"r" ( value ) :
"memory"
8042static inline uint64_t _AArch64_Read_dbgwvr9_el1(
void )
8047 "mrs %0, DBGWVR9_EL1" :
"=&r" ( value ) : :
"memory"
8053static inline void _AArch64_Write_dbgwvr9_el1( uint64_t value )
8056 "msr DBGWVR9_EL1, %0" : :
"r" ( value ) :
"memory"
8060static inline uint64_t _AArch64_Read_dbgwvr10_el1(
void )
8065 "mrs %0, DBGWVR10_EL1" :
"=&r" ( value ) : :
"memory"
8071static inline void _AArch64_Write_dbgwvr10_el1( uint64_t value )
8074 "msr DBGWVR10_EL1, %0" : :
"r" ( value ) :
"memory"
8078static inline uint64_t _AArch64_Read_dbgwvr11_el1(
void )
8083 "mrs %0, DBGWVR11_EL1" :
"=&r" ( value ) : :
"memory"
8089static inline void _AArch64_Write_dbgwvr11_el1( uint64_t value )
8092 "msr DBGWVR11_EL1, %0" : :
"r" ( value ) :
"memory"
8096static inline uint64_t _AArch64_Read_dbgwvr12_el1(
void )
8101 "mrs %0, DBGWVR12_EL1" :
"=&r" ( value ) : :
"memory"
8107static inline void _AArch64_Write_dbgwvr12_el1( uint64_t value )
8110 "msr DBGWVR12_EL1, %0" : :
"r" ( value ) :
"memory"
8114static inline uint64_t _AArch64_Read_dbgwvr13_el1(
void )
8119 "mrs %0, DBGWVR13_EL1" :
"=&r" ( value ) : :
"memory"
8125static inline void _AArch64_Write_dbgwvr13_el1( uint64_t value )
8128 "msr DBGWVR13_EL1, %0" : :
"r" ( value ) :
"memory"
8132static inline uint64_t _AArch64_Read_dbgwvr14_el1(
void )
8137 "mrs %0, DBGWVR14_EL1" :
"=&r" ( value ) : :
"memory"
8143static inline void _AArch64_Write_dbgwvr14_el1( uint64_t value )
8146 "msr DBGWVR14_EL1, %0" : :
"r" ( value ) :
"memory"
8150static inline uint64_t _AArch64_Read_dbgwvr15_el1(
void )
8155 "mrs %0, DBGWVR15_EL1" :
"=&r" ( value ) : :
"memory"
8161static inline void _AArch64_Write_dbgwvr15_el1( uint64_t value )
8164 "msr DBGWVR15_EL1, %0" : :
"r" ( value ) :
"memory"
8170static inline uint64_t _AArch64_Read_dlr_el0(
void )
8175 "mrs %0, DLR_EL0" :
"=&r" ( value ) : :
"memory"
8181static inline void _AArch64_Write_dlr_el0( uint64_t value )
8184 "msr DLR_EL0, %0" : :
"r" ( value ) :
"memory"
8190#define AARCH64_DSPSR_EL0_M_3_0( _val ) ( ( _val ) << 0 )
8191#define AARCH64_DSPSR_EL0_M_3_0_SHIFT 0
8192#define AARCH64_DSPSR_EL0_M_3_0_MASK 0xfU
8193#define AARCH64_DSPSR_EL0_M_3_0_GET( _reg ) \
8194 ( ( ( _reg ) >> 0 ) & 0xfU )
8196#define AARCH64_DSPSR_EL0_M_4 0x10U
8198#define AARCH64_DSPSR_EL0_T 0x20U
8200#define AARCH64_DSPSR_EL0_F 0x40U
8202#define AARCH64_DSPSR_EL0_I 0x80U
8204#define AARCH64_DSPSR_EL0_A 0x100U
8206#define AARCH64_DSPSR_EL0_D 0x200U
8208#define AARCH64_DSPSR_EL0_E 0x200U
8210#define AARCH64_DSPSR_EL0_BTYPE( _val ) ( ( _val ) << 10 )
8211#define AARCH64_DSPSR_EL0_BTYPE_SHIFT 10
8212#define AARCH64_DSPSR_EL0_BTYPE_MASK 0xc00U
8213#define AARCH64_DSPSR_EL0_BTYPE_GET( _reg ) \
8214 ( ( ( _reg ) >> 10 ) & 0x3U )
8216#define AARCH64_DSPSR_EL0_IT_7_2( _val ) ( ( _val ) << 10 )
8217#define AARCH64_DSPSR_EL0_IT_7_2_SHIFT 10
8218#define AARCH64_DSPSR_EL0_IT_7_2_MASK 0xfc00U
8219#define AARCH64_DSPSR_EL0_IT_7_2_GET( _reg ) \
8220 ( ( ( _reg ) >> 10 ) & 0x3fU )
8222#define AARCH64_DSPSR_EL0_SSBS_0 0x1000U
8224#define AARCH64_DSPSR_EL0_GE( _val ) ( ( _val ) << 16 )
8225#define AARCH64_DSPSR_EL0_GE_SHIFT 16
8226#define AARCH64_DSPSR_EL0_GE_MASK 0xf0000U
8227#define AARCH64_DSPSR_EL0_GE_GET( _reg ) \
8228 ( ( ( _reg ) >> 16 ) & 0xfU )
8230#define AARCH64_DSPSR_EL0_IL 0x100000U
8232#define AARCH64_DSPSR_EL0_SS 0x200000U
8234#define AARCH64_DSPSR_EL0_PAN 0x400000U
8236#define AARCH64_DSPSR_EL0_SSBS_1 0x800000U
8238#define AARCH64_DSPSR_EL0_UAO 0x800000U
8240#define AARCH64_DSPSR_EL0_DIT 0x1000000U
8242#define AARCH64_DSPSR_EL0_TCO 0x2000000U
8244#define AARCH64_DSPSR_EL0_IT_1_0( _val ) ( ( _val ) << 25 )
8245#define AARCH64_DSPSR_EL0_IT_1_0_SHIFT 25
8246#define AARCH64_DSPSR_EL0_IT_1_0_MASK 0x6000000U
8247#define AARCH64_DSPSR_EL0_IT_1_0_GET( _reg ) \
8248 ( ( ( _reg ) >> 25 ) & 0x3U )
8250#define AARCH64_DSPSR_EL0_Q 0x8000000U
8252#define AARCH64_DSPSR_EL0_V 0x10000000U
8254#define AARCH64_DSPSR_EL0_C 0x20000000U
8256#define AARCH64_DSPSR_EL0_Z 0x40000000U
8258#define AARCH64_DSPSR_EL0_N 0x80000000U
8260static inline uint64_t _AArch64_Read_dspsr_el0(
void )
8265 "mrs %0, DSPSR_EL0" :
"=&r" ( value ) : :
"memory"
8271static inline void _AArch64_Write_dspsr_el0( uint64_t value )
8274 "msr DSPSR_EL0, %0" : :
"r" ( value ) :
"memory"
8280#define AARCH64_MDCCINT_EL1_TX 0x20000000U
8282#define AARCH64_MDCCINT_EL1_RX 0x40000000U
8284static inline uint64_t _AArch64_Read_mdccint_el1(
void )
8289 "mrs %0, MDCCINT_EL1" :
"=&r" ( value ) : :
"memory"
8295static inline void _AArch64_Write_mdccint_el1( uint64_t value )
8298 "msr MDCCINT_EL1, %0" : :
"r" ( value ) :
"memory"
8304#define AARCH64_MDCCSR_EL0_TXFULL 0x20000000U
8306#define AARCH64_MDCCSR_EL0_RXFULL 0x40000000U
8308static inline uint64_t _AArch64_Read_mdccsr_el0(
void )
8313 "mrs %0, MDCCSR_EL0" :
"=&r" ( value ) : :
"memory"
8321#define AARCH64_MDCR_EL2_HPMN( _val ) ( ( _val ) << 0 )
8322#define AARCH64_MDCR_EL2_HPMN_SHIFT 0
8323#define AARCH64_MDCR_EL2_HPMN_MASK 0x1fU
8324#define AARCH64_MDCR_EL2_HPMN_GET( _reg ) \
8325 ( ( ( _reg ) >> 0 ) & 0x1fU )
8327#define AARCH64_MDCR_EL2_TPMCR 0x20U
8329#define AARCH64_MDCR_EL2_TPM 0x40U
8331#define AARCH64_MDCR_EL2_HPME 0x80U
8333#define AARCH64_MDCR_EL2_TDE 0x100U
8335#define AARCH64_MDCR_EL2_TDA 0x200U
8337#define AARCH64_MDCR_EL2_TDOSA 0x400U
8339#define AARCH64_MDCR_EL2_TDRA 0x800U
8341#define AARCH64_MDCR_EL2_E2PB( _val ) ( ( _val ) << 12 )
8342#define AARCH64_MDCR_EL2_E2PB_SHIFT 12
8343#define AARCH64_MDCR_EL2_E2PB_MASK 0x3000U
8344#define AARCH64_MDCR_EL2_E2PB_GET( _reg ) \
8345 ( ( ( _reg ) >> 12 ) & 0x3U )
8347#define AARCH64_MDCR_EL2_TPMS 0x4000U
8349#define AARCH64_MDCR_EL2_HPMD 0x20000U
8351#define AARCH64_MDCR_EL2_TTRF 0x80000U
8353#define AARCH64_MDCR_EL2_HCCD 0x800000U
8355#define AARCH64_MDCR_EL2_HLP 0x4000000U
8357#define AARCH64_MDCR_EL2_TDCC 0x8000000U
8359#define AARCH64_MDCR_EL2_MTPME 0x10000000U
8361static inline uint64_t _AArch64_Read_mdcr_el2(
void )
8366 "mrs %0, MDCR_EL2" :
"=&r" ( value ) : :
"memory"
8372static inline void _AArch64_Write_mdcr_el2( uint64_t value )
8375 "msr MDCR_EL2, %0" : :
"r" ( value ) :
"memory"
8381#define AARCH64_MDCR_EL3_TPM 0x40U
8383#define AARCH64_MDCR_EL3_TDA 0x200U
8385#define AARCH64_MDCR_EL3_TDOSA 0x400U
8387#define AARCH64_MDCR_EL3_NSPB( _val ) ( ( _val ) << 12 )
8388#define AARCH64_MDCR_EL3_NSPB_SHIFT 12
8389#define AARCH64_MDCR_EL3_NSPB_MASK 0x3000U
8390#define AARCH64_MDCR_EL3_NSPB_GET( _reg ) \
8391 ( ( ( _reg ) >> 12 ) & 0x3U )
8393#define AARCH64_MDCR_EL3_SPD32( _val ) ( ( _val ) << 14 )
8394#define AARCH64_MDCR_EL3_SPD32_SHIFT 14
8395#define AARCH64_MDCR_EL3_SPD32_MASK 0xc000U
8396#define AARCH64_MDCR_EL3_SPD32_GET( _reg ) \
8397 ( ( ( _reg ) >> 14 ) & 0x3U )
8399#define AARCH64_MDCR_EL3_SDD 0x10000U
8401#define AARCH64_MDCR_EL3_SPME 0x20000U
8403#define AARCH64_MDCR_EL3_STE 0x40000U
8405#define AARCH64_MDCR_EL3_TTRF 0x80000U
8407#define AARCH64_MDCR_EL3_EDAD 0x100000U
8409#define AARCH64_MDCR_EL3_EPMAD 0x200000U
8411#define AARCH64_MDCR_EL3_SCCD 0x800000U
8413#define AARCH64_MDCR_EL3_TDCC 0x8000000U
8415#define AARCH64_MDCR_EL3_MTPME 0x10000000U
8417static inline uint64_t _AArch64_Read_mdcr_el3(
void )
8422 "mrs %0, MDCR_EL3" :
"=&r" ( value ) : :
"memory"
8428static inline void _AArch64_Write_mdcr_el3( uint64_t value )
8431 "msr MDCR_EL3, %0" : :
"r" ( value ) :
"memory"
8437#define AARCH64_MDRAR_EL1_VALID( _val ) ( ( _val ) << 0 )
8438#define AARCH64_MDRAR_EL1_VALID_SHIFT 0
8439#define AARCH64_MDRAR_EL1_VALID_MASK 0x3U
8440#define AARCH64_MDRAR_EL1_VALID_GET( _reg ) \
8441 ( ( ( _reg ) >> 0 ) & 0x3U )
8443#define AARCH64_MDRAR_EL1_ROMADDR_47_12( _val ) ( ( _val ) << 12 )
8444#define AARCH64_MDRAR_EL1_ROMADDR_47_12_SHIFT 12
8445#define AARCH64_MDRAR_EL1_ROMADDR_47_12_MASK 0xfffffffff000ULL
8446#define AARCH64_MDRAR_EL1_ROMADDR_47_12_GET( _reg ) \
8447 ( ( ( _reg ) >> 12 ) & 0xfffffffffULL )
8449#define AARCH64_MDRAR_EL1_ROMADDR_51_48( _val ) ( ( _val ) << 48 )
8450#define AARCH64_MDRAR_EL1_ROMADDR_51_48_SHIFT 48
8451#define AARCH64_MDRAR_EL1_ROMADDR_51_48_MASK 0xf000000000000ULL
8452#define AARCH64_MDRAR_EL1_ROMADDR_51_48_GET( _reg ) \
8453 ( ( ( _reg ) >> 48 ) & 0xfULL )
8455static inline uint64_t _AArch64_Read_mdrar_el1(
void )
8460 "mrs %0, MDRAR_EL1" :
"=&r" ( value ) : :
"memory"
8468#define AARCH64_MDSCR_EL1_SS 0x1U
8470#define AARCH64_MDSCR_EL1_ERR 0x40U
8472#define AARCH64_MDSCR_EL1_TDCC 0x1000U
8474#define AARCH64_MDSCR_EL1_KDE 0x2000U
8476#define AARCH64_MDSCR_EL1_HDE 0x4000U
8478#define AARCH64_MDSCR_EL1_MDE 0x8000U
8480#define AARCH64_MDSCR_EL1_SC2 0x80000U
8482#define AARCH64_MDSCR_EL1_TDA 0x200000U
8484#define AARCH64_MDSCR_EL1_INTDIS( _val ) ( ( _val ) << 22 )
8485#define AARCH64_MDSCR_EL1_INTDIS_SHIFT 22
8486#define AARCH64_MDSCR_EL1_INTDIS_MASK 0xc00000U
8487#define AARCH64_MDSCR_EL1_INTDIS_GET( _reg ) \
8488 ( ( ( _reg ) >> 22 ) & 0x3U )
8490#define AARCH64_MDSCR_EL1_TXU 0x4000000U
8492#define AARCH64_MDSCR_EL1_RXO 0x8000000U
8494#define AARCH64_MDSCR_EL1_TXFULL 0x20000000U
8496#define AARCH64_MDSCR_EL1_RXFULL 0x40000000U
8498#define AARCH64_MDSCR_EL1_TFO 0x80000000U
8500static inline uint64_t _AArch64_Read_mdscr_el1(
void )
8505 "mrs %0, MDSCR_EL1" :
"=&r" ( value ) : :
"memory"
8511static inline void _AArch64_Write_mdscr_el1( uint64_t value )
8514 "msr MDSCR_EL1, %0" : :
"r" ( value ) :
"memory"
8520#define AARCH64_OSDLR_EL1_DLK 0x1U
8522static inline uint64_t _AArch64_Read_osdlr_el1(
void )
8527 "mrs %0, OSDLR_EL1" :
"=&r" ( value ) : :
"memory"
8533static inline void _AArch64_Write_osdlr_el1( uint64_t value )
8536 "msr OSDLR_EL1, %0" : :
"r" ( value ) :
"memory"
8542static inline uint64_t _AArch64_Read_osdtrrx_el1(
void )
8547 "mrs %0, OSDTRRX_EL1" :
"=&r" ( value ) : :
"memory"
8553static inline void _AArch64_Write_osdtrrx_el1( uint64_t value )
8556 "msr OSDTRRX_EL1, %0" : :
"r" ( value ) :
"memory"
8562static inline uint64_t _AArch64_Read_osdtrtx_el1(
void )
8567 "mrs %0, OSDTRTX_EL1" :
"=&r" ( value ) : :
"memory"
8573static inline void _AArch64_Write_osdtrtx_el1( uint64_t value )
8576 "msr OSDTRTX_EL1, %0" : :
"r" ( value ) :
"memory"
8582#define AARCH64_OSECCR_EL1_EDECCR( _val ) ( ( _val ) << 0 )
8583#define AARCH64_OSECCR_EL1_EDECCR_SHIFT 0
8584#define AARCH64_OSECCR_EL1_EDECCR_MASK 0xffffffffU
8585#define AARCH64_OSECCR_EL1_EDECCR_GET( _reg ) \
8586 ( ( ( _reg ) >> 0 ) & 0xffffffffU )
8588static inline uint64_t _AArch64_Read_oseccr_el1(
void )
8593 "mrs %0, OSECCR_EL1" :
"=&r" ( value ) : :
"memory"
8599static inline void _AArch64_Write_oseccr_el1( uint64_t value )
8602 "msr OSECCR_EL1, %0" : :
"r" ( value ) :
"memory"
8608#define AARCH64_OSLAR_EL1_OSLK 0x1U
8610static inline void _AArch64_Write_oslar_el1( uint64_t value )
8613 "msr OSLAR_EL1, %0" : :
"r" ( value ) :
"memory"
8619#define AARCH64_OSLSR_EL1_OSLM_0 0x1U
8621#define AARCH64_OSLSR_EL1_OSLK 0x2U
8623#define AARCH64_OSLSR_EL1_NTT 0x4U
8625#define AARCH64_OSLSR_EL1_OSLM_1 0x8U
8627static inline uint64_t _AArch64_Read_oslsr_el1(
void )
8632 "mrs %0, OSLSR_EL1" :
"=&r" ( value ) : :
"memory"
8640#define AARCH64_SDER32_EL2_SUIDEN 0x1U
8642#define AARCH64_SDER32_EL2_SUNIDEN 0x2U
8644static inline uint64_t _AArch64_Read_sder32_el2(
void )
8649 "mrs %0, SDER32_EL2" :
"=&r" ( value ) : :
"memory"
8655static inline void _AArch64_Write_sder32_el2( uint64_t value )
8658 "msr SDER32_EL2, %0" : :
"r" ( value ) :
"memory"
8664#define AARCH64_SDER32_EL3_SUIDEN 0x1U
8666#define AARCH64_SDER32_EL3_SUNIDEN 0x2U
8668static inline uint64_t _AArch64_Read_sder32_el3(
void )
8673 "mrs %0, SDER32_EL3" :
"=&r" ( value ) : :
"memory"
8679static inline void _AArch64_Write_sder32_el3( uint64_t value )
8682 "msr SDER32_EL3, %0" : :
"r" ( value ) :
"memory"
8688#define AARCH64_TRFCR_EL1_E0TRE 0x1U
8690#define AARCH64_TRFCR_EL1_E1TRE 0x2U
8692#define AARCH64_TRFCR_EL1_TS( _val ) ( ( _val ) << 5 )
8693#define AARCH64_TRFCR_EL1_TS_SHIFT 5
8694#define AARCH64_TRFCR_EL1_TS_MASK 0x60U
8695#define AARCH64_TRFCR_EL1_TS_GET( _reg ) \
8696 ( ( ( _reg ) >> 5 ) & 0x3U )
8698static inline uint64_t _AArch64_Read_trfcr_el1(
void )
8703 "mrs %0, TRFCR_EL1" :
"=&r" ( value ) : :
"memory"
8709static inline void _AArch64_Write_trfcr_el1( uint64_t value )
8712 "msr TRFCR_EL1, %0" : :
"r" ( value ) :
"memory"
8718#define AARCH64_TRFCR_EL2_E0HTRE 0x1U
8720#define AARCH64_TRFCR_EL2_E2TRE 0x2U
8722#define AARCH64_TRFCR_EL2_CX 0x8U
8724#define AARCH64_TRFCR_EL2_TS( _val ) ( ( _val ) << 5 )
8725#define AARCH64_TRFCR_EL2_TS_SHIFT 5
8726#define AARCH64_TRFCR_EL2_TS_MASK 0x60U
8727#define AARCH64_TRFCR_EL2_TS_GET( _reg ) \
8728 ( ( ( _reg ) >> 5 ) & 0x3U )
8730static inline uint64_t _AArch64_Read_trfcr_el2(
void )
8735 "mrs %0, TRFCR_EL2" :
"=&r" ( value ) : :
"memory"
8741static inline void _AArch64_Write_trfcr_el2( uint64_t value )
8744 "msr TRFCR_EL2, %0" : :
"r" ( value ) :
"memory"
8750#define AARCH64_PMCCFILTR_EL0_SH 0x1000000U
8752#define AARCH64_PMCCFILTR_EL0_M 0x4000000U
8754#define AARCH64_PMCCFILTR_EL0_NSH 0x8000000U
8756#define AARCH64_PMCCFILTR_EL0_NSU 0x10000000U
8758#define AARCH64_PMCCFILTR_EL0_NSK 0x20000000U
8760#define AARCH64_PMCCFILTR_EL0_U 0x40000000U
8762#define AARCH64_PMCCFILTR_EL0_P 0x80000000U
8764static inline uint64_t _AArch64_Read_pmccfiltr_el0(
void )
8769 "mrs %0, PMCCFILTR_EL0" :
"=&r" ( value ) : :
"memory"
8775static inline void _AArch64_Write_pmccfiltr_el0( uint64_t value )
8778 "msr PMCCFILTR_EL0, %0" : :
"r" ( value ) :
"memory"
8784static inline uint64_t _AArch64_Read_pmccntr_el0(
void )
8789 "mrs %0, PMCCNTR_EL0" :
"=&r" ( value ) : :
"memory"
8795static inline void _AArch64_Write_pmccntr_el0( uint64_t value )
8798 "msr PMCCNTR_EL0, %0" : :
"r" ( value ) :
"memory"
8804static inline uint64_t _AArch64_Read_pmceid0_el0(
void )
8809 "mrs %0, PMCEID0_EL0" :
"=&r" ( value ) : :
"memory"
8817static inline uint64_t _AArch64_Read_pmceid1_el0(
void )
8822 "mrs %0, PMCEID1_EL0" :
"=&r" ( value ) : :
"memory"
8830#define AARCH64_PMCNTENCLR_EL0_C 0x80000000U
8832static inline uint64_t _AArch64_Read_pmcntenclr_el0(
void )
8837 "mrs %0, PMCNTENCLR_EL0" :
"=&r" ( value ) : :
"memory"
8843static inline void _AArch64_Write_pmcntenclr_el0( uint64_t value )
8846 "msr PMCNTENCLR_EL0, %0" : :
"r" ( value ) :
"memory"
8852#define AARCH64_PMCNTENSET_EL0_C 0x80000000U
8854static inline uint64_t _AArch64_Read_pmcntenset_el0(
void )
8859 "mrs %0, PMCNTENSET_EL0" :
"=&r" ( value ) : :
"memory"
8865static inline void _AArch64_Write_pmcntenset_el0( uint64_t value )
8868 "msr PMCNTENSET_EL0, %0" : :
"r" ( value ) :
"memory"
8874#define AARCH64_PMCR_EL0_E 0x1U
8876#define AARCH64_PMCR_EL0_P 0x2U
8878#define AARCH64_PMCR_EL0_C 0x4U
8880#define AARCH64_PMCR_EL0_D 0x8U
8882#define AARCH64_PMCR_EL0_X 0x10U
8884#define AARCH64_PMCR_EL0_DP 0x20U
8886#define AARCH64_PMCR_EL0_LC 0x40U
8888#define AARCH64_PMCR_EL0_LP 0x80U
8890#define AARCH64_PMCR_EL0_N( _val ) ( ( _val ) << 11 )
8891#define AARCH64_PMCR_EL0_N_SHIFT 11
8892#define AARCH64_PMCR_EL0_N_MASK 0xf800U
8893#define AARCH64_PMCR_EL0_N_GET( _reg ) \
8894 ( ( ( _reg ) >> 11 ) & 0x1fU )
8896#define AARCH64_PMCR_EL0_IDCODE( _val ) ( ( _val ) << 16 )
8897#define AARCH64_PMCR_EL0_IDCODE_SHIFT 16
8898#define AARCH64_PMCR_EL0_IDCODE_MASK 0xff0000U
8899#define AARCH64_PMCR_EL0_IDCODE_GET( _reg ) \
8900 ( ( ( _reg ) >> 16 ) & 0xffU )
8902#define AARCH64_PMCR_EL0_IMP( _val ) ( ( _val ) << 24 )
8903#define AARCH64_PMCR_EL0_IMP_SHIFT 24
8904#define AARCH64_PMCR_EL0_IMP_MASK 0xff000000U
8905#define AARCH64_PMCR_EL0_IMP_GET( _reg ) \
8906 ( ( ( _reg ) >> 24 ) & 0xffU )
8908static inline uint64_t _AArch64_Read_pmcr_el0(
void )
8913 "mrs %0, PMCR_EL0" :
"=&r" ( value ) : :
"memory"
8919static inline void _AArch64_Write_pmcr_el0( uint64_t value )
8922 "msr PMCR_EL0, %0" : :
"r" ( value ) :
"memory"
8928static inline uint64_t _AArch64_Read_pmevcntr_n_el0(
void )
8933 "mrs %0, PMEVCNTR_N_EL0" :
"=&r" ( value ) : :
"memory"
8939static inline void _AArch64_Write_pmevcntr_n_el0( uint64_t value )
8942 "msr PMEVCNTR_N_EL0, %0" : :
"r" ( value ) :
"memory"
8948#define AARCH64_PMEVTYPER_N_EL0_EVTCOUNT_9_0( _val ) ( ( _val ) << 0 )
8949#define AARCH64_PMEVTYPER_N_EL0_EVTCOUNT_9_0_SHIFT 0
8950#define AARCH64_PMEVTYPER_N_EL0_EVTCOUNT_9_0_MASK 0x3ffU
8951#define AARCH64_PMEVTYPER_N_EL0_EVTCOUNT_9_0_GET( _reg ) \
8952 ( ( ( _reg ) >> 0 ) & 0x3ffU )
8954#define AARCH64_PMEVTYPER_N_EL0_EVTCOUNT_15_10( _val ) ( ( _val ) << 10 )
8955#define AARCH64_PMEVTYPER_N_EL0_EVTCOUNT_15_10_SHIFT 10
8956#define AARCH64_PMEVTYPER_N_EL0_EVTCOUNT_15_10_MASK 0xfc00U
8957#define AARCH64_PMEVTYPER_N_EL0_EVTCOUNT_15_10_GET( _reg ) \
8958 ( ( ( _reg ) >> 10 ) & 0x3fU )
8960#define AARCH64_PMEVTYPER_N_EL0_SH 0x1000000U
8962#define AARCH64_PMEVTYPER_N_EL0_MT 0x2000000U
8964#define AARCH64_PMEVTYPER_N_EL0_M 0x4000000U
8966#define AARCH64_PMEVTYPER_N_EL0_NSH 0x8000000U
8968#define AARCH64_PMEVTYPER_N_EL0_NSU 0x10000000U
8970#define AARCH64_PMEVTYPER_N_EL0_NSK 0x20000000U
8972#define AARCH64_PMEVTYPER_N_EL0_U 0x40000000U
8974#define AARCH64_PMEVTYPER_N_EL0_P 0x80000000U
8976static inline uint64_t _AArch64_Read_pmevtyper_n_el0(
void )
8981 "mrs %0, PMEVTYPER_N_EL0" :
"=&r" ( value ) : :
"memory"
8987static inline void _AArch64_Write_pmevtyper_n_el0( uint64_t value )
8990 "msr PMEVTYPER_N_EL0, %0" : :
"r" ( value ) :
"memory"
8996#define AARCH64_PMINTENCLR_EL1_C 0x80000000U
8998static inline uint64_t _AArch64_Read_pmintenclr_el1(
void )
9003 "mrs %0, PMINTENCLR_EL1" :
"=&r" ( value ) : :
"memory"
9009static inline void _AArch64_Write_pmintenclr_el1( uint64_t value )
9012 "msr PMINTENCLR_EL1, %0" : :
"r" ( value ) :
"memory"
9018#define AARCH64_PMINTENSET_EL1_C 0x80000000U
9020static inline uint64_t _AArch64_Read_pmintenset_el1(
void )
9025 "mrs %0, PMINTENSET_EL1" :
"=&r" ( value ) : :
"memory"
9031static inline void _AArch64_Write_pmintenset_el1( uint64_t value )
9034 "msr PMINTENSET_EL1, %0" : :
"r" ( value ) :
"memory"
9040#define AARCH64_PMMIR_EL1_SLOTS( _val ) ( ( _val ) << 0 )
9041#define AARCH64_PMMIR_EL1_SLOTS_SHIFT 0
9042#define AARCH64_PMMIR_EL1_SLOTS_MASK 0xffU
9043#define AARCH64_PMMIR_EL1_SLOTS_GET( _reg ) \
9044 ( ( ( _reg ) >> 0 ) & 0xffU )
9046static inline uint64_t _AArch64_Read_pmmir_el1(
void )
9051 "mrs %0, PMMIR_EL1" :
"=&r" ( value ) : :
"memory"
9059#define AARCH64_PMOVSCLR_EL0_C 0x80000000U
9061static inline uint64_t _AArch64_Read_pmovsclr_el0(
void )
9066 "mrs %0, PMOVSCLR_EL0" :
"=&r" ( value ) : :
"memory"
9072static inline void _AArch64_Write_pmovsclr_el0( uint64_t value )
9075 "msr PMOVSCLR_EL0, %0" : :
"r" ( value ) :
"memory"
9081#define AARCH64_PMOVSSET_EL0_C 0x80000000U
9083static inline uint64_t _AArch64_Read_pmovsset_el0(
void )
9088 "mrs %0, PMOVSSET_EL0" :
"=&r" ( value ) : :
"memory"
9094static inline void _AArch64_Write_pmovsset_el0( uint64_t value )
9097 "msr PMOVSSET_EL0, %0" : :
"r" ( value ) :
"memory"
9103#define AARCH64_PMSELR_EL0_SEL( _val ) ( ( _val ) << 0 )
9104#define AARCH64_PMSELR_EL0_SEL_SHIFT 0
9105#define AARCH64_PMSELR_EL0_SEL_MASK 0x1fU
9106#define AARCH64_PMSELR_EL0_SEL_GET( _reg ) \
9107 ( ( ( _reg ) >> 0 ) & 0x1fU )
9109static inline uint64_t _AArch64_Read_pmselr_el0(
void )
9114 "mrs %0, PMSELR_EL0" :
"=&r" ( value ) : :
"memory"
9120static inline void _AArch64_Write_pmselr_el0( uint64_t value )
9123 "msr PMSELR_EL0, %0" : :
"r" ( value ) :
"memory"
9129static inline void _AArch64_Write_pmswinc_el0( uint64_t value )
9132 "msr PMSWINC_EL0, %0" : :
"r" ( value ) :
"memory"
9138#define AARCH64_PMUSERENR_EL0_EN 0x1U
9140#define AARCH64_PMUSERENR_EL0_SW 0x2U
9142#define AARCH64_PMUSERENR_EL0_CR 0x4U
9144#define AARCH64_PMUSERENR_EL0_ER 0x8U
9146static inline uint64_t _AArch64_Read_pmuserenr_el0(
void )
9151 "mrs %0, PMUSERENR_EL0" :
"=&r" ( value ) : :
"memory"
9157static inline void _AArch64_Write_pmuserenr_el0( uint64_t value )
9160 "msr PMUSERENR_EL0, %0" : :
"r" ( value ) :
"memory"
9166#define AARCH64_PMXEVCNTR_EL0_PMEVCNTR_N( _val ) ( ( _val ) << 0 )
9167#define AARCH64_PMXEVCNTR_EL0_PMEVCNTR_N_SHIFT 0
9168#define AARCH64_PMXEVCNTR_EL0_PMEVCNTR_N_MASK 0xffffffffU
9169#define AARCH64_PMXEVCNTR_EL0_PMEVCNTR_N_GET( _reg ) \
9170 ( ( ( _reg ) >> 0 ) & 0xffffffffU )
9172static inline uint64_t _AArch64_Read_pmxevcntr_el0(
void )
9177 "mrs %0, PMXEVCNTR_EL0" :
"=&r" ( value ) : :
"memory"
9183static inline void _AArch64_Write_pmxevcntr_el0( uint64_t value )
9186 "msr PMXEVCNTR_EL0, %0" : :
"r" ( value ) :
"memory"
9192static inline uint64_t _AArch64_Read_pmxevtyper_el0(
void )
9197 "mrs %0, PMXEVTYPER_EL0" :
"=&r" ( value ) : :
"memory"
9203static inline void _AArch64_Write_pmxevtyper_el0( uint64_t value )
9206 "msr PMXEVTYPER_EL0, %0" : :
"r" ( value ) :
"memory"
9212#define AARCH64_AMCFGR_EL0_N( _val ) ( ( _val ) << 0 )
9213#define AARCH64_AMCFGR_EL0_N_SHIFT 0
9214#define AARCH64_AMCFGR_EL0_N_MASK 0xffU
9215#define AARCH64_AMCFGR_EL0_N_GET( _reg ) \
9216 ( ( ( _reg ) >> 0 ) & 0xffU )
9218#define AARCH64_AMCFGR_EL0_SIZE( _val ) ( ( _val ) << 8 )
9219#define AARCH64_AMCFGR_EL0_SIZE_SHIFT 8
9220#define AARCH64_AMCFGR_EL0_SIZE_MASK 0x3f00U
9221#define AARCH64_AMCFGR_EL0_SIZE_GET( _reg ) \
9222 ( ( ( _reg ) >> 8 ) & 0x3fU )
9224#define AARCH64_AMCFGR_EL0_HDBG 0x1000000U
9226#define AARCH64_AMCFGR_EL0_NCG( _val ) ( ( _val ) << 28 )
9227#define AARCH64_AMCFGR_EL0_NCG_SHIFT 28
9228#define AARCH64_AMCFGR_EL0_NCG_MASK 0xf0000000U
9229#define AARCH64_AMCFGR_EL0_NCG_GET( _reg ) \
9230 ( ( ( _reg ) >> 28 ) & 0xfU )
9232static inline uint64_t _AArch64_Read_amcfgr_el0(
void )
9237 "mrs %0, AMCFGR_EL0" :
"=&r" ( value ) : :
"memory"
9245static inline uint64_t _AArch64_Read_amcg1idr_el0(
void )
9250 "mrs %0, AMCG1IDR_EL0" :
"=&r" ( value ) : :
"memory"
9258#define AARCH64_AMCGCR_EL0_CG0NC( _val ) ( ( _val ) << 0 )
9259#define AARCH64_AMCGCR_EL0_CG0NC_SHIFT 0
9260#define AARCH64_AMCGCR_EL0_CG0NC_MASK 0xffU
9261#define AARCH64_AMCGCR_EL0_CG0NC_GET( _reg ) \
9262 ( ( ( _reg ) >> 0 ) & 0xffU )
9264#define AARCH64_AMCGCR_EL0_CG1NC( _val ) ( ( _val ) << 8 )
9265#define AARCH64_AMCGCR_EL0_CG1NC_SHIFT 8
9266#define AARCH64_AMCGCR_EL0_CG1NC_MASK 0xff00U
9267#define AARCH64_AMCGCR_EL0_CG1NC_GET( _reg ) \
9268 ( ( ( _reg ) >> 8 ) & 0xffU )
9270static inline uint64_t _AArch64_Read_amcgcr_el0(
void )
9275 "mrs %0, AMCGCR_EL0" :
"=&r" ( value ) : :
"memory"
9283static inline uint64_t _AArch64_Read_amcntenclr0_el0(
void )
9288 "mrs %0, AMCNTENCLR0_EL0" :
"=&r" ( value ) : :
"memory"
9294static inline void _AArch64_Write_amcntenclr0_el0( uint64_t value )
9297 "msr AMCNTENCLR0_EL0, %0" : :
"r" ( value ) :
"memory"
9303static inline uint64_t _AArch64_Read_amcntenclr1_el0(
void )
9308 "mrs %0, AMCNTENCLR1_EL0" :
"=&r" ( value ) : :
"memory"
9314static inline void _AArch64_Write_amcntenclr1_el0( uint64_t value )
9317 "msr AMCNTENCLR1_EL0, %0" : :
"r" ( value ) :
"memory"
9323static inline uint64_t _AArch64_Read_amcntenset0_el0(
void )
9328 "mrs %0, AMCNTENSET0_EL0" :
"=&r" ( value ) : :
"memory"
9334static inline void _AArch64_Write_amcntenset0_el0( uint64_t value )
9337 "msr AMCNTENSET0_EL0, %0" : :
"r" ( value ) :
"memory"
9343static inline uint64_t _AArch64_Read_amcntenset1_el0(
void )
9348 "mrs %0, AMCNTENSET1_EL0" :
"=&r" ( value ) : :
"memory"
9354static inline void _AArch64_Write_amcntenset1_el0( uint64_t value )
9357 "msr AMCNTENSET1_EL0, %0" : :
"r" ( value ) :
"memory"
9363#define AARCH64_AMCR_EL0_HDBG 0x400U
9365#define AARCH64_AMCR_EL0_CG1RZ 0x20000U
9367static inline uint64_t _AArch64_Read_amcr_el0(
void )
9372 "mrs %0, AMCR_EL0" :
"=&r" ( value ) : :
"memory"
9378static inline void _AArch64_Write_amcr_el0( uint64_t value )
9381 "msr AMCR_EL0, %0" : :
"r" ( value ) :
"memory"
9387static inline uint64_t _AArch64_Read_amevcntr0_n_el0(
void )
9392 "mrs %0, AMEVCNTR0_N_EL0" :
"=&r" ( value ) : :
"memory"
9398static inline void _AArch64_Write_amevcntr0_n_el0( uint64_t value )
9401 "msr AMEVCNTR0_N_EL0, %0" : :
"r" ( value ) :
"memory"
9407static inline uint64_t _AArch64_Read_amevcntr1_n_el0(
void )
9412 "mrs %0, AMEVCNTR1_N_EL0" :
"=&r" ( value ) : :
"memory"
9418static inline void _AArch64_Write_amevcntr1_n_el0( uint64_t value )
9421 "msr AMEVCNTR1_N_EL0, %0" : :
"r" ( value ) :
"memory"
9427static inline uint64_t _AArch64_Read_amevcntvoff0_n_el2(
void )
9432 "mrs %0, AMEVCNTVOFF0_N_EL2" :
"=&r" ( value ) : :
"memory"
9438static inline void _AArch64_Write_amevcntvoff0_n_el2( uint64_t value )
9441 "msr AMEVCNTVOFF0_N_EL2, %0" : :
"r" ( value ) :
"memory"
9447static inline uint64_t _AArch64_Read_amevcntvoff1_n_el2(
void )
9452 "mrs %0, AMEVCNTVOFF1_N_EL2" :
"=&r" ( value ) : :
"memory"
9458static inline void _AArch64_Write_amevcntvoff1_n_el2( uint64_t value )
9461 "msr AMEVCNTVOFF1_N_EL2, %0" : :
"r" ( value ) :
"memory"
9467#define AARCH64_AMEVTYPER0_N_EL0_EVTCOUNT( _val ) ( ( _val ) << 0 )
9468#define AARCH64_AMEVTYPER0_N_EL0_EVTCOUNT_SHIFT 0
9469#define AARCH64_AMEVTYPER0_N_EL0_EVTCOUNT_MASK 0xffffU
9470#define AARCH64_AMEVTYPER0_N_EL0_EVTCOUNT_GET( _reg ) \
9471 ( ( ( _reg ) >> 0 ) & 0xffffU )
9473static inline uint64_t _AArch64_Read_amevtyper0_n_el0(
void )
9478 "mrs %0, AMEVTYPER0_N_EL0" :
"=&r" ( value ) : :
"memory"
9486#define AARCH64_AMEVTYPER1_N_EL0_EVTCOUNT( _val ) ( ( _val ) << 0 )
9487#define AARCH64_AMEVTYPER1_N_EL0_EVTCOUNT_SHIFT 0
9488#define AARCH64_AMEVTYPER1_N_EL0_EVTCOUNT_MASK 0xffffU
9489#define AARCH64_AMEVTYPER1_N_EL0_EVTCOUNT_GET( _reg ) \
9490 ( ( ( _reg ) >> 0 ) & 0xffffU )
9492static inline uint64_t _AArch64_Read_amevtyper1_n_el0(
void )
9497 "mrs %0, AMEVTYPER1_N_EL0" :
"=&r" ( value ) : :
"memory"
9503static inline void _AArch64_Write_amevtyper1_n_el0( uint64_t value )
9506 "msr AMEVTYPER1_N_EL0, %0" : :
"r" ( value ) :
"memory"
9512#define AARCH64_AMUSERENR_EL0_EN 0x1U
9514static inline uint64_t _AArch64_Read_amuserenr_el0(
void )
9519 "mrs %0, AMUSERENR_EL0" :
"=&r" ( value ) : :
"memory"
9525static inline void _AArch64_Write_amuserenr_el0( uint64_t value )
9528 "msr AMUSERENR_EL0, %0" : :
"r" ( value ) :
"memory"
9534#define AARCH64_PMBIDR_EL1_ALIGN( _val ) ( ( _val ) << 0 )
9535#define AARCH64_PMBIDR_EL1_ALIGN_SHIFT 0
9536#define AARCH64_PMBIDR_EL1_ALIGN_MASK 0xfU
9537#define AARCH64_PMBIDR_EL1_ALIGN_GET( _reg ) \
9538 ( ( ( _reg ) >> 0 ) & 0xfU )
9540#define AARCH64_PMBIDR_EL1_P 0x10U
9542#define AARCH64_PMBIDR_EL1_F 0x20U
9544static inline uint64_t _AArch64_Read_pmbidr_el1(
void )
9549 "mrs %0, PMBIDR_EL1" :
"=&r" ( value ) : :
"memory"
9557#define AARCH64_PMBLIMITR_EL1_E 0x1U
9559#define AARCH64_PMBLIMITR_EL1_FM( _val ) ( ( _val ) << 1 )
9560#define AARCH64_PMBLIMITR_EL1_FM_SHIFT 1
9561#define AARCH64_PMBLIMITR_EL1_FM_MASK 0x6U
9562#define AARCH64_PMBLIMITR_EL1_FM_GET( _reg ) \
9563 ( ( ( _reg ) >> 1 ) & 0x3U )
9565#define AARCH64_PMBLIMITR_EL1_LIMIT( _val ) ( ( _val ) << 12 )
9566#define AARCH64_PMBLIMITR_EL1_LIMIT_SHIFT 12
9567#define AARCH64_PMBLIMITR_EL1_LIMIT_MASK 0xfffffffffffff000ULL
9568#define AARCH64_PMBLIMITR_EL1_LIMIT_GET( _reg ) \
9569 ( ( ( _reg ) >> 12 ) & 0xfffffffffffffULL )
9571static inline uint64_t _AArch64_Read_pmblimitr_el1(
void )
9576 "mrs %0, PMBLIMITR_EL1" :
"=&r" ( value ) : :
"memory"
9582static inline void _AArch64_Write_pmblimitr_el1( uint64_t value )
9585 "msr PMBLIMITR_EL1, %0" : :
"r" ( value ) :
"memory"
9591static inline uint64_t _AArch64_Read_pmbptr_el1(
void )
9596 "mrs %0, PMBPTR_EL1" :
"=&r" ( value ) : :
"memory"
9602static inline void _AArch64_Write_pmbptr_el1( uint64_t value )
9605 "msr PMBPTR_EL1, %0" : :
"r" ( value ) :
"memory"
9611#define AARCH64_PMBSR_EL1_BSC( _val ) ( ( _val ) << 0 )
9612#define AARCH64_PMBSR_EL1_BSC_SHIFT 0
9613#define AARCH64_PMBSR_EL1_BSC_MASK 0x3fU
9614#define AARCH64_PMBSR_EL1_BSC_GET( _reg ) \
9615 ( ( ( _reg ) >> 0 ) & 0x3fU )
9617#define AARCH64_PMBSR_EL1_FSC( _val ) ( ( _val ) << 0 )
9618#define AARCH64_PMBSR_EL1_FSC_SHIFT 0
9619#define AARCH64_PMBSR_EL1_FSC_MASK 0x3fU
9620#define AARCH64_PMBSR_EL1_FSC_GET( _reg ) \
9621 ( ( ( _reg ) >> 0 ) & 0x3fU )
9623#define AARCH64_PMBSR_EL1_MSS( _val ) ( ( _val ) << 0 )
9624#define AARCH64_PMBSR_EL1_MSS_SHIFT 0
9625#define AARCH64_PMBSR_EL1_MSS_MASK 0xffffU
9626#define AARCH64_PMBSR_EL1_MSS_GET( _reg ) \
9627 ( ( ( _reg ) >> 0 ) & 0xffffU )
9629#define AARCH64_PMBSR_EL1_COLL 0x10000U
9631#define AARCH64_PMBSR_EL1_S 0x20000U
9633#define AARCH64_PMBSR_EL1_EA 0x40000U
9635#define AARCH64_PMBSR_EL1_DL 0x80000U
9637#define AARCH64_PMBSR_EL1_EC( _val ) ( ( _val ) << 26 )
9638#define AARCH64_PMBSR_EL1_EC_SHIFT 26
9639#define AARCH64_PMBSR_EL1_EC_MASK 0xfc000000U
9640#define AARCH64_PMBSR_EL1_EC_GET( _reg ) \
9641 ( ( ( _reg ) >> 26 ) & 0x3fU )
9643static inline uint64_t _AArch64_Read_pmbsr_el1(
void )
9648 "mrs %0, PMBSR_EL1" :
"=&r" ( value ) : :
"memory"
9654static inline void _AArch64_Write_pmbsr_el1( uint64_t value )
9657 "msr PMBSR_EL1, %0" : :
"r" ( value ) :
"memory"
9663#define AARCH64_PMSCR_EL1_E0SPE 0x1U
9665#define AARCH64_PMSCR_EL1_E1SPE 0x2U
9667#define AARCH64_PMSCR_EL1_CX 0x8U
9669#define AARCH64_PMSCR_EL1_PA 0x10U
9671#define AARCH64_PMSCR_EL1_TS 0x20U
9673#define AARCH64_PMSCR_EL1_PCT( _val ) ( ( _val ) << 6 )
9674#define AARCH64_PMSCR_EL1_PCT_SHIFT 6
9675#define AARCH64_PMSCR_EL1_PCT_MASK 0xc0U
9676#define AARCH64_PMSCR_EL1_PCT_GET( _reg ) \
9677 ( ( ( _reg ) >> 6 ) & 0x3U )
9679static inline uint64_t _AArch64_Read_pmscr_el1(
void )
9684 "mrs %0, PMSCR_EL1" :
"=&r" ( value ) : :
"memory"
9690static inline void _AArch64_Write_pmscr_el1( uint64_t value )
9693 "msr PMSCR_EL1, %0" : :
"r" ( value ) :
"memory"
9699#define AARCH64_PMSCR_EL2_E0HSPE 0x1U
9701#define AARCH64_PMSCR_EL2_E2SPE 0x2U
9703#define AARCH64_PMSCR_EL2_CX 0x8U
9705#define AARCH64_PMSCR_EL2_PA 0x10U
9707#define AARCH64_PMSCR_EL2_TS 0x20U
9709#define AARCH64_PMSCR_EL2_PCT( _val ) ( ( _val ) << 6 )
9710#define AARCH64_PMSCR_EL2_PCT_SHIFT 6
9711#define AARCH64_PMSCR_EL2_PCT_MASK 0xc0U
9712#define AARCH64_PMSCR_EL2_PCT_GET( _reg ) \
9713 ( ( ( _reg ) >> 6 ) & 0x3U )
9715static inline uint64_t _AArch64_Read_pmscr_el2(
void )
9720 "mrs %0, PMSCR_EL2" :
"=&r" ( value ) : :
"memory"
9726static inline void _AArch64_Write_pmscr_el2( uint64_t value )
9729 "msr PMSCR_EL2, %0" : :
"r" ( value ) :
"memory"
9735#define AARCH64_PMSEVFR_EL1_E_1 0x2U
9737#define AARCH64_PMSEVFR_EL1_E_3 0x8U
9739#define AARCH64_PMSEVFR_EL1_E_5 0x20U
9741#define AARCH64_PMSEVFR_EL1_E_7 0x80U
9743#define AARCH64_PMSEVFR_EL1_E_11 0x800U
9745#define AARCH64_PMSEVFR_EL1_E_12 0x1000U
9747#define AARCH64_PMSEVFR_EL1_E_13 0x2000U
9749#define AARCH64_PMSEVFR_EL1_E_14 0x4000U
9751#define AARCH64_PMSEVFR_EL1_E_15 0x8000U
9753#define AARCH64_PMSEVFR_EL1_E_17 0x20000U
9755#define AARCH64_PMSEVFR_EL1_E_18 0x40000U
9757#define AARCH64_PMSEVFR_EL1_E_24 0x1000000U
9759#define AARCH64_PMSEVFR_EL1_E_25 0x2000000U
9761#define AARCH64_PMSEVFR_EL1_E_26 0x4000000U
9763#define AARCH64_PMSEVFR_EL1_E_27 0x8000000U
9765#define AARCH64_PMSEVFR_EL1_E_28 0x10000000U
9767#define AARCH64_PMSEVFR_EL1_E_29 0x20000000U
9769#define AARCH64_PMSEVFR_EL1_E_30 0x40000000U
9771#define AARCH64_PMSEVFR_EL1_E_31 0x80000000U
9773#define AARCH64_PMSEVFR_EL1_E_48 0x1000000000000ULL
9775#define AARCH64_PMSEVFR_EL1_E_49 0x2000000000000ULL
9777#define AARCH64_PMSEVFR_EL1_E_50 0x4000000000000ULL
9779#define AARCH64_PMSEVFR_EL1_E_51 0x8000000000000ULL
9781#define AARCH64_PMSEVFR_EL1_E_52 0x10000000000000ULL
9783#define AARCH64_PMSEVFR_EL1_E_53 0x20000000000000ULL
9785#define AARCH64_PMSEVFR_EL1_E_54 0x40000000000000ULL
9787#define AARCH64_PMSEVFR_EL1_E_55 0x80000000000000ULL
9789#define AARCH64_PMSEVFR_EL1_E_56 0x100000000000000ULL
9791#define AARCH64_PMSEVFR_EL1_E_57 0x200000000000000ULL
9793#define AARCH64_PMSEVFR_EL1_E_58 0x400000000000000ULL
9795#define AARCH64_PMSEVFR_EL1_E_59 0x800000000000000ULL
9797#define AARCH64_PMSEVFR_EL1_E_60 0x1000000000000000ULL
9799#define AARCH64_PMSEVFR_EL1_E_61 0x2000000000000000ULL
9801#define AARCH64_PMSEVFR_EL1_E_62 0x4000000000000000ULL
9803#define AARCH64_PMSEVFR_EL1_E_63 0x8000000000000000ULL
9805static inline uint64_t _AArch64_Read_pmsevfr_el1(
void )
9810 "mrs %0, PMSEVFR_EL1" :
"=&r" ( value ) : :
"memory"
9816static inline void _AArch64_Write_pmsevfr_el1( uint64_t value )
9819 "msr PMSEVFR_EL1, %0" : :
"r" ( value ) :
"memory"
9825#define AARCH64_PMSFCR_EL1_FE 0x1U
9827#define AARCH64_PMSFCR_EL1_FT 0x2U
9829#define AARCH64_PMSFCR_EL1_FL 0x4U
9831#define AARCH64_PMSFCR_EL1_B 0x10000U
9833#define AARCH64_PMSFCR_EL1_LD 0x20000U
9835#define AARCH64_PMSFCR_EL1_ST 0x40000U
9837static inline uint64_t _AArch64_Read_pmsfcr_el1(
void )
9842 "mrs %0, PMSFCR_EL1" :
"=&r" ( value ) : :
"memory"
9848static inline void _AArch64_Write_pmsfcr_el1( uint64_t value )
9851 "msr PMSFCR_EL1, %0" : :
"r" ( value ) :
"memory"
9857#define AARCH64_PMSICR_EL1_COUNT( _val ) ( ( _val ) << 0 )
9858#define AARCH64_PMSICR_EL1_COUNT_SHIFT 0
9859#define AARCH64_PMSICR_EL1_COUNT_MASK 0xffffffffU
9860#define AARCH64_PMSICR_EL1_COUNT_GET( _reg ) \
9861 ( ( ( _reg ) >> 0 ) & 0xffffffffU )
9863#define AARCH64_PMSICR_EL1_ECOUNT( _val ) ( ( _val ) << 56 )
9864#define AARCH64_PMSICR_EL1_ECOUNT_SHIFT 56
9865#define AARCH64_PMSICR_EL1_ECOUNT_MASK 0xff00000000000000ULL
9866#define AARCH64_PMSICR_EL1_ECOUNT_GET( _reg ) \
9867 ( ( ( _reg ) >> 56 ) & 0xffULL )
9869static inline uint64_t _AArch64_Read_pmsicr_el1(
void )
9874 "mrs %0, PMSICR_EL1" :
"=&r" ( value ) : :
"memory"
9880static inline void _AArch64_Write_pmsicr_el1( uint64_t value )
9883 "msr PMSICR_EL1, %0" : :
"r" ( value ) :
"memory"
9889#define AARCH64_PMSIDR_EL1_FE 0x1U
9891#define AARCH64_PMSIDR_EL1_FT 0x2U
9893#define AARCH64_PMSIDR_EL1_FL 0x4U
9895#define AARCH64_PMSIDR_EL1_ARCHINST 0x8U
9897#define AARCH64_PMSIDR_EL1_LDS 0x10U
9899#define AARCH64_PMSIDR_EL1_ERND 0x20U
9901#define AARCH64_PMSIDR_EL1_INTERVAL( _val ) ( ( _val ) << 8 )
9902#define AARCH64_PMSIDR_EL1_INTERVAL_SHIFT 8
9903#define AARCH64_PMSIDR_EL1_INTERVAL_MASK 0xf00U
9904#define AARCH64_PMSIDR_EL1_INTERVAL_GET( _reg ) \
9905 ( ( ( _reg ) >> 8 ) & 0xfU )
9907#define AARCH64_PMSIDR_EL1_MAXSIZE( _val ) ( ( _val ) << 12 )
9908#define AARCH64_PMSIDR_EL1_MAXSIZE_SHIFT 12
9909#define AARCH64_PMSIDR_EL1_MAXSIZE_MASK 0xf000U
9910#define AARCH64_PMSIDR_EL1_MAXSIZE_GET( _reg ) \
9911 ( ( ( _reg ) >> 12 ) & 0xfU )
9913#define AARCH64_PMSIDR_EL1_COUNTSIZE( _val ) ( ( _val ) << 16 )
9914#define AARCH64_PMSIDR_EL1_COUNTSIZE_SHIFT 16
9915#define AARCH64_PMSIDR_EL1_COUNTSIZE_MASK 0xf0000U
9916#define AARCH64_PMSIDR_EL1_COUNTSIZE_GET( _reg ) \
9917 ( ( ( _reg ) >> 16 ) & 0xfU )
9919static inline uint64_t _AArch64_Read_pmsidr_el1(
void )
9924 "mrs %0, PMSIDR_EL1" :
"=&r" ( value ) : :
"memory"
9932#define AARCH64_PMSIRR_EL1_RND 0x1U
9934#define AARCH64_PMSIRR_EL1_INTERVAL( _val ) ( ( _val ) << 8 )
9935#define AARCH64_PMSIRR_EL1_INTERVAL_SHIFT 8
9936#define AARCH64_PMSIRR_EL1_INTERVAL_MASK 0xffffff00U
9937#define AARCH64_PMSIRR_EL1_INTERVAL_GET( _reg ) \
9938 ( ( ( _reg ) >> 8 ) & 0xffffffU )
9940static inline uint64_t _AArch64_Read_pmsirr_el1(
void )
9945 "mrs %0, PMSIRR_EL1" :
"=&r" ( value ) : :
"memory"
9951static inline void _AArch64_Write_pmsirr_el1( uint64_t value )
9954 "msr PMSIRR_EL1, %0" : :
"r" ( value ) :
"memory"
9960#define AARCH64_PMSLATFR_EL1_MINLAT( _val ) ( ( _val ) << 0 )
9961#define AARCH64_PMSLATFR_EL1_MINLAT_SHIFT 0
9962#define AARCH64_PMSLATFR_EL1_MINLAT_MASK 0xfffU
9963#define AARCH64_PMSLATFR_EL1_MINLAT_GET( _reg ) \
9964 ( ( ( _reg ) >> 0 ) & 0xfffU )
9966static inline uint64_t _AArch64_Read_pmslatfr_el1(
void )
9971 "mrs %0, PMSLATFR_EL1" :
"=&r" ( value ) : :
"memory"
9977static inline void _AArch64_Write_pmslatfr_el1( uint64_t value )
9980 "msr PMSLATFR_EL1, %0" : :
"r" ( value ) :
"memory"
9986#define AARCH64_DISR_EL1_DFSC( _val ) ( ( _val ) << 0 )
9987#define AARCH64_DISR_EL1_DFSC_SHIFT 0
9988#define AARCH64_DISR_EL1_DFSC_MASK 0x3fU
9989#define AARCH64_DISR_EL1_DFSC_GET( _reg ) \
9990 ( ( ( _reg ) >> 0 ) & 0x3fU )
9992#define AARCH64_DISR_EL1_ISS( _val ) ( ( _val ) << 0 )
9993#define AARCH64_DISR_EL1_ISS_SHIFT 0
9994#define AARCH64_DISR_EL1_ISS_MASK 0xffffffU
9995#define AARCH64_DISR_EL1_ISS_GET( _reg ) \
9996 ( ( ( _reg ) >> 0 ) & 0xffffffU )
9998#define AARCH64_DISR_EL1_EA 0x200U
10000#define AARCH64_DISR_EL1_AET( _val ) ( ( _val ) << 10 )
10001#define AARCH64_DISR_EL1_AET_SHIFT 10
10002#define AARCH64_DISR_EL1_AET_MASK 0x1c00U
10003#define AARCH64_DISR_EL1_AET_GET( _reg ) \
10004 ( ( ( _reg ) >> 10 ) & 0x7U )
10006#define AARCH64_DISR_EL1_IDS 0x1000000U
10008#define AARCH64_DISR_EL1_A 0x80000000U
10010static inline uint64_t _AArch64_Read_disr_el1(
void )
10015 "mrs %0, DISR_EL1" :
"=&r" ( value ) : :
"memory"
10021static inline void _AArch64_Write_disr_el1( uint64_t value )
10024 "msr DISR_EL1, %0" : :
"r" ( value ) :
"memory"
10030#define AARCH64_ERRIDR_EL1_NUM( _val ) ( ( _val ) << 0 )
10031#define AARCH64_ERRIDR_EL1_NUM_SHIFT 0
10032#define AARCH64_ERRIDR_EL1_NUM_MASK 0xffffU
10033#define AARCH64_ERRIDR_EL1_NUM_GET( _reg ) \
10034 ( ( ( _reg ) >> 0 ) & 0xffffU )
10036static inline uint64_t _AArch64_Read_erridr_el1(
void )
10041 "mrs %0, ERRIDR_EL1" :
"=&r" ( value ) : :
"memory"
10049#define AARCH64_ERRSELR_EL1_SEL( _val ) ( ( _val ) << 0 )
10050#define AARCH64_ERRSELR_EL1_SEL_SHIFT 0
10051#define AARCH64_ERRSELR_EL1_SEL_MASK 0xffffU
10052#define AARCH64_ERRSELR_EL1_SEL_GET( _reg ) \
10053 ( ( ( _reg ) >> 0 ) & 0xffffU )
10055static inline uint64_t _AArch64_Read_errselr_el1(
void )
10060 "mrs %0, ERRSELR_EL1" :
"=&r" ( value ) : :
"memory"
10066static inline void _AArch64_Write_errselr_el1( uint64_t value )
10069 "msr ERRSELR_EL1, %0" : :
"r" ( value ) :
"memory"
10075static inline uint64_t _AArch64_Read_erxaddr_el1(
void )
10080 "mrs %0, ERXADDR_EL1" :
"=&r" ( value ) : :
"memory"
10086static inline void _AArch64_Write_erxaddr_el1( uint64_t value )
10089 "msr ERXADDR_EL1, %0" : :
"r" ( value ) :
"memory"
10095static inline uint64_t _AArch64_Read_erxctlr_el1(
void )
10100 "mrs %0, ERXCTLR_EL1" :
"=&r" ( value ) : :
"memory"
10106static inline void _AArch64_Write_erxctlr_el1( uint64_t value )
10109 "msr ERXCTLR_EL1, %0" : :
"r" ( value ) :
"memory"
10115static inline uint64_t _AArch64_Read_erxfr_el1(
void )
10120 "mrs %0, ERXFR_EL1" :
"=&r" ( value ) : :
"memory"
10128static inline uint64_t _AArch64_Read_erxmisc0_el1(
void )
10133 "mrs %0, ERXMISC0_EL1" :
"=&r" ( value ) : :
"memory"
10139static inline void _AArch64_Write_erxmisc0_el1( uint64_t value )
10142 "msr ERXMISC0_EL1, %0" : :
"r" ( value ) :
"memory"
10148static inline uint64_t _AArch64_Read_erxmisc1_el1(
void )
10153 "mrs %0, ERXMISC1_EL1" :
"=&r" ( value ) : :
"memory"
10159static inline void _AArch64_Write_erxmisc1_el1( uint64_t value )
10162 "msr ERXMISC1_EL1, %0" : :
"r" ( value ) :
"memory"
10168static inline uint64_t _AArch64_Read_erxmisc2_el1(
void )
10173 "mrs %0, ERXMISC2_EL1" :
"=&r" ( value ) : :
"memory"
10179static inline void _AArch64_Write_erxmisc2_el1( uint64_t value )
10182 "msr ERXMISC2_EL1, %0" : :
"r" ( value ) :
"memory"
10188static inline uint64_t _AArch64_Read_erxmisc3_el1(
void )
10193 "mrs %0, ERXMISC3_EL1" :
"=&r" ( value ) : :
"memory"
10199static inline void _AArch64_Write_erxmisc3_el1( uint64_t value )
10202 "msr ERXMISC3_EL1, %0" : :
"r" ( value ) :
"memory"
10208static inline uint64_t _AArch64_Read_erxpfgcdn_el1(
void )
10213 "mrs %0, ERXPFGCDN_EL1" :
"=&r" ( value ) : :
"memory"
10219static inline void _AArch64_Write_erxpfgcdn_el1( uint64_t value )
10222 "msr ERXPFGCDN_EL1, %0" : :
"r" ( value ) :
"memory"
10228static inline uint64_t _AArch64_Read_erxpfgctl_el1(
void )
10233 "mrs %0, ERXPFGCTL_EL1" :
"=&r" ( value ) : :
"memory"
10239static inline void _AArch64_Write_erxpfgctl_el1( uint64_t value )
10242 "msr ERXPFGCTL_EL1, %0" : :
"r" ( value ) :
"memory"
10248static inline uint64_t _AArch64_Read_erxpfgf_el1(
void )
10253 "mrs %0, ERXPFGF_EL1" :
"=&r" ( value ) : :
"memory"
10261static inline uint64_t _AArch64_Read_erxstatus_el1(
void )
10266 "mrs %0, ERXSTATUS_EL1" :
"=&r" ( value ) : :
"memory"
10272static inline void _AArch64_Write_erxstatus_el1( uint64_t value )
10275 "msr ERXSTATUS_EL1, %0" : :
"r" ( value ) :
"memory"
10281#define AARCH64_VDISR_EL2_FS_3_0( _val ) ( ( _val ) << 0 )
10282#define AARCH64_VDISR_EL2_FS_3_0_SHIFT 0
10283#define AARCH64_VDISR_EL2_FS_3_0_MASK 0xfU
10284#define AARCH64_VDISR_EL2_FS_3_0_GET( _reg ) \
10285 ( ( ( _reg ) >> 0 ) & 0xfU )
10287#define AARCH64_VDISR_EL2_STATUS( _val ) ( ( _val ) << 0 )
10288#define AARCH64_VDISR_EL2_STATUS_SHIFT 0
10289#define AARCH64_VDISR_EL2_STATUS_MASK 0x3fU
10290#define AARCH64_VDISR_EL2_STATUS_GET( _reg ) \
10291 ( ( ( _reg ) >> 0 ) & 0x3fU )
10293#define AARCH64_VDISR_EL2_ISS( _val ) ( ( _val ) << 0 )
10294#define AARCH64_VDISR_EL2_ISS_SHIFT 0
10295#define AARCH64_VDISR_EL2_ISS_MASK 0xffffffU
10296#define AARCH64_VDISR_EL2_ISS_GET( _reg ) \
10297 ( ( ( _reg ) >> 0 ) & 0xffffffU )
10299#define AARCH64_VDISR_EL2_LPAE 0x200U
10301#define AARCH64_VDISR_EL2_FS_4 0x400U
10303#define AARCH64_VDISR_EL2_EXT 0x1000U
10305#define AARCH64_VDISR_EL2_AET( _val ) ( ( _val ) << 14 )
10306#define AARCH64_VDISR_EL2_AET_SHIFT 14
10307#define AARCH64_VDISR_EL2_AET_MASK 0xc000U
10308#define AARCH64_VDISR_EL2_AET_GET( _reg ) \
10309 ( ( ( _reg ) >> 14 ) & 0x3U )
10311#define AARCH64_VDISR_EL2_IDS 0x1000000U
10313#define AARCH64_VDISR_EL2_A 0x80000000U
10315static inline uint64_t _AArch64_Read_vdisr_el2(
void )
10320 "mrs %0, VDISR_EL2" :
"=&r" ( value ) : :
"memory"
10326static inline void _AArch64_Write_vdisr_el2( uint64_t value )
10329 "msr VDISR_EL2, %0" : :
"r" ( value ) :
"memory"
10335#define AARCH64_VSESR_EL2_ISS( _val ) ( ( _val ) << 0 )
10336#define AARCH64_VSESR_EL2_ISS_SHIFT 0
10337#define AARCH64_VSESR_EL2_ISS_MASK 0xffffffU
10338#define AARCH64_VSESR_EL2_ISS_GET( _reg ) \
10339 ( ( ( _reg ) >> 0 ) & 0xffffffU )
10341#define AARCH64_VSESR_EL2_EXT 0x1000U
10343#define AARCH64_VSESR_EL2_AET( _val ) ( ( _val ) << 14 )
10344#define AARCH64_VSESR_EL2_AET_SHIFT 14
10345#define AARCH64_VSESR_EL2_AET_MASK 0xc000U
10346#define AARCH64_VSESR_EL2_AET_GET( _reg ) \
10347 ( ( ( _reg ) >> 14 ) & 0x3U )
10349#define AARCH64_VSESR_EL2_IDS 0x1000000U
10351static inline uint64_t _AArch64_Read_vsesr_el2(
void )
10356 "mrs %0, VSESR_EL2" :
"=&r" ( value ) : :
"memory"
10362static inline void _AArch64_Write_vsesr_el2( uint64_t value )
10365 "msr VSESR_EL2, %0" : :
"r" ( value ) :
"memory"
10371static inline uint64_t _AArch64_Read_cntfrq_el0(
void )
10376 "mrs %0, CNTFRQ_EL0" :
"=&r" ( value ) : :
"memory"
10382static inline void _AArch64_Write_cntfrq_el0( uint64_t value )
10385 "msr CNTFRQ_EL0, %0" : :
"r" ( value ) :
"memory"
10391#define AARCH64_CNTHCTL_EL2_EL0PCTEN 0x1U
10393#define AARCH64_CNTHCTL_EL2_EL1PCTEN_0 0x1U
10395#define AARCH64_CNTHCTL_EL2_EL0VCTEN 0x2U
10397#define AARCH64_CNTHCTL_EL2_EL1PCEN 0x2U
10399#define AARCH64_CNTHCTL_EL2_EVNTEN 0x4U
10401#define AARCH64_CNTHCTL_EL2_EVNTDIR 0x8U
10403#define AARCH64_CNTHCTL_EL2_EVNTI( _val ) ( ( _val ) << 4 )
10404#define AARCH64_CNTHCTL_EL2_EVNTI_SHIFT 4
10405#define AARCH64_CNTHCTL_EL2_EVNTI_MASK 0xf0U
10406#define AARCH64_CNTHCTL_EL2_EVNTI_GET( _reg ) \
10407 ( ( ( _reg ) >> 4 ) & 0xfU )
10409#define AARCH64_CNTHCTL_EL2_EL0VTEN 0x100U
10411#define AARCH64_CNTHCTL_EL2_EL0PTEN 0x200U
10413#define AARCH64_CNTHCTL_EL2_EL1PCTEN_1 0x400U
10415#define AARCH64_CNTHCTL_EL2_EL1PTEN 0x800U
10417#define AARCH64_CNTHCTL_EL2_ECV 0x1000U
10419#define AARCH64_CNTHCTL_EL2_EL1TVT 0x2000U
10421#define AARCH64_CNTHCTL_EL2_EL1TVCT 0x4000U
10423#define AARCH64_CNTHCTL_EL2_EL1NVPCT 0x8000U
10425#define AARCH64_CNTHCTL_EL2_EL1NVVCT 0x10000U
10427#define AARCH64_CNTHCTL_EL2_EVNTIS 0x20000U
10429static inline uint64_t _AArch64_Read_cnthctl_el2(
void )
10434 "mrs %0, CNTHCTL_EL2" :
"=&r" ( value ) : :
"memory"
10440static inline void _AArch64_Write_cnthctl_el2( uint64_t value )
10443 "msr CNTHCTL_EL2, %0" : :
"r" ( value ) :
"memory"
10449#define AARCH64_CNTHP_CTL_EL2_ENABLE 0x1U
10451#define AARCH64_CNTHP_CTL_EL2_IMASK 0x2U
10453#define AARCH64_CNTHP_CTL_EL2_ISTATUS 0x4U
10455static inline uint64_t _AArch64_Read_cnthp_ctl_el2(
void )
10460 "mrs %0, CNTHP_CTL_EL2" :
"=&r" ( value ) : :
"memory"
10466static inline void _AArch64_Write_cnthp_ctl_el2( uint64_t value )
10469 "msr CNTHP_CTL_EL2, %0" : :
"r" ( value ) :
"memory"
10475static inline uint64_t _AArch64_Read_cnthp_cval_el2(
void )
10480 "mrs %0, CNTHP_CVAL_EL2" :
"=&r" ( value ) : :
"memory"
10486static inline void _AArch64_Write_cnthp_cval_el2( uint64_t value )
10489 "msr CNTHP_CVAL_EL2, %0" : :
"r" ( value ) :
"memory"
10495#define AARCH64_CNTHP_TVAL_EL2_TIMERVALUE( _val ) ( ( _val ) << 0 )
10496#define AARCH64_CNTHP_TVAL_EL2_TIMERVALUE_SHIFT 0
10497#define AARCH64_CNTHP_TVAL_EL2_TIMERVALUE_MASK 0xffffffffU
10498#define AARCH64_CNTHP_TVAL_EL2_TIMERVALUE_GET( _reg ) \
10499 ( ( ( _reg ) >> 0 ) & 0xffffffffU )
10501static inline uint64_t _AArch64_Read_cnthp_tval_el2(
void )
10506 "mrs %0, CNTHP_TVAL_EL2" :
"=&r" ( value ) : :
"memory"
10512static inline void _AArch64_Write_cnthp_tval_el2( uint64_t value )
10515 "msr CNTHP_TVAL_EL2, %0" : :
"r" ( value ) :
"memory"
10521#define AARCH64_CNTHPS_CTL_EL2_ENABLE 0x1U
10523#define AARCH64_CNTHPS_CTL_EL2_IMASK 0x2U
10525#define AARCH64_CNTHPS_CTL_EL2_ISTATUS 0x4U
10527static inline uint64_t _AArch64_Read_cnthps_ctl_el2(
void )
10532 "mrs %0, CNTHPS_CTL_EL2" :
"=&r" ( value ) : :
"memory"
10538static inline void _AArch64_Write_cnthps_ctl_el2( uint64_t value )
10541 "msr CNTHPS_CTL_EL2, %0" : :
"r" ( value ) :
"memory"
10547static inline uint64_t _AArch64_Read_cnthps_cval_el2(
void )
10552 "mrs %0, CNTHPS_CVAL_EL2" :
"=&r" ( value ) : :
"memory"
10558static inline void _AArch64_Write_cnthps_cval_el2( uint64_t value )
10561 "msr CNTHPS_CVAL_EL2, %0" : :
"r" ( value ) :
"memory"
10567#define AARCH64_CNTHPS_TVAL_EL2_TIMERVALUE( _val ) ( ( _val ) << 0 )
10568#define AARCH64_CNTHPS_TVAL_EL2_TIMERVALUE_SHIFT 0
10569#define AARCH64_CNTHPS_TVAL_EL2_TIMERVALUE_MASK 0xffffffffU
10570#define AARCH64_CNTHPS_TVAL_EL2_TIMERVALUE_GET( _reg ) \
10571 ( ( ( _reg ) >> 0 ) & 0xffffffffU )
10573static inline uint64_t _AArch64_Read_cnthps_tval_el2(
void )
10578 "mrs %0, CNTHPS_TVAL_EL2" :
"=&r" ( value ) : :
"memory"
10584static inline void _AArch64_Write_cnthps_tval_el2( uint64_t value )
10587 "msr CNTHPS_TVAL_EL2, %0" : :
"r" ( value ) :
"memory"
10593#define AARCH64_CNTHV_CTL_EL2_ENABLE 0x1U
10595#define AARCH64_CNTHV_CTL_EL2_IMASK 0x2U
10597#define AARCH64_CNTHV_CTL_EL2_ISTATUS 0x4U
10599static inline uint64_t _AArch64_Read_cnthv_ctl_el2(
void )
10604 "mrs %0, CNTHV_CTL_EL2" :
"=&r" ( value ) : :
"memory"
10610static inline void _AArch64_Write_cnthv_ctl_el2( uint64_t value )
10613 "msr CNTHV_CTL_EL2, %0" : :
"r" ( value ) :
"memory"
10619static inline uint64_t _AArch64_Read_cnthv_cval_el2(
void )
10624 "mrs %0, CNTHV_CVAL_EL2" :
"=&r" ( value ) : :
"memory"
10630static inline void _AArch64_Write_cnthv_cval_el2( uint64_t value )
10633 "msr CNTHV_CVAL_EL2, %0" : :
"r" ( value ) :
"memory"
10639#define AARCH64_CNTHV_TVAL_EL2_TIMERVALUE( _val ) ( ( _val ) << 0 )
10640#define AARCH64_CNTHV_TVAL_EL2_TIMERVALUE_SHIFT 0
10641#define AARCH64_CNTHV_TVAL_EL2_TIMERVALUE_MASK 0xffffffffU
10642#define AARCH64_CNTHV_TVAL_EL2_TIMERVALUE_GET( _reg ) \
10643 ( ( ( _reg ) >> 0 ) & 0xffffffffU )
10645static inline uint64_t _AArch64_Read_cnthv_tval_el2(
void )
10650 "mrs %0, CNTHV_TVAL_EL2" :
"=&r" ( value ) : :
"memory"
10656static inline void _AArch64_Write_cnthv_tval_el2( uint64_t value )
10659 "msr CNTHV_TVAL_EL2, %0" : :
"r" ( value ) :
"memory"
10665#define AARCH64_CNTHVS_CTL_EL2_ENABLE 0x1U
10667#define AARCH64_CNTHVS_CTL_EL2_IMASK 0x2U
10669#define AARCH64_CNTHVS_CTL_EL2_ISTATUS 0x4U
10671static inline uint64_t _AArch64_Read_cnthvs_ctl_el2(
void )
10676 "mrs %0, CNTHVS_CTL_EL2" :
"=&r" ( value ) : :
"memory"
10682static inline void _AArch64_Write_cnthvs_ctl_el2( uint64_t value )
10685 "msr CNTHVS_CTL_EL2, %0" : :
"r" ( value ) :
"memory"
10691static inline uint64_t _AArch64_Read_cnthvs_cval_el2(
void )
10696 "mrs %0, CNTHVS_CVAL_EL2" :
"=&r" ( value ) : :
"memory"
10702static inline void _AArch64_Write_cnthvs_cval_el2( uint64_t value )
10705 "msr CNTHVS_CVAL_EL2, %0" : :
"r" ( value ) :
"memory"
10711#define AARCH64_CNTHVS_TVAL_EL2_TIMERVALUE( _val ) ( ( _val ) << 0 )
10712#define AARCH64_CNTHVS_TVAL_EL2_TIMERVALUE_SHIFT 0
10713#define AARCH64_CNTHVS_TVAL_EL2_TIMERVALUE_MASK 0xffffffffU
10714#define AARCH64_CNTHVS_TVAL_EL2_TIMERVALUE_GET( _reg ) \
10715 ( ( ( _reg ) >> 0 ) & 0xffffffffU )
10717static inline uint64_t _AArch64_Read_cnthvs_tval_el2(
void )
10722 "mrs %0, CNTHVS_TVAL_EL2" :
"=&r" ( value ) : :
"memory"
10728static inline void _AArch64_Write_cnthvs_tval_el2( uint64_t value )
10731 "msr CNTHVS_TVAL_EL2, %0" : :
"r" ( value ) :
"memory"
10737#define AARCH64_CNTKCTL_EL1_EL0PCTEN 0x1U
10739#define AARCH64_CNTKCTL_EL1_EL0VCTEN 0x2U
10741#define AARCH64_CNTKCTL_EL1_EVNTEN 0x4U
10743#define AARCH64_CNTKCTL_EL1_EVNTDIR 0x8U
10745#define AARCH64_CNTKCTL_EL1_EVNTI( _val ) ( ( _val ) << 4 )
10746#define AARCH64_CNTKCTL_EL1_EVNTI_SHIFT 4
10747#define AARCH64_CNTKCTL_EL1_EVNTI_MASK 0xf0U
10748#define AARCH64_CNTKCTL_EL1_EVNTI_GET( _reg ) \
10749 ( ( ( _reg ) >> 4 ) & 0xfU )
10751#define AARCH64_CNTKCTL_EL1_EL0VTEN 0x100U
10753#define AARCH64_CNTKCTL_EL1_EL0PTEN 0x200U
10755#define AARCH64_CNTKCTL_EL1_EVNTIS 0x20000U
10757static inline uint64_t _AArch64_Read_cntkctl_el1(
void )
10762 "mrs %0, CNTKCTL_EL1" :
"=&r" ( value ) : :
"memory"
10768static inline void _AArch64_Write_cntkctl_el1( uint64_t value )
10771 "msr CNTKCTL_EL1, %0" : :
"r" ( value ) :
"memory"
10777#define AARCH64_CNTP_CTL_EL0_ENABLE 0x1U
10779#define AARCH64_CNTP_CTL_EL0_IMASK 0x2U
10781#define AARCH64_CNTP_CTL_EL0_ISTATUS 0x4U
10783static inline uint64_t _AArch64_Read_cntp_ctl_el0(
void )
10788 "mrs %0, CNTP_CTL_EL0" :
"=&r" ( value ) : :
"memory"
10794static inline void _AArch64_Write_cntp_ctl_el0( uint64_t value )
10797 "msr CNTP_CTL_EL0, %0" : :
"r" ( value ) :
"memory"
10803static inline uint64_t _AArch64_Read_cntp_cval_el0(
void )
10808 "mrs %0, CNTP_CVAL_EL0" :
"=&r" ( value ) : :
"memory"
10814static inline void _AArch64_Write_cntp_cval_el0( uint64_t value )
10817 "msr CNTP_CVAL_EL0, %0" : :
"r" ( value ) :
"memory"
10823#define AARCH64_CNTP_TVAL_EL0_TIMERVALUE( _val ) ( ( _val ) << 0 )
10824#define AARCH64_CNTP_TVAL_EL0_TIMERVALUE_SHIFT 0
10825#define AARCH64_CNTP_TVAL_EL0_TIMERVALUE_MASK 0xffffffffU
10826#define AARCH64_CNTP_TVAL_EL0_TIMERVALUE_GET( _reg ) \
10827 ( ( ( _reg ) >> 0 ) & 0xffffffffU )
10829static inline uint64_t _AArch64_Read_cntp_tval_el0(
void )
10834 "mrs %0, CNTP_TVAL_EL0" :
"=&r" ( value ) : :
"memory"
10840static inline void _AArch64_Write_cntp_tval_el0( uint64_t value )
10843 "msr CNTP_TVAL_EL0, %0" : :
"r" ( value ) :
"memory"
10849static inline uint64_t _AArch64_Read_cntpctss_el0(
void )
10854 "mrs %0, CNTPCTSS_EL0" :
"=&r" ( value ) : :
"memory"
10862static inline uint64_t _AArch64_Read_cntpct_el0(
void )
10867 "mrs %0, CNTPCT_EL0" :
"=&r" ( value ) : :
"memory"
10875#define AARCH64_CNTPS_CTL_EL1_ENABLE 0x1U
10877#define AARCH64_CNTPS_CTL_EL1_IMASK 0x2U
10879#define AARCH64_CNTPS_CTL_EL1_ISTATUS 0x4U
10881static inline uint64_t _AArch64_Read_cntps_ctl_el1(
void )
10886 "mrs %0, CNTPS_CTL_EL1" :
"=&r" ( value ) : :
"memory"
10892static inline void _AArch64_Write_cntps_ctl_el1( uint64_t value )
10895 "msr CNTPS_CTL_EL1, %0" : :
"r" ( value ) :
"memory"
10901static inline uint64_t _AArch64_Read_cntpoff_el2(
void )
10906 "mrs %0, CNTPOFF_EL2" :
"=&r" ( value ) : :
"memory"
10912static inline void _AArch64_Write_cntpoff_el2( uint64_t value )
10915 "msr CNTPOFF_EL2, %0" : :
"r" ( value ) :
"memory"
10921static inline uint64_t _AArch64_Read_cntps_cval_el1(
void )
10926 "mrs %0, CNTPS_CVAL_EL1" :
"=&r" ( value ) : :
"memory"
10932static inline void _AArch64_Write_cntps_cval_el1( uint64_t value )
10935 "msr CNTPS_CVAL_EL1, %0" : :
"r" ( value ) :
"memory"
10941#define AARCH64_CNTPS_TVAL_EL1_TIMERVALUE( _val ) ( ( _val ) << 0 )
10942#define AARCH64_CNTPS_TVAL_EL1_TIMERVALUE_SHIFT 0
10943#define AARCH64_CNTPS_TVAL_EL1_TIMERVALUE_MASK 0xffffffffU
10944#define AARCH64_CNTPS_TVAL_EL1_TIMERVALUE_GET( _reg ) \
10945 ( ( ( _reg ) >> 0 ) & 0xffffffffU )
10947static inline uint64_t _AArch64_Read_cntps_tval_el1(
void )
10952 "mrs %0, CNTPS_TVAL_EL1" :
"=&r" ( value ) : :
"memory"
10958static inline void _AArch64_Write_cntps_tval_el1( uint64_t value )
10961 "msr CNTPS_TVAL_EL1, %0" : :
"r" ( value ) :
"memory"
10967#define AARCH64_CNTV_CTL_EL0_ENABLE 0x1U
10969#define AARCH64_CNTV_CTL_EL0_IMASK 0x2U
10971#define AARCH64_CNTV_CTL_EL0_ISTATUS 0x4U
10973static inline uint64_t _AArch64_Read_cntv_ctl_el0(
void )
10978 "mrs %0, CNTV_CTL_EL0" :
"=&r" ( value ) : :
"memory"
10984static inline void _AArch64_Write_cntv_ctl_el0( uint64_t value )
10987 "msr CNTV_CTL_EL0, %0" : :
"r" ( value ) :
"memory"
10993static inline uint64_t _AArch64_Read_cntv_cval_el0(
void )
10998 "mrs %0, CNTV_CVAL_EL0" :
"=&r" ( value ) : :
"memory"
11004static inline void _AArch64_Write_cntv_cval_el0( uint64_t value )
11007 "msr CNTV_CVAL_EL0, %0" : :
"r" ( value ) :
"memory"
11013#define AARCH64_CNTV_TVAL_EL0_TIMERVALUE( _val ) ( ( _val ) << 0 )
11014#define AARCH64_CNTV_TVAL_EL0_TIMERVALUE_SHIFT 0
11015#define AARCH64_CNTV_TVAL_EL0_TIMERVALUE_MASK 0xffffffffU
11016#define AARCH64_CNTV_TVAL_EL0_TIMERVALUE_GET( _reg ) \
11017 ( ( ( _reg ) >> 0 ) & 0xffffffffU )
11019static inline uint64_t _AArch64_Read_cntv_tval_el0(
void )
11024 "mrs %0, CNTV_TVAL_EL0" :
"=&r" ( value ) : :
"memory"
11030static inline void _AArch64_Write_cntv_tval_el0( uint64_t value )
11033 "msr CNTV_TVAL_EL0, %0" : :
"r" ( value ) :
"memory"
11039static inline uint64_t _AArch64_Read_cntvctss_el0(
void )
11044 "mrs %0, CNTVCTSS_EL0" :
"=&r" ( value ) : :
"memory"
11052static inline uint64_t _AArch64_Read_cntvct_el0(
void )
11057 "mrs %0, CNTVCT_EL0" :
"=&r" ( value ) : :
"memory"
11065#define AARCH64_CPUMERRSR_EL1_ADDR_SHIFT 0
11066#define AARCH64_CPUMERRSR_EL1_ADDR_MASK 0xfffLLU
11067#define AARCH64_CPUMERRSR_EL1_ADDR( _val ) \
11068 ( ( _val ) << AARCH64_CPUMERRSR_EL1_ADDR_SHIFT )
11069#define AARCH64_CPUMERRSR_EL1_ADDR_GET( _reg ) \
11070 ( ( ( _reg ) >> AARCH64_CPUMERRSR_EL1_ADDR_SHIFT ) \
11071 & AARCH64_CPUMERRSR_EL1_ADDR_MASK )
11073#define AARCH64_CPUMERRSR_EL1_CPUIDWAY_SHIFT 18
11074#define AARCH64_CPUMERRSR_EL1_CPUIDWAY_MASK 0x7LLU
11075#define AARCH64_CPUMERRSR_EL1_CPUIDWAY( _val ) \
11076 ( ( _val ) << AARCH64_CPUMERRSR_EL1_CPUIDWAY_SHIFT )
11077#define AARCH64_CPUMERRSR_EL1_CPUIDWAY_GET( _reg ) \
11078 ( ( ( _reg ) >> AARCH64_CPUMERRSR_EL1_CPUIDWAY_SHIFT ) \
11079 & AARCH64_CPUMERRSR_EL1_CPUIDWAY_MASK )
11081#define AARCH64_CPUMERRSR_EL1_RAMID_SHIFT 24
11082#define AARCH64_CPUMERRSR_EL1_RAMID_MASK 0x7fLLU
11083#define AARCH64_CPUMERRSR_EL1_RAMID( _val ) \
11084 ( ( _val ) << AARCH64_CPUMERRSR_EL1_RAMID_SHIFT )
11085#define AARCH64_CPUMERRSR_EL1_RAMID_GET( _reg ) \
11086 ( ( ( _reg ) >> AARCH64_CPUMERRSR_EL1_RAMID_SHIFT ) \
11087 & AARCH64_CPUMERRSR_EL1_RAMID_MASK )
11089#define AARCH64_CPUMERRSR_EL1_VALID 0x80000000LLU
11091#define AARCH64_CPUMERRSR_EL1_REPEATERR_SHIFT 32
11092#define AARCH64_CPUMERRSR_EL1_REPEATERR_MASK 0xffLLU
11093#define AARCH64_CPUMERRSR_EL1_REPEATERR( _val ) \
11094 ( ( _val ) << AARCH64_CPUMERRSR_EL1_REPEATERR_SHIFT )
11095#define AARCH64_CPUMERRSR_EL1_REPEATERR_GET( _reg ) \
11096 ( ( ( _reg ) >> AARCH64_CPUMERRSR_EL1_REPEATERR_SHIFT ) \
11097 & AARCH64_CPUMERRSR_EL1_REPEATERR_MASK )
11099#define AARCH64_CPUMERRSR_EL1_OTHERERR_SHIFT 40
11100#define AARCH64_CPUMERRSR_EL1_OTHERERR_MASK 0xffLLU
11101#define AARCH64_CPUMERRSR_EL1_OTHERERR( _val ) \
11102 ( ( _val ) << AARCH64_CPUMERRSR_EL1_OTHERERR_SHIFT )
11103#define AARCH64_CPUMERRSR_EL1_OTHERERR_GET( _reg ) \
11104 ( ( ( _reg ) >> AARCH64_CPUMERRSR_EL1_OTHERERR_SHIFT ) \
11105 & AARCH64_CPUMERRSR_EL1_OTHERERR_MASK )
11107#define AARCH64_CPUMERRSR_EL1_FATAL 0x8000000000000000LLU
11109static inline uint64_t _AArch64_Read_cpumerrsr_el1(
void )
11114 "mrs %0, S3_1_c15_c2_2" :
"=&r" ( value ) : :
"memory"
11120static inline void _AArch64_Write_cpumerrsr_el1( uint64_t value )
11123 "msr S3_1_c15_c2_2, %0" : :
"r" ( value ) :
"memory"
11129#define AARCH64_L2MERRSR_EL1_ADDR_SHIFT 3
11130#define AARCH64_L2MERRSR_EL1_ADDR_MASK 0x3fffLLU
11131#define AARCH64_L2MERRSR_EL1_ADDR( _val ) \
11132 ( ( _val ) << AARCH64_L2MERRSR_EL1_ADDR_SHIFT )
11133#define AARCH64_L2MERRSR_EL1_ADDR_GET( _reg ) \
11134 ( ( ( _reg ) >> AARCH64_L2MERRSR_EL1_ADDR_SHIFT ) \
11135 & AARCH64_L2MERRSR_EL1_ADDR_MASK )
11137#define AARCH64_L2MERRSR_EL1_CPUIDWAY_SHIFT 18
11138#define AARCH64_L2MERRSR_EL1_CPUIDWAY_MASK 0xfLLU
11139#define AARCH64_L2MERRSR_EL1_CPUIDWAY( _val ) \
11140 ( ( _val ) << AARCH64_L2MERRSR_EL1_CPUIDWAY_SHIFT )
11141#define AARCH64_L2MERRSR_EL1_CPUIDWAY_GET( _reg ) \
11142 ( ( ( _reg ) >> AARCH64_L2MERRSR_EL1_CPUIDWAY_SHIFT ) \
11143 & AARCH64_L2MERRSR_EL1_CPUIDWAY_MASK )
11145#define AARCH64_L2MERRSR_EL1_RAMID_SHIFT 24
11146#define AARCH64_L2MERRSR_EL1_RAMID_MASK 0x7fLLU
11147#define AARCH64_L2MERRSR_EL1_RAMID( _val ) \
11148 ( ( _val ) << AARCH64_L2MERRSR_EL1_RAMID_SHIFT )
11149#define AARCH64_L2MERRSR_EL1_RAMID_GET( _reg ) \
11150 ( ( ( _reg ) >> AARCH64_L2MERRSR_EL1_RAMID_SHIFT ) \
11151 & AARCH64_L2MERRSR_EL1_RAMID_MASK )
11153#define AARCH64_L2MERRSR_EL1_VALID 0x80000000LLU
11155#define AARCH64_L2MERRSR_EL1_REPEATERR_SHIFT 32
11156#define AARCH64_L2MERRSR_EL1_REPEATERR_MASK 0xffLLU
11157#define AARCH64_L2MERRSR_EL1_REPEATERR( _val ) \
11158 ( ( _val ) << AARCH64_L2MERRSR_EL1_REPEATERR_SHIFT )
11159#define AARCH64_L2MERRSR_EL1_REPEATERR_GET( _reg ) \
11160 ( ( ( _reg ) >> AARCH64_L2MERRSR_EL1_REPEATERR_SHIFT ) \
11161 & AARCH64_L2MERRSR_EL1_REPEATERR_MASK )
11163#define AARCH64_L2MERRSR_EL1_OTHERERR_SHIFT 40
11164#define AARCH64_L2MERRSR_EL1_OTHERERR_MASK 0xffLLU
11165#define AARCH64_L2MERRSR_EL1_OTHERERR( _val ) \
11166 ( ( _val ) << AARCH64_L2MERRSR_EL1_OTHERERR_SHIFT )
11167#define AARCH64_L2MERRSR_EL1_OTHERERR_GET( _reg ) \
11168 ( ( ( _reg ) >> AARCH64_L2MERRSR_EL1_OTHERERR_SHIFT ) \
11169 & AARCH64_L2MERRSR_EL1_OTHERERR_MASK )
11171#define AARCH64_L2MERRSR_EL1_FATAL 0x8000000000000000LLU
11173static inline uint64_t _AArch64_Read_l2merrsr_el1(
void )
11178 "mrs %0, S3_1_c15_c2_3" :
"=&r" ( value ) : :
"memory"
11184static inline void _AArch64_Write_l2merrsr_el1( uint64_t value )
11187 "msr S3_1_c15_c2_3, %0" : :
"r" ( value ) :
"memory"