X86: Implement a stub CPUID function which is hardcode to return certain values.
authorGabe Black <gblack@eecs.umich.edu>
Mon, 30 Jul 2007 20:29:33 +0000 (13:29 -0700)
committerGabe Black <gblack@eecs.umich.edu>
Mon, 30 Jul 2007 20:29:33 +0000 (13:29 -0700)
--HG--
extra : convert_revision : 4085e04fd13e834646106faa55726d07d9631f42

src/arch/x86/isa/insts/processor_information.py

index b9c8a407ed4e7af33d39d78f6824a8acd8590159..f7ef4db9820aa5db5ca1d7865c3bde7c76d94f77 100644 (file)
 #
 # Authors: Gabe Black
 
-microcode = ""
+microcode = '''
+def macroop CPUID_R {
+    #
+    # For now, the CPUID function number will be hard wired to 0x8000_0000.
+    # Getting it to work more robustly will likely require microcode branching
+    # which probably doesn't work at the moment.
+    #
+
+    limm rax, 0x80000018, dataSize=4
+    limm rbx, 0x68747541, dataSize=4
+    limm rdx, 0x69746e65, dataSize=4
+    limm rcx, 0x444d4163, dataSize=4
+};
+'''
 #let {{
 #    class CPUID(Inst):
 #      "GenFault ${new UnimpInstFault}"