摘要:1、什么是堆栈? 在嵌入式的世界里,堆栈通常指的是栈,严格来说,堆栈分为堆(Heap)和栈(Stack)。 栈(Stack): 一种顺序数据结构,满足后进先出(Last-In / First-Out)的原则,由编译器自动分配和释放。使用一级缓存,调用完立即释放。 堆(Heap):类似于链表结构,可对
阅读全文
摘要:Setup If you have worked through all the previous posts in this series, you can cd to your riscv-from-scratch directory and skip this section. If you’
阅读全文
摘要:root@ubuntu:~# riscv64-linux-gnu-gcc -v Using built-in specs. COLLECT_GCC=riscv64-linux-gnu-gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc-cross/riscv64-linux-g
阅读全文
摘要:linux driver write writel_relaxed readb()和writeb()系列函数 1 #define readb_relaxed(c) ({ u8 __r = __raw_readb(c); __r; }) 2 #define readw_relaxed(c) ({ u1
阅读全文
摘要:[ 0.000000] riscv_timer_init_dt: Registering clocksource cpuid [0] hartid [2] [ 0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max
阅读全文
摘要:[root@centos7 lesson14]# make riscv64-unknown-elf-gcc -c -o entry.o entry.S riscv64-unknown-elf-gcc -Wall -Werror -O -fno-omit-frame-pointer -ggdb -mc
阅读全文
摘要:特权模式(privilege mode) /* * Only the HART supporting privilege mode specified in the * scratch->next_mode should be allowed to become the coldboot * HAR
阅读全文
摘要:补丁下载 内核代码 root@Ubuntu-riscv64:/usr/src/linux-5.14# head Makefile # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 14 SUBLEVEL = 0 EXTRAVERS
阅读全文