Port-mips archive

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

Trying to fix my broken MIPS CI20



Hi,
I can't boot my CI20. The "dmesg" is at the end. The diff below is the
only way I have found to get to the shell. I will post working CI20
dmesg in the following message.
If there is another solution, please let me know.

Thanks,
Lwazi
----------------------

diff --git a/sys/arch/mips/mips/cache.c b/sys/arch/mips/mips/cache.c
index 1ace757ca7d6..1aa58558892f 100644
--- a/sys/arch/mips/mips/cache.c
+++ b/sys/arch/mips/mips/cache.c
@@ -1491,6 +1491,13 @@ mips_config_cache_modern(uint32_t cpu_id)
         mco->mco_pdcache_inv_range = octeon_pdcache_inv_range;
         mco->mco_pdcache_wb_range = no_cache_op_range;
 #endif /* MIPS64_OCTEON */
+    case MIPS_PRID_CID_INGENIC:
+        mco->mco_sdcache_wbinv_all = no_cache_op;
+        mco->mco_sdcache_wbinv_range = no_cache_op_range;
+        mco->mco_sdcache_wbinv_range_index = no_cache_op_range_index;
+        mco->mco_sdcache_inv_range = no_cache_op_range;
+        mco->mco_sdcache_wb_range = no_cache_op_range;
+        break;
     }

 #define CACHE_DEBUG
diff --git a/sys/arch/mips/mips/mips_machdep.c
b/sys/arch/mips/mips/mips_machdep.c
index 5eb22c06aeea..8206b5d0b3c0 100644
--- a/sys/arch/mips/mips/mips_machdep.c
+++ b/sys/arch/mips/mips/mips_machdep.c
@@ -686,7 +686,7 @@ static const struct pridtab cputab[] = {

     /* Ingenic XBurst */
     { MIPS_PRID_CID_INGENIC, MIPS_XBURST,  -1, -1,    -1, 0,
-      MIPS32_FLAGS | CPU_MIPS_D_CACHE_COHERENT | CPU_MIPS_DOUBLE_COUNT,
+      MIPS32_FLAGS | CPU_MIPS_DOUBLE_COUNT,
       0, 0, "XBurst"        },

     { 0, 0, 0,                0, 0, 0,

=====================================================================

[   1.0000000] Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
[   1.0000000]     2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013,
[   1.0000000]     2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023
[   1.0000000]     The NetBSD Foundation, Inc.  All rights reserved.
[   1.0000000] Copyright (c) 1982, 1986, 1989, 1991, 1993
[   1.0000000]     The Regents of the University of California.  All
rights reserved.

[   1.0000000] NetBSD 10.99.4 (CI20) #1: Fri Jul  7 12:19:06 EDT 2023
[   1.0000000]
lwazi@pc:/data/netbsd/head/src/sys/arch/evbmips/compile/obj/CI20
[   1.0000000] Ingenic XBurst
[   1.0000000] total memory = 1024 MB
[   1.0000000] avail memory = 1008 MB
[   1.0000000] mainbus0 (root)
[   1.0000000] cpu0 at mainbus0: 1200.00MHz (hz cycles = 120000, delay
divisor = 12)
[   1.0000000] cpu0: Ingenic XBurst (0x3ee1024f) Rev. 79 with unknown
FPC type (0x330000) Rev. 0
[   1.0000000] cpu0: 32 TLB entries, 16MB max page size
[   1.0000000] cpu0: 32KB/32B 8-way set-associative L1 instruction cache
[   1.0000000] cpu0: 32KB/32B 8-way set-associative write-back
coherent L1 data cache
[   1.0000000] cpu0: 256KB/128B 8-way set-associative write-back L2
unified cache
[   1.0000000] apbus0 at mainbus0
[   1.0000000] JZ_CLKGR0 3f5c7fe0
[   1.0000000] JZ_CLKGR1 000073e0
[   1.0000000] JZ_SPCR0  00000000
[   1.0000000] JZ_SPCR1  00000000
[   1.0000000] JZ_SRBC   00000002
[   1.0000000] JZ_OPCR   000015e6
[   1.0000000] JZ_UHCCDR c0000000
[   1.0000000] JZ_ERNG   00000001
[   1.0000000] JZ_RNG    68776d84
[   1.0000000] efuse0 at apbus0 addr 0x134100d0: Ingenic EFUSE Slave Interface
[   1.0000000] com0 at apbus0 addr 0x10030000 irq 51: Ingenic UART, 16-byte FIFO
[   1.0000000] com0: console
[   1.0000000] com1 at apbus0 addr 0x10031000 irq 50: Ingenic UART, 16-byte FIFO
[   1.0000000] com2 at apbus0 addr 0x10032000 irq 49: Ingenic UART, 16-byte FIFO
[   1.0000000] com3 at apbus0 addr 0x10033000 irq 48: Ingenic UART, 16-byte FIFO
[   1.0000000] com4 at apbus0 addr 0x10034000 irq 34: Ingenic UART, 16-byte FIFO
[   1.0000000] dwctwo0 at apbus0 addr 0x13500000 irq 21: USB OTG controller
[   1.0000000] ohci0 at apbus0 addr 0x134a0000 irq 5: OHCI USB controller
[   1.0000000] ohci0: OHCI version 1.0
[   1.0000000] usb0 at ohci0: USB revision 1.0
[   1.0000000] ehci0 at apbus0 addr 0x13490000 irq 20: EHCI USB controller
[   1.0000000] ehci0: 1 companion controller, 1 port: ohci0
[   1.0000000] ehci0: Using DMA subregion for control data structures
[   1.0000000] usb1 at ehci0: USB revision 2.0
[   1.0000000] dme0 at apbus0 addr 0x16000000: DM9000 Ethernet controller
[   1.0000000] dme0: DM9000 was configured with MAC address: ba:ba:be:ef:fe:ed
[   1.0000000] jzgpio at apbus0 addr 0x10010000 not configured
[   1.0000000] jzgpio at apbus0 addr 0x10010100 not configured
[   1.0000000] jzgpio at apbus0 addr 0x10010200 not configured
[   1.0000000] jzgpio at apbus0 addr 0x10010300 not configured
[   1.0000000] jzgpio at apbus0 addr 0x10010400 not configured
[   1.0000000] jzgpio at apbus0 addr 0x10010500 not configured
[   1.0000000] jziic0 at apbus0 addr 0x10050000 irq 60: SMBus controller
[   1.0000000] iic0 at jziic0: I2C bus
[   1.0000000] jziic1 at apbus0 addr 0x10051000 irq 59: SMBus controller
[   1.0000000] iic1 at jziic1: I2C bus
[   1.0000000] jziic2 at apbus0 addr 0x10052000 irq 58: SMBus controller
[   1.0000000] iic2 at jziic2: I2C bus
[   1.0000000] jziic3 at apbus0 addr 0x10053000 irq 57: SMBus controller
[   1.0000000] iic3 at jziic3: I2C bus
[   1.0000000] jziic4 at apbus0 addr 0x10054000 irq 56: SMBus controller
[   1.0000000] iic4 at jziic4: I2C bus
[   1.0000000] pcf8563rtc0 at iic4 addr 0x51: NXP PCF8563 Real-time Clock
[   1.0000000] jzmmc at apbus0 addr 0x13450000 not configured
[   1.0000000] jzmmc at apbus0 addr 0x13460000 not configured
[   1.0000000] jzmmc at apbus0 addr 0x13470000 not configured
[   1.0000000] jzfb at apbus0 addr 0x13050000 not configured
[   1.0000000] jzrng0 at apbus0 addr 0x100000dc: Ingenic random number generator
[   1.0000000] usb2 at dwctwo0: USB revision 2.0
[   1.0000000] entropy: ready
[   1.0000000] pid 0(system): trap: cpu0, TLB miss (load or instr.
fetch) in kernel mode
[   1.0000000] status=0x3, cause=0xc08, epc=0x8033ed5c, vaddr=0
[   1.0000000] tf=0x804dddb8 ksp=0x804dde58 ra=0x8000001c ppl=0x801b578c
[   1.0000000] kernel: TLB miss (load or instr. fetch) trap
Stopped in pid 0.0 (system) at  netbsd:memset+0x5c:     sw      a3,0(v1)
db> bt
0x804dde58: memset+0x5c (0xc0100000,0xc0110000,0x10000,0) ra 0x802520a0 sz 40
0x804dde80: kmem_zalloc+0x5c (0xc0100000,0xc0110000,0x10000,0) ra 0x8019fed8 sz
40
0x804ddea8: ubc_init+0x44 (0xc0100000,0xc0110000,0x10000,0) ra 0x8034bd38 sz 48
0x804dded8: main+0x438 (0xc0100000,0xc0110000,0x10000,0) ra 0x800200d8 sz 112
0x804ddf48: kernel_text+0xd8 (0xc0100000,0xc0110000,0x10000,0) ra 0 sz 0
User-level: pid 0.0
db>


Home | Main Index | Thread Index | Old Index