简体   繁体   English

带有AArch64和32位应用程序的Android内核

[英]Android kernel with AArch64 and 32bit apps

How can Android device run AARCH64 kernel while running multiple(possibly several dozens) of A32 apk processes? Android设备如何在运行多个(可能是几十个)A32 apk进程的同时运行AARCH64内核? Does it mean the kernel will constantly make millions of execution state switches? 这是否意味着内核将不断进行数百万次执行状态切换?

Or Android kernel is not going to be AARCH64 in the near future? 还是Android内核在不久的将来不会成为AARCH64?

The kernel is making those "millions of execution state switches" anyway regardless; 无论如何,内核都在进行那些“数百万个执行状态切换”。 every time it takes an interrupt or system call, or schedules a new task, it's preserving an EL0 context on the switch to EL1, then restoring either the same or a different context on return. 每次执行中断或系统调用,或计划新任务时,都会在切换到EL1的开关上保留EL0上下文,然后在返回时恢复相同或不同的上下文。 From that position the difference between preserving/restoring a 32-bit EL0 vs. a 64-bit one isn't much more than the number of registers involved. 从这个位置来看,保存/恢复32位EL0与保存64位EL0之间的区别不超过所涉及的寄存器数量。 The specific AArch32/AArch64 detail is simply part of the processor mode in the SPSR, dealt with by the hardware as an inherent part of the exception entry/return mechanism. 特定的AArch32 / AArch64详细信息只是SPSR中处理器模式的一部分,由硬件作为异常进入/返回机制的固有部分来处理。

The bulk of the compatibility layer in the arm64 kernel is actually the translation between the 32-bit and 64-bit system call ABIs; 实际上,arm64内核中兼容性层的主要部分是32位和64位系统调用ABI之间的转换。 the rest just kind of falls out of the way the architecture was designed. 其余的都属于架构设计的方式。

As for "the near future", well, Android L with its full 64-bit support has been out for a while already... 至于“不久的将来”,具有完整的64位支持的Android L已经出现了一段时间。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM