Changeset 06f10ac in mainline for kernel/arch/arm64/include
- Timestamp:
- 2021-08-22T19:08:44Z (4 years ago)
- Branches:
- master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c21cc26
- Parents:
- 95b7d4df
- Location:
- kernel/arch/arm64/include/arch
- Files:
-
- 5 edited
- 1 moved
-
barrier.h (modified) (1 diff)
-
istate_struct.h (modified) (2 diffs)
-
mach/hikey960/hikey960.h (moved) (moved from kernel/arch/arm64/src/smc.c ) (2 diffs)
-
mach/virt/virt.h (modified) (1 diff)
-
mm/km.h (modified) (2 diffs)
-
mm/page.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/arm64/include/arch/barrier.h
r95b7d4df r06f10ac 37 37 #define KERN_arm64_BARRIER_H_ 38 38 39 #include <stddef.h>40 41 #define COHERENCE_INVAL_MIN 442 43 /** Ensure visibility of instruction updates for a multiprocessor.44 *45 * @param addr Address of the first instruction.46 * @param size Size of the instruction block (in bytes).47 */48 static inline void ensure_visibility(void *addr, size_t len)49 {50 size_t i;51 52 /*53 * Clean to Point of Unification to make the new instructions visible to54 * the instruction cache.55 */56 for (i = 0; i < len; i += COHERENCE_INVAL_MIN)57 asm volatile (58 "dc cvau, %[addr]\n"59 : : [addr] "r" ((char *) addr + i)60 );61 62 /* Ensure completion on all PEs. */63 asm volatile ("dsb ish" ::: "memory");64 65 /* Ensure instruction cache/branch predictor discards stale data. */66 for (i = 0; i < len; i += COHERENCE_INVAL_MIN)67 asm volatile (68 "ic ivau, %[addr]\n"69 : : [addr] "r" ((char *) addr + i)70 );71 72 /* Ensure completion on all PEs. */73 asm volatile ("dsb ish" ::: "memory");74 75 /* Synchronize context on this PE. */76 asm volatile ("isb");77 }78 79 39 #endif 80 40 -
kernel/arch/arm64/include/arch/istate_struct.h
r95b7d4df r06f10ac 65 65 #define ISTATE_OFFSET_X29 0x108 66 66 #define ISTATE_OFFSET_X30 0x110 67 #define ISTATE_SIZE 0x118 67 #define ISTATE_OFFSET_PAD0 0x118 68 #define ISTATE_SIZE 0x120 68 69 69 70 #ifndef __ASSEMBLER__ … … 109 110 /* Link Register. */ 110 111 uint64_t x30; 112 113 /* 114 * ARM64 mandates that the stack pointer is always aligned to 115 * a 16-byte boundary. To satisfy this condition, the size of 116 * this data structure needs to be also a multiple of 16 bytes. 117 * This is the reason for this padding. 118 */ 119 uint64_t pad0; 111 120 } istate_t; 112 121 113 122 #endif 123 114 124 #endif -
kernel/arch/arm64/include/arch/mach/hikey960/hikey960.h
r95b7d4df r06f10ac 1 1 /* 2 * Copyright (c) 20 19 Petr Pavlu2 * Copyright (c) 2021 Martin Decky 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 #include <arch/barrier.h> 30 #include <barrier.h> 29 /** @addtogroup kernel_arm64_hikey960 30 * @brief HiKey 960 platform. 31 * @ingroup kernel_arm64 32 * @{ 33 */ 34 /** @file 35 * @brief HiKey 960 platform driver. 36 */ 31 37 32 void smc_coherence(void *a, size_t l) 33 { 34 ensure_visibility(a, l); 35 } 38 #ifndef KERN_arm64_mach_hikey960_H_ 39 #define KERN_arm64_mach_hikey960_H_ 40 41 #include <arch/machine_func.h> 42 43 extern struct arm_machine_ops hikey960_machine_ops; 44 45 #endif 46 47 /** @} 48 */ -
kernel/arch/arm64/include/arch/mach/virt/virt.h
r95b7d4df r06f10ac 36 36 */ 37 37 38 #ifndef KERN_arm64_ virt_H_39 #define KERN_arm64_ virt_H_38 #ifndef KERN_arm64_mach_virt_H_ 39 #define KERN_arm64_mach_virt_H_ 40 40 41 41 #include <arch/machine_func.h> -
kernel/arch/arm64/include/arch/mm/km.h
r95b7d4df r06f10ac 41 41 #include <typedefs.h> 42 42 43 #define KM_ARM64_IDENTITY_START UINT64_C(0xffffffff 80000000)44 #define KM_ARM64_IDENTITY_SIZE UINT64_C(0x0000000 080000000)43 #define KM_ARM64_IDENTITY_START UINT64_C(0xffffffff00000000) 44 #define KM_ARM64_IDENTITY_SIZE UINT64_C(0x0000000100000000) 45 45 46 46 #define KM_ARM64_NON_IDENTITY_START UINT64_C(0xffff000000000000) 47 #define KM_ARM64_NON_IDENTITY_SIZE UINT64_C(0x0000ffff 80000000)47 #define KM_ARM64_NON_IDENTITY_SIZE UINT64_C(0x0000ffff00000000) 48 48 49 49 extern void km_identity_arch_init(void); … … 53 53 #else /* __ASSEMBLER__ */ 54 54 55 #define KM_ARM64_IDENTITY_START 0xffffffff 8000000056 #define KM_ARM64_IDENTITY_SIZE 0x0000000 08000000055 #define KM_ARM64_IDENTITY_START 0xffffffff00000000 56 #define KM_ARM64_IDENTITY_SIZE 0x0000000100000000 57 57 58 58 #define KM_ARM64_NON_IDENTITY_START 0xffff000000000000 59 #define KM_ARM64_NON_IDENTITY_SIZE 0x0000ffff 8000000059 #define KM_ARM64_NON_IDENTITY_SIZE 0x0000ffff00000000 60 60 61 61 #endif /* __ASSEMBLER__ */ -
kernel/arch/arm64/include/arch/mm/page.h
r95b7d4df r06f10ac 53 53 54 54 #define KA2PA(x) \ 55 (((uintptr_t) (x)) - UINT64_C(0xffffffff 80000000) + physmem_base)55 (((uintptr_t) (x)) - UINT64_C(0xffffffff00000000) + physmem_base) 56 56 #define PA2KA(x) \ 57 (((uintptr_t) (x)) + UINT64_C(0xffffffff 80000000) - physmem_base)57 (((uintptr_t) (x)) + UINT64_C(0xffffffff00000000) - physmem_base) 58 58 59 59 #endif /* __ASSEMBLER__ */
Note:
See TracChangeset
for help on using the changeset viewer.
