tech-kern archive

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

Re: [ARM32] panic when sshd responding



There is the patch to reduce cache to 16K for ARM1136 r1p0 or above
which contains cache size switcher.
Look to the '6.11.3. Restrictions on page table mappings (page
coloring)' in the ARM1136 TRM.
Who could test ssh corruption data with this patch applied (also you
need to comment out two KASSERT as described above in this mail
thread)?

diff --git a/sys/arch/arm/arm/cpufunc.c b/sys/arch/arm/arm/cpufunc.c
index b95c942..ac22914 100644
--- a/sys/arch/arm/arm/cpufunc.c
+++ b/sys/arch/arm/arm/cpufunc.c
@@ -2374,6 +2374,7 @@ arm1136_setup(char *args)
 {
        int cpuctrl, cpuctrl_wax;
        uint32_t sbz=0;
+       volatile uint32_t auxctl;

 #if defined(PROCESS_ID_IS_CURCPU)
        /* set curcpu() */
@@ -2383,6 +2384,10 @@ arm1136_setup(char *args)
         __asm("mcr\tp15, 0, %0, c13, c0, 4" : : "r"(&lwp0));
 #endif

+       __asm volatile("mrc p15, 0, %0, c1, c0, 1" : "=r"(auxctl));
+       auxctl |= 1 << 6;
+       __asm volatile("mcr p15, 0, %0, c1, c0, 1" : : "r"(auxctl));
+
        cpuctrl =
                CPU_CONTROL_MMU_ENABLE  |
                CPU_CONTROL_DC_ENABLE   |

-- 
With Best Regards,
Andy Shevchenko


Home | Main Index | Thread Index | Old Index