]> rtime.felk.cvut.cz Git - hercules2020/nv-tegra/linux-4.4.git/commitdiff
arm64: enable halting CPU by hlt
authorBo Yan <byan@nvidia.com>
Sat, 30 Aug 2014 00:35:23 +0000 (17:35 -0700)
committerDan Willemsen <dwillemsen@nvidia.com>
Wed, 18 Mar 2015 23:11:39 +0000 (16:11 -0700)
set MDSCR_EL1.HDE,so that hlt instruction can be used to halt cpu

this is useful in that the hlt instruction can be inserted into
various places for JTAG debugger attach.

for example, following statement can halt the CPU for JTAG debugger:

asm volatile("hlt #0x1234")

Change-Id: I0ad0429ca05720573bae0e91a9da8ccd1019566b
Signed-off-by: Bo Yan <byan@nvidia.com>
Reviewed-on: http://git-master/r/494149
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
arch/arm64/mm/proc.S

index a34a18d17b2101882d2792f0c5b4d80222a27cd5..27e948978ee54e1d5afe9c3153f6fa85cb74e372 100644 (file)
@@ -203,7 +203,8 @@ __cpu_setup_post_flush:
 
        mov     x0, #3 << 20
        msr     cpacr_el1, x0                   // Enable FP/ASIMD
-       msr     mdscr_el1, xzr                  // Reset mdscr_el1
+       mov     x0, #1 << 14                    // Enable MDSCR_EL1.HDE
+       msr     mdscr_el1, x0                   // only set HDE in mdscr_el1
        /*
         * Memory region attributes for LPAE:
         *