• Ben Avison's avatar
    Support for ARMv8 · 66b90f9d
    Ben Avison authored
    Detail:
      * Filled in CPU tables for publicly documented ARMv8 cores (Cortex-A53,57,72).
      * Recent ARM ARMs (e.g. section B1.9.2 of the ARMv7AR ARM) permit the core to
        take an undefined instruction exception upon encountering even not-taken
        conditional undefined instructions. This option is exercised by the
        Cortex-A53, unlike all ARMv7 cores previously supported by RISC OS. This
        unfortunately trips up a lot of kernel code that adapts to different
        architectures at runtime. These have now all been replaced with branches
        over the affected code on the opposite condition.
      * Fixed bug in HAL_InvalidateCache_ARMvF: for the main body of the loop,
        which was written as though to act on the CLIDR register, r8 actually
        contained the CTR register instead.
    Admin:
      Tested on Raspberry Pi 3
    
    Version 5.35, 4.79.2.304. Tagged as 'Kernel-5_35-4_79_2_304'
    66b90f9d
ARMops 2.33 KB
; Copyright 2000 Pace Micro Technology plc
;
; Licensed under the Apache License, Version 2.0 (the "License");
; you may not use this file except in compliance with the License.
; You may obtain a copy of the License at
;
;     http://www.apache.org/licenses/LICENSE-2.0
;
; Unless required by applicable law or agreed to in writing, software
; distributed under the License is distributed on an "AS IS" BASIS,
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
; See the License for the specific language governing permissions and
; limitations under the License.
;

ARMv3    *       0
ARMv4    *       1
ARMv4T   *       2
ARMv5    *       3
ARMv5T   *       4
ARMv5TE  *       5
ARMv5TEJ *       6
ARMv6    *       7
ARMvF		*	&F ; 'Fancy' ARM that describes its features in the feature registers.
; Generally this implies ARMv7+, but there are also a few ARMv6 CPUs with this value
; (e.g. ARM1176JZF-S)

                ^       0
ARM600          #       1
ARM610          #       1
ARM700          #       1
ARM710          #       1
ARM710a         #       1
SA110_preRevT   #       1
SA110           #       1
ARM7500         #       1
ARM7500FE       #       1
SA1100          #       1
SA1110          #       1
ARM720T         #       1
ARM920T         #       1
ARM922T         #       1
X80200          #       1
X80321          #       1
ARM1176JZF_S    #       1
Cortex_A5       #       1
Cortex_A7       #       1
Cortex_A8       #       1
Cortex_A9       #       1
Cortex_A12      #       1
Cortex_A15      #       1
Cortex_A17      #       1
Cortex_A53      #       1
Cortex_A57      #       1
Cortex_A72      #       1
ARMunk          *       255

; The macro to do an ARM operation. All ARM operations are expected
; to corrupt a1 only
; This macro corrupts ip unless $zeropage reg is supplied

        MACRO
        ARMop   $op, $cond, $tailcall, $zeropage
 [ "$zeropage" = ""
        LDR$cond ip, =ZeroPage
 ]
 [ "$tailcall" = ""
        MOV$cond lr, pc
 ]
 [ "$zeropage" = ""
        LDR$cond pc, [ip, #Proc_$op]
 |
        LDR$cond pc, [$zeropage, #Proc_$op]
 ]
        MEND

        MACRO
        ChangedProcVecs $tmp
 [ XScaleJTAGDebug
        LDR     $tmp, =ZeroPage
        LDR     $tmp, [$tmp, #ProcessorFlags]
        TST     $tmp, #CPUFlag_XScaleJTAGconnected
        BEQ     %FT01
        BKPT    &2000
01
 ]
        MEND


        END