From d9f1cee286c8d039e290f624baeeb133b8d47a21 Mon Sep 17 00:00:00 2001 From: Sean Anderson Date: Tue, 17 Dec 2019 21:35:32 -0500 Subject: [PATCH 1/5] riscv: Fix breakage caused by linker relaxation Due to the two-instruction sequence needed to access arbitrary memory locations, the RISC-V linker aggressively optimises memory accesses and jumps at link-time. This is called "linker relaxation," and is discussed in this SiFive article . One of the optimizations in place is to assume that the __global_pointer symbol is placed in the gp register. To quote the article: "...The magic __global_pointer$ symbol is defined to point 0x800 bytes past the start of the .sdata section. The 0x800 magic number allows signed 12-bit offsets from __global_pointer$ to address symbols at the start of the .sdata section. The linker assumes that if this symbol is defined, then the gp register contains that value, which it can then use to relax accesses to global symbols within that 12-bit range. The compiler treats the gp register as a constant so it doesn't need to be saved or restored, which means it is generally only written by _start, the ELF entry point." However, U-Boot instead keeps the global data pointer in gp. This causes memory accesses and jumps optimized to use the gp pointer to fail. To fix this problem, we undefine the __global_pointer symbol. Signed-off-by: Sean Anderson Reviewed-by: Bin Meng Reviewed-by: Rick Chen --- arch/riscv/cpu/u-boot.lds | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/riscv/cpu/u-boot.lds b/arch/riscv/cpu/u-boot.lds index 838a844399..c00d17c736 100644 --- a/arch/riscv/cpu/u-boot.lds +++ b/arch/riscv/cpu/u-boot.lds @@ -32,7 +32,6 @@ SECTIONS . = ALIGN(4); .data : { - __global_pointer$ = . + 0x800; *(.data*) } . = ALIGN(4); From fd1f6e9a0bc7ba536c19478b2fd8619ecda6ec3b Mon Sep 17 00:00:00 2001 From: Sean Anderson Date: Wed, 25 Dec 2019 00:27:44 -0500 Subject: [PATCH 2/5] riscv: Add option to print registers on exception When debugging, it can be helpful to see more information about an unhandled exception. This patch adds an option to view the registers at the time of the trap, similar to the linux output on a kernel panic. Signed-off-by: Sean Anderson Reviewed-by: Rick Chen Reviewed-by: Bin Meng Tested-by: Bin Meng --- arch/riscv/Kconfig | 3 +++ arch/riscv/cpu/mtrap.S | 3 ++- arch/riscv/lib/interrupts.c | 50 +++++++++++++++++++++++++++++-------- 3 files changed, 44 insertions(+), 12 deletions(-) diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index 85e15ebffa..3338b788f8 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -222,6 +222,9 @@ config XIP from a NOR flash memory without copying the code to ram. Say yes here if U-Boot boots from flash directly. +config SHOW_REGS + bool "Show registers on unhandled exception" + config STACK_SIZE_SHIFT int default 14 diff --git a/arch/riscv/cpu/mtrap.S b/arch/riscv/cpu/mtrap.S index 407ecfa9c0..e40c7bd3f4 100644 --- a/arch/riscv/cpu/mtrap.S +++ b/arch/riscv/cpu/mtrap.S @@ -64,7 +64,8 @@ trap_entry: SREG x31, 31 * REGBYTES(sp) csrr a0, MODE_PREFIX(cause) csrr a1, MODE_PREFIX(epc) - mv a2, sp + csrr a2, MODE_PREFIX(tval) + mv a3, sp jal handle_trap csrw MODE_PREFIX(epc), a0 diff --git a/arch/riscv/lib/interrupts.c b/arch/riscv/lib/interrupts.c index 512dce0619..074c70ee77 100644 --- a/arch/riscv/lib/interrupts.c +++ b/arch/riscv/lib/interrupts.c @@ -5,6 +5,8 @@ * * Copyright (C) 2017 Andes Technology Corporation * Rick Chen, Andes Technology Corporation + * + * Copyright (C) 2019 Sean Anderson */ #include @@ -14,7 +16,34 @@ #include #include -static void _exit_trap(ulong code, ulong epc, struct pt_regs *regs) +static void show_regs(struct pt_regs *regs) +{ +#ifdef CONFIG_SHOW_REGS + printf("RA: " REG_FMT " SP: " REG_FMT " GP: " REG_FMT "\n", + regs->ra, regs->sp, regs->gp); + printf("TP: " REG_FMT " T0: " REG_FMT " T1: " REG_FMT "\n", + regs->tp, regs->t0, regs->t1); + printf("T2: " REG_FMT " S0: " REG_FMT " S1: " REG_FMT "\n", + regs->t2, regs->s0, regs->s1); + printf("A0: " REG_FMT " A1: " REG_FMT " A2: " REG_FMT "\n", + regs->a0, regs->a1, regs->a2); + printf("A3: " REG_FMT " A4: " REG_FMT " A5: " REG_FMT "\n", + regs->a3, regs->a4, regs->a5); + printf("A6: " REG_FMT " A7: " REG_FMT " S2: " REG_FMT "\n", + regs->a6, regs->a7, regs->s2); + printf("S3: " REG_FMT " S4: " REG_FMT " S5: " REG_FMT "\n", + regs->s3, regs->s4, regs->s5); + printf("S6: " REG_FMT " S7: " REG_FMT " S8: " REG_FMT "\n", + regs->s6, regs->s7, regs->s8); + printf("S9: " REG_FMT " S10: " REG_FMT " S11: " REG_FMT "\n", + regs->s9, regs->s10, regs->s11); + printf("T3: " REG_FMT " T4: " REG_FMT " T5: " REG_FMT "\n", + regs->t3, regs->t4, regs->t5); + printf("T6: " REG_FMT "\n", regs->t6); +#endif +} + +static void _exit_trap(ulong code, ulong epc, ulong tval, struct pt_regs *regs) { static const char * const exception_code[] = { "Instruction address misaligned", @@ -35,14 +64,13 @@ static void _exit_trap(ulong code, ulong epc, struct pt_regs *regs) "Store/AMO page fault", }; - if (code < ARRAY_SIZE(exception_code)) { - printf("exception code: %ld , %s , epc %lx , ra %lx\n", - code, exception_code[code], epc, regs->ra); - } else { - printf("reserved exception code: %ld , epc %lx , ra %lx\n", - code, epc, regs->ra); - } + if (code < ARRAY_SIZE(exception_code)) + printf("Unhandled exception: %s\n", exception_code[code]); + else + printf("Unhandled exception code: %ld\n", code); + printf("EPC: " REG_FMT " TVAL: " REG_FMT "\n", epc, tval); + show_regs(regs); hang(); } @@ -66,7 +94,7 @@ int disable_interrupts(void) return 0; } -ulong handle_trap(ulong cause, ulong epc, struct pt_regs *regs) +ulong handle_trap(ulong cause, ulong epc, ulong tval, struct pt_regs *regs) { ulong is_irq, irq; @@ -84,11 +112,11 @@ ulong handle_trap(ulong cause, ulong epc, struct pt_regs *regs) timer_interrupt(0); /* handle timer interrupt */ break; default: - _exit_trap(cause, epc, regs); + _exit_trap(cause, epc, tval, regs); break; }; } else { - _exit_trap(cause, epc, regs); + _exit_trap(cause, epc, tval, regs); } return epc; From cf9c427a87e1a1a5115ec60f7785f48c8b34a5f6 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Fri, 27 Dec 2019 19:50:53 +0100 Subject: [PATCH 3/5] doc: fix AX25-AE350 RISC-V documentation Since commit 04883bf7acca ("doc: update AX25-AE350 RISC-V documentation") `make htmldocs` produces a log of warnings like doc/board/AndesTech/ax25-ae350.rst:373: WARNING: Block quote ends without a blank line; unexpected unindent. doc/board/AndesTech/ax25-ae350.rst:0: WARNING: Undefined substitution referenced: "_ __ ___ _ __ | (___ | |_) |". Reformat the problematic passages. Fixes: 04883bf7acca ("doc: update AX25-AE350 RISC-V documentation") Signed-off-by: Heinrich Schuchardt Reviewed-by: Jagan Teki Reviewed-by: Rick Chen Tested-by: Bin Meng --- doc/board/AndesTech/ax25-ae350.rst | 317 +++++++++++++++-------------- 1 file changed, 159 insertions(+), 158 deletions(-) diff --git a/doc/board/AndesTech/ax25-ae350.rst b/doc/board/AndesTech/ax25-ae350.rst index a7bd1a75e8..89c485f88f 100644 --- a/doc/board/AndesTech/ax25-ae350.rst +++ b/doc/board/AndesTech/ax25-ae350.rst @@ -62,9 +62,10 @@ Configurations -------------- CONFIG_SKIP_LOWLEVEL_INIT: - If you want to boot this system from SPI ROM and bypass e-bios (the - other boot loader on ROM). You should undefine CONFIG_SKIP_LOWLEVEL_INIT - in "include/configs/ax25-ae350.h". + +If you want to boot this system from SPI ROM and bypass e-bios (the +other boot loader on ROM). You should undefine CONFIG_SKIP_LOWLEVEL_INIT +in "include/configs/ax25-ae350.h". Build and boot steps -------------------- @@ -165,7 +166,7 @@ Messages of U-Boot boot on AE350 board crc32 for 80000000 ... 80050452 ==> 692dc44a RISC-V # - *** power-off and power-on, this U-Boot is booted from spi flash *** + *** power-off and power-on, this U-Boot is booted from spi flash *** U-Boot 2018.01-rc2-00032-gf67dd47-dirty (Dec 21 2017 - 13:56:03 +0800) @@ -365,168 +366,168 @@ Messages of U-Boot SPL boots Kernel on AE350 board .. code-block:: none -U-Boot SPL 2020.01-rc1-00292-g67a3313-dirty (Nov 14 2019 - 11:26:21 +0800) -Trying to boot from RAM + U-Boot SPL 2020.01-rc1-00292-g67a3313-dirty (Nov 14 2019 - 11:26:21 +0800) + Trying to boot from RAM -OpenSBI v0.5-1-gdd8ef28 (Nov 14 2019 11:08:39) - ____ _____ ____ _____ - / __ \ / ____| _ \_ _| - | | | |_ __ ___ _ __ | (___ | |_) || | - | | | | '_ \ / _ \ '_ \ \___ \| _ < | | - | |__| | |_) | __/ | | |____) | |_) || |_ - \____/| .__/ \___|_| |_|_____/|____/_____| - | | - |_| + OpenSBI v0.5-1-gdd8ef28 (Nov 14 2019 11:08:39) + ____ _____ ____ _____ + / __ \ / ____| _ \_ _| + | | | |_ __ ___ _ __ | (___ | |_) || | + | | | | '_ \ / _ \ '_ \ \___ \| _ < | | + | |__| | |_) | __/ | | |____) | |_) || |_ + \____/| .__/ \___|_| |_|_____/|____/_____| + | | + |_| -Platform Name : Andes AE350 -Platform HART Features : RV64ACIMSUX -Platform Max HARTs : 4 -Current Hart : 0 -Firmware Base : 0x0 -Firmware Size : 84 KB -Runtime SBI Version : 0.2 + Platform Name : Andes AE350 + Platform HART Features : RV64ACIMSUX + Platform Max HARTs : 4 + Current Hart : 0 + Firmware Base : 0x0 + Firmware Size : 84 KB + Runtime SBI Version : 0.2 -PMP0: 0x0000000000000000-0x000000000001ffff (A) -PMP1: 0x0000000000000000-0x00000001ffffffff (A,R,W,X) + PMP0: 0x0000000000000000-0x000000000001ffff (A) + PMP1: 0x0000000000000000-0x00000001ffffffff (A,R,W,X) -U-Boot 2020.01-rc1-00292-g67a3313-dirty (Nov 14 2019 - 11:26:21 +0800) + U-Boot 2020.01-rc1-00292-g67a3313-dirty (Nov 14 2019 - 11:26:21 +0800) -DRAM: 1 GiB -Flash: 64 MiB -MMC: mmc@f0e00000: 0 -Loading Environment from SPI Flash... SF: Detected mx25u1635e with page size 256 Bytes, erase size 4 KiB, total 2 MiB -OK -In: serial@f0300000 -Out: serial@f0300000 -Err: serial@f0300000 -Net: no alias for ethernet0 + DRAM: 1 GiB + Flash: 64 MiB + MMC: mmc@f0e00000: 0 + Loading Environment from SPI Flash... SF: Detected mx25u1635e with page size 256 Bytes, erase size 4 KiB, total 2 MiB + OK + In: serial@f0300000 + Out: serial@f0300000 + Err: serial@f0300000 + Net: no alias for ethernet0 -Warning: mac@e0100000 (eth0) using random MAC address - a2:ae:93:7b:cc:8f -eth0: mac@e0100000 -Hit any key to stop autoboot: 0 -6455 bytes read in 31 ms (203.1 KiB/s) -20421684 bytes read in 8647 ms (2.3 MiB/s) -## Booting kernel from Legacy Image at 00600000 ... - Image Name: - Image Type: RISC-V Linux Kernel Image (uncompressed) - Data Size: 20421620 Bytes = 19.5 MiB - Load Address: 00200000 - Entry Point: 00200000 - Verifying Checksum ... OK -## Flattened Device Tree blob at 20000000 - Booting using the fdt blob at 0x20000000 - Loading Kernel Image - Loading Device Tree to 000000001effb000, end 000000001efff936 ... OK + Warning: mac@e0100000 (eth0) using random MAC address - a2:ae:93:7b:cc:8f + eth0: mac@e0100000 + Hit any key to stop autoboot: 0 + 6455 bytes read in 31 ms (203.1 KiB/s) + 20421684 bytes read in 8647 ms (2.3 MiB/s) + ## Booting kernel from Legacy Image at 00600000 ... + Image Name: + Image Type: RISC-V Linux Kernel Image (uncompressed) + Data Size: 20421620 Bytes = 19.5 MiB + Load Address: 00200000 + Entry Point: 00200000 + Verifying Checksum ... OK + ## Flattened Device Tree blob at 20000000 + Booting using the fdt blob at 0x20000000 + Loading Kernel Image + Loading Device Tree to 000000001effb000, end 000000001efff936 ... OK -Starting kernel ... + Starting kernel ... -OF: fdt: Ignoring memory range 0x0 - 0x200000 -Linux version 4.17.0-00253-g49136e10bcb2 (sqa@atcsqa07) (gcc version 7.3.0 (2019-04-06_nds64le-linux-glibc-v5_experimental)) #1 SMP PREEMPT Sat Apr 6 23:41:49 CST 2019 -bootconsole [early0] enabled -Initial ramdisk at: 0x (ptrval) (13665712 bytes) -Zone ranges: - DMA32 [mem 0x0000000000200000-0x000000003fffffff] - Normal empty -Movable zone start for each node -Early memory node ranges - node 0: [mem 0x0000000000200000-0x000000003fffffff] -Initmem setup node 0 [mem 0x0000000000200000-0x000000003fffffff] -software IO TLB [mem 0x3b1f8000-0x3f1f8000] (64MB) mapped at [ (ptrval)- (ptrval)] -elf_platform is rv64i2p0m2p0a2p0c2p0xv5-0p0 -compatible privileged spec version 1.10 -percpu: Embedded 16 pages/cpu @ (ptrval) s28184 r8192 d29160 u65536 -Built 1 zonelists, mobility grouping on. Total pages: 258055 -Kernel command line: console=ttyS0,38400n8 debug loglevel=7 -log_buf_len individual max cpu contribution: 4096 bytes -log_buf_len total cpu_extra contributions: 12288 bytes -log_buf_len min size: 16384 bytes -log_buf_len: 32768 bytes -early log buf free: 14608(89%) -Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes) -Inode-cache hash table entries: 65536 (order: 7, 524288 bytes) -Sorting __ex_table... -Memory: 944428K/1046528K available (3979K kernel code, 246K rwdata, 1490K rodata, 13523K init, 688K bss, 102100K reserved, 0K cma-reserved) -SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1 -Preemptible hierarchical RCU implementation. - Tasks RCU enabled. -NR_IRQS: 72, nr_irqs: 72, preallocated irqs: 0 -riscv,cpu_intc,0: 64 local interrupts mapped -riscv,cpu_intc,1: 64 local interrupts mapped -riscv,cpu_intc,2: 64 local interrupts mapped -riscv,cpu_intc,3: 64 local interrupts mapped -riscv,plic0,e4000000: mapped 71 interrupts to 8/8 handlers -clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x1bacf917bf, max_idle_ns: 881590412290 ns -sched_clock: 64 bits at 60MHz, resolution 16ns, wraps every 4398046511098ns -Console: colour dummy device 40x30 -Calibrating delay loop (skipped), value calculated using timer frequency.. 120.00 BogoMIPS (lpj=600000) -pid_max: default: 32768 minimum: 301 -Mount-cache hash table entries: 2048 (order: 2, 16384 bytes) -Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes) -Hierarchical SRCU implementation. -smp: Bringing up secondary CPUs ... -CPU0: online -CPU2: online -CPU3: online -smp: Brought up 1 node, 4 CPUs -devtmpfs: initialized -random: get_random_u32 called from bucket_table_alloc+0x198/0x1d8 with crng_init=0 -clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns -futex hash table entries: 1024 (order: 4, 65536 bytes) -NET: Registered protocol family 16 -Advanced Linux Sound Architecture Driver Initialized. -clocksource: Switched to clocksource riscv_clocksource -NET: Registered protocol family 2 -tcp_listen_portaddr_hash hash table entries: 512 (order: 1, 8192 bytes) -TCP established hash table entries: 8192 (order: 4, 65536 bytes) -TCP bind hash table entries: 8192 (order: 5, 131072 bytes) -TCP: Hash tables configured (established 8192 bind 8192) -UDP hash table entries: 512 (order: 2, 16384 bytes) -UDP-Lite hash table entries: 512 (order: 2, 16384 bytes) -NET: Registered protocol family 1 -RPC: Registered named UNIX socket transport module. -RPC: Registered udp transport module. -RPC: Registered tcp transport module. -RPC: Registered tcp NFSv4.1 backchannel transport module. -Unpacking initramfs... -workingset: timestamp_bits=62 max_order=18 bucket_order=0 -NFS: Registering the id_resolver key type -Key type id_resolver registered -Key type id_legacy registered -nfs4filelayout_init: NFSv4 File Layout Driver Registering... -io scheduler noop registered -io scheduler cfq registered (default) -io scheduler mq-deadline registered -io scheduler kyber registered -Console: switching to colour frame buffer device 40x30 -Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled -console [ttyS0] disabled -f0300000.serial: ttyS0 at MMIO 0xf0300020 (irq = 20, base_baud = 1228800) is a 16550A -console [ttyS0] enabled -console [ttyS0] enabled -bootconsole [early0] disabled -bootconsole [early0] disabled -loop: module loaded -tun: Universal TUN/TAP device driver, 1.6 -ftmac100: Loading version 0.2 ... -ftmac100 e0100000.mac eth0: irq 21, mapped at (ptrval) -ftmac100 e0100000.mac eth0: generated random MAC address 4e:fd:bd:f3:04:fc -ftsdc010 f0e00000.mmc: mmc0 - using hw SDIO IRQ -mmc0: new SDHC card at address d555 -ftssp010 card registered! -mmcblk0: mmc0:d555 SD04G 3.79 GiB -NET: Registered protocol family 10 - mmcblk0: p1 -Segment Routing with IPv6 -sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver -NET: Registered protocol family 17 -NET: Registered protocol family 15 -ALSA device list: - #0: ftssp_ac97 controller -Freeing unused kernel memory: 13520K -This architecture does not have kernel memory protection. -Sysinit starting -Sat Apr 6 23:33:53 CST 2019 -nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering... + OF: fdt: Ignoring memory range 0x0 - 0x200000 + Linux version 4.17.0-00253-g49136e10bcb2 (sqa@atcsqa07) (gcc version 7.3.0 (2019-04-06_nds64le-linux-glibc-v5_experimental)) #1 SMP PREEMPT Sat Apr 6 23:41:49 CST 2019 + bootconsole [early0] enabled + Initial ramdisk at: 0x (ptrval) (13665712 bytes) + Zone ranges: + DMA32 [mem 0x0000000000200000-0x000000003fffffff] + Normal empty + Movable zone start for each node + Early memory node ranges + node 0: [mem 0x0000000000200000-0x000000003fffffff] + Initmem setup node 0 [mem 0x0000000000200000-0x000000003fffffff] + software IO TLB [mem 0x3b1f8000-0x3f1f8000] (64MB) mapped at [ (ptrval)- (ptrval)] + elf_platform is rv64i2p0m2p0a2p0c2p0xv5-0p0 + compatible privileged spec version 1.10 + percpu: Embedded 16 pages/cpu @ (ptrval) s28184 r8192 d29160 u65536 + Built 1 zonelists, mobility grouping on. Total pages: 258055 + Kernel command line: console=ttyS0,38400n8 debug loglevel=7 + log_buf_len individual max cpu contribution: 4096 bytes + log_buf_len total cpu_extra contributions: 12288 bytes + log_buf_len min size: 16384 bytes + log_buf_len: 32768 bytes + early log buf free: 14608(89%) + Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes) + Inode-cache hash table entries: 65536 (order: 7, 524288 bytes) + Sorting __ex_table... + Memory: 944428K/1046528K available (3979K kernel code, 246K rwdata, 1490K rodata, 13523K init, 688K bss, 102100K reserved, 0K cma-reserved) + SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1 + Preemptible hierarchical RCU implementation. + Tasks RCU enabled. + NR_IRQS: 72, nr_irqs: 72, preallocated irqs: 0 + riscv,cpu_intc,0: 64 local interrupts mapped + riscv,cpu_intc,1: 64 local interrupts mapped + riscv,cpu_intc,2: 64 local interrupts mapped + riscv,cpu_intc,3: 64 local interrupts mapped + riscv,plic0,e4000000: mapped 71 interrupts to 8/8 handlers + clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x1bacf917bf, max_idle_ns: 881590412290 ns + sched_clock: 64 bits at 60MHz, resolution 16ns, wraps every 4398046511098ns + Console: colour dummy device 40x30 + Calibrating delay loop (skipped), value calculated using timer frequency.. 120.00 BogoMIPS (lpj=600000) + pid_max: default: 32768 minimum: 301 + Mount-cache hash table entries: 2048 (order: 2, 16384 bytes) + Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes) + Hierarchical SRCU implementation. + smp: Bringing up secondary CPUs ... + CPU0: online + CPU2: online + CPU3: online + smp: Brought up 1 node, 4 CPUs + devtmpfs: initialized + random: get_random_u32 called from bucket_table_alloc+0x198/0x1d8 with crng_init=0 + clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns + futex hash table entries: 1024 (order: 4, 65536 bytes) + NET: Registered protocol family 16 + Advanced Linux Sound Architecture Driver Initialized. + clocksource: Switched to clocksource riscv_clocksource + NET: Registered protocol family 2 + tcp_listen_portaddr_hash hash table entries: 512 (order: 1, 8192 bytes) + TCP established hash table entries: 8192 (order: 4, 65536 bytes) + TCP bind hash table entries: 8192 (order: 5, 131072 bytes) + TCP: Hash tables configured (established 8192 bind 8192) + UDP hash table entries: 512 (order: 2, 16384 bytes) + UDP-Lite hash table entries: 512 (order: 2, 16384 bytes) + NET: Registered protocol family 1 + RPC: Registered named UNIX socket transport module. + RPC: Registered udp transport module. + RPC: Registered tcp transport module. + RPC: Registered tcp NFSv4.1 backchannel transport module. + Unpacking initramfs... + workingset: timestamp_bits=62 max_order=18 bucket_order=0 + NFS: Registering the id_resolver key type + Key type id_resolver registered + Key type id_legacy registered + nfs4filelayout_init: NFSv4 File Layout Driver Registering... + io scheduler noop registered + io scheduler cfq registered (default) + io scheduler mq-deadline registered + io scheduler kyber registered + Console: switching to colour frame buffer device 40x30 + Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled + console [ttyS0] disabled + f0300000.serial: ttyS0 at MMIO 0xf0300020 (irq = 20, base_baud = 1228800) is a 16550A + console [ttyS0] enabled + console [ttyS0] enabled + bootconsole [early0] disabled + bootconsole [early0] disabled + loop: module loaded + tun: Universal TUN/TAP device driver, 1.6 + ftmac100: Loading version 0.2 ... + ftmac100 e0100000.mac eth0: irq 21, mapped at (ptrval) + ftmac100 e0100000.mac eth0: generated random MAC address 4e:fd:bd:f3:04:fc + ftsdc010 f0e00000.mmc: mmc0 - using hw SDIO IRQ + mmc0: new SDHC card at address d555 + ftssp010 card registered! + mmcblk0: mmc0:d555 SD04G 3.79 GiB + NET: Registered protocol family 10 + mmcblk0: p1 + Segment Routing with IPv6 + sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver + NET: Registered protocol family 17 + NET: Registered protocol family 15 + ALSA device list: + #0: ftssp_ac97 controller + Freeing unused kernel memory: 13520K + This architecture does not have kernel memory protection. + Sysinit starting + Sat Apr 6 23:33:53 CST 2019 + nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering... ~ # From 33a6259d72ba4d7a3e3f97e9cfadc34e6e4f52d3 Mon Sep 17 00:00:00 2001 From: Jagan Teki Date: Mon, 30 Dec 2019 19:59:09 +0530 Subject: [PATCH 4/5] doc: fix opensbi build steps for AX25-AE350 OpenSBI build steps are marked as normal text in AX25-AE350 documentation. Move them into code-block so-that it can show it as build steps. Cc: Heinrich Schuchardt Signed-off-by: Jagan Teki Reviewed-by: Bin Meng Reviewed-by: Rick Chen Tested-by: Bin Meng --- doc/board/AndesTech/ax25-ae350.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/board/AndesTech/ax25-ae350.rst b/doc/board/AndesTech/ax25-ae350.rst index 89c485f88f..f795476d85 100644 --- a/doc/board/AndesTech/ax25-ae350.rst +++ b/doc/board/AndesTech/ax25-ae350.rst @@ -337,9 +337,11 @@ How to build U-Boot SPL Before building U-Boot SPL, OpenSBI must be build first. OpenSBI can be cloned and build for AE350 as below: -git clone https://github.com/riscv/opensbi.git -cd opensbi -make PLATFORM=andes/ae350 +.. code-block:: none + + git clone https://github.com/riscv/opensbi.git + cd opensbi + make PLATFORM=andes/ae350 Copy OpenSBI FW_DYNAMIC image (build\platform\andes\ae350\firmware\fw_dynamic.bin) into U-Boot root directory From 404339759ef5e0bcd4fa7768d1148b1ace2d2bb6 Mon Sep 17 00:00:00 2001 From: Sean Anderson Date: Mon, 27 Jan 2020 16:39:44 -0500 Subject: [PATCH 5/5] riscv: Remove unnecessary instruction The add instruction on risc-v can have any three sources and targets, so there is no need for an intermediate mov. Signed-off-by: Sean Anderson Reviewed-by: Rick Chen Reviewed-by: Bin Meng --- arch/riscv/cpu/start.S | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/riscv/cpu/start.S b/arch/riscv/cpu/start.S index f3dccdbe4c..6b3ff99c38 100644 --- a/arch/riscv/cpu/start.S +++ b/arch/riscv/cpu/start.S @@ -359,9 +359,8 @@ relocate_secondary_harts: call_board_init_r: jal invalidate_icache_all jal flush_dcache_all - la t0, board_init_r - mv t4, t0 /* offset of board_init_r() */ - add t4, t4, t6 /* real address of board_init_r() */ + la t0, board_init_r /* offset of board_init_r() */ + add t4, t0, t6 /* real address of board_init_r() */ /* * setup parameters for board_init_r */