- 博客(606)
- 资源 (18)
- 收藏
- 关注
原创 ARMv8 ELx VBAR
VBAR_EL1, Vector Base Address Register (EL1)Holds the vector base address for any exception that is taken to EL1.VBAR_EL2, Vector Base Address Register (EL2)Holds the vector base address f...
2019-11-25 19:00:55
2043
原创 EXT4 MAP
const struct file_operations ext4_file_operations = { .llseek = ext4_llseek, .read_iter = ext4_file_read_iter, .write_iter = ext4_file_write_iter, .unlocked_ioctl = ext4_...
2019-08-30 09:10:54
633
原创 Linux softirq
static struct softirq_action softirq_vec[NR_SOFTIRQS];DEFINE_PER_CPU(struct task_struct *, ksoftirqd);const char * const softirq_to_name[NR_SOFTIRQS] = { "HI", "TIMER", "NET_TX",...
2019-08-22 20:58:58
647
原创 QCOM KERNEL log for DTB
[ 0.000000] Initializing cgroup subsys cpu[ 0.000000] Initializing cgroup subsys cpuacct[ 0.000000][ 0.000000] Boot CPU: AArch64 Processor [410fd034][ 0.000000] Machine: Qualcomm T...
2019-08-16 09:54:02
1064
原创 ARM64 DTS 处理-早期处理
setup_arch() // arch/arm64/kernel/setup.c --> setup_machine_fdt(__fdt_pointer); 检查DTB是否正确,以及早期配置系统 --> unflatten_device_tree();对DTB进行解析,填充设备树结构下内核针对设备树定义的struct device_node类型对象初始化。st...
2019-08-15 19:45:32
1391
原创 Linux ramfs, rootfs and initramfs
ramfs, rootfs and initramfs October 17, 2005 Rob Landley <rob@landley.net> =============================What is ramfs?--------------Ramfs is a very simple filesystem that exports Linux's disk...
2019-08-09 10:34:54
772
原创 驱动调用栈
[ 14.873268] [<ffffff800808c078>] dump_backtrace+0x0/0x4b0[ 14.881364] [<ffffff800808c53c>] show_stack+0x14/0x1c[ 14.888952] [<ffffff80087579d8>] dump_stack+0x78/0x98[ 14....
2019-08-07 13:36:31
640
原创 ARM GICv3 研究学习 中断状态
对于GICv3来说,每个中断都关联了一个状态机,其用于描述每个中断的状态。GICv3 提供的每个中断的中断状态机Inactive:描述中断没有到来的状态,这里的定义是,不是处于active和pending状态。Pending:中断信号已经被asserted,即中断已经到来,并且被硬件识别到,这里是指GICv3的硬件识别到,这个可以是硬件产生或者软件产生的。此时处于等待目标cor...
2019-07-19 11:11:29
1056
原创 kernel_log之 version
Linux kernel log 版本与编译信息一般利用版本和编译信息用于确定每次修改内核代码后,了解本次运行是否是编译的kernel 镜像。上面这个打印位于start_kernel 函数的下面代码中:asmlinkage __visible void __init start_kernel(void){ char *command_line; char *afte...
2019-07-19 10:44:31
549
原创 irq_enter
/** Enter an interrupt context.*/void irq_enter(void){ rcu_irq_enter(); if (is_idle_task(current) && !in_interrupt()) { /* * Prevent raise_softirq from needlessl...
2019-03-20 18:48:17
608
转载 Watchdog
A watchdog is a fixed-length counter that enables a system to recover from an unexpected hardware or software catastrophe. Unless the system periodically resets the watchdog timer, the watchdog timer ...
2018-09-11 14:05:42
1127
原创 Linux 子进程pgd处理
进程创建 fork函数运行。copy_mm()--> dup_mmstatic struct mm_struct *mm_init(struct mm_struct *mm, struct task_struct *p, struct user_namespace *user_ns){ mm->mmap = NULL; mm->mm_rb = RB_ROOT;
2018-02-07 10:56:58
1338
原创 Linux 内核页表初始化
前面我们讨论了页描述符对象分配,以及初始化。接下来我们再来了解内核页表建立初始化处理。针对ARM64进行。start_kernel --> setup_arch --> paging_init()void __init paging_init(void){ phys_addr_t pgd_phys = early_pgtable_alloc(); 分配页全局目录表地址
2018-02-07 10:31:24
1788
原创 Linux初始化页描述符对象
在前面我们讨论了内存节点node_mem_map成员的初始化。了解到此成员其实是以struct page为单位的数组,数组大小跟此节点内存大小相关,那么这些描述符是何时初始化呢,当前主要是在mem_init函数进行设置。start_kernel() --> mm_init --> mem_init()需要注意的是mem_init是跟体系结构相关的函数,比如针对ARM64的实现函数:
2018-02-07 10:12:05
888
原创 Linux内存管理之mem_map对象
在linux内核中,所有的物理内存都用struct page结构来描述,这些对象以数组形式存放,而这个数组的地址就是mem_map。内核以节点node为单位,每个node下的物理内存统一管理,也就是说在表示内存node的描述类型struct pglist_data中,有node_mem_map这个成员,其针对平坦型内存进行描述(CONFIG_FLAT_NODE_MEM_MAP),与此相反的是S
2018-02-07 09:53:46
9595
原创 Linux printk
printk("A0:%lld\n", ktime_to_ns(ktime_get())); printk("A1:%lld\n", ktime_to_ns(ktime_get()));[ 40.059130] A0:40056438422[ 40.061813] A1:40059121391[ 40.064527] A0:40061834828
2018-01-24 09:41:14
669
原创 ext4 节点inode.i_block描述
The Contents of inode.i_block Depending on the type of file an inode describes, the 60 bytes of storage in inode.i_block can be used in different ways. In general, regular files and directories will
2018-01-09 13:49:24
1143
原创 ext4 节点表
Inode Table In a regular UNIX filesystem, the inode stores all the metadata pertaining to the file (time stamps, block maps, extended attributes, etc), not the directory entry. To find the informatio
2018-01-09 13:46:40
560
原创 ext5 块和节点表
Block and inode Bitmaps The data block bitmap tracks the usage of data blocks within the block group. The inode bitmap records which entries in the inode table are in use. As with most bitmaps, one bi
2018-01-09 13:43:19
673
原创 ext4 块组介绍
Block Group Descriptors Each block group on the filesystem has one of these descriptors associated with it. As noted in the Layout section above, the group descriptors (if present) are the second ite
2018-01-09 13:39:26
927
原创 EXT4 超级块介绍
The Super Block The superblock records various information about the enclosing filesystem, such as block counts, inode counts, supported features, maintenance information, and more. If the sparse_supe
2018-01-09 13:35:48
1808
原创 ext4 Overview
Overview An ext4 file system is split into a series of block groups. To reduce performance difficulties due to fragmentation, the block allocator tries very hard to keep each file's blocks within t
2018-01-09 11:25:58
470
原创 ext4 Terminology
Terminology ext4 divides a storage device into an array of logical blocks both to reduce bookkeeping overhead and to increase throughput by forcing larger transfer sizes. Generally, the block size
2018-01-09 11:24:17
236
原创 ext4 创建文件系统
Creating ext4 filesystems Creating a new ext4 filesystem is very easy once you have upgraded to e2fsprogs 1.41 or later. Simply type: # mke2fs -t ext4 /dev/DEV or # mkfs.ext4 /dev/DEV Once the files
2018-01-09 11:17:07
3309
转载 ext4 General Information
General Information Ext4 was released as a functionally complete and stable filesystem in Linux 2.6.28, and it's getting included in all the modern distros (in some cases as the default fs), so if you
2018-01-09 11:15:49
186
翻译 ext4 EXT4 features
EXT4 features Compatibility Any existing Ext3 filesystem can be mounted as Ext4 without requiring any on-disk format changes. However, it is possible to upgrade an Ext3 filesystem to take advantage
2018-01-09 11:12:08
613
原创 ext4 log1
ext4_map_blocks(): inode 8, flag 0, max_blocks 1,logical block 0ext4_map_blocks(): inode 8, flag 0, max_blocks 1,logical block 0ext4_map_blocks(): inode 8, flag 0, max_blocks 1,logical block 1ex
2018-01-08 14:29:56
223
原创 ext4 block map log
blocks 0/1 requested for inode 8 size=88584192blocks 1/1 requested for inode 8 size=88584192blocks 2/1 requested for inode 8 size=88584192blocks 3/1 requested for inode 8 size=88584192bloc
2018-01-08 14:28:30
276
原创 Linux buffer_head
enum bh_state_bits { BH_Uptodate, /* Contains valid data */ BH_Dirty, /* Is dirty */ BH_Lock, /* Is locked */ BH_Req, /* Has been submitted for I/O */
2018-01-07 18:00:43
815
原创 ext4 extent 寻址方案
Extent Tree In ext4, the file to logical block map has been replaced with an extent tree. Under the old scheme, allocating a contiguous run of 1,000 blocks requires an indirect block to map all 1,000
2018-01-06 21:18:36
768
原创 ext4 直接和间接块寻址
Direct/Indirect Block Addressing In ext2/3, file block numbers were mapped to logical block numbers by means of an (up to) three level 1-1 block map. To find the logical block that stores a particul
2018-01-06 19:43:27
1351
原创 ext4 fs format
$ sudo mke2fs -t ext4 /dev/sdcmke2fs 1.42.9 (4-Feb-2014)/dev/sdc is entire device, not just one partition!Proceed anyway? (y,n) yFilesystem label=OS type: LinuxBlock size=4096 (log=2)Fra
2018-01-06 10:42:41
479
原创 ext4 block info
Disk /dev/sdc: 15.5 GB, 15472047104 bytes32 heads, 63 sectors/track, 14989 cylinders, total 30218842 sectorsUnits = sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512
2018-01-06 10:35:07
221
原创 ext4 节点映射块
/* * The ext4_map_blocks() function tries to look up the requested blocks, * and returns if the blocks are already mapped. * * Otherwise it takes the write lock of the i_data_sem and allocate
2018-01-05 20:26:12
632
原创 ext4 定位块所在的块组
/* * The free blocks are managed by bitmaps. A file system contains several * blocks groups. Each group contains 1 bitmap block for blocks, 1 bitmap * block for inodes, N blocks for the inode
2018-01-05 20:17:46
490
原创 ext4 读取块组下的节点位图
/* * Read the inode allocation bitmap for a given block_group, reading * into the specified slot in the superblock's bitmap cache. * Return buffer_head of bitmap on success or NULL. */static stru
2018-01-05 20:08:06
908
原创 ext4 分配节点 核心层操作
static struct inode *alloc_inode(struct super_block *sb){ struct inode *inode; if (sb->s_op->alloc_inode) inode = sb->s_op->alloc_inode(sb); else inode = kmem_cach
2018-01-05 19:58:53
667
原创 ext4 分配节点ext4_alloc_inode
/* * Called inside transaction, so use GFP_NOFS */static struct inode *ext4_alloc_inode(struct super_block *sb){ struct ext4_inode_info *ei; ei = kmem_cache_alloc(ext4_inode_cachep
2018-01-05 19:44:40
784
原创 EXT4之mount可选项
static const match_table_t tokens = { {Opt_bsd_df, "bsddf"}, {Opt_minix_df, "minixdf"}, {Opt_grpid, "grpid"}, {Opt_grpid, "bsdgroups"}, {Opt_nogrpid, "nogrpid"}, {Opt_nogrpid, "sysvgroups"
2018-01-03 09:16:26
2549
没有程序语言是完美的.甚至没有一个唯一最好的语言,只有对于特定目的,比较适合和不适合
2010-06-03
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人