xv6

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 55ca7a8d1176fc6a03d9471870c949dd546ca424
parent 1b517da1056b90a3d8fcaf485719a82a5e7741a0
Author: Brian Swetland <swetland@frotz.net>
Date:   Mon, 30 Dec 2013 18:15:38 -0800

wrmsr()

parking this in assembly until I can figure out the correct syntax for
inline assembly for it.  gcc keeps generating code that mangles everything.

Diffstat:
Mkernel/entry64.S | 11+++++++++++
1 file changed, 11 insertions(+), 0 deletions(-)

diff --git a/kernel/entry64.S b/kernel/entry64.S @@ -149,6 +149,17 @@ entry64high: # enter main() jmp main +.global __deadloop +__deadloop: # we should never return here... jmp . +.global wrmsr +wrmsr: + mov %rdi, %rcx # arg0 -> msrnum + mov %rsi, %rax # val.low -> eax + shr $32, %rsi + mov %rsi, %rdx # val.high -> edx + wrmsr + retq +