From 4b7a5ced3b829a7deaf19c8bbfdbcb2f07c3576f Mon Sep 17 00:00:00 2001 From: Adrian-Ken Rueegsegger Date: Wed, 18 Feb 2015 00:22:34 +0100 Subject: [PATCH] hw_x86_64: Declare CPU context offset constants The constants specify offset values of CPU context member variables as specified by Genode::Cpu_state [1] and Genode::Cpu::Context [2]. [1] - repos/base/include/x86_64/cpu/cpu_state.h [2] - repos/base-hw/src/core/include/spec/x86/cpu.h --- repos/base-hw/src/core/spec/x86_64/mode_transition.s | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/repos/base-hw/src/core/spec/x86_64/mode_transition.s b/repos/base-hw/src/core/spec/x86_64/mode_transition.s index b78f5b222..a3c742d9c 100644 --- a/repos/base-hw/src/core/spec/x86_64/mode_transition.s +++ b/repos/base-hw/src/core/spec/x86_64/mode_transition.s @@ -20,6 +20,13 @@ /* globally mapped buffer storage */ .set BUFFER_SIZE, 6 * 8 +/* offsets of the member variables in a CPU context */ +.set SP_OFFSET, 1 * 8 +.set R8_OFFSET, 2 * 8 +.set RAX_OFFSET, 10 * 8 +.set FLAGS_OFFSET, 18 * 8 +.set CR3_OFFSET, 20 * 8 + .section .text /*