ARMv8-A system semantics: instruction fetch in relaxed architectures

被引:5
作者
Ben Simner [1 ]
Flur, Shaked [1 ]
Pulte, Christopher [1 ]
Armstrong, Alasdair [1 ]
Pichon-Pharabod, Jean [1 ]
Maranget, Luc [2 ]
Sewell, Peter [1 ]
机构
[1] Univ Cambridge, Cambridge, England
[2] INRIA Paris, Paris, France
来源
PROGRAMMING LANGUAGES AND SYSTEMS ( ESOP 2020): 29TH EUROPEAN SYMPOSIUM ON PROGRAMMING | 2020年 / 12075卷
基金
英国工程与自然科学研究理事会; 欧洲研究理事会;
关键词
MEMORY; VERIFICATION; MODEL;
D O I
10.1007/978-3-030-44914-8_23
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Computing relies on architecture specifications to decouple hardware and software development. Historically these have been prose documents, with all the problems that entails, but research over the last ten years has developed rigorous and executable-as-test-oracle specifications of mainstream architecture instruction sets and "user-mode" concurrency, clarifying architectures and bringing them into the scope of programming-language semantics and verification. However, the system semantics, of instruction-fetch and cache maintenance, exceptions and interrupts, and address translation, remains obscure, leaving us without a solid foundation for verification of security-critical systems software. In this paper we establish a robust model for one aspect of system semantics: instruction fetch and cache maintenance for ARMv8-A. Systems code relies on executing instructions that were written by data writes, e.g. in program loading, dynamic linking, JIT compilation, debugging, and OS configuration, but hardware implementations are often highly optimised, e.g. with instruction caches, linefill buffers, out-of-order fetching, branch prediction, and instruction prefetching, which can affect programmer-observable behaviour. It is essential, both for programming and verification, to abstract from such microarchitectural details as much as possible, but no more. We explore the key architecture design questions with a series of examples, discussed in detail with senior Arm staff; capture the architectural intent in operational and axiomatic semantic models, extending previous work on "user-mode" concurrency; make these models executable as test oracles for small examples; and experimentally validate them against hardware behaviour (finding a bug in one hardware device). We thereby bring these subtle issues into the mathematical domain, clarifying the architecture and enabling future work on system software verification.
引用
收藏
页码:626 / 655
页数:30
相关论文
共 52 条
[1]   Information-flow models for shared memory with an application to the PowerPC architecture [J].
Adir, A ;
Attiya, H ;
Shurek, G .
IEEE TRANSACTIONS ON PARALLEL AND DISTRIBUTED SYSTEMS, 2003, 14 (05) :502-515
[2]  
Alglave J., 2019, LITMUS7 TOOL
[3]  
Alglave J., 2019, HERD7 TOOL
[4]  
Alglave J., 2009, P DAMP 2009 JAN
[5]  
Alglave J., 2019, DIY7 TOOL
[6]   Herding Cats: Modelling, Simulation, Testing, and Data Mining for Weak Memory [J].
Alglave, Jade ;
Maranget, Luc ;
Tautschnig, Michael .
ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 2014, 36 (02)
[7]  
Alglave J, 2011, LECT NOTES COMPUT SC, V6605, P41, DOI 10.1007/978-3-642-19835-9_5
[8]   Fences in Weak Memory Models [J].
Alglave, Jade ;
Maranget, Luc ;
Sarkar, Susmit ;
Sewell, Peter .
COMPUTER AIDED VERIFICATION, PROCEEDINGS, 2010, 6174 :258-+
[9]  
[Anonymous], Intel 64 and IA-32 Architectures Software Developer's Manuals
[10]  
ARM Limited, 2018, 0487DA ARM DDI