arm

ARM prefetch workaround

烂漫一生 提交于 2021-01-27 03:47:34
问题 I have a situation where some of the address space is sensitive in that you read it you crash as there is nobody there to respond to that address. pop {r3,pc} bx r0 0: e8bd8008 pop {r3, pc} 4: e12fff10 bx r0 8: bd08 pop {r3, pc} a: 4700 bx r0 The bx was not created by the compiler as an instruction, instead it is the result of a 32 bit constant that didnt fit as an immediate in a single instruction so a pc relative load is setup. This is basically the literal pool. And it happens to have bits

ARM prefetch workaround

寵の児 提交于 2021-01-27 03:45:52
问题 I have a situation where some of the address space is sensitive in that you read it you crash as there is nobody there to respond to that address. pop {r3,pc} bx r0 0: e8bd8008 pop {r3, pc} 4: e12fff10 bx r0 8: bd08 pop {r3, pc} a: 4700 bx r0 The bx was not created by the compiler as an instruction, instead it is the result of a 32 bit constant that didnt fit as an immediate in a single instruction so a pc relative load is setup. This is basically the literal pool. And it happens to have bits

手机需要将电池用光之后再充电吗?

…衆ロ難τιáo~ 提交于 2021-01-22 04:41:31
手机需要将电池用光之后再充电吗? 目前业界的电池标准技术是锂电子聚合物电池,这种电池的功率密度更高,说人话就是可以保证更高的电池使用时间,但是由于手机屏幕在更长更宽的路上没有终点,因此手机电量消耗依然很快。于是许多用户面临了这样的问题,手机是否可以随时连接电源?还是需要等待电量耗尽再充电? 实际上,锂电子的电池寿命是根据充电周期来决定的,以iPhone的电池为例,在完成500个充电盒放电周期后,电量会下降为原始电池容量的 80%。 而一个充电周期意味着用完电池的所有电量,但并不等同于充一次电。例如,你一天可以使用iPhone好几个小时,只用了一半的电量,然后又为它充满 电。如果你第二天还如此,这只能算作一个充电周期,而不是两个,因此,你可能要花去好几天才完成一个周期。当然,每完成一个充电周期,电池容量就会减少一 点,因此,电池最终会难以维持一天的使用时间,这个时候就意味着你该更换手机电池,或直接更换手机了。 至于对于移动设备电池的保养,除了关闭一些自己不需要的联网设置,我们建议你每个月至少一次将电池充满后再将其完全用尽。同时确保自己的设备不要因为保护套过紧,而导致设备过热,影响电池寿命。 来源: oschina 链接: https://my.oschina.net/u/118890/blog/182177

ARM Cortex-M3 boot from RAM initial state

爱⌒轻易说出口 提交于 2021-01-21 05:56:51
问题 I have two ARM Cortex-M3 chips: STMF103C8T6 and STM32F103VET6 . When set to boot from RAM, initial state of STMF103C8T6 PC register is 0x20000108 ; 0x200001e0 for STM32F103VET6 . I am unable to find and information about these addresses in the datasheets. Why are they booted this way and where I can find some information about it? Edit: To clarify. When chip set to boot from flash, PC register points to the location of the Reset Handler. This address is provided in the reset vector table at

Restrict a routine to use a limited set of registers

倖福魔咒の 提交于 2021-01-20 09:32:47
问题 Using compiler option, is it possible to restrict a routine from using certain set of registers? For example: Restrict a routine to use only R0-R8; Purpose: If some compiler option available, then I could ensure certain routines (like Interrupt Service Routines) to use only limited register set, and thus do limited Context Save & Restore. 回答1: When this was last discussed, the consensus was that it is not possible on a function-by-function basis. There are ways to restrict register use

Importance of Q(Saturation Flag) in ARM

家住魔仙堡 提交于 2021-01-19 06:49:25
问题 I want to understand the importance of Q flag in ARM Processor. I know there are certain instructions like QADD,QSUB etc. But I need to understand this with some examples which will clarify the concept. Please explain me. Thank you 回答1: This is explained in the "ARM Architecture Reference Manual" (ARM DDI 0100E): Bit[27] of the CPSR is a sticky overflow flag, also known as the Q flag. This flag is set to 1 if any of the following occurs: Saturation of the addition result in a QADD or QDADD

Importance of Q(Saturation Flag) in ARM

我的梦境 提交于 2021-01-19 06:45:29
问题 I want to understand the importance of Q flag in ARM Processor. I know there are certain instructions like QADD,QSUB etc. But I need to understand this with some examples which will clarify the concept. Please explain me. Thank you 回答1: This is explained in the "ARM Architecture Reference Manual" (ARM DDI 0100E): Bit[27] of the CPSR is a sticky overflow flag, also known as the Q flag. This flag is set to 1 if any of the following occurs: Saturation of the addition result in a QADD or QDADD

How to rename dynamic symbols in arm elf .so file?

删除回忆录丶 提交于 2021-01-16 12:10:38
问题 I need to modify a so inside an Android APK. The task is to rename the dynamic symbols in side the so (which is the function name). For example, change from Java_com_example_abc_.... to Java_com_yahoo_zzz_.... I try to use WinHex directly search and replace text words, the apk startup error. Seems like the .hash section also needs to be updated, but i do not know how to update the .hash section. My question is what is the correct or preferable way to rename the dynamic Symbol? I heave been

How to rename dynamic symbols in arm elf .so file?

冷暖自知 提交于 2021-01-16 12:10:37
问题 I need to modify a so inside an Android APK. The task is to rename the dynamic symbols in side the so (which is the function name). For example, change from Java_com_example_abc_.... to Java_com_yahoo_zzz_.... I try to use WinHex directly search and replace text words, the apk startup error. Seems like the .hash section also needs to be updated, but i do not know how to update the .hash section. My question is what is the correct or preferable way to rename the dynamic Symbol? I heave been