ΠΠ° ΠΊΠ°ΡΡΠΈΠ½ΠΊΠ΅ Linux kernel ΡΠ»ΡΡ Π²Π°ΠΌ ΠΏΡΠΈΠ²Π΅Ρ ΡΠ΅ΡΠ΅Π· GPIO.
Π ΡΡΠΎΠΉ ΡΠ°ΡΡΠΈ ΠΈΡΡΠΎΡΠΈΠΈ Ρ ΠΏΠΎΡΡΠΈΡΠΎΠ²Π°Π½ΠΈΠ΅ΠΌ RISC-V RocketChip Π½Π° ΠΊΠΈΡΠ°ΠΉΡΠΊΡΡ ΠΏΠ»Π°ΡΡ Ρ Cyclone IV ΠΌΡ Π²ΡΡ-ΡΠ°ΠΊΠΈ Π·Π°ΠΏΡΡΡΠΈΠΌ Linux, Π° ΡΠ°ΠΊΠΆΠ΅ Π½Π°ΡΡΠΈΠΌΡΡ ΡΠ°ΠΌΠΈ ΠΊΠΎΠ½ΡΠΈΠ³ΡΡΠΈΡΠΎΠ²Π°ΡΡ IP Core ΠΊΠΎΠ½ΡΡΠΎΠ»Π»Π΅ΡΠ° ΠΏΠ°ΠΌΡΡΠΈ ΠΈ ΡΡΡΡ ΠΏΠΎΠ΄ΡΠ΅Π΄Π°ΠΊΡΠΈΡΡΠ΅ΠΌ dts-ΠΎΠΏΠΈΡΠ°Π½ΠΈΠ΅ Π°ΠΏΠΏΠ°ΡΠ°ΡΡΡΡ. ΠΡΠ° ΡΡΠ°ΡΡΡ ΡΠ²Π»ΡΠ΅ΡΡΡ ΠΏΡΠΎΠ΄ΠΎΠ»ΠΆΠ΅Π½ΠΈΠ΅ΠΌ
β¦ ΠΠΎΡΠΊΠΎΠ»ΡΠΊΡ setup_smp
Π²ΡΠ·ΡΠ²Π°Π΅ΡΡΡ, ΡΠΎΠ»ΡΠΊΠΎ Π΅ΡΠ»ΠΈ ΡΠ΄ΡΠΎ ΡΠΊΠΎΠ½ΡΠΈΠ³ΡΡΠΈΡΠΎΠ²Π°Π½ΠΎ Ρ ΠΏΠΎΠ΄Π΄Π΅ΡΠΆΠΊΠΎΠΉ SMP, ΠΌΠΎΠΆΠ½ΠΎ ΠΏΠΎΠΏΡΠΎΠ±ΠΎΠ²Π°ΡΡ ΠΎΡΠΊΠ»ΡΡΠΈΡΡ ΠΌΠ½ΠΎΠ³ΠΎΡΠ΄Π΅ΡΠ½ΠΎΡΡΡ. ΠΡΠ΄Π΅Ρ Π½Π΅ΠΏΡΠΈΡΡΠ½ΠΎ, Π΅ΡΠ»ΠΈ ΠΌΠ½Π΅ Π½ΡΠΆΠ½ΠΎ Π±ΡΠ΄Π΅Ρ Π΅ΡΡ ΠΈ ΡΠ΅Π°Π»ΠΈΠ·ΠΎΠ²ΡΠ²Π°ΡΡ Π² ΠΌΠΎΠ΄ΡΠ»Π΅ ΠΏΠ°ΠΌΡΡΠΈ ΠΏΠΎΠ΄Π΄Π΅ΡΠΆΠΊΡ Π°ΡΠΎΠΌΠ°ΡΠ½ΠΎΡΡΠΈ (ΠΌΠ½Π΅ ΠΊΠ°Π·Π°Π»ΠΎΡΡ, Ρ ΡΡΠΈΠΌ ΠΊΠ΅Ρ Π²ΠΎΠ·ΠΈΡΡΡ ΡΠ°ΠΌΠΎΡΡΠΎΡΡΠ΅Π»ΡΠ½ΠΎ), Π½ΠΎ Π² ΠΎΠ΄Π½ΠΎΡΠ΄Π΅ΡΠ½ΠΎΠΌ ΡΠ»ΡΡΠ°Π΅ ΠΎΠ½ΠΎ Π½Π°ΠΌ ΠΏΠΎΠΌΠ΅ΡΠ°ΡΡ Π½Π΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ.
ΠΡΡ ΡΠ°Π²Π½ΠΎ Π½Π΅ Π²Π·Π»Π΅ΡΠ΅Π»ΠΎ…
[ 0.000000] OF: fdt: Ignoring memory range 0x80000000 - 0x80200000
[ 0.000000] Linux version 4.19.0-sifive-1+ (trosinenko@trosinenko-pc) (gcc version 8.3.0 (Buildroot 2019.02-07449-g4eddd28f99)) #1 Thu Jul 4 18:38:10 MSK 2019
[ 0.000000] bootconsole [early0] enabled
[ 0.000000] Initial ramdisk at: 0x(____ptrval____) (16777216 bytes)
[ 0.000000] Zone ranges:
[ 0.000000] DMA32 [mem 0x0000000080200000-0x00000000bfffffff]
[ 0.000000] Normal [mem 0x00000000c0000000-0x00000bffffffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000080200000-0x00000000bfffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000080200000-0x00000000bfffffff]
[ 0.000000] software IO TLB: mapped [mem 0xbb1fc000-0xbf1fc000] (64MB)
[ 0.000000] Unable to find "cpu" devicetree entry
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 258055
[ 0.000000] Kernel command line: debug console=ttySIF0,125200 root=/dev/mmcblk0p2 loglevel=7 rootwait
[ 0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)
[ 0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes)
[ 0.000000] Sorting __ex_table...
[ 0.000000] BUG: Bad page state in process swapper pfn:80bf7
[ 0.000000] page:ffffffe03f029e08 count:0 mapcount:-65280 mapping:0000000000000000 index:0x1
[ 0.000000] flags: 0x0()
[ 0.000000] raw: 0000000000000000 0000000000000100 0000000000000200 0000000000000000
[ 0.000000] raw: 0000000000000001 0000000000000000 00000000ffff00ff
[ 0.000000] page dumped because: nonzero mapcount
[ 0.000000] Modules linked in:
[ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 4.19.0-sifive-1+ #1
[ 0.000000] Call Trace:
[ 0.000000] [<ffffffe00002cfde>] walk_stackframe+0x0/0xa0
[ 0.000000] [<ffffffe00002d1da>] show_stack+0x2a/0x34
[ 0.000000] [<ffffffe00063c898>] chachachllachachachTradeonachachach_inachachipachachachachllachachachTradeonachachachdevachachachypachachachllachachachTradeona+0x20/0x28
[ 0.000000] [<ffffffe00009499c>] bad_page+0xe4/0x102
[ 0.000000] [<ffffffe0000949f2>] free_pages_check_bad+0x38/0x7a
[ 0.000000] [<ffffffe000094bb0>] free_pcppages_bulk+0x106/0x36c
[ 0.000000] [<ffffffe0000957be>] free_unref_page_commit.isra.23+0x86/0x8e
[ 0.000000] [<ffffffe0000960bc>] free_unref_page+0x44/0x58
[ 0.000000] [<ffffffe0000960de>] __free_pages.part.28+0xe/0x22
[ 0.000000] [<ffffffe0000056da>] __free_pages_bootmem+0x86/0x90
[ 0.000000] [<ffffffe000007c46>] free_all_bootmem+0x156/0x1ba
[ 0.000000] [<ffffffe0000023f8>] mem_init+0x36/0x44
[ 0.000000] [<ffffffe0000007a0>] start_kernel+0x1aa/0x328
[ 0.000000] [<ffffffe000000058>] _sinittext+0x58/0x5c
[ 0.000000] Disabling lock debugging due to kernel taint
[ 0.000000] BUG: Bad page state in process swapper pfn:80bf9
[ 0.000000] page:ffffffe03f029e78 count:0 mapcount:-65280 mapping:0000000000000000 index:0x0
[ 0.000000] flags: 0x0()
[ 0.000000] raw: 0000000000000000 ffffffe03f020080 ffffffe03f020080 0000000000000000
[ 0.000000] raw: 0000000000000000 0000000000000000 00000000ffff00ff
[ 0.000000] page dumped because: nonzero mapcount
[ 0.000000] Modules linked in:
[ 0.000000] CPU: 0 PID: 0 Comm: swapper Tainted: G B 4.19.0-sifive-1+ #1
[ 0.000000] Call Trace:
[ 0.000000] [<ffffffe00002cfde>] walk_stackframe+0x0/0xa0
[ 0.000000] [<ffffffe00002d1da>] show_stack+0x2a/0x34
[ 0.000000] [<ffffffe00063c898>] chachachllachachachTradeonachachach_inachachipachachachachllachachachTradeonachachachdevachachachypachachachllachachachTradeona+0x20/0x28
[ 0.000000] [<ffffffe00009499c>] bad_page+0xe4/0x102
[ 0.000000] [<ffffffe0000949f2>] free_pages_check_bad+0x38/0x7a
[ 0.000000] [<ffffffe0000955c6>] __free_pages_ok+0x3fe/0x430
[ 0.000000] [<ffffffe0000960ea>] __free_pages.part.28+0x1a/0x22
[ 0.000000] [<ffffffe0000056da>] __free_pages_bootmem+0x86/0x90
[ 0.000000] [<ffffffe000007c46>] free_all_bootmem+0x156/0x1ba
[ 0.000000] [<ffffffe0000023f8>] mem_init+0x36/0x44
[ 0.000000] [<ffffffe0000007a0>] start_kernel+0x1aa/0x328
[ 0.000000] [<ffffffe000000058>] _sinittext+0x58/0x5c
[ 0.000000] BUG: Bad page state in process swapper pfn:80bfa
[ 0.000000] page:ffffffe03f029eb0 count:0 mapcount:-65280 mapping:0000000000000000 index:0x0
[ 0.000000] flags: 0x0()
[ 0.000000] raw: 0000000000000000 ffffffe03f0200b8 ffffffe03f0200b8 0000000000000000
[ 0.000000] raw: 0000000000000000 0000000000000000 00000000ffff00ff
[ 0.000000] page dumped because: nonzero mapcount
[ 0.000000] Modules linked in:
[ 0.000000] CPU: 0 PID: 0 Comm: swapper Tainted: G B 4.19.0-sifive-1+ #1
[ 0.000000] Call Trace:
[ 0.000000] [<ffffffe00002cfde>] walk_stackframe+0x0/0xa0
[ 0.000000] [<ffffffe00002d1da>] show_stack+0x2a/0x34
[ 0.000000] [<ffffffe00063c898>] chachachllachachachTradeonachachach_inachachipachachachachllachachachTradeonachachachdevachachachypachachachllachachachTradeona+0x20/0x28
[ 0.000000] [<ffffffe00009499c>] bad_page+0xe4/0x102
[ 0.000000] [<ffffffe0000949f2>] free_pages_check_bad+0x38/0x7a
[ 0.000000] [<ffffffe0000955c6>] __free_pages_ok+0x3fe/0x430
[ 0.000000] [<ffffffe0000960ea>] __free_pages.part.28+0x1a/0x22
[ 0.000000] [<ffffffe0000056da>] __free_pages_bootmem+0x86/0x90
[ 0.000000] [<ffffffe000007c46>] free_all_bootmem+0x156/0x1ba
[ 0.000000] [<ffffffe0000023f8>] mem_init+0x36/0x44
[ 0.000000] [<ffffffe0000007a0>] start_kernel+0x1aa/0x328
[ 0.000000] [<ffffffe000000058>] _sinittext+0x58/0x5c
[ 0.000000] BUG: Bad page state in process swapper pfn:80bfb
[ 0.000000] page:ffffffe03f029ee8 count:0 mapcount:-65280 mapping:0000000000000000 index:0x0
[ 0.000000] flags: 0x0()
[ 0.000000] raw: 0000000000000000 ffffffe03f0200f0 ffffffe03f0200f0 0000000000000000
[ 0.000000] raw: 0000000000000000 0000000000000000 00000000ffff00ff
[ 0.000000] page dumped because: nonzero mapcount
[ 0.000000] Modules linked in:
[ 0.000000] CPU: 0 PID: 0 Comm: swapper Tainted: G B 4.19.0-sifive-1+ #1
[ 0.000000] Call Trace:
[ 0.000000] [<ffffffe00002cfde>] walk_stackframe+0x0/0xa0
[ 0.000000] [<ffffffe00002d1da>] show_stack+0x2a/0x34
[ 0.000000] [<ffffffe00063c898>] chachachllachachachTradeonachachach_inachachipachachachachllachachachTradeonachachachdevachachachypachachachllachachachTradeona+0x20/0x28
[ 0.000000] [<ffffffe00009499c>] bad_page+0xe4/0x102
[ 0.000000] [<ffffffe0000949f2>] free_pages_check_bad+0x38/0x7a
[ 0.000000] [<ffffffe0000955c6>] __free_pages_ok+0x3fe/0x430
[ 0.000000] [<ffffffe0000960ea>] __free_pages.part.28+0x1a/0x22
[ 0.000000] [<ffffffe0000056da>] __free_pages_bootmem+0x86/0x90
[ 0.000000] [<ffffffe000007c46>] free_all_bootmem+0x156/0x1ba
[ 0.000000] [<ffffffe0000023f8>] mem_init+0x36/0x44
[ 0.000000] [<ffffffe0000007a0>] start_kernel+0x1aa/0x328
[ 0.000000] [<ffffffe000000058>] _sinittext+0x58/0x5c
[ 0.000000] BUG: Bad page state in process swapper pfn:80bfc
[ 0.000000] page:ffffffe03f029f20 count:0 mapcount:-65280 mapping:0000000000000000 index:0x0
[ 0.000000] flags: 0x0()
[ 0.000000] raw: 0000000000000000 ffffffe03f020028 ffffffe03f020028 0000000000000000
[ 0.000000] raw: 0000000000000000 0000000000000000 00000000ffff00ff
...
ΠΠ°Π½ΡΡΠ½ΠΎ, ΡΡΠΎ ΠΏΠΎΡΠ»Π΅ Π²ΡΠ΅ΠΉ ΠΎΡΠ»Π°Π΄ΠΊΠΈ Ρ ΡΠ΅ΡΠΈΠ» ΠΏΠΎΡΠΌΠΎΡΡΠ΅ΡΡ, ΠΊΠ°ΠΊ Π΄ΠΎΠ»ΠΆΠ΅Π½ Π²ΡΠ³Π»ΡΠ΄Π΅ΡΡ Β«ΡΠ΅ΡΠ΅ΡΠ΅Π½ΡΠ½ΡΠΉΒ» Π²ΡΠ²ΠΎΠ΄ ΡΠ΄ΡΠ°, ΡΠΊΠ°Π·Π°Π» make qemu
, ΠΈ ΡΠ²ΠΈΠ΄Π΅Π» Π°Π½Π°Π»ΠΎΠ³ΠΈΡΠ½ΡΡ ΠΎΡΠΈΠ±ΠΊΡ.
Π£Π²Ρ, ΡΠ»Π΅Π΄ΡΡΡΠΈΠΉ ΡΡΠΎΠ²Π΅Π½Ρ (Linux kernel) ΡΠ»ΠΎΠΆΠ½Π΅Π΅: GDB, ΠΏΠΎΠ΄ΠΊΠ»ΡΡΡΠ½Π½ΡΠΉ ΡΠ΅ΡΠ΅Π· JTAG ΠΊ RocketChip, ΡΠ°Π±ΠΎΡΠ°Π΅Ρ, ΠΏΠΎ-Π²ΠΈΠ΄ΠΈΠΌΠΎΠΌΡ, Ρ ΡΠΈΠ·ΠΈΡΠ΅ΡΠΊΠΈΠΌΠΈ Π°Π΄ΡΠ΅ΡΠ°ΠΌΠΈ Π²Π½Π΅ Π·Π°Π²ΠΈΡΠΈΠΌΠΎΡΡΠΈ ΠΎΡ ΡΠΎΠ³ΠΎ, ΠΊΠ°ΠΊ Π½Π°ΡΡΡΠΎΠ΅Π½ΠΎ MMU, Π° ΡΠ΄ΡΠΎ Π² ΠΈΠ½ΡΠ΅ΡΠ΅ΡΡΡΡΠΈΠΉ Π½Π°Ρ ΠΌΠΎΠΌΠ΅Π½Ρ ΡΠΆΠ΅ Π½Π°ΡΡΡΠΎΠΈΠ»ΠΎ ΠΎΡΠΎΠ±ΡΠ°ΠΆΠ΅Π½ΠΈΠ΅ Π°Π΄ΡΠ΅ΡΠΎΠ², ΠΏΠΎΡΡΠΎΠΌΡ ΠΏΡΠΎΡΡΠΎ ΡΠΊΠ°Π·Π°ΡΡ display/10i $pc
Π½Π΅ ΠΏΠΎΠ»ΡΡΠΈΡΡΡ β ΡΠ²ΠΈΠ΄ΠΈΠΌ Π»ΠΈΡΡ ΠΌΠ½ΠΎΠ³ΠΎ unimp
. ΠΠ°ΡΠΎ, Π΅ΡΠ»ΠΈ ΠΌΡ ΡΠΆΠ΅ Π²ΡΡΡΠ½ΠΈΠ»ΠΈ ΡΠΌΠ΅ΡΠ΅Π½ΠΈΠ΅ (ΠΏΠΎΡ
ΠΎΠΆΠ΅, ΡΡΠΎ 0x80200000 -> 0xffffffe000000000
), ΡΠΎ ΠΌΠΎΠΆΠ½ΠΎ ΡΡ
ΠΈΡΡΠΈΡΡ:
1: x/10i $pc
=> 0xffffffe000002436 <setup_smp>: unimp
0xffffffe000002438 <setup_smp+2>: unimp
0xffffffe00000243a <setup_smp+4>: unimp
0xffffffe00000243c <setup_smp+6>: unimp
0xffffffe00000243e <setup_smp+8>: unimp
0xffffffe000002440 <setup_smp+10>: unimp
0xffffffe000002442 <setup_smp+12>: unimp
0xffffffe000002444 <setup_smp+14>: unimp
0xffffffe000002446 <setup_smp+16>: unimp
0xffffffe000002448 <setup_smp+18>: unimp
(gdb) undisplay 1
(gdb) display/10i ($pc - 0xffffffe000002436 + 0x80202436)
2: x/10i ($pc - 0xffffffe000002436 + 0x80202436)
0x80202436: addi sp,sp,-96
0x80202438: sd s0,80(sp)
0x8020243a: sd s1,72(sp)
0x8020243c: sd s2,64(sp)
0x8020243e: sd s3,56(sp)
0x80202440: sd s4,48(sp)
0x80202442: sd s5,40(sp)
0x80202444: sd s6,32(sp)
0x80202446: sd s7,24(sp)
0x80202448: sd s8,16(sp)
ΠΡΠ΅ΠΊΠΏΠΎΠΈΠ½ΡΡ ΠΏΡΠΎΡΡΠ°Π²Π»ΡΡΡΡΡ Π°Π½Π°Π»ΠΎΠ³ΠΈΡΠ½ΠΎ:
(gdb) p setup_smp
$1 = {<text variable, no debug info>} 0xffffffe000002436 <setup_smp>
(gdb) b *0x80202436
Breakpoint 1 at 0x80202436
(gdb) c
Continuing.
Program received signal SIGTRAP, Trace/breakpoint trap.
setup_smp () at /home/trosinenko/freedom-u-sdk/linux/arch/riscv/kernel/smpboot.c:58
58 while ((dn = of_find_node_by_type(dn, "cpu"))) {
(gdb) bt
#0 setup_smp () at /home/trosinenko/freedom-u-sdk/linux/arch/riscv/kernel/smpboot.c:58
#1 0xffffffe0000022a2 in setup_arch () at /home/trosinenko/freedom-u-sdk/linux/arch/riscv/kernel/setup.c:253
#2 0x0000000000000000 in ?? ()
Backtrace stopped: frame did not save the PC
ΠΠΎΡ ΡΠΎΠ»ΡΠΊΠΎ ΠΈΡ
ΠΏΡΠΈΡ
ΠΎΠ΄ΠΈΡΡΡ Π²ΡΡΡΠ½ΡΡ ΡΠ½ΠΈΠΌΠ°ΡΡ, ΡΡΠΎΠ±Ρ ΠΏΠΎΠΉΡΠΈ Π΄Π°Π»ΡΡΠ΅ β Π΄Π»Ρ GDB ΡΡΠΎ ΠΊΠ°ΠΊΠΎΠΉ-ΡΠΎ ΡΠΎΠ²Π΅ΡΡΠ΅Π½Π½ΠΎ Π½Π΅ΠΏΠΎΠ½ΡΡΠ½ΡΠΉ trap. ΠΡ
Π΄Π°, Π΅ΡΠ»ΠΈ Π²Ρ ΡΠ»ΡΡΠ°ΠΉΠ½ΠΎ ΡΠΊΠ°ΠΆΠ΅ΡΠ΅ s
ΠΈΠ»ΠΈ n
Π²ΠΌΠ΅ΡΡΠΎ si
, gdb ΠΏΠΎΠΏΡΡΠ°Π΅ΡΡΡ Π²ΡΡΠ°Π²ΠΈΡΡ Π½Π΅ΡΠ²Π½ΡΠΉ Π±ΡΠ΅ΠΊΠΏΠΎΠΈΠ½Ρ, ΠΊΠΎΡΠΎΡΡΠΉ ΠΏΠΎ ΠΏΠΎΠ½ΡΡΠ½ΡΠΌ ΠΏΡΠΈΡΠΈΠ½Π°ΠΌ Π½Π΅ Π²ΡΡΡΠ°Π²ΠΈΡΡΡ, Π½ΠΎ ΠΈ ΠΎΡΠ³ΠΎΠ²ΠΎΡΠΈΡΡ GDB ΡΠΆΠ΅ Π½ΠΈΠΊΠ°ΠΊ. ΠΠΎ Π½Π΅ ΡΠΏΠ΅ΡΠΈΡΠ΅ ΠΏΠ΅ΡΠ΅Π·Π°Π³ΡΡΠΆΠ°ΡΡ ΠΏΠ»Π°ΡΡ β ΠΏΠΎ ΠΌΠΎΠΈΠΌ Π½Π°Π±Π»ΡΠ΄Π΅Π½ΠΈΡΠΌ, Π΄ΠΎΡΡΠ°ΡΠΎΡΠ½ΠΎ ΠΏΠ΅ΡΠ΅Π·Π°ΠΏΡΡΡΠΈΡΡ ΡΠΎΠ»ΡΠΊΠΎ gdb (ΡΡΡΠΈΡΠ΅, ΡΡΠΎ ΡΡΠ°ΡΡΠ΅ breakpoint-Ρ, Π²ΠΎΠ·ΠΌΠΎΠΆΠ½ΠΎ, Π½Π΅ ΠΈΡΡΠ΅Π·Π½ΡΡ).
Π‘ΠΎΠ±ΡΡΠ²Π΅Π½Π½ΠΎ, ΠΏΡΠΈΠ΄ΡΡΡΡ ΡΠ°Π·Π±ΠΈΡΠ°ΡΡΡΡ Ρ ΠΈΠ·Π½Π°ΡΠ°Π»ΡΠ½ΠΎΠΉ ΠΏΡΠΎΠ±Π»Π΅ΠΌΠΎΠΉ: ΡΠ°ΡΡΡΠ°Π½ΠΎΠ²ΠΊΠ° ΠΎΡΠ»Π°Π΄ΠΎΡΠ½ΡΡ
printk
Π² ΡΡΠ½ΠΊΡΠΈΡ of_find_node_by_type
, ΠΈΡΠΏΠΎΠ»ΡΠ·ΡΠ΅ΠΌΡΡ ΠΊΠΎΠ΄ΠΎΠΌ ΠΏΠΎΠΈΡΠΊΠ° Π·Π°Π³ΡΡΠ·ΠΎΡΠ½ΠΎΠ³ΠΎ ΠΏΡΠΎΡΠ΅ΡΡΠΎΡΠ½ΠΎΠ³ΠΎ ΡΠ΄ΡΠ°, ΠΏΠΎΠΊΠ°Π·ΡΠ²Π°Π΅Ρ, ΡΡΠΎ ΠΎΠ½ΠΎ Π²ΠΈΠ΄ΠΈΡ ΠΊΠ°ΠΊΠΎΠΉ-ΡΠΎ ΠΌΡΡΠΎΡ Π²ΠΌΠ΅ΡΡΠΎ Π½Π°Π·Π²Π°Π½ΠΈΠΉ ΡΠΈΠΏΠΎΠ² ΡΡΡΡΠΎΠΉΡΡΠ². ΠΠ°ΠΏΡΠΈΠΌΠ΅Ρ, ΠΎΠ½ΠΎ ΠΎΡΠΊΡΠ΄Π°-ΡΠΎ Π±Π΅ΡΡΡ ΡΡΡΠΎΡΠΊΡ Β«Serial portΒ», Ρ
ΠΎΡΡ ΡΠ°ΠΊΠΎΠ³ΠΎ ΡΠ²Π½ΠΎ Π½Π΅Ρ Π² dtb Π² ΠΏΠΎΠ»Π΅ device_type
. ΠΠΎΠΈΡΠΊΠ°Π² ΡΡΠΈ Π±Π°ΠΉΡΡ Π² ΠΎΠ±ΡΠ°Π·Π΅ ΡΠ΄ΡΠ°, Ρ ΠΈΡ
Π½Π°ΡΡΠ», ΠΏΠΎΡΠΌΠΎΡΡΠ΅Π» Π½Π° ΡΠΌΠ΅ΡΠ΅Π½ΠΈΠ΅, ΠΈ ΠΏΠΎΠ½ΡΠ» ΠΎΡΠ΅Π²ΠΈΠ΄Π½ΠΎΠ΅: ΡΠ°Π·ΠΌΠ΅Ρ ΡΠ΄ΡΠ° Π² ΠΏΠ°ΡΠ°ΠΌΠ΅ΡΡΠ°Ρ
Π·Π°Π³ΡΡΠ·ΠΊΠΈ ΡΠ²Π½ΠΎ Π½Π΅Π΄ΠΎΠΎΡΠ΅Π½ΡΠ½: Π΅ΠΌΡ Π²ΡΠ΄Π΅Π»Π΅Π½ΠΎ 8Mb, Π° Π·Π°Π½ΠΈΠΌΠ°Π΅Ρ ΠΎΠ½ΠΎ Π±ΠΎΠ»ΡΡΠ΅ Π΄Π΅ΡΡΡΠΈ. ΠΡΠ΄Π΅Π»ΠΈΠ» 16Mb, Π½ΠΎ ΡΡΡΠ°Π½Π½ΠΎΡΡΠΈ Π½Π΅ ΠΏΡΠ΅ΠΊΡΠ°ΡΠΈΠ»ΠΈΡΡ. ΠΠΎΡΠ»Π΅ ΠΏΠ»ΡΡΠΎΠΊ Ρ ΡΡΠ΅Π½ΠΈΠ΅ΠΌ FDT Ρ ΡΠ°Π·Π½ΡΡ
Π°Π΄ΡΠ΅ΡΠΎΠ² (ΡΡΠ°ΡΠ½ΠΎ Π°Π΄ΡΠ΅Ρ ΠΏΠ΅ΡΠ΅Π΄Π°ΡΡΡΡ ΡΠ΄ΡΡ Π² ΡΠ΅Π³ΠΈΡΡΡΠ΅ a1
), Ρ, Π½Π°ΠΊΠΎΠ½Π΅Ρ, ΡΠ΅ΡΠΈΠ» ΡΡΠ°ΡΡΠΈΡΠΎΠ²Π°ΡΡ, Π° ΡΡΠΎ ΠΆΠ΅ ΡΠ΅ΠΉΡΠ°Ρ ΡΠ°ΠΌ ΠΏΠ°ΡΡΠΈΡΡΡ. Π ΡΡΠ°ΡΡΡΡ, Π²ΠΌΠ΅ΡΡΠΎ Ρ
ΠΎΠΆΠ΄Π΅Π½ΠΈΠΉ Ρ ΠΎΡΠ»Π°Π΄ΡΠΈΠΊΠΎΠΌ (Π° ΠΌΡ ΠΏΠΎΠΌΠ½ΠΈΠΌ, ΡΡΠΎ Π΅ΡΡΡ Π½ΡΠ°Π½ΡΡ Ρ ΡΡΠ°Π½ΡΠ»ΡΡΠΈΠ΅ΠΉ Π°Π΄ΡΠ΅ΡΠΎΠ², ΠΊΠΎΡΠΎΡΡΠ΅ Π΅ΡΡ Π½ΡΠΆΠ½ΠΎ ΡΠ°ΠΊ ΠΈΠ»ΠΈ ΠΈΠ½Π°ΡΠ΅ ΡΠ΅ΡΠΈΡΡ), ΠΌΠΎΠΆΠ½ΠΎ ΠΏΡΠΎΡΡΠΎ ΠΈ ΠΊΠΎΡΡΡΠ»ΡΠ½ΠΎ Π² ΡΠ°ΠΉΠ»Π΅ drivers/of/fdt.c
ΡΠΊΠ°Π·Π°ΡΡ #define pr_debug printk
. Π ΠΈΡΠΎΠ³Π΅ ΠΏΠΎΠ»ΡΡΠΈΠ»ΠΎΡΡ:
Π΄ΠΎΠ±Π°Π²Π»Π΅Π½ΠΈΠ΅ ΠΎΡΠ»Π°Π΄ΠΎΡΠ½ΠΎΠ³ΠΎ Π²ΡΠ²ΠΎΠ΄Π°
diff --git a/arch/riscv/kernel/setup.c b/arch/riscv/kernel/setup.c
index 3db0d71d128b..fac47df9d1db 100644
--- a/arch/riscv/kernel/setup.c
+++ b/arch/riscv/kernel/setup.c
@@ -173,6 +173,7 @@ asmlinkage void __init setup_vm(void)
void __init parse_dtb(unsigned int hartid, void *dtb)
{
+ printk("HART = %u DTB = %lxn", hartid, dtb);
early_init_dt_scan(__va(dtb));
}
diff --git a/drivers/of/base.c b/drivers/of/base.c
index 74eaedd5b860..c019e4158e1d 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -940,10 +940,12 @@ struct device_node *of_find_node_by_type(struct device_node *from,
unsigned long flags;
raw_spin_lock_irqsave(&devtree_lock, flags);
- for_each_of_allnodes_from(from, np)
+ for_each_of_allnodes_from(from, np) {
+ printk("%lx %lx [%s] | [%s]n", from, np, np->type, type);
if (np->type && (of_node_cmp(np->type, type) == 0)
&& of_node_get(np))
break;
+ }
of_node_put(from);
raw_spin_unlock_irqrestore(&devtree_lock, flags);
return np;
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index 800ad252cf9c..2b45870ebada 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -31,6 +31,8 @@
#include "of_private.h"
+#define pr_debug printk
+
/*
* of_fdt_limit_memory - limit the number of regions in the /memory node
* @limit: maximum entries
@@ -1253,6 +1255,7 @@ bool __init early_init_dt_scan(void *params)
*/
void __init unflatten_device_tree(void)
{
+ printk("INITIAL: %lxn", initial_boot_params);
__unflatten_device_tree(initial_boot_params, NULL, &of_root,
early_init_dt_alloc_memory_arch, false);
ΠΡΠ²ΠΎΠ΄ Π½Π° ΠΆΠ΅Π»Π΅Π·Π΅
SIFIVE, INC.
5555555555555555555555555
5555 5555
5555 5555
5555 5555
5555 5555555555555555555555
5555 555555555555555555555555
5555 5555
5555 5555
5555 5555
5555555555555555555555555555 55555
55555 555555555 55555
55555 55555 55555
55555 5 55555
55555 55555
55555 55555
55555 55555
55555 55555
55555 55555
555555555
55555
5
SiFive RISC-V Core IP
{
#address-cells = <0x00000001>;
#size-cells = <0x00000001>;
compatible = "freechips,rocketchip-unknown-dev";
model = "freechips,rocketchip-unknown";
chosen {
linux,initrd-start = <0x82000000>;
riscv,kernel-end = <0x81200000>;
riscv,kernel-start = <0x80200000>;
#address-cells = <0x00000001>;
#size-cells = <0x00000000>;
bootargs = <0x64656275 0x6720636f 0x6e736f6c 0x653d7474 0x79534946 0x302c3132 0x35323030 0x20726f6f 0x743d2f64 0x65762f6d 0x6d63626c 0x6b307032 0x206c6f67 0x6c657665 0x6c3d3720 0x726f6f74 0x77616974>;
}
firmware {
sifive,uboot = "YYYY-MM-DD";
}
aliases {
serial0 = <0x2f736f63 0x2f736572 0x69616c40 0x36343030 0x30303030>;
}
cpus {
#address-cells = <0x00000001>;
#size-cells = <0x00000000>;
cpu@0 {
device_type = "cpu";
clock-frequency = <0x00000000>;
compatible = "sifive,rocket0", "riscv";
d-cache-block-size = <0x00000010>;
d-cache-sets = <0x00000040>;
d-cache-size = <0x00001000>;
d-tlb-sets = <0x00000001>;
d-tlb-size = <0x00000020>;
i-cache-block-size = <0x00000010>;
i-cache-sets = <0x00000040>;
i-cache-size = <0x00001000>;
i-tlb-sets = <0x00000001>;
i-tlb-size = <0x00000020>;
mmu-type = "riscv,sv39";
next-level-cache = <0x00000001>;
reg = <0x00000000>;
riscv,isa = "rv64imafdc";
status = "okay";
timebase-frequency = <0x000f4240>;
tlb-split;
interrupt-controller {
#interrupt-cells = <0x00000001>;
compatible = "riscv,cpu-intc";
interrupt-controller;
phandle = <0x00000002>;
}
}
}
ram@80000000 {
device_type = "memory";
reg = <0x80000000 0x40000000>;
reg-names = "mem";
phandle = <0x00000001>;
}
soc {
#address-cells = <0x00000001>;
#size-cells = <0x00000001>;
compatible = "freechips,rocketchip-unknown-soc", "simple-bus";
ranges;
clint@2000000 {
compatible = "riscv,clint0";
interrupts-extended = <0x00000002 0x00000003 0x00000002 0x00000007>;
reg = <0x02000000 0x00010000>;
reg-names = "control";
}
debug-controller@0 {
compatible = "sifive,debug-013", "riscv,debug-013";
interrupts-extended = <0x00000002 0x0000ffff>;
reg = <0x00000000 0x00001000>;
reg-names = "control";
}
gpio@64002000 {
#gpio-cells = <0x00000002>;
#interrupt-cells = <0x00000002>;
compatible = "sifive,gpio0";
gpio-controller;
interrupt-controller;
interrupt-parent = <0x00000003>;
interrupts = <0x00000003 0x00000004 0x00000005 0x00000006 0x00000007 0x00000008>;
reg = <0x64002000 0x00001000>;
reg-names = "control";
}
interrupt-controller@c000000 {
#interrupt-cells = <0x00000001>;
compatible = "riscv,plic0";
interrupt-controller;
interrupts-extended = <0x00000002 0x0000000b 0x00000002 0x00000009>;
reg = <0x0c000000 0x04000000>;
reg-names = "control";
riscv,max-priority = <0x00000007>;
riscv,ndev = <0x00000008>;
phandle = <0x00000003>;
}
rom@10000 {
compatible = "sifive,maskrom0";
reg = <0x00010000 0x00002000>;
reg-names = "mem";
}
serial@64000000 {
compatible = "sifive,uart0";
interrupt-parent = <0x00000003>;
interrupts = <0x00000002>;
reg = <0x64000000 0x00001000>;
reg-names = "control";
}
spi@64001000 {
#address-cells = <0x00000001>;
#size-cells = <0x00000000>;
compatible = "sifive,spi0";
interrupt-parent = <0x00000003>;
interrupts = <0x00000001>;
reg = <0x64001000 0x00001000>;
reg-names = "control";
mmc@0 {
compatible = "mmc-spi-slot";
disable-wp;
reg = <0x00000000>;
spi-max-frequency = <0x01312d00>;
voltage-ranges = <0x00000ce4 0x00000ce4>;
}
}
tlclk {
#clock-cells = <0x00000000>;
clock-frequency = <0x017d7840>;
clock-output-names = "tlclk";
compatible = "fixed-clock";
}
}
}
[ 0.000000] HART = 0 DTB = 81200000
[ 0.000000] search "chosen", depth: 0, uname:
[ 0.000000] search "chosen", depth: 1, uname: chosen
[ 0.000000] Looking for initrd properties...
[ 0.000000] Command line is: debug console=ttySIF0,125200 root=/dev/mmcblk0p2 loglevel=7 rootwait
[ 0.000000] dt_root_size_cells = 1
[ 0.000000] dt_root_addr_cells = 1
[ 0.000000] memory scan node ram@80000000, reg size 8,
[ 0.000000] - 80000000 , 40000000
[ 0.000000] OF: fdt: Ignoring memory range 0x80000000 - 0x80200000
[ 0.000000] Linux version 4.19.0-sifive-1+ (trosinenko@trosinenko-pc) (gcc version 8.3.0 (Buildroot 2019.02-07449-g4eddd28f99)) #1 SMP Sat Jul 6 12:14:41 MSK 2019
[ 0.000000] bootconsole [early0] enabled
[ 0.000000] initrd not found or empty - disabling initrd
[ 0.000000] Zone ranges:
[ 0.000000] DMA32 [mem 0x0000000080200000-0x00000000bfffffff]
[ 0.000000] Normal [mem 0x00000000c0000000-0x00000bffffffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000080200000-0x00000000bfffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000080200000-0x00000000bfffffff]
[ 0.000000] INITIAL: ffffffe001000000
[ 0.000000] -> unflatten_device_tree()
[ 0.000000] Unflattening device tree:
[ 0.000000] magic: d00dfeed
[ 0.000000] size: 00001000
[ 0.000000] version: 00000011
[ 0.000000] size is 13512, allocating...
[ 0.000000] unflattening (____ptrval____)...
[ 0.000000] fixed up name for ->
[ 0.000000] fixed up name for chosen -> chosen
[ 0.000000] fixed up name for firmware -> firmware
[ 0.000000] fixed up name for aliases -> aliases
[ 0.000000] fixed up name for cpus -> cpus
[ 0.000000] fixed up name for cpu@0 -> cpu
[ 0.000000] fixed up name for interrupt-controller -> interrupt-controller
[ 0.000000] fixed up name for ram@80000000 -> ram
[ 0.000000] fixed up name for soc -> soc
[ 0.000000] fixed up name for clint@2000000 -> clint
[ 0.000000] fixed up name for debug-controller@0 -> debug-controller
[ 0.000000] fixed up name for gpio@64002000 -> gpio
[ 0.000000] fixed up name for interrupt-controller@c000000 -> interrupt-controller
[ 0.000000] fixed up name for rom@10000 -> rom
[ 0.000000] fixed up name for serial@64000000 -> serial
[ 0.000000] fixed up name for spi@64001000 -> spi
[ 0.000000] fixed up name for mmc@0 -> mmc
[ 0.000000] fixed up name for tlclk -> tlclk
[ 0.000000] <- unflatten_device_tree()
[ 0.000000] software IO TLB: mapped [mem 0xbb1fc000-0xbf1fc000] (64MB)
[ 0.000000] 0 ffffffe03effcab0 [attach() failed for %s with error %d
[ 0.000000] ] | [cpu]
[ 0.000000] 0 ffffffe03eff0020 [(null)] | [cpu]
ΠΡΠ²ΠΎΠ΄ Π² QEMU
SIFIVE, INC.
5555555555555555555555555
5555 5555
5555 5555
5555 5555
5555 5555555555555555555555
5555 555555555555555555555555
5555 5555
5555 5555
5555 5555
5555555555555555555555555555 55555
55555 555555555 55555
55555 55555 55555
55555 5 55555
55555 55555
55555 55555
55555 55555
55555 55555
55555 55555
555555555
55555
5
SiFive RISC-V Core IP
{
#address-cells = <0x00000002>;
#size-cells = <0x00000002>;
compatible = "riscv-virtio";
model = "riscv-virtio,qemu";
chosen {
linux,initrd-start = <0x00000000 0x88000000>;
linux,initrd-end = <0x00000000 0x88442b86>;
riscv,kernel-start = <0x00000000 0x80200000>;
riscv,kernel-end = <0x00000000 0x80c482ac>;
bootargs = "";
stdout-path = <0x2f756172 0x74403130 0x30303030>;
}
uart@10000000 {
interrupts = <0x0000000a>;
interrupt-parent = <0x00000002>;
clock-frequency = <0x00384000>;
reg = <0x00000000 0x10000000 0x00000000 0x00000100>;
compatible = "ns16550a";
}
test@100000 {
reg = <0x00000000 0x00100000 0x00000000 0x00001000>;
compatible = "sifive,test0";
}
virtio_mmio@10008000 {
interrupts = <0x00000008>;
interrupt-parent = <0x00000002>;
reg = <0x00000000 0x10008000 0x00000000 0x00001000>;
compatible = "virtio,mmio";
}
virtio_mmio@10007000 {
interrupts = <0x00000007>;
interrupt-parent = <0x00000002>;
reg = <0x00000000 0x10007000 0x00000000 0x00001000>;
compatible = "virtio,mmio";
}
virtio_mmio@10006000 {
interrupts = <0x00000006>;
interrupt-parent = <0x00000002>;
reg = <0x00000000 0x10006000 0x00000000 0x00001000>;
compatible = "virtio,mmio";
}
virtio_mmio@10005000 {
interrupts = <0x00000005>;
interrupt-parent = <0x00000002>;
reg = <0x00000000 0x10005000 0x00000000 0x00001000>;
compatible = "virtio,mmio";
}
virtio_mmio@10004000 {
interrupts = <0x00000004>;
interrupt-parent = <0x00000002>;
reg = <0x00000000 0x10004000 0x00000000 0x00001000>;
compatible = "virtio,mmio";
}
virtio_mmio@10003000 {
interrupts = <0x00000003>;
interrupt-parent = <0x00000002>;
reg = <0x00000000 0x10003000 0x00000000 0x00001000>;
compatible = "virtio,mmio";
}
virtio_mmio@10002000 {
interrupts = <0x00000002>;
interrupt-parent = <0x00000002>;
reg = <0x00000000 0x10002000 0x00000000 0x00001000>;
compatible = "virtio,mmio";
}
virtio_mmio@10001000 {
interrupts = <0x00000001>;
interrupt-parent = <0x00000002>;
reg = <0x00000000 0x10001000 0x00000000 0x00001000>;
compatible = "virtio,mmio";
}
cpus {
#address-cells = <0x00000001>;
#size-cells = <0x00000000>;
timebase-frequency = <0x00989680>;
cpu@0 {
device_type = "cpu";
reg = <0x00000000>;
status = "okay";
compatible = "riscv";
riscv,isa = "rv64imafdcsu";
mmu-type = "riscv,sv48";
clock-frequency = <0x3b9aca00>;
interrupt-controller {
#interrupt-cells = <0x00000001>;
interrupt-controller;
compatible = "riscv,cpu-intc";
linux,phandle = <0x00000001>;
phandle = <0x00000001>;
}
}
}
memory@80000000 {
device_type = "memory";
reg = <0x00000000 0x80000000 0x00000000 0x40000000>;
}
soc {
#address-cells = <0x00000002>;
#size-cells = <0x00000002>;
compatible = "simple-bus";
ranges;
pci@30000000 {
interrupt-map-mask = <0x00001800 0x00000000 0x00000000 0x00000007>;
interrupt-map = <0x00000000 0x00000000 0x00000000 0x00000001 0x00000002 0x00000020 0x00000000 0x00000000 0x00000000 0x00000002 0x00000002 0x00000021 0x00000000 0x00000000 0x00000000 0x00000003 0x00000002 0x00000022 0x00000000 0x00000000 0x00000000 0x00000004 0x00000002 0x00000023 0x00000800 0x00000000 0x00000000 0x00000001 0x00000002 0x00000021 0x00000800 0x00000000 0x00000000 0x00000002 0x00000002 0x00000022 0x00000800 0x00000000 0x00000000 0x00000003 0x00000002 0x00000023 0x00000800 0x00000000 0x00000000 0x00000004 0x00000002 0x00000020 0x00001000 0x00000000 0x00000000 0x00000001 0x00000002 0x00000022 0x00001000 0x00000000 0x00000000 0x00000002 0x00000002 0x00000023 0x00001000 0x00000000 0x00000000 0x00000003 0x00000002 0x00000020 0x00001000 0x00000000 0x00000000 0x00000004 0x00000002 0x00000021 0x00001800 0x00000000 0x00000000 0x00000001 0x00000002 0x00000023 0x00001800 0x00000000 0x00000000 0x00000002 0x00000002 0x00000020 0x00001800 0x00000000 0x00000000 0x00000003 0x00000002 0x00000021 0x00001800 0x00000000 0x00000000 0x00000004 0x00000002 0x00000022>;
ranges = <0x01000000 0x00000000 0x00000000 0x00000000 0x03000000 0x00000000 0x00010000 0x02000000 0x00000000 0x40000000 0x00000000 0x40000000 0x00000000 0x40000000>;
reg = <0x00000000 0x30000000 0x00000000 0x10000000>;
dma-coherent;
bus-range = <0x00000000 0x000002ff>;
linux,pci-domain = <0x00000000>;
device_type = "pci";
compatible = "pci-host-ecam-generic";
#size-cells = <0x00000002>;
#interrupt-cells = <0x00000001>;
#address-cells = <0x00000003>;
}
interrupt-controller@c000000 {
linux,phandle = <0x00000002>;
phandle = <0x00000002>;
riscv,ndev = <0x00000035>;
riscv,max-priority = <0x00000007>;
reg-names = "control";
reg = <0x00000000 0x0c000000 0x00000000 0x04000000>;
interrupts-extended = <0x00000001 0x0000000b 0x00000001 0x00000009>;
interrupt-controller;
compatible = "riscv,plic0";
#interrupt-cells = <0x00000001>;
#address-cells = <0x00000000>;
}
clint@2000000 {
interrupts-extended = <0x00000001 0x00000003 0x00000001 0x00000007>;
reg = <0x00000000 0x02000000 0x00000000 0x00010000>;
compatible = "riscv,clint0";
}
}
}
[ 0.000000] HART = 0 DTB = 80e00000
[ 0.000000] search "chosen", depth: 0, uname:
[ 0.000000] search "chosen", depth: 1, uname: chosen
[ 0.000000] Looking for initrd properties...
[ 0.000000] initrd_start=0x88000000 initrd_end=0x88442b86
[ 0.000000] Command line is: earlyprintk
[ 0.000000] dt_root_size_cells = 2
[ 0.000000] dt_root_addr_cells = 2
[ 0.000000] memory scan node memory@80000000, reg size 16,
[ 0.000000] - 80000000 , 40000000
[ 0.000000] OF: fdt: Ignoring memory range 0x80000000 - 0x80200000
[ 0.000000] Linux version 4.19.0-sifive-1+ (trosinenko@trosinenko-pc) (gcc version 8.3.0 (Buildroot 2019.02-07449-g4eddd28f99)) #1 SMP Sat Jul 6 12:14:41 MSK 2019
[ 0.000000] bootconsole [early0] enabled
[ 0.000000] Initial ramdisk at: 0x(____ptrval____) (4467590 bytes)
[ 0.000000] Zone ranges:
[ 0.000000] DMA32 [mem 0x0000000080200000-0x00000000bfffffff]
[ 0.000000] Normal [mem 0x00000000c0000000-0x00000bffffffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000080200000-0x00000000bfffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000080200000-0x00000000bfffffff]
[ 0.000000] INITIAL: ffffffe000c00000
[ 0.000000] -> unflatten_device_tree()
[ 0.000000] Unflattening device tree:
[ 0.000000] magic: d00dfeed
[ 0.000000] size: 00000d56
[ 0.000000] version: 00000011
[ 0.000000] size is 14192, allocating...
[ 0.000000] unflattening (____ptrval____)...
[ 0.000000] fixed up name for ->
[ 0.000000] fixed up name for chosen -> chosen
[ 0.000000] fixed up name for uart@10000000 -> uart
[ 0.000000] fixed up name for test@100000 -> test
[ 0.000000] fixed up name for virtio_mmio@10008000 -> virtio_mmio
[ 0.000000] fixed up name for virtio_mmio@10007000 -> virtio_mmio
[ 0.000000] fixed up name for virtio_mmio@10006000 -> virtio_mmio
[ 0.000000] fixed up name for virtio_mmio@10005000 -> virtio_mmio
[ 0.000000] fixed up name for virtio_mmio@10004000 -> virtio_mmio
[ 0.000000] fixed up name for virtio_mmio@10003000 -> virtio_mmio
[ 0.000000] fixed up name for virtio_mmio@10002000 -> virtio_mmio
[ 0.000000] fixed up name for virtio_mmio@10001000 -> virtio_mmio
[ 0.000000] fixed up name for cpus -> cpus
[ 0.000000] fixed up name for cpu@0 -> cpu
[ 0.000000] fixed up name for interrupt-controller -> interrupt-controller
[ 0.000000] fixed up name for memory@80000000 -> memory
[ 0.000000] fixed up name for soc -> soc
[ 0.000000] fixed up name for pci@30000000 -> pci
[ 0.000000] fixed up name for interrupt-controller@c000000 -> interrupt-controller
[ 0.000000] fixed up name for clint@2000000 -> clint
[ 0.000000] <- unflatten_device_tree()
[ 0.000000] software IO TLB: mapped [mem 0xbb1fc000-0xbf1fc000] (64MB)
[ 0.000000] 0 ffffffe03effc808 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effca78 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effcd98 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effd068 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effd230 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effd4b8 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effd740 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effd9c8 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effdc50 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effded8 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effe160 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effe3e8 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effe670 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effe888 [cpu] | [cpu]
[ 0.000000] ffffffe03effe888 ffffffe03effec00 [<NULL>] | [cpu]
[ 0.000000] ffffffe03effe888 ffffffe03effeee8 [memory] | [cpu]
[ 0.000000] ffffffe03effe888 ffffffe03efff0b0 [<NULL>] | [cpu]
[ 0.000000] ffffffe03effe888 ffffffe03efff320 [pci] | [cpu]
[ 0.000000] ffffffe03effe888 ffffffe03efff858 [<NULL>] | [cpu]
[ 0.000000] ffffffe03effe888 ffffffe03efffd58 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effc808 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effca78 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effcd98 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effd068 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effd230 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effd4b8 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effd740 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effd9c8 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effdc50 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effded8 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effe160 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effe3e8 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effe670 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effe888 [cpu] | [cpu]
[ 0.000000] elf_hwcap is 0x112d
[ 0.000000] percpu: Embedded 17 pages/cpu @(____ptrval____) s29400 r8192 d32040 u69632
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 258055
[ 0.000000] Kernel command line: earlyprintk
[ 0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)
[ 0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes)
[ 0.000000] Sorting __ex_table...
[ 0.000000] Memory: 949716K/1046528K available (6565K kernel code, 342K rwdata, 2564K rodata, 208K init, 832K bss, 96812K reserved, 0K cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] rcu: Hierarchical RCU implementation.
[ 0.000000] rcu: RCU event tracing is enabled.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[ 0.000000] NR_IRQS: 0, nr_irqs: 0, preallocated irqs: 0
[ 0.000000] plic: mapped 53 interrupts to 2 (out of 2) handlers.
[ 0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x24e6a1710, max_idle_ns: 440795202120 ns
[ 0.000000] Console: colour dummy device 80x25
[ 0.000000] console [tty0] enabled
[ 0.000000] bootconsole [early0] disabled
[ 0.000000] HART = 0 DTB = 80e00000
[ 0.000000] search "chosen", depth: 0, uname:
[ 0.000000] search "chosen", depth: 1, uname: chosen
[ 0.000000] Looking for initrd properties...
[ 0.000000] initrd_start=0x88000000 initrd_end=0x88442b86
[ 0.000000] Command line is: earlyprintk
[ 0.000000] dt_root_size_cells = 2
[ 0.000000] dt_root_addr_cells = 2
[ 0.000000] memory scan node memory@80000000, reg size 16,
[ 0.000000] - 80000000 , 40000000
[ 0.000000] OF: fdt: Ignoring memory range 0x80000000 - 0x80200000
[ 0.000000] Linux version 4.19.0-sifive-1+ (trosinenko@trosinenko-pc) (gcc version 8.3.0 (Buildroot 2019.02-07449-g4eddd28f99)) #1 SMP Sat Jul 6 12:14:41 MSK 2019
[ 0.000000] bootconsole [early0] enabled
[ 0.000000] Initial ramdisk at: 0x(____ptrval____) (4467590 bytes)
[ 0.000000] Zone ranges:
[ 0.000000] DMA32 [mem 0x0000000080200000-0x00000000bfffffff]
[ 0.000000] Normal [mem 0x00000000c0000000-0x00000bffffffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000080200000-0x00000000bfffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000080200000-0x00000000bfffffff]
[ 0.000000] INITIAL: ffffffe000c00000
[ 0.000000] -> unflatten_device_tree()
[ 0.000000] Unflattening device tree:
[ 0.000000] magic: d00dfeed
[ 0.000000] size: 00000d56
[ 0.000000] version: 00000011
[ 0.000000] size is 14192, allocating...
[ 0.000000] unflattening (____ptrval____)...
[ 0.000000] fixed up name for ->
[ 0.000000] fixed up name for chosen -> chosen
[ 0.000000] fixed up name for uart@10000000 -> uart
[ 0.000000] fixed up name for test@100000 -> test
[ 0.000000] fixed up name for virtio_mmio@10008000 -> virtio_mmio
[ 0.000000] fixed up name for virtio_mmio@10007000 -> virtio_mmio
[ 0.000000] fixed up name for virtio_mmio@10006000 -> virtio_mmio
[ 0.000000] fixed up name for virtio_mmio@10005000 -> virtio_mmio
[ 0.000000] fixed up name for virtio_mmio@10004000 -> virtio_mmio
[ 0.000000] fixed up name for virtio_mmio@10003000 -> virtio_mmio
[ 0.000000] fixed up name for virtio_mmio@10002000 -> virtio_mmio
[ 0.000000] fixed up name for virtio_mmio@10001000 -> virtio_mmio
[ 0.000000] fixed up name for cpus -> cpus
[ 0.000000] fixed up name for cpu@0 -> cpu
[ 0.000000] fixed up name for interrupt-controller -> interrupt-controller
[ 0.000000] fixed up name for memory@80000000 -> memory
[ 0.000000] fixed up name for soc -> soc
[ 0.000000] fixed up name for pci@30000000 -> pci
[ 0.000000] fixed up name for interrupt-controller@c000000 -> interrupt-controller
[ 0.000000] fixed up name for clint@2000000 -> clint
[ 0.000000] <- unflatten_device_tree()
[ 0.000000] software IO TLB: mapped [mem 0xbb1fc000-0xbf1fc000] (64MB)
[ 0.000000] 0 ffffffe03effc808 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effca78 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effcd98 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effd068 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effd230 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effd4b8 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effd740 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effd9c8 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effdc50 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effded8 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effe160 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effe3e8 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effe670 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effe888 [cpu] | [cpu]
[ 0.000000] ffffffe03effe888 ffffffe03effec00 [<NULL>] | [cpu]
[ 0.000000] ffffffe03effe888 ffffffe03effeee8 [memory] | [cpu]
[ 0.000000] ffffffe03effe888 ffffffe03efff0b0 [<NULL>] | [cpu]
[ 0.000000] ffffffe03effe888 ffffffe03efff320 [pci] | [cpu]
[ 0.000000] ffffffe03effe888 ffffffe03efff858 [<NULL>] | [cpu]
[ 0.000000] ffffffe03effe888 ffffffe03efffd58 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effc808 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effca78 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effcd98 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effd068 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effd230 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effd4b8 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effd740 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effd9c8 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effdc50 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effded8 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effe160 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effe3e8 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effe670 [<NULL>] | [cpu]
[ 0.000000] 0 ffffffe03effe888 [cpu] | [cpu]
[ 0.000000] elf_hwcap is 0x112d
[ 0.000000] percpu: Embedded 17 pages/cpu @(____ptrval____) s29400 r8192 d32040 u69632
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 258055
[ 0.000000] Kernel command line: earlyprintk
[ 0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)
[ 0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes)
[ 0.000000] Sorting __ex_table...
[ 0.000000] Memory: 949716K/1046528K available (6565K kernel code, 342K rwdata, 2564K rodata, 208K init, 832K bss, 96812K reserved, 0K cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] rcu: Hierarchical RCU implementation.
[ 0.000000] rcu: RCU event tracing is enabled.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[ 0.000000] NR_IRQS: 0, nr_irqs: 0, preallocated irqs: 0
[ 0.000000] plic: mapped 53 interrupts to 2 (out of 2) handlers.
[ 0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x24e6a1710, max_idle_ns: 440795202120 ns
[ 0.000000] Console: colour dummy device 80x25
[ 0.000000] console [tty0] enabled
[ 0.000000] bootconsole [early0] disabled
[ 0.000000] Calibrating delay loop (skipped), value calculated using timer frequency.. 20.00 BogoMIPS (lpj=100000)
[ 0.000000] pid_max: default: 32768 minimum: 301
[ 0.000000] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes)
[ 0.000000] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes)
[ 0.020000] rcu: Hierarchical SRCU implementation.
[ 0.020000] smp: Bringing up secondary CPUs ...
[ 0.020000] smp: Brought up 1 node, 1 CPU
[ 0.050000] devtmpfs: initialized
[ 0.050000] 0 ffffffe03effc808 [<NULL>] | [cpu]
[ 0.050000] 0 ffffffe03effca78 [<NULL>] | [cpu]
[ 0.050000] 0 ffffffe03effcd98 [<NULL>] | [cpu]
[ 0.050000] 0 ffffffe03effd068 [<NULL>] | [cpu]
[ 0.050000] 0 ffffffe03effd230 [<NULL>] | [cpu]
[ 0.050000] 0 ffffffe03effd4b8 [<NULL>] | [cpu]
[ 0.050000] 0 ffffffe03effd740 [<NULL>] | [cpu]
[ 0.050000] 0 ffffffe03effd9c8 [<NULL>] | [cpu]
[ 0.050000] 0 ffffffe03effdc50 [<NULL>] | [cpu]
[ 0.050000] 0 ffffffe03effded8 [<NULL>] | [cpu]
[ 0.050000] 0 ffffffe03effe160 [<NULL>] | [cpu]
[ 0.050000] 0 ffffffe03effe3e8 [<NULL>] | [cpu]
[ 0.050000] 0 ffffffe03effe670 [<NULL>] | [cpu]
[ 0.050000] 0 ffffffe03effe888 [cpu] | [cpu]
[ 0.050000] random: get_random_u32 called from bucket_table_alloc+0x76/0x17a with crng_init=0
[ 0.050000] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.050000] futex hash table entries: 256 (order: 2, 16384 bytes)
[ 0.060000] NET: Registered protocol family 16
[ 0.090000] vgaarb: loaded
[ 0.090000] SCSI subsystem initialized
[ 0.090000] usbcore: registered new interface driver usbfs
[ 0.090000] usbcore: registered new interface driver hub
[ 0.090000] usbcore: registered new device driver usb
[ 0.090000] pps_core: LinuxPPS API ver. 1 registered
[ 0.090000] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <[email protected]>
[ 0.090000] PTP clock support registered
[ 0.100000] Advanced Linux Sound Architecture Driver Initialized.
[ 0.100000] clocksource: Switched to clocksource riscv_clocksource
[ 0.110000] NET: Registered protocol family 2
[ 0.110000] tcp_listen_portaddr_hash hash table entries: 512 (order: 1, 8192 bytes)
[ 0.110000] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
[ 0.110000] TCP bind hash table entries: 8192 (order: 5, 131072 bytes)
[ 0.110000] TCP: Hash tables configured (established 8192 bind 8192)
[ 0.110000] UDP hash table entries: 512 (order: 2, 16384 bytes)
[ 0.110000] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[ 0.110000] NET: Registered protocol family 1
[ 0.120000] Unpacking initramfs...
[ 0.590000] workingset: timestamp_bits=62 max_order=18 bucket_order=0
[ 0.620000] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[ 0.620000] io scheduler noop registered
[ 0.620000] io scheduler deadline registered
[ 0.620000] io scheduler cfq registered (default)
[ 0.620000] io scheduler mq-deadline registered
[ 0.620000] io scheduler kyber registered
[ 0.620000] shpchp: Standard Hot Plug PCI Controller Driver version: 0.4
[ 0.690000] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[ 0.690000] 10000000.uart: ttyS0 at MMIO 0x10000000 (irq = 10, base_baud = 230400) is a 16550A
[ 0.720000] console [ttyS0] enabled
[ 0.720000] [drm] radeon kernel modesetting enabled.
[ 0.720000] [drm] amdgpu kernel modesetting enabled.
[ 0.730000] loop: module loaded
[ 0.730000] libphy: Fixed MDIO Bus: probed
[ 0.740000] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
[ 0.740000] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[ 0.740000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.740000] ehci-pci: EHCI PCI platform driver
[ 0.740000] ehci-platform: EHCI generic platform driver
[ 0.740000] mousedev: PS/2 mouse device common for all mice
[ 0.740000] usbcore: registered new interface driver usbhid
[ 0.740000] usbhid: USB HID core driver
[ 0.740000] usbcore: registered new interface driver snd-usb-audio
[ 0.740000] NET: Registered protocol family 10
[ 0.750000] Segment Routing with IPv6
[ 0.750000] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[ 0.750000] NET: Registered protocol family 17
[ 0.750000] Key type dns_resolver registered
[ 0.760000] ALSA device list:
[ 0.760000] No soundcards found.
[ 0.770000] Freeing unused kernel memory: 208K
[ 0.770000] This architecture does not have kernel memory protection.
[ 0.770000] Run /init as init process
(Β«Π’Π°ΠΉΠΌΡΡΠ΅ΠΌΠΏΠ½ΡΡΡΠΌΠΈΒ» ΡΡΡΠΎΡΠΊΠΈ Π²ΡΠ²ΠΎΠ΄ΠΈΡ ΡΠ΄ΡΠΎ, ΠΏΠ΅ΡΠ΅Π΄ Π½ΠΈΠΌΠΈ Π΄Π΅ΡΠ΅Π²ΠΎ Π²ΡΠ²ΠΎΠ΄ΠΈΡ BBL) Π‘ ΠΎΠ΄Π½ΠΎΠΉ ΡΡΠΎΡΠΎΠ½Ρ, FDT ΡΡΠΏΠ΅ΡΠ½ΠΎ ΡΠΈΡΠ°Π΅ΡΡΡ, Ρ Π΄ΡΡΠ³ΠΎΠΉ β ΠΏΠΎΠ»ΡΡΠ°Π΅ΡΡΡ ΠΊΠ°ΠΊΠ°Ρ-ΡΠΎ ΡΠ΅ΠΏΡΡ Π° Π² ΡΠ°ΡΠΏΠ°ΡΡΠ΅Π½Π½ΠΎΠΌ Β«ΠΎΠ±ΡΠ΅ΠΊΡΠ½ΠΎΠΌΒ» Π΄Π΅ΡΠ΅Π²Π΅.
Π ΠΏΡΠΎΡΠ΅ΡΡΠ΅ ΠΎΡΠ»Π°Π΄ΠΊΠΈ Ρ ΠΏΠΎΠ½ΡΠ», ΡΡΠΎ BBL Π½Π΅ ΠΌΠΎΠ³ ΠΏΡΠΎΡΠΈΡΠ°ΡΡ Β«Π΄Π²ΠΎΠΉΠ½ΠΎΠΉΒ» Π°Π΄ΡΠ΅Ρ Π½Π΅ ΠΏΠΎΡΠΎΠΌΡ, ΡΡΠΎ Π² ΠΊΠΎΠ½ΡΠΈΠ³Π΅ Π±ΡΠ»Π° ΠΎΡΠΈΠ±ΠΊΠ°, Π° ΠΏΡΠΎΡΡΠΎ ΠΏΠΎΡΠΎΠΌΡ, ΡΡΠΎ Ρ ΠΊΠΎΡΠ½Π΅Π²ΠΎΠ³ΠΎ ΡΠ·Π»Π° Π±ΡΠ» Π²ΡΡΡΠ°Π²Π»Π΅Π½ #address-cells = <1>; #size-cells = <1>;
.
Π Π°ΡΡΠΈΡΠΈΠ² ΠΎΡΠ»Π°Π΄ΠΎΡΠ½ΡΠΉ Π²ΡΠ²ΠΎΠ΄, Ρ ΡΠ²ΠΈΠ΄Π΅Π», ΡΡΠΎ ΡΠΊΠ°Π·Π°ΡΠ΅Π»ΠΈ Π½Π° type
ΠΈ name
Β«ΠΏΠΎΠ±ΠΈΠ»ΠΈΡΡΒ», ΠΏΡΠΈΡΡΠΌ Π΄ΠΎΠ²ΠΎΠ»ΡΠ½ΠΎ ΡΡΡΠ°Π½Π½ΡΠΌ ΠΎΠ±ΡΠ°Π·ΠΎΠΌ: Ρ Π½ΠΈΡ
ΠΎΠ±Π½ΡΠ»ΠΈΠ»ΡΡ ΠΏΠ΅ΡΠ²ΡΠΉ (Π½Π°ΡΠΈΠ½Π°Ρ Ρ Π½ΡΠ»Ρ) Π±Π°ΠΉΡ, ΡΡΠΎ-ΡΠΎ Π²ΡΠΎΠ΄Π΅ 0xabcdef -> 0xab00ef
. ΠΡΠΈΡΠ»ΠΎΡΡ Π²ΠΎΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΡΡΡ Π·Π½Π°ΠΊΠΎΠΌΠΎΠΉ ΡΠ°ΠΊΡΠΈΠΊΠΎΠΉ: Π·Π½Π°Ρ Π°Π΄ΡΠ΅ΡΠ°, ΠΏΠΎ ΠΊΠΎΡΠΎΡΡΠΌ Π½Π°Ρ
ΠΎΠ΄ΠΈΡΡΡ ΠΏΠΎΠ²ΡΠ΅ΠΆΠ΄ΡΠ½Π½Π°Ρ ΠΏΠ°ΠΌΡΡΡ, Π΄ΠΎΠΏΠΈΡΠ°ΡΡ Π² ΡΡΠ½ΠΊΡΠΈΡ printk
ΠΏΠ΅ΡΠ°ΡΡ ΡΡΠΈΡ
Π΄Π°Π½Π½ΡΡ
. ΠΡ ΠΈ ΡΠ°ΠΌΠΈΡ
Π²ΡΠ·ΠΎΠ²ΠΎΠ² printk
ΠΏΠΎΡΠ°ΡΠΊΠΈΠ΄Π°ΡΡ, Π³Π΄Π΅ ΠΈΡ
ΠΌΠ°Π»ΠΎ. Π£Π²Ρ, ΡΠΈΠ»ΡΠ½ΠΎ ΠΏΠΎΠ½ΡΡΠ½Π΅Π΅ Π½Π΅ ΡΡΠ°Π»ΠΎ. Π’ΠΎΠ³Π΄Π° Ρ ΡΡΠ°Π», ΡΠ²Π΅ΡΡΡΡΡ Ρ Π΄ΠΈΠ·Π°ΡΡΠ΅ΠΌΠ±Π»ΠΈΡΠΎΠ²Π°Π½Π½ΠΎΠΉ objdump
Π²Π΅ΡΡΠΈΠ΅ΠΉ, Π²ΡΡΡΠ½ΡΡ ΡΠ°ΡΡΡΠ°Π²Π»ΡΡΡ breakpoint-Ρ ΠΈ ΠΏΠΎ ΡΠ°Π³Π°ΠΌ ΠΏΡΠΎΡ
ΠΎΠ΄ΠΈΡΡ ΠΏΡΠΎΠ±Π»Π΅ΠΌΠ½ΡΠΉ ΡΡΠ°ΡΡΠΎΠΊ ΠΊΠΎΠ΄Π°. Π ΡΡΡ ΠΎΠ±Π½Π°ΡΡΠΆΠΈΠ»ΠΎΡΡ Π·Π°Π³Π°Π΄ΠΎΡΠ½ΠΎΠ΅ ΠΈ Π½Π΅ΠΏΡΠΈΡΡΠ½ΠΎΠ΅: Π΅ΡΠ»ΠΈ ΡΡΠ°Π·Ρ ΠΏΠΎΡΡΠ°Π²ΠΈΡΡ ΡΠΎΡΠΊΡ ΠΎΡΡΠ°Π½ΠΎΠ²Π° ΠΊΡΠ΄Π°-Π½ΠΈΠ±ΡΠ΄Ρ ΠΎΡΠ½ΠΎΡΠΈΡΠ΅Π»ΡΠ½ΠΎ Π΄Π°Π»Π΅ΠΊΠΎ ΠΎΡ known-good ΡΠΎΡΡΠΎΡΠ½ΠΈΡ, ΡΠΎ, ΠΎΡΡΠ°Π½ΠΎΠ²ΠΈΠ²ΡΠΈΡΡ Π½Π° Π½Π΅ΠΉ, Ρ ΡΠ²ΠΈΠΆΡ ΡΠΆΠ΅ ΠΏΠΎΠ²ΡΠ΅ΠΆΠ΄ΡΠ½Π½ΡΡ ΠΏΠ°ΠΌΡΡΡ. ΠΠΎ Π΅ΡΠ»ΠΈ ΠΏΠΎΠΏΡΡΠ°ΡΡΡΡ ΡΠΈΡ
ΠΎ ΠΏΠΎΠ΄ΠΊΡΠ°ΡΡΡΡΡ ΠΊ Π½Π΅ΠΉ ΠΏΠΎ ΡΠ°Π³Π°ΠΌ, ΡΠΎ ΠΎΡΠΈΠ±ΠΊΠ° ΡΡΠΏΠ΅Π²Π°Π΅Ρ ΡΠΏΡΡΡΠ°ΡΡΡΡ! ΠΠ΅Π»ΠΎ ΠΏΠ°Ρ
Π½Π΅Ρ Π±ΠΈΡΡΠΌ ΠΊΠΎΠ½ΡΡΠΎΠ»Π»Π΅ΡΠΎΠΌ ΠΏΠ°ΠΌΡΡΠΈ ΠΈ ΠΊΠ΅ΡΠΎΠΌ, ΡΠΊΡΡΠ²Π°ΡΡΠΈΠΌ ΠΎΡΠΈΠ±ΠΊΡ, Π΅ΡΠ»ΠΈ ΠΏΠΎΡΡΠΎΡΠ½Π½ΠΎ Π·Π°ΠΏΡΠ°ΡΠΈΠ²Π°ΡΡ Π½ΡΠΆΠ½ΠΎΠ΅ Π·Π½Π°ΡΠ΅Π½ΠΈΠ΅. Π ΡΡΠΎ Π΅ΡΠ»ΠΈ…
ΠΠ°ΠΌΠ΅Π½ΡΠ΅ΠΌ ΠΏΠ°ΠΌΡΡΡ
Π¦Π΅ΠΏΠ»ΡΡΡΡ Π·Π° Π²ΠΎΠ·ΠΌΠΎΠΆΠ½ΠΎΡΡΡ ΡΠ΅ΡΠΈΡΡ ΠΏΡΠΎΠ±Π»Π΅ΠΌΡ Π½Π΅ Π½Π° ΡΠ²ΠΎΠ΅ΠΉ ΡΡΠΎΡΠΎΠ½Π΅, Ρ ΠΏΡΠ΅Π΄ΠΏΠΎΠ»ΠΎΠΆΠΈΠ», ΡΡΠΎ, ΠΌΠΎΠΆΠ΅Ρ, ΠΌΠ½Π΅ ΠΏΡΠΎΡΡΠΎ ΠΏΡΠΈΡΠ»Π° Π±ΠΈΡΠ°Ρ ΠΏΠ»Π°Π½ΠΊΠ° ΠΏΠ°ΠΌΡΡΠΈ. Π’ΡΡ Ρ Π²ΡΠΏΠΎΠΌΠ½ΠΈΠ», ΡΡΠΎ Π½Π΅ΡΠ±ΡΠΊ Π΄Π΅ΡΡΡΠΈΠ»Π΅ΡΠ½Π΅ΠΉ Π΄Π°Π²Π½ΠΎΡΡΠΈ β ΡΡΠΎ Π½Π΅ ΡΠΎΠ»ΡΠΊΠΎ ΠΏΠΎΡΡΠ°ΡΠΈΠ²Π½ΡΠΉ ΠΊΠΎΠΌΠΏΡΡΡΠ΅Ρ, Π½ΠΎ ΠΈ ΡΠ΅Π½Π½ΡΠΉ ΠΈΡΡΠΎΡΠ½ΠΈΠΊ DDR2 SO-DIMM. ΠΠΎΠ½ΡΡΠΎΠΌ, Π² Π½Π΅Π³ΠΎ ΠΌΠΎΠΆΠ½ΠΎ Π·Π°ΡΡΠ½ΡΡΡ Π²ΡΠ½ΡΡΡΡ ΠΈΠ· ΠΏΠ»Π°ΡΡ ΠΏΠ°ΠΌΡΡΡ, ΠΈ ΠΏΠΎΠ»ΡΡΠΈΡΡ ΠΏΠΎΡΡΠΈ ΠΌΠ³Π½ΠΎΠ²Π΅Π½Π½ΠΎΠ΅ Π·Π°Π²ΠΈΡΠ°Π½ΠΈΠ΅ Memtest (Linux, ΠΊΡΡΠ°ΡΠΈ, ΠΏΡΠΈ ΡΡΠΎΠΌ Π³ΡΡΠ·ΠΈΠ»ΡΡ ΠΏΠΎΡΡΠΈ Π΄ΠΎ Π³ΡΠ°ΡΠΈΡΠ΅ΡΠΊΠΎΠΉ ΠΎΠ±ΠΎΠ»ΠΎΡΠΊΠΈ. ΠΠΎ Π»ΡΡΡΠ΅ Π½Π΅ ΠΏΠΎΠ²ΡΠΎΡΡΠΉΡΠ΅ ΡΠ°ΠΊΠΎΠΉ ΡΠΊΡΠΏΠ΅ΡΠΈΠΌΠ΅Π½Ρ, Π΅ΡΠ»ΠΈ Π²Π°ΠΌ Π΄ΠΎΡΠΎΠ³Π° ΠΈΠ½ΡΠΎΡΠΌΠ°ΡΠΈΡ Π½Π° ΠΏΠΎΠ΄ΠΌΠΎΠ½ΡΠΈΡΠΎΠ²Π°Π½Π½ΡΡ Π΄ΠΈΡΠΊΠ°Ρ …). Π‘ ΠΎΠ΄Π½ΠΎΠΉ ΡΡΠΎΡΠΎΠ½Ρ, ΠΌΠΎΠΆΠ½ΠΎ ΠΏΡΠ΅Π΄ΠΏΠΎΠ»ΠΎΠΆΠΈΡΡ, ΡΡΠΎ ΠΏΡΠΎΡΡΠΎ ΠΏΠ°ΠΌΡΡΡ Π½Π΅ ΠΏΠΎΠ΄ΠΎΡΠ»Π° ΠΊΠΎΠ½ΠΊΡΠ΅ΡΠ½ΠΎ ΠΊ ΡΡΠΎΠΌΡ Π½Π΅ΡΠ±ΡΠΊΡ. Π‘ Π΄ΡΡΠ³ΠΎΠΉ ΡΡΠΎΡΠΎΠ½Ρ, ΠΎΠ½ ΠΆΠ΅ ΡΠΌΠΎΠ³ Π·Π°Π³ΡΡΠ·ΠΈΡΡΡΡ! ΠΠΎΡΠ²ΠΈΠ»Π°ΡΡ Π½Π°Π΄Π΅ΠΆΠ΄Π°, ΡΡΠΎ ΠΏΡΠΎΡΡΠΎ ΠΏΠ°ΠΌΡΡΡ Β«Π±ΠΈΡΠ°ΡΒ», ΠΈ ΠΏΡΠΎΠ±Π»Π΅ΠΌΠ° Π½Π΅ Π² ΠΌΠΎΠ΅ΠΉ ΠΎΠ±ΡΡΡΠΊΠ΅.
ΠΠ½Π°ΡΠΈΡ, Π½ΡΠΆΠ½ΠΎ ΠΏΠΎΠΏΡΠΎΠ±ΠΎΠ²Π°ΡΡ Π²ΡΠ΅ΠΌΠ΅Π½Π½ΠΎ Π·Π°ΠΏΡΡΡΠΈΡΡΡΡ Ρ Π½Π΅ΡΠ±ΡΡΠ½ΠΎΠΉ ΠΏΠ°ΠΌΡΡΡΡ. Π ΡΠΎΠΆΠ°Π»Π΅Π½ΠΈΡ, Quartus 18 Π½Π΅ ΡΠΌΠ΅Π΅Ρ Π°ΠΏΠ³ΡΠ΅ΠΉΠ΄ΠΈΡΡ ΡΡΠΎΡ IP Core ΡΠ°ΠΊ, ΡΡΠΎΠ±Ρ Π΅Π³ΠΎ ΠΌΠΎΠΆΠ½ΠΎ Π±ΡΠ»ΠΎ ΡΠ΅Π΄Π°ΠΊΡΠΈΡΠΎΠ²Π°ΡΡ. ΠΠ½Π°ΡΠΈΡ, Π²ΡΡ-ΡΠ°ΠΊΠΈ ΠΏΡΠΈΡΠ»ΠΎ Π²ΡΠ΅ΠΌΡ Π½Π°ΡΡΠΈΡΡΡΡ ΡΠΎΠ·Π΄Π°Π²Π°ΡΡ Π½ΠΎΠ²ΡΠ΅ ΠΈΠ½ΡΡΠ°Π½ΡΡ. ΠΡΡ ΠΎΠΊΠ°Π·Π°Π»ΠΎΡΡ Π΄ΠΎΠ²ΠΎΠ»ΡΠ½ΠΎ ΠΏΡΠΎΡΡΠΎ: ΠΈΡΠ΅ΠΌ Π² IP Catalog ΠΏΡΠ½ΠΊΡ DDR2 SDRAM Controller with ALTMEMPHY Intel FPGA IP ΠΈ ΠΏΠΎΠ»ΡΡΠ°Π΅ΠΌ Π±Π»ΠΎΠΊ Ρ ΡΠ°ΠΊΠΈΠΌ ΠΆΠ΅ ΠΈΠ½ΡΠ΅ΡΡΠ΅ΠΉΡΠΎΠΌ, ΠΊΠ°ΠΊ ΠΈ ΡΠ°Π½ΡΡΠ΅. ΠΠ΄ΠΈΠ½ΡΡΠ²Π΅Π½Π½Π°Ρ ΠΏΡΠΎΠ±Π»Π΅ΠΌΠ° β ΡΡΠΎ Π²ΡΡΡΠ°Π²ΠΈΡΡ ΠΏΡΠ°Π²ΠΈΠ»ΡΠ½ΡΠ΅ Π½Π°ΡΡΡΠΎΠΉΠΊΠΈ ΠΏΠ°ΠΌΡΡΠΈ.
ΠΠΎΠ»ΡΡΠ°Π΅ΠΌ ΠΏΠ°ΡΠ°ΠΌΠ΅ΡΡΡ ΠΌΠΎΠ΄ΡΠ»Ρ ΠΏΠ°ΠΌΡΡΠΈ
ΠΡΡΡ ΠΎΡΠ½ΠΎΡΠΈΡΠ΅Π»ΡΠ½ΠΎ ΠΎΡΠ΅Π²ΠΈΠ΄Π½ΡΠΉ ΡΠΏΠΎΡΠΎΠ± Π½Π°ΡΡΡΠΎΠΈΡΡ ΠΌΠΎΠ΄ΡΠ»Ρ: ΠΏΡΠΎΡΠΈΡΠ°ΡΡ ΠΏΠ°ΡΠ°ΠΌΠ΅ΡΡΡ ΠΈΠ· SPD. ΠΠ΅ΠΉΡΡΠ²ΠΈΡΠ΅Π»ΡΠ½ΠΎ, Π΅ΡΠ»ΠΈ ΠΎΠ±ΡΡΠ½ΡΠΉ ΠΊΠΎΠΌΠΏΡΡΡΠ΅Ρ Π²ΡΡΠΈΡΡΠ²Π°Π΅Ρ Π΄Π°Π½Π½ΡΠ΅ SPD ΠΈ Π½Π°ΡΡΡΠ°ΠΈΠ²Π°Π΅Ρ ΠΏΠΎ Π½ΠΈΠΌ ΠΊΠΎΠ½ΡΡΠΎΠ»Π»Π΅Ρ, ΡΠΎ Π΄Π°Π²Π°ΠΉΡΠ΅ Π²ΡΡΠΈΡΠ°Π΅ΠΌ ΡΡΠΈ Π΄Π°Π½Π½ΡΠ΅ Π½Π° ΠΈΠΌΠ΅ΡΡΠ΅ΠΌΡΡ Π½Π΅ΡΠ±ΡΠΊΠ΅ ΠΈ Π²ΠΎΠ±ΡΡΠΌ ΠΈΡ Π² ΡΠ°Π±Π»ΠΈΡΠΊΡ.
ΠΠ° Ubuntu ΡΡΠΎ Π΄Π΅Π»Π°Π΅ΡΡΡ i2c-tools
, Π·Π°Π³ΡΡΠ·ΠΈΡΡ ΠΌΠΎΠ΄ΡΠ»ΠΈ eeprom
ΠΈ i2c-i801
(Π½Π΅ ΡΠ²Π΅ΡΠ΅Π½, ΠΏΡΠ°Π²Π΄Π°, ΡΡΠΎ Π²ΡΠΎΡΠΎΠΉ Π΄ΡΠ°ΠΉΠ²Π΅Ρ ΠΏΠΎΠ΄ΠΎΠΉΠ΄ΡΡ Π²Π΅Π·Π΄Π΅), ΠΏΠΎΡΠ»Π΅ ΡΠ΅Π³ΠΎ Π·Π°ΠΏΡΡΡΠΈΡΡ decode-dimms
:
ΠΡΠ²ΠΎΠ΄ decode-dimms
# decode-dimms version 6231 (2014-02-20 10:54:34 +0100)
Memory Serial Presence Detect Decoder
By Philip Edelbrock, Christian Zuckschwerdt, Burkart Lingner,
Jean Delvare, Trent Piepho and others
Decoding EEPROM: /sys/bus/i2c/drivers/eeprom/0-0050
Guessing DIMM is in bank 1
---=== SPD EEPROM Information ===---
EEPROM Checksum of bytes 0-62 OK (0x00)
SPD Revision Invalid
Fundamental Memory type Unknown (0x00)
---=== Manufacturing Information ===---
Manufacturer Undefined
Part Number Undefined
Decoding EEPROM: /sys/bus/i2c/drivers/eeprom/4-0050
Guessing DIMM is in bank 1
---=== SPD EEPROM Information ===---
EEPROM Checksum of bytes 0-62 OK (0x00)
SPD Revision Invalid
Fundamental Memory type Unknown (0x00)
---=== Manufacturing Information ===---
Manufacturer Undefined
Part Number Undefined
Decoding EEPROM: /sys/bus/i2c/drivers/eeprom/6-0050
Guessing DIMM is in bank 1
---=== SPD EEPROM Information ===---
EEPROM Checksum of bytes 0-62 OK (0x76)
# of bytes written to SDRAM EEPROM 128
Total number of bytes in EEPROM 256
Fundamental Memory type DDR2 SDRAM
SPD Revision 1.2
---=== Memory Characteristics ===---
Maximum module speed 800 MHz (PC2-6400)
Size 1024 MB
Banks x Rows x Columns x Bits 8 x 13 x 10 x 64
Ranks 2
SDRAM Device Width 16 bits
Module Height 30.0 mm
Module Type SO-DIMM (67.6 mm)
DRAM Package Planar
Voltage Interface Level SSTL 1.8V
Module Configuration Type No Parity
Refresh Rate Reduced (7.8 us) - Self Refresh
Supported Burst Lengths 4, 8
tCL-tRCD-tRP-tRAS 6-6-6-18
Supported CAS Latencies (tCL) 6T, 5T, 4T
Minimum Cycle Time 2.50 ns at CAS 6 (tCK min)
3.00 ns at CAS 5
3.75 ns at CAS 4
Maximum Access Time 0.40 ns at CAS 6 (tAC)
0.45 ns at CAS 5
0.50 ns at CAS 4
Maximum Cycle Time (tCK max) 8.00 ns
---=== Timing Parameters ===---
Address/Command Setup Time Before Clock (tIS) 0.17 ns
Address/Command Hold Time After Clock (tIH) 0.25 ns
Data Input Setup Time Before Strobe (tDS) 0.05 ns
Data Input Hold Time After Strobe (tDH) 0.12 ns
Minimum Row Precharge Delay (tRP) 15.00 ns
Minimum Row Active to Row Active Delay (tRRD) 10.00 ns
Minimum RAS# to CAS# Delay (tRCD) 15.00 ns
Minimum RAS# Pulse Width (tRAS) 45.00 ns
Write Recovery Time (tWR) 15.00 ns
Minimum Write to Read CMD Delay (tWTR) 7.50 ns
Minimum Read to Pre-charge CMD Delay (tRTP) 7.50 ns
Minimum Active to Auto-refresh Delay (tRC) 60.00 ns
Minimum Recovery Delay (tRFC) 127.50 ns
Maximum DQS to DQ Skew (tDQSQ) 0.20 ns
Maximum Read Data Hold Skew (tQHS) 0.30 ns
---=== Manufacturing Information ===---
Manufacturer Samsung
Manufacturing Location Code 0x02
Part Number M4 70T2864QZ3-CF7
Revision Code 0x3351
Manufacturing Date 2009-W34
Assembly Serial Number 0x79C64E9A
Number of SDRAM DIMMs detected and decoded: 3
ΠΡΠΎΠ±Π»Π΅ΠΌΠ° Π² ΡΠΎΠΌ, ΡΡΠΎ Π½Π΅ΠΊΠΎΡΠΎΡΡΡ ΡΠ°ΠΉΠΌΠΈΠ½Π³ΠΎΠ² Π·Π΄Π΅ΡΡ Π½Π΅ ΡΠΊΠ°Π·Π°Π½ΠΎ, ΠΏΠΎΡΡΠΎΠΌΡ ΠΏΠΎΠΉΠ΄ΡΠΌ ΠΏΠΎ Π²ΡΠΎΡΠΎΠΌΡ ΠΏΡΡΠΈ.
Π§ΡΠΎ Ρ Π½Π°Ρ Π½Π°ΠΏΠΈΡΠ°Π½ΠΎ Π½Π° ΠΌΠΎΠ΄ΡΠ»ΡΡ :
Π Π΄Π°Π½Π½ΠΎΠΌ ΡΠ»ΡΡΠ°Π΅ ΠΈΠ½ΡΠ΅ΡΠ΅ΡΠ½Π΅Π΅ Π½Π°Π΄ΠΏΠΈΡΡ Π½Π° ΡΠ°ΠΌΠΈΡ
ΠΌΠΈΠΊΡΠΎΡΡ
Π΅ΠΌΠ°Ρ
ΠΏΠ°ΠΌΡΡΠΈ: K4T1G164QQ-HCF7. ΠΠ°Π±ΠΈΠ² ΡΡΡ ΡΡΡΠΎΡΠΊΡ Π² ΠΡΠ³Π», ΠΏΠΎΠ»ΡΡΠ°Π΅ΠΌ datasheet Π½Π° Π½Π΅ΡΠΊΠΎΠ»ΡΠΊΠΎ Π΄Π΅ΡΡΡΠΊΠΎΠ² ΡΡΡΠ°Π½ΠΈΡ ΡΠΎ Π²ΡΠ΅ΠΌΠΈ Π½Π΅ΠΎΠ±Ρ
ΠΎΠ΄ΠΈΠΌΡΠΌΠΈ ΠΏΠ°ΡΠ°ΠΌΠ΅ΡΡΠ°ΠΌΠΈ, ΠΊΠΎΡΠΎΡΡΠ΅ ΠΌΠΎΠΆΠ½ΠΎ Π°ΠΊΠΊΡΡΠ°ΡΠ½ΠΎ ΠΏΠ΅ΡΠ΅Π±ΠΈΡΡ Π² ΡΠ²ΠΎΠΉΡΡΠ²Π° IP Core. Π’ΠΎΠ»ΡΠΊΠΎ ΠΎΠ±ΡΠ°ΡΠ°ΠΉΡΠ΅ Π²Π½ΠΈΠΌΠ°Π½ΠΈΠ΅ Π½Π° Π΅Π΄ΠΈΠ½ΠΈΡΡ ΠΈΠ·ΠΌΠ΅ΡΠ΅Π½ΠΈΡ: Π³Π΄Π΅-ΡΠΎ ns
, Π³Π΄Π΅-ΡΠΎ β ps
, Π° ΠΈΠ½ΠΎΠ³Π΄Π° ΠΈ Π²ΠΎΠΎΠ±ΡΠ΅ Π΄ΠΎΠ»ΠΈ tCK
. Π£ΡΠΈΡΡ Π²Π°Ρ, Π½Π° ΡΡΠΎ Π½ΡΠΆΠ½ΠΎ ΠΎΠ±ΡΠ°ΡΠ°ΡΡ Π²Π½ΠΈΠΌΠ°Π½ΠΈΠ΅, Ρ Π½Π΅ Π±ΡΠ΄Ρ β ΡΠ°ΠΌ ΠΌΠ½ΠΎΠ³ΠΎΠ΅ Π½Π°ΡΡΡΠ°ΠΈΠ²Π°Π» ΠΌΠ΅ΡΠΎΠ΄ΠΎΠΌ ΡΡΠΊΠ° (Π½Π΅ ΠΌΠΎΠ³Ρ ΠΏΡΠΈ ΡΡΠΎΠΌ Π³Π°ΡΠ°Π½ΡΠΈΡΠΎΠ²Π°ΡΡ, ΡΡΠΎ ΡΠ°ΠΊ Π½Π΅Π»ΡΠ·Ρ Β«ΡΠΆΠ΅ΡΡΒ» ΠΏΠ°ΠΌΡΡΡ ΠΈΠ»ΠΈ ΠΠΠΠ‘). ΠΠ±ΡΠ°ΡΡ Π»ΠΈΡΡ Π²Π½ΠΈΠΌΠ°Π½ΠΈΠ΅ Π²ΠΎΡ Π½Π° ΡΡΠΎ: Ρ ΠΎΡΠ΅Π½Ρ Π΄ΠΎΠ»Π³ΠΎ Π½Π΅ ΠΌΠΎΠ³ Π·Π°ΡΡΠ°Π²ΠΈΡΡ ΠΊΠΎΠ½ΡΡΠΎΠ»Π»Π΅Ρ ΡΠ°Π±ΠΎΡΠ°ΡΡ, ΠΈ ΠΏΠΎΡΠ»Π΅Π΄Π½ΠΈΠΌ ΡΠ°Π³ΠΎΠΌ Π±ΡΠ»ΠΎ ΠΎΡΠΎΠ·Π½Π°Π½ΠΈΠ΅, ΡΡΠΎ Π½ΡΠΆΠ½ΠΎ ΠΏΡΠΎΠ²Π΅ΡΠΈΡΡ ΡΠΈΡΠΈΠ½Ρ Π²ΡΠ΅Ρ
ΠΈΠ½ΡΠ΅ΡΡΠ΅ΠΉΡΠΎΠ² ΠΊ ΠΏΠ°ΠΌΡΡΠΈ Π½Π° ΡΠΎΠΎΡΠ²Π΅ΡΡΡΠ²ΠΈΠ΅ ΡΠ³Π΅Π½Π΅ΡΠΈΡΠΎΠ²Π°Π½Π½ΠΎΠΌΡ ΠΊΠΎΠ΄Ρ Π½Π° Verilog: Π²Π΅Π΄Ρ ΠΊΠΎΠ³Π΄Π° Π² MemIfBundle
ΡΠΊΠ°Π·Π°Π½ val mem_ba = IO(Output(UInt(2.W)))
, Π° Π±Π°Π½ΠΊΠΎΠ² 8 (Ρ.Π΅. Π°Π΄ΡΠ΅Ρ ΡΠΈΡΠΈΠ½ΠΎΠΉ 3 Π±ΠΈΡΠ°), ΡΠΎ Π²ΡΡ, ΡΡΠΎ Ρ Π½Π°Ρ Π΅ΡΡΡ β Π²ΠΈΡΡΡΠΈΠΉ Π² Π²ΠΎΠ·Π΄ΡΡ
Π΅ output ΠΈΠ· ΠΊΠΎΠ½ΡΡΠΎΠ»Π»Π΅ΡΠ° ΠΏΠ°ΠΌΡΡΠΈ β ΠΏΡΠΎΠ±Π»Π΅ΠΌΠ°, Π½ΠΎ Π½Π΅ ΠΊΡΠΈΡΠΈΡΠ΅ΡΠΊΠ°Ρ, ΠΏΠΎΡΡΠΎΠΌΡ Π²ΡΡ ΡΠΈΠ½ΡΠ΅Π·ΠΈΡΡΠ΅ΡΡΡ, Π½ΠΎ Π½Π΅ ΡΠ°Π±ΠΎΡΠ°Π΅Ρ.
ΠΠΎΠ·ΠΌΠΎΠΆΠ½ΠΎ, Π²ΡΡ Π±Ρ Π·Π°Π²Π΅Π»ΠΎΡΡ ΠΈ ΡΠΎ ΡΡΠ°ΡΡΠΌ ΠΌΠΎΠ΄ΡΠ»Π΅ΠΌ, Π΅ΡΠ»ΠΈ ΠΎΠ±Π½ΠΎΠ²ΠΈΡΡ ΠΊΠΎΠ½ΡΡΠΎΠ»Π»Π΅Ρ, Π½ΠΎ ΠΏΠΎΠΊΠ° ΡΡΠΎ ΠΌΠ½Π΅ Π»Π΅Π½Ρ ΡΠ°Π·Π±ΠΈΡΠ°ΡΡΡΡ Ρ ΠΏΠΎΡΠ΅Π½ΡΠΈΠ°Π»ΡΠ½ΡΠΌΠΈ ΠΏΠ»Π°Π²Π°ΡΡΠΈΠΌΠΈ Π±Π°Π³Π°ΠΌΠΈ: ΠΌΠ½Π΅ ΠΈ ΡΠ²ΠΎΠΈΡ Ρ Π²Π°ΡΠ°Π΅Ρ.
ΠΡΠ°ΠΊ, ΠΏΠΎΡΠ»Π΅ ΠΏΠ΅ΡΠ΅ΠΌΠ΅ΡΠ΅Π½ΠΈΡ timebase-frequency
Π² DTS Ρ ΡΡΠΎΠ²Π½Ρ ΠΊΠΎΠ½ΠΊΡΠ΅ΡΠ½ΠΎΠ³ΠΎ CPU Π½Π° ΡΡΠΎΠ²Π΅Π½Ρ ΡΠ·Π»Π° cpus
(ΠΏΠΎ Π²ΠΏΠΎΠ»Π½Π΅ ΠΏΠΎΠ½ΡΡΠ½ΠΎ ΡΠΊΠ°Π·Π°Π½Π½ΠΎΠΉ ΠΏΡΠΎΡΡΠ±Π΅ ΡΠ΄ΡΠ°), ΠΏΠΎΠ»ΡΡΠ°Π΅ΠΌ:
Π‘ΠΊΡΡΡΡΠΉ ΡΠ΅ΠΊΡΡ
[ 0.000000] OF: fdt: Ignoring memory range 0x80000000 - 0x80200000
[ 0.000000] Linux version 4.19.0-sifive-1+ (trosinenko@trosinenko-pc) (gcc version 8.3.0 (Buildroot 2019.02-07449-g4eddd28f99)) #1 SMP Tue Jul 9 22:42:36 MSK 2019
[ 0.000000] bootconsole [early0] enabled
[ 0.000000] Initial ramdisk at: 0x(____ptrval____) (16777216 bytes)
[ 0.000000] Zone ranges:
[ 0.000000] DMA32 [mem 0x0000000080200000-0x00000000bfffffff]
[ 0.000000] Normal [mem 0x00000000c0000000-0x00000bffffffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000080200000-0x00000000bfffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000080200000-0x00000000bfffffff]
[ 0.000000] software IO TLB: mapped [mem 0xbb1fc000-0xbf1fc000] (64MB)
[ 0.000000] elf_hwcap is 0x112d
[ 0.000000] percpu: Embedded 17 pages/cpu @(____ptrval____) s29400 r8192 d32040 u69632
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 258055
[ 0.000000] Kernel command line: debug console=ttySIF0,125200 root=/dev/mmcblk0p2 loglevel=7 rootwait
[ 0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)
[ 0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes)
[ 0.000000] Sorting __ex_table...
[ 0.000000] Memory: 937696K/1046528K available (6565K kernel code, 343K rwdata, 2564K rodata, 208K init, 832K bss, 108832K reserved, 0K cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] rcu: Hierarchical RCU implementation.
[ 0.000000] rcu: RCU event tracing is enabled.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[ 0.000000] NR_IRQS: 0, nr_irqs: 0, preallocated irqs: 0
[ 0.000000] plic: mapped 8 interrupts to 1 (out of 2) handlers.
[ 0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x1d854df40, max_idle_ns: 3526361616960 ns
[ 0.000000] Console: colour dummy device 80x25
[ 0.000000] Calibrating delay loop (skipped), value calculated using timer frequency.. 2.00 BogoMIPS (lpj=10000)
[ 0.020000] pid_max: default: 32768 minimum: 301
[ 0.030000] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes)
[ 0.040000] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes)
[ 0.140000] rcu: Hierarchical SRCU implementation.
[ 0.190000] smp: Bringing up secondary CPUs ...
[ 0.190000] smp: Brought up 1 node, 1 CPU
[ 0.220000] devtmpfs: initialized
[ 0.300000] random: get_random_u32 called from bucket_table_alloc+0x76/0x17a with crng_init=0
[ 0.330000] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.340000] futex hash table entries: 256 (order: 2, 16384 bytes)
[ 0.380000] NET: Registered protocol family 16
[ 1.850000] vgaarb: loaded
[ 1.870000] SCSI subsystem initialized
[ 1.900000] usbcore: registered new interface driver usbfs
[ 1.910000] usbcore: registered new interface driver hub
[ 1.920000] usbcore: registered new device driver usb
[ 1.930000] pps_core: LinuxPPS API ver. 1 registered
[ 1.940000] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <[email protected]>
[ 1.950000] PTP clock support registered
[ 1.970000] Advanced Linux Sound Architecture Driver Initialized.
[ 2.010000] clocksource: Switched to clocksource riscv_clocksource
[ 2.600000] NET: Registered protocol family 2
[ 2.640000] tcp_listen_portaddr_hash hash table entries: 512 (order: 1, 8192 bytes)
[ 2.650000] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
[ 2.670000] TCP bind hash table entries: 8192 (order: 5, 131072 bytes)
[ 2.700000] TCP: Hash tables configured (established 8192 bind 8192)
[ 2.720000] UDP hash table entries: 512 (order: 2, 16384 bytes)
[ 2.730000] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
[ 2.750000] NET: Registered protocol family 1
[ 2.770000] Unpacking initramfs...
[ 23.980000] Initramfs unpacking failed: junk in compressed archive
[ 24.030000] workingset: timestamp_bits=62 max_order=18 bucket_order=0
[ 25.020000] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[ 25.030000] io scheduler noop registered
[ 25.040000] io scheduler deadline registered
[ 25.050000] io scheduler cfq registered (default)
[ 25.060000] io scheduler mq-deadline registered
[ 25.060000] io scheduler kyber registered
[ 25.120000] sifive_gpio 64002000.gpio: SiFive GPIO chip registered 6 GPIOs
[ 25.150000] shpchp: Standard Hot Plug PCI Controller Driver version: 0.4
[ 28.870000] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[ 28.940000] sifive-serial 64000000.serial: unable to find controller clock
[ 28.950000] sifive-serial: probe of 64000000.serial failed with error -2
[ 28.980000] [drm] radeon kernel modesetting enabled.
[ 28.990000] [drm] amdgpu kernel modesetting enabled.
[ 29.500000] loop: module loaded
[ 29.610000] sifive_spi 64001000.spi: Unable to find bus clock
[ 29.620000] sifive_spi: probe of 64001000.spi failed with error -2
[ 29.640000] libphy: Fixed MDIO Bus: probed
[ 29.680000] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
[ 29.690000] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[ 29.700000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 29.710000] ehci-pci: EHCI PCI platform driver
[ 29.720000] ehci-platform: EHCI generic platform driver
[ 29.750000] mousedev: PS/2 mouse device common for all mice
[ 29.790000] usbcore: registered new interface driver usbhid
[ 29.800000] usbhid: USB HID core driver
[ 29.820000] usbcore: registered new interface driver snd-usb-audio
[ 29.900000] NET: Registered protocol family 10
[ 29.960000] Segment Routing with IPv6
[ 29.960000] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[ 30.020000] NET: Registered protocol family 17
[ 30.020000] Key type dns_resolver registered
[ 30.070000] bootconsole [early0] uses init memory and must be disabled even before the real one is ready
[ 30.080000] bootconsole [early0] disabled
ΠΠΎΡΠ»Π΅ ΡΠ΅Π³ΠΎ Π½ΠΈΡΠ΅Π³ΠΎ Π²ΠΈΠ΄ΠΈΠΌΠΎΠ³ΠΎ Π½Π΅ ΠΏΡΠΎΠΈΡΡ ΠΎΠ΄ΠΈΡ.
Π’Π΅ΠΏΠ΅ΡΡ ΠΌΠΎΠΆΠ½ΠΎ ΠΏΠΎΠΏΡΠΎΠ±ΠΎΠ²Π°ΡΡ ΠΏΠΎΠ±ΠΎΡΠΎΡΡΡΡ Ρ ΡΡΠ΅ΠΌΡ ΠΏΡΠΎΠ±Π»Π΅ΠΌΠ°ΠΌΠΈ:
[ 23.980000] Initramfs unpacking failed: junk in compressed archive
...
[ 28.940000] sifive-serial 64000000.serial: unable to find controller clock
...
[ 29.610000] sifive_spi 64001000.spi: Unable to find bus clock
β¦ Π° ΡΠ°ΠΊΠΆΠ΅ Ρ ΠΏΡΠ΅ΠΊΡΠ°ΡΠ΅Π½ΠΈΠ΅ΠΌ Π²ΡΠ²ΠΎΠ΄Π° Π² ΠΊΠΎΠ½ΡΠΎΠ»Ρ.
Π‘ Π΄Π²ΡΠΌΡ ΠΏΡΠΎΠ±Π»Π΅ΠΌΠ°ΠΌΠΈ Ρ ΡΠ°ΡΡΠΎΡΠ°ΠΌΠΈ ΠΏΠΎΠ±ΠΎΡΠΎΡΡΡΡ ΡΠΎΠ²ΡΠ΅ΠΌ Π½Π΅ΡΠ»ΠΎΠΆΠ½ΠΎ: Π½ΡΠΆΠ½ΠΎ Π΄ΠΎΠ±Π°Π²ΠΈΡΡ ΠΏΡΠ½ΠΊΡΡ clocks
Π² ΠΏΠΎΠ΄Π΄Π΅ΡΠ΅Π²ΡΡ ΡΡΠ΅Π±ΡΠ΅ΠΌΡΡ
ΡΡΡΡΠΎΠΉΡΡΠ², Π΄Π»Ρ ΡΠ΄ΠΎΠ±ΡΡΠ²Π° Π΄Π°Π² ΠΏΠΎΠ½ΡΡΠ½ΠΎΠ΅ ΠΈΠΌΡ ΠΌΠ΅ΡΠΊΠΈ Π΄Π»Ρ ΡΠ·Π»Π° tlclk
:
diff --git a/arch/riscv/dts/zeowaa-1gb.dts b/arch/riscv/dts/zeowaa-1gb.dts
index 4b2cebc..1347e76 100644
--- a/arch/riscv/dts/zeowaa-1gb.dts
+++ b/arch/riscv/dts/zeowaa-1gb.dts
@@ -96,6 +97,7 @@
L8: serial@64000000 {
compatible = "sifive,uart0";
interrupt-parent = <&L0>;
+ clocks = <&tlclk>;
interrupts = <2>;
reg = <0x64000000 0x1000>;
reg-names = "control";
@@ -107,6 +109,7 @@
interrupt-parent = <&L0>;
interrupts = <1>;
reg = <0x64001000 0x1000>;
+ clocks = <&tlclk>;
reg-names = "control";
L12: mmc@0 {
compatible = "mmc-spi-slot";
@@ -116,7 +119,7 @@
voltage-ranges = <3300 3300>;
};
};
- L11: tlclk {
+ tlclk: tlclk {
#clock-cells = <0>;
clock-frequency = <25000000>;
clock-output-names = "tlclk";
ΠΠΎΠ±Π°Π²ΠΈΠ² ΡΡΡΠΎΡΠΊΡ #define pr_debug printk
Π² Π½Π°ΡΠ°Π»ΠΎ ΡΠ°ΠΉΠ»Π° init/initramfs.c
, Π²ΡΠ²ΠΎΠ΄ΡΡΠ΅Π³ΠΎ ΡΠΎΠΎΠ±ΡΠ΅Π½ΠΈΠ΅ ΠΏΡΠΎ ΠΌΡΡΠΎΡ Π²ΠΌΠ΅ΡΡΠΎ initramfs ΠΏΠΎΠ»ΡΡΠ°Π΅ΠΌ ΡΡΡΡ Π±ΠΎΠ»Π΅Π΅ ΠΏΠΎΠ΄ΡΠΎΠ±Π½ΠΎΠ΅ ΡΠΎΠΎΠ±ΡΠ΅Π½ΠΈΠ΅:
[ 2.760000] Unpacking initramfs...
[ 2.770000] Detected gzip compressed data
[ 23.940000] Detected (null) compressed data
[ 23.970000] Initramfs unpacking failed: junk in compressed archive
Π’ΠΎ Π΅ΡΡΡ, Π²ΠΎΠ·ΠΌΠΎΠΆΠ½ΠΎ, ΠΌΡΡΠΎΡ Π½Π΅ Π²ΠΌΠ΅ΡΡΠΎ initramfs, Π° Π²ΠΌΠ΅ΡΡΠ΅.
ΠΠΊΠ΅ΠΉ, ΡΡΠΎ-ΡΠΎ ΠΎΠ½ Π½Π°ΡΡΠ», ΠΌΠΎΠΆΠ΅Ρ, ΠΈ ΡΡΠΎΠ³ΠΎ Π΄ΠΎΡΡΠ°ΡΠΎΡΠ½ΠΎ. Π ΠΊΡΠ΄Π° Π΄Π΅Π»Π°ΡΡ ΠΊΠΎΠ½ΡΠΎΠ»Ρ? ΠΠΎΠΈΡΠΊ Π΄Π°ΡΡ ΡΡΡΠ»ΠΊΡ Π½Π° issue Π½Π° ΠΠΈΡΡ
Π°Π±Π΅:
ΠΠ°Π»ΠΎΠ³ΠΈΠ½ΠΈΠ²ΡΠΈΡΡ ΠΊΠ°ΠΊ user=root, password=sifive, Ρ ΡΠΌΠΎΠ³ Π±Π΅Π· ΠΎΡΠΎΠ±ΡΡ
ΠΏΡΠΎΠ±Π»Π΅ΠΌ (ΠΊΡΠΎΠΌΠ΅ ΡΠΎΠ³ΠΎ, ΡΡΠΎΠ±Ρ ΠΏΠΎΠ½ΡΡΡ, ΡΡΠΎ Ρ Π½ΠΎΠΌΠ΅ΡΠ° GPIO Π΅ΡΡΡ base, ΠΎΡ ΠΊΠΎΡΠΎΡΠΎΠ³ΠΎ Π²ΡΡ ΡΡΠΈΡΠ°Π΅ΡΡΡ, ΠΈ ΠΊΠΎΡΠΎΡΡΠΉ ΠΏΡΠΎΡΡΠΎ Π½ΡΠΆΠ½ΠΎ ΠΏΡΠΎΡΠΈΡΠ°ΡΡ ΠΈΠ· ΡΠΎΠΎΡΠ²Π΅ΡΡΡΠ²ΡΡΡΠ΅Π³ΠΎ ΠΏΡΠ΅Π²Π΄ΠΎ-ΡΠ°ΠΉΠ»Π°) ΡΠ΅ΡΠ΅Π· sysfs
Π·Π°ΠΆΠ΅ΡΡ ΡΠ²Π΅ΡΠΎΠ΄ΠΈΠΎΠ΄ Π½Π° ΠΏΠ»Π°ΡΠ΅.
ΠΠ°ΠΊ ΠΈ Π² ΠΏΡΠΎΡΠ»ΡΠΉ ΡΠ°Π·, ΠΏΡΠΈΠΊΠ»Π°Π΄ΡΠ²Π°Ρ ΡΠ΅ΠΊΡΡΠΎΠ²ΠΎΠ΅ Π²ΠΈΠ΄Π΅ΠΎ Π·Π°ΠΏΡΡΠΊΠ° Linux. Π ΠΌΠΎΠΌΠ΅Π½Ρ ΠΏΠ΅ΡΠ΅ΠΊΠ»ΡΡΠ΅Π½ΠΈΡ ΠΊΠΎΠ½ΡΠΎΠ»ΠΈ Ρ earlyprintk Π½Π° ΡΡΠ°ΡΠ½ΡΡ ΠΈΠ΄ΡΡ ΠΊΠ°ΠΊΠΎΠΉ-ΡΠΎ ΠΌΡΡΠΎΡ, ΠΏΠΎΡ ΠΎΠΆΠΈΠΉ Π½Π° Π²ΡΠ²ΠΎΠ΄ ΠΏΡΠΈ Π½Π΅ΠΏΡΠ°Π²ΠΈΠ»ΡΠ½ΠΎ Π²ΡΡΡΠ°Π²Π»Π΅Π½Π½ΠΎΠΉ ΡΠΊΠΎΡΠΎΡΡΠΈ UART. Π§ΡΠΎ ΠΈΠ½ΡΠ΅ΡΠ΅ΡΠ½ΠΎ, ΠΏΠ»Π΅Π΅Ρ ΡΡΠΏΠ΅ΡΠ½ΠΎ ΠΎΡΡΠ°Π±ΠΎΡΠ°Π» ΡΡΡ Β«ΠΊΠ°ΡΡΒ».
ΠΡΡΠΎΡΠ½ΠΈΠΊ: habr.com