- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi
I want to read msr register (IA32_ENERGY_PERF_BIAS(1B0H) ) in assembly with "rdmsr" instruction but have a run time error (Segmentation fault (core dumped)).
I execute my code by root.
-------------------- it's my code -----------------
.file "tst.c".section .rodata
.LC0:
.string "result %u\n"
.text
.globl main
.type main, @function
main:
.LFB0:
.cfi_startproc
pushq %rbp
.cfi_def_cfa_offset 16
.cfi_offset 6, -16
movq %rsp, %rbp
movq $0,%rax
movq $0,%rdx
movl $0x1b0,%ecx
rdmsr
.cfi_def_cfa_register 6
subq $16, %rsp
movl %ecx, -4(%rbp)
movl $.LC0, %eax
movl -4(%rbp), %edx
movl %edx, %esi
movq %rax, %rdi
movl $0, %eax
call printf
movl $0, %eax
leave
.cfi_def_cfa 7, 8
ret
.cfi_endproc
.LFE0:
.size main, .-main
.ident "GCC: (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3"
.section .note.GNU-stack,"",@progbits
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would recommend searching for assistance at the software developer zone here: https://sfederation.intel.com/affwebservices/public/saml2sso?SPID=idz-prod&ProtocolBinding=urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST&RelayState=https://software%2Eintel%2Ecom/en-us/forum Intel developer Zone Forums
Allan.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page