在 RISC-V 中实现运行时可配置字节序:挑战与解决方案.pdf

编号:955328 PDF 21页 1.49MB 下载积分:VIP专享
下载报告请您先登录!

1、1RISCV Big EndianCOPYRIGHT CODETHINK|LICENSED UNDER CCBY SA 4.0RISCV EU Summit 2025CODETHINK201IntroductionCOPYRIGHT CODETHINK|LICENSED UNDER CCBY SA 4.0Endianness What is Endianness?The order values are composed in memoryBig Endian BE left-to-rightLittle Endian LE right-to-leftAn easy way to rememb

2、er:Big/Little endian stores the Big/Little end of the number in the first memory address.3COPYRIGHT CODETHINK|LICENSED UNDER CCBY SA 4.0Different Endians?Different Users?Big Endian:Little Endian:Often used in older architectures and applicationsMany networking protocols use BE.LE systems have to rev

3、erse byte order(adding overhead)x86 chose little endian as at the time,it made operations such as type casting is easier(as memory layout doesnt change)x86 used it and achieved dominance4COPYRIGHT CODETHINK|LICENSED UNDER CCBY SA 4.0Why are we interested?Current state:Definition of Done:RISCV is LEL

4、atest ISA specification adds runtime configurable endianness Part of ISA volume II,privileged architecture Configuration added(version 1.12,2022Overall:Linux running on Qemu in big endianQemu Add ability to configure CSRs and modify data accessesOpenSBI Boot system in big endian and correctly deal w

5、ith IOLinux Build minimal kernel and userland5COPYRIGHT CODETHINK|LICENSED UNDER CCBY SA 4.0602QEMUCOPYRIGHT CODETHINK|LICENSED UNDER CCBY SA 4.0CPU FlagsGoal is to update the CSRs that controls the endian for each execution level M/S/U M-mode is controlled by bit 37(MBE)of the mstatus CSR MBE is th

6、en read-only cloned into bit 36(SBE)and bit 6(UBE)CSR writes allowed to mstatus bits Writes update new context field:ctx-be_dataFor QEMU sstatus SBE and UBE are read-only clones of mstatus We may add SBE/UBE configuration later#define MSTATUS_MBE 0 x2000000000ULL7COPYRIGHT CODETHINK|LICENSED UNDER C

友情提示

1、下载报告失败解决办法
2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
4、本站报告下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。

本文(在 RISC-V 中实现运行时可配置字节序:挑战与解决方案.pdf)为本站 (com) 主动上传,三个皮匠报告文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知三个皮匠报告文库(点击联系客服),我们立即给予删除!

温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。
客服
商务合作
小程序
服务号
折叠