| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: armreg.h,v 1.33 2020/01/28 17:47:51 maxv Exp $ */ | | 1 | /* $NetBSD: armreg.h,v 1.34 2020/01/28 18:02:30 maxv Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 2014 The NetBSD Foundation, Inc. | | 4 | * Copyright (c) 2014 The NetBSD Foundation, Inc. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * This code is derived from software contributed to The NetBSD Foundation | | 7 | * This code is derived from software contributed to The NetBSD Foundation |
8 | * by Matt Thomas of 3am Software Foundry. | | 8 | * by Matt Thomas of 3am Software Foundry. |
9 | * | | 9 | * |
10 | * Redistribution and use in source and binary forms, with or without | | 10 | * Redistribution and use in source and binary forms, with or without |
11 | * modification, are permitted provided that the following conditions | | 11 | * modification, are permitted provided that the following conditions |
12 | * are met: | | 12 | * are met: |
13 | * 1. Redistributions of source code must retain the above copyright | | 13 | * 1. Redistributions of source code must retain the above copyright |
14 | * notice, this list of conditions and the following disclaimer. | | 14 | * notice, this list of conditions and the following disclaimer. |
| @@ -700,39 +700,55 @@ AARCH64REG_WRITE_INLINE(sctlr_el1) | | | @@ -700,39 +700,55 @@ AARCH64REG_WRITE_INLINE(sctlr_el1) |
700 | | | 700 | |
701 | #define SCTLR_RES0 0xc8222400 // Reserved ARMv8.0, write 0 | | 701 | #define SCTLR_RES0 0xc8222400 // Reserved ARMv8.0, write 0 |
702 | #define SCTLR_RES1 0x30d00800 // Reserved ARMv8.0, write 1 | | 702 | #define SCTLR_RES1 0x30d00800 // Reserved ARMv8.0, write 1 |
703 | #define SCTLR_M __BIT(0) | | 703 | #define SCTLR_M __BIT(0) |
704 | #define SCTLR_A __BIT(1) | | 704 | #define SCTLR_A __BIT(1) |
705 | #define SCTLR_C __BIT(2) | | 705 | #define SCTLR_C __BIT(2) |
706 | #define SCTLR_SA __BIT(3) | | 706 | #define SCTLR_SA __BIT(3) |
707 | #define SCTLR_SA0 __BIT(4) | | 707 | #define SCTLR_SA0 __BIT(4) |
708 | #define SCTLR_CP15BEN __BIT(5) | | 708 | #define SCTLR_CP15BEN __BIT(5) |
709 | #define SCTLR_nAA __BIT(6) | | 709 | #define SCTLR_nAA __BIT(6) |
710 | #define SCTLR_ITD __BIT(7) | | 710 | #define SCTLR_ITD __BIT(7) |
711 | #define SCTLR_SED __BIT(8) | | 711 | #define SCTLR_SED __BIT(8) |
712 | #define SCTLR_UMA __BIT(9) | | 712 | #define SCTLR_UMA __BIT(9) |
| | | 713 | #define SCTLR_EnRCTX __BIT(10) |
| | | 714 | #define SCTLR_EOS __BIT(11) |
713 | #define SCTLR_I __BIT(12) | | 715 | #define SCTLR_I __BIT(12) |
| | | 716 | #define SCTLR_EnDB __BIT(13) |
714 | #define SCTLR_DZE __BIT(14) | | 717 | #define SCTLR_DZE __BIT(14) |
715 | #define SCTLR_UCT __BIT(15) | | 718 | #define SCTLR_UCT __BIT(15) |
716 | #define SCTLR_nTWI __BIT(16) | | 719 | #define SCTLR_nTWI __BIT(16) |
717 | #define SCTLR_nTWE __BIT(18) | | 720 | #define SCTLR_nTWE __BIT(18) |
718 | #define SCTLR_WXN __BIT(19) | | 721 | #define SCTLR_WXN __BIT(19) |
| | | 722 | #define SCTLR_TSCXT __BIT(20) |
719 | #define SCTLR_IESB __BIT(21) | | 723 | #define SCTLR_IESB __BIT(21) |
| | | 724 | #define SCTLR_EIS __BIT(22) |
720 | #define SCTLR_SPAN __BIT(23) | | 725 | #define SCTLR_SPAN __BIT(23) |
721 | #define SCTLR_EOE __BIT(24) | | 726 | #define SCTLR_EOE __BIT(24) |
722 | #define SCTLR_EE __BIT(25) | | 727 | #define SCTLR_EE __BIT(25) |
723 | #define SCTLR_UCI __BIT(26) | | 728 | #define SCTLR_UCI __BIT(26) |
| | | 729 | #define SCTLR_EnDA __BIT(27) |
724 | #define SCTLR_nTLSMD __BIT(28) | | 730 | #define SCTLR_nTLSMD __BIT(28) |
725 | #define SCTLR_LSMAOE __BIT(29) | | 731 | #define SCTLR_LSMAOE __BIT(29) |
| | | 732 | #define SCTLR_EnIB __BIT(30) |
| | | 733 | #define SCTLR_EnIA __BIT(31) |
| | | 734 | #define SCTLR_BT0 __BIT(35) |
| | | 735 | #define SCTLR_BT1 __BIT(36) |
| | | 736 | #define SCTLR_ITFSB __BIT(37) |
| | | 737 | #define SCTLR_TCF0 __BITS(39,38) |
| | | 738 | #define SCTLR_TCF __BITS(41,40) |
| | | 739 | #define SCTLR_ATA0 __BIT(42) |
| | | 740 | #define SCTLR_ATA __BIT(43) |
| | | 741 | #define SCTLR_DSSBS __BIT(44) |
726 | | | 742 | |
727 | // current EL stack pointer | | 743 | // current EL stack pointer |
728 | static __inline uint64_t | | 744 | static __inline uint64_t |
729 | reg_sp_read(void) | | 745 | reg_sp_read(void) |
730 | { | | 746 | { |
731 | uint64_t __rv; | | 747 | uint64_t __rv; |
732 | __asm __volatile ("mov %0, sp" : "=r"(__rv)); | | 748 | __asm __volatile ("mov %0, sp" : "=r"(__rv)); |
733 | return __rv; | | 749 | return __rv; |
734 | } | | 750 | } |
735 | | | 751 | |
736 | AARCH64REG_READ_INLINE(sp_el0) // EL0 Stack Pointer | | 752 | AARCH64REG_READ_INLINE(sp_el0) // EL0 Stack Pointer |
737 | AARCH64REG_WRITE_INLINE(sp_el0) | | 753 | AARCH64REG_WRITE_INLINE(sp_el0) |
738 | | | 754 | |