[coreboot] X201 port is in gerrit

Vladimir 'φ-coder/phcoder' Serbinenko phcoder at gmail.com
Tue Mar 12 16:09:15 CET 2013

Hello, all. I've pushed my X201 work to gerrit. It also contains
spkmodem and serialice improvements (target-side, like EHCI debug
support). Host-side I attach a small patch to redirect clflush to
target. Code quality is bad but it already works.
Current known issues:
speedstep doesn't work
S3 doesn't work
many ACPI buttons don't work.

Not tested:

diff --git a/qemu-0.15.x/target-i386/helper.h
index 6b518ad..3c1068a 100644
--- a/qemu-0.15.x/target-i386/helper.h
+++ b/qemu-0.15.x/target-i386/helper.h
@@ -47,6 +47,7 @@ DEF_HELPER_1(lmsw, void, tl)
 DEF_HELPER_0(clts, void)
 DEF_HELPER_2(movl_drN_T0, void, int, tl)
 DEF_HELPER_1(invlpg, void, tl)
+DEF_HELPER_1(clflush, void, tl)

 DEF_HELPER_3(enter_level, void, int, int, tl)
 #ifdef TARGET_X86_64
diff --git a/qemu-0.15.x/target-i386/op_helper.c
index 1823c74..20d8d2d 100644
--- a/qemu-0.15.x/target-i386/op_helper.c
+++ b/qemu-0.15.x/target-i386/op_helper.c
@@ -3053,6 +3053,12 @@ void helper_invlpg(target_ulong addr)
     tlb_flush_page(env, addr);

+void helper_clflush(target_ulong addr)
+    if (serialice_active)
+      serialice_handle_clflush ((uint32_t)addr);
 void helper_rdtsc(void)
     uint64_t val;
diff --git a/qemu-0.15.x/target-i386/translate.c
index ccef381..c23585a 100644
--- a/qemu-0.15.x/target-i386/translate.c
+++ b/qemu-0.15.x/target-i386/translate.c
@@ -7551,6 +7551,9 @@ static target_ulong disas_insn(DisasContext *s,
target_ulong pc_start)
                 if (!(s->cpuid_features & CPUID_CLFLUSH))
                     goto illegal_op;
                 gen_lea_modrm(s, modrm, &reg_addr, &offset_addr);
+               gen_helper_clflush(cpu_A0);
+               gen_jmp_im(s->pc - s->cs_base);
+               gen_eob(s);

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 294 bytes
Desc: OpenPGP digital signature
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20130312/3e88737a/attachment.sig>

More information about the coreboot mailing list