![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
basic.armv8
文章平均质量分 69
byd yes
这个作者很懒,什么都没留下…
展开
-
armv8 store buffer,invalidate queue简介
store buffer1. store buffer位于CPU和L1 cache之间2.CPU在写数据时,先把数据写入store buffer,不用等待收到其他所有CPU的应答,可以解决CPU停滞问题3. 如果store buffer有数据,cpu优先从store buffer里面读取,而不是从L1 cache读取数据。称为store forwarding4.smp_wmb()可以冲刷store buffer,保证前面的数据被写入到cache,在执行后面的存储操作invalidat原创 2021-12-29 11:06:09 · 1272 阅读 · 0 评论 -
armv8 cache维护
cache基本概念cache管理的操作 无效(invalidata)整个高速缓存或某个缓存行。高速缓存上的数据会被丢弃 清除(clean)整个高速缓存或者某个高速缓存行。相应的高速缓存行会被标记为脏,数据会写回到下一级高速缓存中或者主存器中。 清零(zero)操作,通常作用预取和加速,比如程序需要一大块内存,内存需要被清零,通常cache控制器会把零数据写入到对应的cacheline上,如果程序主动使用清零指令,则会大大减少内部总线的带宽。 cache管理的对象 ..原创 2021-09-09 16:38:55 · 569 阅读 · 0 评论 -
armv8 cache PoU和PoC区别
名词解释Point of Unification(PoU)Point of Coherency(PoC)PoU表示一个CPU中的指令Cache,数据cache还有MMU,TLB等看到的是同一份的内存拷贝。 PoU for a PE, 保证PE看到的I/Dcache和MMU是同一份拷贝。大多数情况下,PoU是站在单系统的角度来观察的。 PoU for inner share,意思是说在inner share里面的所有PE都能看到相同的一份拷贝。 以上是PoU的两个用法。..原创 2021-09-09 14:02:03 · 4517 阅读 · 0 评论 -
物理/虚拟高速缓存区别以及高速缓存重名/同名问题详解
概述 处理器在访问存储器时,访问的地址都是虚拟地址,经过TLB和MMU的映射后变成物理地址。TBL只用于加速虚拟地址到物理地址的转换过程。得到物理地址后,若每次都直接从物理内存中读取数据,显然会变慢。实际上,处理器都配置了多级的高速缓存来加快数据的访问速度。物理高速缓存 当处理器查询MMU和TLB并得到物理地址之后,使用物理地址查询高速缓存,这种高速缓存称为物理高速缓存。缺点:使用物理高速缓存的缺点就是处理器在查询MMU和TLB后才能访问高速缓存,增加了流水线的延迟时间。 ...原创 2021-09-08 16:21:35 · 1940 阅读 · 0 评论 -
armv8 mmu Memory region attributes
D5.5 Memory region attributes内存属性:内存类型,cache,shareability,内存一致性等。The memory region attribute fields control the memory type, accesses to the caches, and whether the memory region is Shareable and therefore is coherent. This section also describes some原创 2021-09-07 11:16:52 · 718 阅读 · 1 评论 -
armv8 mmu Memory access control
内存访问控制D5.4 Memory access controlThe access control fields in the translation table descriptors determine whether the PE, in its current state, ispermitted to perform the required access to the output address given in the translation table descriptor.原创 2021-09-07 08:56:24 · 387 阅读 · 0 评论 -
armv8 mmu The Access flag and The dirty state
D5.4.7 The Access flagpage或者section的内存第一次被访问时,会设置AF标志位,如果是armv8.0需要软件管理,如果是armv8.1则是硬件自动管理。The Access flag indicates when a page or section of memory is accessed for the first time since the Access flag in the corresponding translation table descriptor原创 2021-09-06 22:39:28 · 1302 阅读 · 0 评论 -
armv8 mmu 内存页表属性
armv8中的页表项D5.3 VMSAv8-64 translation table format descriptorsIn general, a descriptor is one of:页表项的4种类型• An invalid or fault entry.有效的或者无效的页表项• A table entry, that points to the next-level translation table.指向下一级的页表项• A block entry, that defi...原创 2021-09-06 16:39:19 · 6035 阅读 · 0 评论 -
armv8中开启或关闭mmu对内存和指令的影响
开启/关闭mmu后访问的情况D5.2.9 The effects of disabling a stage of address translationAll other accessesFor all other accesses, when stage 1 address translation is disabled, the assigned attributes dependon whether the access is a data access or an instruc原创 2021-09-06 14:06:54 · 1063 阅读 · 1 评论 -
armv8 mmu 究竟如何选择TTBR0或TTBR1呢?
TTBR的选择(armv8.6手册 2578页)Selection between TTBR0_ELx and TTBR1_ELx when two VA ranges are supportedEvery translation table walk starts by accessing the translation table addressed by the TTBR_ELx for the stage 1translation for the required translation原创 2021-09-06 13:54:31 · 2810 阅读 · 0 评论 -
计算机中浮点数表示
浮点数表示 浮点数在计算机中由符号位、指数和尾数组合而成。通常,浮点数表示为如下形式:F为小数(尾数)字段值,E为指数字段值。溢出(浮点的上溢):正的指数太大而超过了指数字段的表示范围。下溢:负的指数太大而超过了指数字段的表示范围。减少溢出方法在c语言中称为double,基于double的操作称为双精度(doubleprecision)浮点运算。 IEEE 754浮点标准 IEEE 754隐藏了规格化二进制小数点前面的1.因此,在单精度下,数据有2...原创 2021-09-01 15:27:41 · 21756 阅读 · 1 评论 -
arm64裸机系统,编译器添加额外的sxtw指令,导致系统分配内存返回的地址不对
首先查看我的get_free_page()函数:unsigned long get_free_page(void){ int i; for(i = 0; i < NR_PAGES; i++){ if(mem_map[i] == 0){ mem_map[i] = 1; unsigned long page = LOW_MEMORY + (i*PAGE_SIZE) + VA_START; mem原创 2021-08-19 14:17:49 · 1426 阅读 · 1 评论 -
ARM64架构题目答案
1.A64指令集支持64位宽的数据和地址寻址,为什么指令的编码宽度只有32位答:遵循简单源于规整的原则。2.下面几条mov指令,哪些能成功,哪些会失败mov x0, 0x1234mov x0, 0x1abcdmov x0, 0x12bc0000mov x0, 0xffff0000ffff答:armv8体系结构中mov指令有三种模式: invertedwideimmediate 别名为MOVN 将一个立即数左移16/32/48位放入寄存器,通常此指令用于移动位掩码...原创 2021-07-27 16:55:19 · 1247 阅读 · 2 评论 -
armv8架构中栈结构
栈的布局 函数调用栈由连续的栈帧组成。每个栈帧记录一个函数调用的信息,这些信息包括函数参数,函数变量,函数运行地址。 假设函数调用关系是:main()->func1()->func2()原创 2021-07-22 08:46:03 · 503 阅读 · 0 评论