Ignore:
Timestamp:
2021-08-22T19:08:44Z (3 years ago)
Author:
Martin Decky <martin@…>
Branches:
master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
c21cc26
Parents:
95b7d4df
Message:

Implement support for HiKey 960

Initial support for the 96Boards HiKey 960 board.

  • The kernel identity mapping has been extended to 4 GiB. The initial bootstrap mapping maps 3 GiB as nornal memory and the next 1 GiB as device memory to support early UART debugging output.
  • The istate_t has been padded in order to preserve the stack pointer alignment invariant.

The current implementation is limited to UP and UART input/output.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/arm64/include/arch/barrier.h

    r95b7d4df r06f10ac  
    3737#define KERN_arm64_BARRIER_H_
    3838
    39 #include <stddef.h>
    40 
    41 #define COHERENCE_INVAL_MIN  4
    42 
    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 to
    54          * 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 
    7939#endif
    8040
Note: See TracChangeset for help on using the changeset viewer.