Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/arm/arm turn on CPU_CONTROL_SWP_ENABLE.



details:   https://anonhg.NetBSD.org/src/rev/3e335bf86e38
branches:  trunk
changeset: 1014409:3e335bf86e38
user:      mrg <mrg%NetBSD.org@localhost>
date:      Mon Sep 21 21:26:43 2020 +0000

description:
turn on CPU_CONTROL_SWP_ENABLE.

this allows armv[67] systems to use 'swp' and 'swpb' instructions,
which means they can run armv[45] software.

arm recommends ldrex/strex for armv6 and newer, and it is not
present in armv8 at all or some armv7.  we emulate it on armv8 and
need to add emulation for the some armv7.  using the hardware is
going to be faster, so, enable this path too.

ok jmcneill.

diffstat:

 sys/arch/arm/arm/armv6_start.S |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (17 lines):

diff -r e15df30b8c9d -r 3e335bf86e38 sys/arch/arm/arm/armv6_start.S
--- a/sys/arch/arm/arm/armv6_start.S    Mon Sep 21 20:00:44 2020 +0000
+++ b/sys/arch/arm/arm/armv6_start.S    Mon Sep 21 21:26:43 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: armv6_start.S,v 1.27 2020/08/28 13:36:52 skrll Exp $   */
+/*     $NetBSD: armv6_start.S,v 1.28 2020/09/21 21:26:43 mrg Exp $     */
 
 /*-
  * Copyright (c) 2012, 2017, 2018 The NetBSD Foundation, Inc.
@@ -660,6 +660,7 @@
 
 #define ARMV7_SCTLR_SET        (       \
     CPU_CONTROL_UNAL_ENABLE |  \
+    CPU_CONTROL_SWP_ENABLE |   \
     0)
 
        mrc     p15, 0, r0, c1, c0, 0



Home | Main Index | Thread Index | Old Index