上一页 1 ··· 31 32 33 34 35 36 37 38 39 ··· 109 下一页
摘要: 概述 原子(atomic)本意是“不能被进一步分割的最小粒子”,而原子操作(atomic operation)意为“不可被中断的一个或一系列操作”,可以保证指令以原子的方式运行,即执行过程不被打断。 对一个整数的操作可以用原子函数,避免使用互斥锁、自旋锁等锁机制带来的线程阻塞、锁竞争、死锁、优先级反 阅读全文
posted @ 2023-02-12 23:18 流水灯 阅读(878) 评论(0) 推荐(0)
摘要: pin controller pin controller 是用来设置引脚上下拉、三态、驱动强度、复用功能的,作为一个设备树节点,如 testgrp iomuxc: pinctrl@20e0000 { compatible = "fsl,imx6ul-iomuxc"; reg = <0x020e00 阅读全文
posted @ 2023-02-12 17:06 流水灯 阅读(163) 评论(0) 推荐(0)
摘要: xxx.mod.c文件源码 xxx.mod.c是编译驱动的时候自动产生的,假设我们编译module.ko,当编译时就会产生一个module.mod.c文件 #include <linux/module.h> #include <linux/vermagic.h> #include <linux/co 阅读全文
posted @ 2023-02-11 22:31 流水灯 阅读(1547) 评论(0) 推荐(0)
摘要: Linux内核由主内核ELF格式文件(vmlinux)和许多内核模块组成。在构成vmliunx主内核文件中,每一个被声明EXPORT_SYMBOL的符号,都只有一个目的,就是让vmlinux主内核文件之外的内核模块使用这个变量或者函数符号,这个就是给到内核模块来使用的内核导出符号。 组成vmlinu 阅读全文
posted @ 2023-02-11 22:09 流水灯 阅读(765) 评论(0) 推荐(0)
摘要: 模块代码有两种运行方式,一是静态编译连接进内核,在系统启动过程中进行初始化;一是编译成可动态加载的module,通过insmod动态加载重定位到内核。这两种方式可以在Makefile中通过obj-y或obj-m选项进行选择。 而一旦可动态加载的模块目标代码(.ko)被加载重定位到内核,其作用域和静态 阅读全文
posted @ 2023-02-10 23:34 流水灯 阅读(632) 评论(1) 推荐(0)
摘要: https://blog.csdn.net/u013836909/article/details/120962422 Linux ARM系统调用过程分析(一)——Linux编程中的API函数和系统调用的关系 Linux ARM系统调用过程分析(二)——Linux系统调用流程分析 Linux ARM系 阅读全文
posted @ 2023-02-10 22:32 流水灯 阅读(377) 评论(0) 推荐(0)
摘要: 0号进程 0号进程称为 idle 进程,其 pid 等于0。 每个进程都有一个进程控制块PCB(Process Control Block),PCB的数据结构类型是struct task_struct。idle进程对应的PCB是 struct task_struct init_task。 idle进 阅读全文
posted @ 2023-02-04 21:52 流水灯 阅读(4054) 评论(0) 推荐(0)
摘要: stext() > __enable_mmu() > __turn_mmu_on() > __mmap_switched() > start_kernel() > setup_arch() > setup_machine_fdt() > of_flat_dt_match_machine() 在函数  阅读全文
posted @ 2023-01-15 21:48 流水灯 阅读(172) 评论(0) 推荐(0)
摘要: uboot通过环境变量 bootargs 传递参数给 kernel 内核,bootargs存储在设备树的 chosen 节点中,则 kernel 是通过读取设备树的 chosen 节点中的 bootargs 属性获取 uboot 传递过来的参数。 U_BOOT_CMD( bootz, CONFIG_ 阅读全文
posted @ 2023-01-15 18:36 流水灯 阅读(1512) 评论(0) 推荐(0)
摘要: 一、设备树 下面是我们将要实验的设备树的例子: / { #address-cells = <1>; #size-cells = <1>; demo_level0 { compatible = "simple-bus"; ranges = <0x0 0x3000000 0x3000>; #addres 阅读全文
posted @ 2023-01-14 18:40 流水灯 阅读(1488) 评论(0) 推荐(0)
上一页 1 ··· 31 32 33 34 35 36 37 38 39 ··· 109 下一页