diff --git a/docs/riscv/current_progress.md b/docs/riscv/current_progress.md new file mode 100644 index 0000000000000000000000000000000000000000..896bfc8611d35b8f7d4b9c18ca52a990672ad7f4 --- /dev/null +++ b/docs/riscv/current_progress.md @@ -0,0 +1,303 @@ +## 当前进度: +启动环境:QEMU Risc-V 10.0.0 + +启动链:EDK2(Risc-V配置下有内嵌OpenSBI)-(OK)-> GRUB -(FAIL)-> Linux Kernel + +目前已完成从EDK2到GRUB的启动,但从GRUB到OC内核的启动失败。在更换到官方版本Linux 6.14.6(并自己编译的)时,仍然有问题。 + +编译命令: +`make ARCH=riscv CROSS_COMPILE=riscv64-linux-gnu- KCFLAGS="-march=rv64gc_zicsr_zihintpause" -j $(nproc)` + +配置文件已上传:[.config](./.config) + +[下载内核](https://git.opencloudos.tech/sources-stream/kernel/kernel-6.6.68-20.tar.gz/sha512/3822d9e70f5db2ce56affe14595ec38dc414aed2bc82424ddf6db4734f04bbb0ff85eeaa9b038949d3ea64688220cee3b4c266ddfde1875647ee6c2b507613f8/kernel-6.6.68-20.tar.gz) + +### 2025/7/1 更新: +using official opencloud-os: +e36ba2196c18aeddd030f1c0301f5ce5568fde16ca7133022252cea380aacf8b + +using original kernel: +6f902f5172d400275ba534b597c3710dabf7309802b48f5b6f249f6d18c8a012 + +我自己后续在`https://github.com/AII-SDU/rv-sp-test-mod`下的环境中进行了测试,发现操作系统内核无论是opencloud os内核,还是原版的linux内核,都可以运行。 + +因此**排除**操作系统内部错误。 + +当前排除范围被进一步缩小为: +·QEMU自身问题(我可能需要build一份risc-v虚拟机,需要运行在windows11 x86_64平台) +·EDK2问题(当前正在排查) + + +## 当前错误: + +来自内核文件的:mm/memblock,符号:memblock_alloc_try_nid + +所有前缀`\[ DEBUG \]`的输出用代码行均为自己手动加入,以显示错误。 + +``` +void * __init memblock_alloc_try_nid( + phys_addr_t size, phys_addr_t align, + phys_addr_t min_addr, phys_addr_t max_addr, + int nid) +{ + void *ptr; + + memblock_dbg("%s: %llu bytes align=0x%llx nid=%d from=%pa max_addr=%pa %pS\n", + __func__, (u64)size, (u64)align, nid, &min_addr, + &max_addr, (void *)_RET_IP_); + ptr = memblock_alloc_internal(size, align, + min_addr, max_addr, nid, false); + + pr_info("[ DEBUG ] Page offset as: %llx\n", &kernel_map.page_offset); + + if (ptr) { + memblock_dbg("[ DEBUG ] ptr is: %llx now", ptr); + memset(ptr, 0, size); + } + + return ptr; +} +``` + +在GRUB中,启动了`earlycon=uart8250,mmio,0x10000000`,该代码输出: + +``` +[ 0.000000] memblock_alloc_try_nid: 41156 bytes align=0x8 nid=-1 from=0x0000000000000000 max_addr=0x0000000000000000 early_init_dt_alloc_memory_arch+0x36/0x60 +[ 0.000000] memblock_reserve: [0x000000027fc00f38-0x000000027fc0affb] memblock_alloc_range_nid+0xb0/0x12e +[ 0.000000] [ DEBUG ] Page offset as: ffffffff8105b998 +[ 0.000000] [ DEBUG ] ptr is: ff600001ffc00f38 now +``` + +并随后导致: +``` +[ 0.000000] Unable to handle kernel paging request at virtual address ff600001ffc00f38 +[ 0.000000] Oops [#1] +[ 0.000000] Modules linked in: +[ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 6.6.68 #17 +[ 0.000000] Hardware name: riscv-virtio,qemu (DT) +[ 0.000000] epc : __memset+0x80/0x100 +[ 0.000000] ra : memblock_alloc_try_nid+0xa8/0xba +[ 0.000000] epc : ffffffff80901e40 ra : ffffffff80a14fac sp : ffffffff81403d30 +[ 0.000000] gp : ffffffff815092b8 tp : ffffffff8140cd40 t0 : ff600001ffc00ef8 +[ 0.000000] t1 : 0000000000000077 t2 : 6630306366663130 s0 : ffffffff81403d70 +[ 0.000000] s1 : ff600001ffc00f38 a0 : ff600001ffc00f38 a1 : 0000000000000000 +[ 0.000000] a2 : 000000000000a0c4 a3 : ff600001ffc0aff8 a4 : 0000000000000020 +[ 0.000000] a5 : ffffffff80901e40 a6 : ffffffff814168b0 a7 : 0000000000000030 +[ 0.000000] s2 : 000000000000a0c4 s3 : ffffffffffffffff s4 : ffffffff8150c000 +[ 0.000000] s5 : ffffffff80a34098 s6 : 0000000000000000 s7 : 0000000278000000 +[ 0.000000] s8 : 000000027eaec918 s9 : 0000000000001c6b s10: ffffffffffffffff +[ 0.000000] s11: 000000027e0f3640 t3 : ffffffff8152272e t4 : ffffffff8152272e +[ 0.000000] t5 : ffffffff81522708 t6 : ffffffff81403b58 +[ 0.000000] status: 0000000200000100 badaddr: ff600001ffc00f38 cause: 000000000000000f +[ 0.000000] [] __memset+0x80/0x100 +[ 0.000000] [] early_init_dt_alloc_memory_arch+0x36/0x60 +[ 0.000000] [] __unflatten_device_tree+0x52/0x114 +[ 0.000000] [] unflatten_device_tree+0x2e/0x44 +[ 0.000000] [] setup_arch+0x150/0x5ee +[ 0.000000] [] start_kernel+0x84/0x798 +[ 0.000000] Code: bc23 00b2 b023 02b2 b423 02b2 b823 02b2 bc23 02b2 (b023) 04b2 +[ 0.000000] ---[ end trace 0000000000000000 ]--- +[ 0.000000] Kernel panic - not syncing: Attempted to kill the idle task! +[ 0.000000] ---[ end Kernel panic - not syncing: Attempted to kill the idle task! ]--- +``` + +## 附录:从进入内核开始时,出现的信息 + +使用GRUB拉入内核。 + +``` +EFI stub: Booting Linux Kernel... +EFI stub: Loaded initrd from LINUX_EFI_INITRD_MEDIA_GUID device path +EFI stub: Using DTB from configuration table +EFI stub: Exiting boot services... +[ 0.000000] Linux version 6.6.68 (devcontainers@DESKTOP-LJC1PO2) (riscv64-linux-gnu-gcc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0, GNU ld (GNU Binutils for Ubuntu) 2.42) #17 SMP Tue Jul 1 13:26:43 CST 2025 +[ 0.000000] Machine model: riscv-virtio,qemu +[ 0.000000] SBI specification v2.0 detected +[ 0.000000] SBI implementation ID=0x1 Version=0x10005 +[ 0.000000] SBI TIME extension detected +[ 0.000000] SBI IPI extension detected +[ 0.000000] SBI RFENCE extension detected +[ 0.000000] SBI SRST extension detected +[ 0.000000] earlycon: uart8250 at MMIO 0x0000000010000000 (options '') +[ 0.000000] printk: bootconsole [uart8250] enabled +[ 0.000000] efi: EFI v2.7 by EDK II +[ 0.000000] efi: SMBIOS 3.0=0x27fe3c000 MEMATTR=0x27eb0f018 ACPI=0xfffff000 ACPI 2.0=0xfffff014 INITRD=0x27eb09e98 MEMRESERVE=0x27eb09c18 +[ 0.000000] memblock_reserve: [0x000000027eb0f018-0x000000027eb0f447] efi_memattr_init+0x7e/0xac +[ 0.000000] memblock_reserve: [0x000000027eb09c18-0x000000027eb09c27] efi_config_parse_tables+0x1ca/0x25c +[ 0.000000] MEMBLOCK configuration: +[ 0.000000] memory size = 0x0000000200000000 reserved size = 0x0000000000000440 +[ 0.000000] memory.cnt = 0x1 +[ 0.000000] memory[0x0] [0x0000000080000000-0x000000027fffffff], 0x0000000200000000 bytes flags: 0x0 +[ 0.000000] reserved.cnt = 0x2 +[ 0.000000] reserved[0x0] [0x000000027eb09c18-0x000000027eb09c27], 0x0000000000000010 bytes flags: 0x0 +[ 0.000000] reserved[0x1] [0x000000027eb0f018-0x000000027eb0f447], 0x0000000000000430 bytes flags: 0x0 +[ 0.000000] memblock_remove: [0x0000000000000000-0xfffffffffffffffe] reserve_regions+0x56/0x15e +[ 0.000000] memblock_add: [0x0000000080000000-0x000000008007ffff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x0000000080080000-0x0000000082d0cfff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x0000000082d0d000-0x0000000082d58fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x0000000082d59000-0x0000000083ffffff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x0000000084000000-0x00000000fffe3fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x00000000fffe4000-0x00000000fffe4fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_reserve: [0x00000000fffe4000-0x00000000fffe4fff] reserve_regions+0x12e/0x15e +[ 0.000000] memblock_add: [0x00000000fffe5000-0x00000000ffff6fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x00000000ffff7000-0x00000000ffffffff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_reserve: [0x00000000ffff7000-0x00000000ffffffff] reserve_regions+0x12e/0x15e +[ 0.000000] memblock_add: [0x0000000100000000-0x0000000277dfffff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x0000000277e00000-0x0000000277ffffff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x0000000278000000-0x0000000279589fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027958a000-0x000000027973ffff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x0000000279740000-0x000000027acc9fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027acca000-0x000000027c1d4fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027c1d5000-0x000000027e2fcfff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027e2fd000-0x000000027e342fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027e343000-0x000000027e344fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_reserve: [0x000000027e343000-0x000000027e344fff] reserve_regions+0x12e/0x15e +[ 0.000000] memblock_add: [0x000000027e345000-0x000000027e401fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027e402000-0x000000027e403fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027e404000-0x000000027e404fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027e405000-0x000000027e8a6fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027e8a7000-0x000000027ea4bfff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027ea4c000-0x000000027eb08fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027eb09000-0x000000027eb09fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027eb0a000-0x000000027eb28fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027eb29000-0x000000027eb37fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027eb38000-0x000000027eb3efff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027eb3f000-0x000000027eb50fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027eb51000-0x000000027eb51fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027eb52000-0x000000027eb81fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027eb82000-0x000000027eb84fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027eb85000-0x000000027eba5fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027eba6000-0x000000027ebacfff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027ebad000-0x000000027ebc0fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027ebc1000-0x000000027ebc1fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027ebc2000-0x000000027ebc5fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027ebc6000-0x000000027ebc9fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027ebca000-0x000000027ebdcfff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027ebdd000-0x000000027ebdffff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027ebe0000-0x000000027ebe6fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027ebe7000-0x000000027ebe7fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027ebe8000-0x000000027ed10fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027ed11000-0x000000027ed61fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027ed62000-0x000000027ed83fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027ed84000-0x000000027ed85fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027ed86000-0x000000027eda9fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027edaa000-0x000000027edaefff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027edaf000-0x000000027edbdfff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027edbe000-0x000000027edc0fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027edc1000-0x000000027edd8fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027edd9000-0x000000027eddefff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027eddf000-0x000000027ee16fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027ee17000-0x000000027ee18fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027ee19000-0x000000027ee20fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027ee21000-0x000000027ee28fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027ee29000-0x000000027ee6afff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027ee6b000-0x000000027eeabfff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027eeac000-0x000000027eff9fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027effa000-0x000000027f00bfff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027f00c000-0x000000027f017fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027f018000-0x000000027f019fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027f01a000-0x000000027f01efff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027f01f000-0x000000027f023fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027f024000-0x000000027f02efff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027f02f000-0x000000027f032fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027f033000-0x000000027f062fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027f063000-0x000000027f065fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027f066000-0x000000027f06cfff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027f06d000-0x000000027f06dfff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027f06e000-0x000000027f070fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027f071000-0x000000027f073fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027f074000-0x000000027f079fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027f07a000-0x000000027f07afff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027f07b000-0x000000027f07dfff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027f07e000-0x000000027f081fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027f082000-0x000000027f083fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027f084000-0x000000027f085fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027f086000-0x000000027f146fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027f147000-0x000000027f147fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027f148000-0x000000027f14afff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027f14b000-0x000000027f14bfff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027f14c000-0x000000027f156fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027f157000-0x000000027f15dfff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027f15e000-0x000000027f162fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027f163000-0x000000027f167fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027f168000-0x000000027f178fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027f179000-0x000000027f17cfff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027f17d000-0x000000027f182fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027f183000-0x000000027fc16fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027fc17000-0x000000027fda6fff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027fda7000-0x000000027fffefff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_add: [0x000000027ffff000-0x000000027fffffff] early_init_dt_add_memory_arch+0x4a/0x52 +[ 0.000000] memblock_reserve: [0x000000027e343000-0x000000027e344fff] efi_init+0x196/0x296 +[ 0.000000] [ DEBUG ] EFI Initialized. +[ 0.000000] [ DEBUG ] Entering page-initialization progress... +[ 0.000000] memblock_reserve: [0x0000000278000000-0x00000002795fffff] paging_init+0xe8/0x5b4 +[ 0.000000] memblock_reserve: [0x000000008c300000-0x0000000090bfffff] reserve_initrd_mem+0xa2/0xf6 +[ 0.000000] OF: reserved mem: 0x0000000080000000..0x000000008003ffff (256 KiB) nomap non-reusable mmode_resv0@80000000 +[ 0.000000] OF: reserved mem: 0x0000000080040000..0x000000008007ffff (256 KiB) nomap non-reusable mmode_resv1@80040000 +[ 0.000000] memblock_reserve: [0x0000000277e00000-0x0000000277e01d6c] paging_init+0x1e4/0x5b4 +[ 0.000000] [ DEBUG ] VMLinux end at 279600000 and start at 278000000, Physics RAM ends at: 10737418240, Max mapped address: 36028799166447616 +[ 0.000000] memblock_phys_alloc_range: 4096 bytes align=0x1000 from=0x0000000000000000 max_addr=0x0000000000000000 alloc_pmd_fixmap+0x18/0x20 +[ 0.000000] memblock_reserve: [0x000000027ffff000-0x000000027fffffff] memblock_alloc_range_nid+0xb0/0x12e +[ 0.000000] memblock_phys_alloc_range: 4096 bytes align=0x1000 from=0x0000000000000000 max_addr=0x0000000000000000 alloc_pmd_fixmap+0x18/0x20 +[ 0.000000] memblock_reserve: [0x000000027fc16000-0x000000027fc16fff] memblock_alloc_range_nid+0xb0/0x12e +[ 0.000000] memblock_phys_alloc_range: 4096 bytes align=0x1000 from=0x0000000000000000 max_addr=0x0000000000000000 alloc_pmd_fixmap+0x18/0x20 +[ 0.000000] memblock_reserve: [0x000000027fc15000-0x000000027fc15fff] memblock_alloc_range_nid+0xb0/0x12e +[ 0.000000] memblock_phys_alloc_range: 4096 bytes align=0x1000 from=0x0000000000000000 max_addr=0x0000000000000000 alloc_pmd_fixmap+0x18/0x20 +[ 0.000000] memblock_reserve: [0x000000027fc14000-0x000000027fc14fff] memblock_alloc_range_nid+0xb0/0x12e +[ 0.000000] memblock_phys_alloc_range: 4096 bytes align=0x1000 from=0x0000000000000000 max_addr=0x0000000000000000 alloc_pmd_fixmap+0x18/0x20 +[ 0.000000] memblock_reserve: [0x000000027fc13000-0x000000027fc13fff] memblock_alloc_range_nid+0xb0/0x12e +[ 0.000000] memblock_phys_alloc_range: 4096 bytes align=0x1000 from=0x0000000000000000 max_addr=0x0000000000000000 alloc_pmd_fixmap+0x18/0x20 +[ 0.000000] memblock_reserve: [0x000000027fc12000-0x000000027fc12fff] memblock_alloc_range_nid+0xb0/0x12e +[ 0.000000] memblock_phys_alloc_range: 4096 bytes align=0x1000 from=0x0000000000000000 max_addr=0x0000000000000000 alloc_pmd_fixmap+0x18/0x20 +[ 0.000000] memblock_reserve: [0x000000027fc11000-0x000000027fc11fff] memblock_alloc_range_nid+0xb0/0x12e +[ 0.000000] memblock_phys_alloc_range: 4096 bytes align=0x1000 from=0x0000000000000000 max_addr=0x0000000000000000 alloc_pmd_fixmap+0x18/0x20 +[ 0.000000] memblock_reserve: [0x000000027fc10000-0x000000027fc10fff] memblock_alloc_range_nid+0xb0/0x12e +[ 0.000000] memblock_phys_alloc_range: 4096 bytes align=0x1000 from=0x0000000000000000 max_addr=0x0000000000000000 alloc_pmd_fixmap+0x18/0x20 +[ 0.000000] memblock_reserve: [0x000000027fc0f000-0x000000027fc0ffff] memblock_alloc_range_nid+0xb0/0x12e +[ 0.000000] memblock_phys_alloc_range: 4096 bytes align=0x1000 from=0x0000000000000000 max_addr=0x0000000000000000 alloc_pmd_fixmap+0x18/0x20 +[ 0.000000] memblock_reserve: [0x000000027fc0e000-0x000000027fc0efff] memblock_alloc_range_nid+0xb0/0x12e +[ 0.000000] memblock_phys_alloc_range: 4096 bytes align=0x1000 from=0x0000000000000000 max_addr=0x0000000000000000 alloc_pmd_fixmap+0x18/0x20 +[ 0.000000] memblock_reserve: [0x000000027fc0d000-0x000000027fc0dfff] memblock_alloc_range_nid+0xb0/0x12e +[ 0.000000] memblock_phys_alloc_range: 4096 bytes align=0x1000 from=0x0000000000000000 max_addr=0x0000000000000000 alloc_pmd_fixmap+0x18/0x20 +[ 0.000000] memblock_reserve: [0x000000027fc0c000-0x000000027fc0cfff] memblock_alloc_range_nid+0xb0/0x12e +[ 0.000000] memblock_phys_alloc_range: 4096 bytes align=0x1000 from=0x0000000000000000 max_addr=0x0000000000000000 alloc_pmd_fixmap+0x18/0x20 +[ 0.000000] memblock_reserve: [0x000000027fc0b000-0x000000027fc0bfff] memblock_alloc_range_nid+0xb0/0x12e +[ 0.000000] [ DEBUG ] Paging Initialized. +[ 0.000000] [ DEBUG ] ACPI Boot table Initialized. +[ 0.000000] [ DEBUG ] Physical RAM base at address: 0x0000000080000000 +[ 0.000000] [ DEBUG ] Physical RAM size as: 0x000000000158a000 +[ 0.000000] OF: fdt: [ DEBUG ] Size: 41156, align: 8 +[ 0.000000] memblock_alloc_try_nid: 41156 bytes align=0x8 nid=-1 from=0x0000000000000000 max_addr=0x0000000000000000 early_init_dt_alloc_memory_arch+0x36/0x60 +[ 0.000000] memblock_reserve: [0x000000027fc00f38-0x000000027fc0affb] memblock_alloc_range_nid+0xb0/0x12e +[ 0.000000] [ DEBUG ] Page offset as: ffffffff8105b998 +[ 0.000000] [ DEBUG ] ptr is: ff600001ffc00f38 now +[ 0.000000] Unable to handle kernel paging request at virtual address ff600001ffc00f38 +[ 0.000000] Oops [#1] +[ 0.000000] Modules linked in: +[ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 6.6.68 #17 +[ 0.000000] Hardware name: riscv-virtio,qemu (DT) +[ 0.000000] epc : __memset+0x80/0x100 +[ 0.000000] ra : memblock_alloc_try_nid+0xa8/0xba +[ 0.000000] epc : ffffffff80901e40 ra : ffffffff80a14fac sp : ffffffff81403d30 +[ 0.000000] gp : ffffffff815092b8 tp : ffffffff8140cd40 t0 : ff600001ffc00ef8 +[ 0.000000] t1 : 0000000000000077 t2 : 6630306366663130 s0 : ffffffff81403d70 +[ 0.000000] s1 : ff600001ffc00f38 a0 : ff600001ffc00f38 a1 : 0000000000000000 +[ 0.000000] a2 : 000000000000a0c4 a3 : ff600001ffc0aff8 a4 : 0000000000000020 +[ 0.000000] a5 : ffffffff80901e40 a6 : ffffffff814168b0 a7 : 0000000000000030 +[ 0.000000] s2 : 000000000000a0c4 s3 : ffffffffffffffff s4 : ffffffff8150c000 +[ 0.000000] s5 : ffffffff80a34098 s6 : 0000000000000000 s7 : 0000000278000000 +[ 0.000000] s8 : 000000027eaec918 s9 : 0000000000001c6b s10: ffffffffffffffff +[ 0.000000] s11: 000000027e0f3640 t3 : ffffffff8152272e t4 : ffffffff8152272e +[ 0.000000] t5 : ffffffff81522708 t6 : ffffffff81403b58 +[ 0.000000] status: 0000000200000100 badaddr: ff600001ffc00f38 cause: 000000000000000f +[ 0.000000] [] __memset+0x80/0x100 +[ 0.000000] [] early_init_dt_alloc_memory_arch+0x36/0x60 +[ 0.000000] [] __unflatten_device_tree+0x52/0x114 +[ 0.000000] [] unflatten_device_tree+0x2e/0x44 +[ 0.000000] [] setup_arch+0x150/0x5ee +[ 0.000000] [] start_kernel+0x84/0x798 +[ 0.000000] Code: bc23 00b2 b023 02b2 b423 02b2 b823 02b2 bc23 02b2 (b023) 04b2 +[ 0.000000] ---[ end trace 0000000000000000 ]--- +[ 0.000000] Kernel panic - not syncing: Attempted to kill the idle task! +[ 0.000000] ---[ end Kernel panic - not syncing: Attempted to kill the idle task! ]--- +``` \ No newline at end of file