[SerialICE] New patch to review for serialice: 5eea24b SerialICE: Export CPUIDs for filter
Kyösti Mälkki (kyosti.malkki@gmail.com)
gerrit at coreboot.org
Sun Aug 19 20:19:48 CEST 2012
Kyösti Mälkki (kyosti.malkki at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/1458
-gerrit
commit 5eea24b21720b9c8ace8bc9bf34ba99d821b4a39
Author: Kyösti Mälkki <kyosti.malkki at gmail.com>
Date: Sat Aug 18 12:53:31 2012 +0300
SerialICE: Export CPUIDs for filter
Required so that filter can access QEMU CPU's CPUID.
Change-Id: I859fce6caf778fb32bbbe243b4b2f72ffbe02355
Signed-off-by: Kyösti Mälkki <kyosti.malkki at gmail.com>
---
qemu-0.15.x/target-i386/cpu.h | 1 +
qemu-0.15.x/target-i386/op_helper.c | 32 +++++++++++++++++---------------
2 files changed, 18 insertions(+), 15 deletions(-)
diff --git a/qemu-0.15.x/target-i386/cpu.h b/qemu-0.15.x/target-i386/cpu.h
index 9819b5f..0a62e18 100644
--- a/qemu-0.15.x/target-i386/cpu.h
+++ b/qemu-0.15.x/target-i386/cpu.h
@@ -1055,6 +1055,7 @@ void do_smm_enter(CPUState *env1);
void svm_check_intercept(CPUState *env1, uint32_t type);
+cpuid_regs_t cpu_cpuid(uint32_t in_eax, uint32_t in_ecx);
uint32_t cpu_cc_compute_all(CPUState *env1, int op);
#endif /* CPU_I386_H */
diff --git a/qemu-0.15.x/target-i386/op_helper.c b/qemu-0.15.x/target-i386/op_helper.c
index 81c8075..bbb5ef4 100644
--- a/qemu-0.15.x/target-i386/op_helper.c
+++ b/qemu-0.15.x/target-i386/op_helper.c
@@ -2010,29 +2010,31 @@ void helper_single_step(void)
raise_exception(EXCP01_DB);
}
-void helper_cpuid(void)
+cpuid_regs_t cpu_cpuid(uint32_t in_eax, uint32_t in_ecx)
{
- uint32_t eax, ebx, ecx, edx;
+ cpuid_regs_t ret;
+ cpu_x86_cpuid(env, in_eax, in_ecx, &ret.eax, &ret.ebx, &ret.ecx, &ret.edx);
+ return ret;
+}
+void helper_cpuid(void)
+{
+ cpuid_regs_t ret;
helper_svm_check_intercept_param(SVM_EXIT_CPUID, 0);
#ifdef CONFIG_SERIALICE
- if (serialice_active) {
- cpuid_regs_t ret;
+ if (serialice_active)
ret = serialice_cpuid((uint32_t) EAX, (uint32_t) ECX);
- EAX = ret.eax;
- EBX = ret.ebx;
- ECX = ret.ecx;
- EDX = ret.edx;
- return;
- }
+ else
+ ret = cpu_cpuid((uint32_t) EAX, (uint32_t) ECX);
+#else
+ cpu_x86_cpuid(env, (uint32_t) EAX, (uint32_t) ECX, &ret.eax, &ret.ebx, &ret.ecx, &ret.edx);
#endif
- cpu_x86_cpuid(env, (uint32_t)EAX, (uint32_t)ECX, &eax, &ebx, &ecx, &edx);
- EAX = eax;
- EBX = ebx;
- ECX = ecx;
- EDX = edx;
+ EAX = ret.eax;
+ EBX = ret.ebx;
+ ECX = ret.ecx;
+ EDX = ret.edx;
}
void helper_enter_level(int level, int data32, target_ulong t1)
More information about the SerialICE
mailing list