7628内核终于运行起来了。
把SP栈操作去掉之后,解决。
<RGS>tftp 80000000 vmlinux.bin
File: cmd_net.c, Func: do_tftpb, Line: 56
load addr= 0x80000000
boot file= vmlinux.bin
TFTP from server 192.168.100.191; our IP address is 192.168.100.2
Filename 'vmlinux.bin'.
Loading: Got ARP REQUEST, return our IP
Got ARP REQUEST, return our IP
Got ARP REQUEST, return our IP
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#################################################################
#########################################Bytes transferred = 4534612 (453154 hex)
<RGS>md 8000c150
8000c150: 40086000 3c011000 3421001f 01014025 .`.@...<..!4%@..
8000c160: 3908001f 40886000 000000c0 3c088001 ...9.`.@.......<
8000c170: 2508c17c 01000008 00000000 3c088045 |..%........E..<
8000c180: 25084000 ad000000 3c09804a 2529a78c .@.%....J..<..)%
8000c190: 25080004 1509fffe ad000000 3c018045 ...%........E..<
8000c1a0: ac2458cc 3c018045 ac2558c8 3c018045 .X$.E..<.X%.E..<
8000c1b0: ac2658c4 3c018045 ac2758c0 40802000 .X&.E..<.X'.. .@
8000c1c0: 3c1c8041 279c8000 0810a15e 000000c0 A..<...'^.......
8000c1d0: 27bdffe8 afbf0014 0c01ba6b 00000000 ...'....k.......
8000c1e0: 3c048043 248488d8 00002821 0c00621f C..<...$!(...b..
8000c1f0: 24060a00 3c048005 24060600 24841bd8 ...$...<...$...$
8000c200: 0c00621f 00002821 3c058041 24a55780 .b..!(..A..<.W.$
8000c210: 0c0139ec 00402021 3c048045 3c038048 .9..! @.E..<H..<
8000c220: 2484a558 0c00bb7b ac62c6c0 0c111de5 X..${.....b.....
8000c230: 8f840000 0c00461d 00000000 8fbf0014 .....F..........
8000c240: 08006106 27bd0018 00802821 3c048045 .a.....'!(..E..<
<RGS>go 8000c150
## Starting application at 0x8000C150 ...
111
LINUX started...
THIS IS ASIC
SDK 5.0.S.0
Linux version 2.6.36 (shidongxue@mp) (gcc version 4.6.3 (Buildroot 2012.11.1) ) #106 Mon Jan 23 20:18:57 CST 2023
The CPU feqenuce set to 580 MHz
CPU revision is: 00019655 (MIPS 24Kc)
Software DMA cache coherency
Determined physical RAM map:
memory: 04000000 @ 00000000 (usable)
Initrd not found or empty - disabling initrd
Zone PFN ranges:
Normal 0x00000000 -> 0x00004000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
0: 0x00000000 -> 0x00004000
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 16256
Kernel command line: console=ttyS1,57600n8 root=/dev/mtdblock5
PID hash table entries: 256 (order: -2, 1024 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Primary instruction cache 64kB, VIPT, , 4-waylinesize 32 bytes.
Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
Writing ErrCtl register=00066f9f
Readback ErrCtl register=00066f9f
Memory: 60252k/65536k available (3135k kernel code, 5232k reserved, 1119k data, 176k init, 0k highmem)
Hierarchical RCU implementation.
Verbose stalled-CPUs detection is disabled.
NR_IRQS:128
解决办法如下(192-196注释掉了):
188
189 MTC0 zero, CP0_CONTEXT # clear context register
190 PTR_LA $28, init_thread_union
191 /* Set the SP after an empty pt_regs. */
192 /*PTR_LI sp,7984 *//* _THREAD_SIZE - 32 - PT_SIZE*/
193 /*PTR_ADDU sp, $28*/
194 back_to_back_c0_hazard
195 //set_saved_sp sp, t0, t1
196 //PTR_SUBU sp, 4 * SZREG # init stack pointer
197 j start_kernel
198 END(kernel_entry)
199
200 __CPUINIT
201
版权声明:本文为snowpiaop原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。