04 2022 档案

摘要:相关文档: register_driver 到 probe 函数调用 https://www.cnblogs.com/zhangzhiwei122/p/16125014.html register_driver 函数,检查 dts 中是否有对应的设备,如果有匹配的设备,就调用 really_prob 阅读全文
posted @ 2022-04-17 19:40 张志伟122 阅读(598) 评论(0) 推荐(0) 编辑
摘要:版权声明:本文为CSDN博主「spongebob1912」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。原文链接:https://blog.csdn.net/spongebob1912/article/details/109496964 简述 soc内部管脚众多, 阅读全文
posted @ 2022-04-17 19:26 张志伟122 阅读(573) 评论(0) 推荐(0) 编辑
摘要:作者:TASK_RUNNING链接:https://www.jianshu.com/p/60e7238876a2 我们在驱动编程时,如果程序内使用了死循环,则一般会使CPU的占用率达到100%,某些情况下,我们希望降低CPU使用率,那应该怎么办呢? 1. schedule_timeout sched 阅读全文
posted @ 2022-04-17 19:22 张志伟122 阅读(1703) 评论(0) 推荐(0) 编辑
摘要:版权声明:本文为CSDN博主「luckywang1103」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。原文链接:https://blog.csdn.net/luckywang1103/article/details/47859995 这里以内核usb gadge 阅读全文
posted @ 2022-04-17 19:02 张志伟122 阅读(410) 评论(0) 推荐(0) 编辑
摘要:上一篇:v4l2 驱动-ioctl 调用流程 https://www.cnblogs.com/zhangzhiwei122/p/16156730.html 原文链接:https://blog.csdn.net/liujun3512159/article/details/123857276 V4L2是 阅读全文
posted @ 2022-04-17 18:43 张志伟122 阅读(306) 评论(0) 推荐(0) 编辑
摘要:下一篇:v4l2 应用流程调用流程 https://www.cnblogs.com/zhangzhiwei122/p/16156750.html 原文链接:https://blog.csdn.net/lxllinux/article/details/81745452 ioctl详解 进入ioctl都 阅读全文
posted @ 2022-04-17 18:37 张志伟122 阅读(614) 评论(0) 推荐(0) 编辑
摘要:中断硬件相关 arm64 中断分类 sync exception; irq ; fiq ; serror; arm64 中断处理相关寄存器: SP_EL0,SP_EL1,SPSR_EL1,ELR_EL1,ESR_EL1,VBAR_EL1 硬件处理过程: a:保存PSTATE到SPSR_EL1; b: 阅读全文
posted @ 2022-04-10 15:26 张志伟122 阅读(164) 评论(0) 推荐(0) 编辑
摘要:上一篇: RESERVEDMEM_OF_DECLARE 对 dts 中预留的内存进行匹配和初始化 https://www.cnblogs.com/zhangzhiwei122/p/16125744.html 另外,dts 中,通常使用 memory-region 将设备和 reserved memo 阅读全文
posted @ 2022-04-10 14:34 张志伟122 阅读(1632) 评论(0) 推荐(0) 编辑
摘要:RESERVEDMEM_OF_DECLARE 在 include/linux/of_reserved_mem.h 11struct reserved_mem { 12 const char *name; 13 unsigned long fdt_node; 14 unsigned long phan 阅读全文
posted @ 2022-04-10 14:13 张志伟122 阅读(1065) 评论(0) 推荐(0) 编辑
摘要:module_init 这个宏定义在 include/linux/module.h module 的含义,即 模块; 有两类: builtin 的模块 (存在在 Image 中) 或者 独立的模块(存在在 xx.ko 中) 根据当前在编译 builtin 还是 编译 独立模块, module 宏有不 阅读全文
posted @ 2022-04-10 12:55 张志伟122 阅读(1034) 评论(0) 推荐(0) 编辑
摘要:gcc __attribute__ 关键字用来给 函数、变量、数据类型设置 属性 alias 用于设置一个函数 设置一个别名 示例 int __func() { printf("in __func ++\n"); return 0; } int fun() __attribute__((alias( 阅读全文
posted @ 2022-04-10 11:39 张志伟122 阅读(560) 评论(0) 推荐(0) 编辑
摘要:上一篇: module_init 宏解析 https://www.cnblogs.com/zhangzhiwei122/p/16125406.html module_i2c_driver module_i2c_driver 是一个宏,简化 i2c driver 模块中的重复代码 linux/incl 阅读全文
posted @ 2022-04-10 11:13 张志伟122 阅读(1196) 评论(0) 推荐(0) 编辑
摘要:上一篇: module_i2c_diver 声明到 i2c_add_driver https://www.cnblogs.com/zhangzhiwei122/p/16125079.html i2c_add_driver ->i2c_register_driver linux/include/lin 阅读全文
posted @ 2022-04-10 10:55 张志伟122 阅读(898) 评论(0) 推荐(0) 编辑
摘要:版权声明:本文为CSDN博主「tangyongxiang_cn」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。原文链接:https://blog.csdn.net/tangyongxiang_cn/article/details/121704682 preempt 阅读全文
posted @ 2022-04-06 19:09 张志伟122 阅读(283) 评论(0) 推荐(0) 编辑
摘要:调度器 sched_class 结构体 调度器 需要做的动作都抽象出来,放在 接口 sched_class 里面,结构体定义在 linux/kernel/sched/sched.h 里面都是 函数指针, 定义了各种调度操作。 示例: enqueue_task - 将 task * p 加入到 rq 阅读全文
posted @ 2022-04-06 17:42 张志伟122 阅读(355) 评论(0) 推荐(0) 编辑
摘要:上一篇: vmalloc 机制和初始化 - 虚拟地址连续但是物理地址不连续的内存分配 https://www.cnblogs.com/zhangzhiwei122/p/16102827.html 前面的文章中,描述了 内核 中使用的 各种地址空间 和 物理内存 的管理机制。 这篇文章,描述 用户态进 阅读全文
posted @ 2022-04-05 17:14 张志伟122 阅读(116) 评论(0) 推荐(0) 编辑
摘要:上一篇: slub 分配器 - kmem_cache_init kmalloc / kfree https://www.cnblogs.com/zhangzhiwei122/p/16102021.html start_kernel -> mm_init -> vmalloc_init 818/* 8 阅读全文
posted @ 2022-04-05 16:38 张志伟122 阅读(190) 评论(0) 推荐(0) 编辑
摘要:上一篇: arm64内存-kmem_cache-slub-分配器-结构体和框架 https://www.cnblogs.com/zhangzhiwei122/p/16101959.html slub分配器-转载 篇优秀博文 推荐: 图解slub https://www.cnblogs.com/lin 阅读全文
posted @ 2022-04-05 13:16 张志伟122 阅读(75) 评论(0) 推荐(0) 编辑
摘要:上一篇 : arm64内存-memblock交接内存给zoned frame allocator (buddy system) https://www.cnblogs.com/zhangzhiwei122/p/16100012.html start_kernel -> mm_init -> kmem 阅读全文
posted @ 2022-04-05 12:55 张志伟122 阅读(431) 评论(0) 推荐(0) 编辑
摘要:上一篇:page alloc init https://www.cnblogs.com/zhangzhiwei122/p/16099528.html start_kernel -> mm_init -> mem_init 818/* 819 * Set up kernel memory alloca 阅读全文
posted @ 2022-04-04 18:36 张志伟122 阅读(292) 评论(0) 推荐(0) 编辑
摘要:上一篇:build all zonelists https://www.cnblogs.com/zhangzhiwei122/p/16099490.html start_kernel ->page_alloc_init 848asmlinkage __visible void __init __no 阅读全文
posted @ 2022-04-04 16:09 张志伟122 阅读(237) 评论(0) 推荐(0) 编辑
摘要:上一篇: zone sizes init - free area init https://www.cnblogs.com/zhangzhiwei122/p/16098846.html start_kernel -> build_all_zonelist(NULL) 848asmlinkage __ 阅读全文
posted @ 2022-04-04 15:57 张志伟122 阅读(220) 评论(0) 推荐(0) 编辑
摘要:上一篇: https://www.cnblogs.com/zhangzhiwei122/p/16097591.html setup_arch -> bootmem_init -> zone_sizes_init arch/arm64/mm/init.c 188static void __init z 阅读全文
posted @ 2022-04-04 12:31 张志伟122 阅读(274) 评论(0) 推荐(0) 编辑
摘要:zone sizes init 各个zone 中 size 相关信息的初始化 setup_arch -> bootmem_init -> zone_sizes_init arch/arm64/mm/init.c 188static void __init zone_sizes_init(unsign 阅读全文
posted @ 2022-04-03 22:09 张志伟122 阅读(204) 评论(0) 推荐(0) 编辑
摘要:版权声明:本文为CSDN博主「Huo的藏经阁」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。原文链接:https://blog.csdn.net/weixin_42730667/article/details/117840820 由于现在运行的设备中大都采用spa 阅读全文
posted @ 2022-04-03 17:29 张志伟122 阅读(453) 评论(0) 推荐(0) 编辑
摘要:相关的宏定义 arch/arm64/include/asm/sparsemem.h 9#define MAX_PHYSMEM_BITS CONFIG_ARM64_PA_BITS 10#define SECTION_SIZE_BITS 30 MAX_PHYSMEM_BIT 最大物理内存地址bits - 阅读全文
posted @ 2022-04-03 16:18 张志伟122 阅读(300) 评论(0) 推荐(0) 编辑
摘要:上一篇:smp_init 整体流程-新核心执行 secondary_entry https://www.cnblogs.com/zhangzhiwei122/p/16093602.html secondary cpu启动流程 secondary_entry // arch/arm64/kernel/ 阅读全文
posted @ 2022-04-03 10:33 张志伟122 阅读(1793) 评论(0) 推荐(0) 编辑
摘要:上一篇:smp_init 的整体流程 https://www.cnblogs.com/zhangzhiwei122/p/16093602.html 本文: smp_init 中的 idle thread init 每个cpu的idle_threads cpuhp_threads_init 每个cpu 阅读全文
posted @ 2022-04-03 09:05 张志伟122 阅读(402) 评论(0) 推荐(0) 编辑
摘要:上一篇:smp_prepare_cpus https://www.cnblogs.com/zhangzhiwei122/p/16093412.html 参考-总流程:https://www.cnblogs.com/pengdonglin137/p/11925299.html 参考:https://z 阅读全文
posted @ 2022-04-02 18:54 张志伟122 阅读(564) 评论(0) 推荐(0) 编辑
摘要:上一篇:time_init() 调用 drivers/clocksource/arm_arch_timer.c 中 arch_timer_of_init 注册CPUHP_AP_ARM_ARCH_TIMER_STARTING的回调函数 https://www.cnblogs.com/zhangzhiw 阅读全文
posted @ 2022-04-02 18:03 张志伟122 阅读(372) 评论(0) 推荐(0) 编辑
摘要:上一篇:init_IRQ():设置中断栈,调用of_irq_init初始化中断控制器,其中会注册CPUHP_AP_IRQ_GIC_STARTING的回调函数gic_starting_cpu https://www.cnblogs.com/zhangzhiwei122/p/16092659.html 阅读全文
posted @ 2022-04-02 16:42 张志伟122 阅读(251) 评论(0) 推荐(0) 编辑
摘要:上一篇:boot_cpu_hotplug_init https://www.cnblogs.com/zhangzhiwei122/p/16092269.html 参考-总流程:https://www.cnblogs.com/pengdonglin137/p/11925299.html 9、init_ 阅读全文
posted @ 2022-04-02 16:12 张志伟122 阅读(158) 评论(0) 推荐(0) 编辑
摘要:上一篇:setup_nr_cpu_ids & smp_prepare_boot_cpu https://www.cnblogs.com/zhangzhiwei122/p/16091458.html start_kernel -> boot_cpu_hotplug_init 848asmlinkage 阅读全文
posted @ 2022-04-02 15:18 张志伟122 阅读(219) 评论(0) 推荐(0) 编辑
摘要:上一篇: setup_arch->smp_init_cpus https://www.cnblogs.com/zhangzhiwei122/p/16091111.html start_kernel -> setup_nr_cpu_ids & smp_prepare_boot_cpu 848asmli 阅读全文
posted @ 2022-04-02 12:22 张志伟122 阅读(464) 评论(0) 推荐(0) 编辑
摘要:上一篇: cpu_ops https://www.cnblogs.com/zhangzhiwei122/p/16090770.html setup_arch -> smp_init_cpus arch/arm64/kernel/setup.c 284void __init __no_sanitize 阅读全文
posted @ 2022-04-02 11:10 张志伟122 阅读(288) 评论(0) 推荐(0) 编辑
摘要:上一篇: https://www.cnblogs.com/zhangzhiwei122/p/16090641.html setup_arch->init_bootcpu_ops arch/arm64/kernel/setup.c 284void __init __no_sanitize_addres 阅读全文
posted @ 2022-04-02 10:19 张志伟122 阅读(207) 评论(0) 推荐(0) 编辑
摘要:setup_arch -> psci_dt_init arch/arm64/kernel/setup.c 284void __init __no_sanitize_address setup_arch(char **cmdline_p) 285{ 339 340 if (acpi_disabled) 阅读全文
posted @ 2022-04-02 09:54 张志伟122 阅读(357) 评论(0) 推荐(0) 编辑
摘要:本文对应 https://www.cnblogs.com/zhangzhiwei122/p/16085238.html 中的“七、看到内存” 。 了解到了当前的物理内存的布局,但是内核仍然只是能够访问部分内存(kernel image mapping和DTB那两段内存,上图中黄色block),大部分 阅读全文
posted @ 2022-04-01 16:52 张志伟122 阅读(745) 评论(0) 推荐(0) 编辑
摘要:请先了解: 1、线性空间下移:https://www.cnblogs.com/zhangzhiwei122/p/16058173.html 2、整体流程:https://www.cnblogs.com/zhangzhiwei122/p/16085238.html 5.10 版本,linux/arch 阅读全文
posted @ 2022-04-01 14:05 张志伟122 阅读(990) 评论(0) 推荐(0) 编辑
摘要:原文链接: http://www.wowotech.net/memory_management/mm-init-1.html 推荐 原文链接: http://www.wowotech.net/memory_management/mm-init-1.html 强烈推荐 内存初始化(上) 作者:linu 阅读全文
posted @ 2022-04-01 09:22 张志伟122 阅读(306) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示