]> xenbits.xensource.com Git - seabios.git/commitdiff
Update qemu_cfg_read to use "rep insb".
authorKevin O'Connor <kevin@koconnor.net>
Thu, 26 Aug 2010 01:43:19 +0000 (21:43 -0400)
committerKevin O'Connor <kevin@koconnor.net>
Thu, 26 Aug 2010 01:43:19 +0000 (21:43 -0400)
Use rep insb instead of manual loop - the host may be able to optimize
the rep insb instruction.

src/paravirt.c

index da72c71d068bde5e0afad43cc23c8972f35980df..ca646d4366b57bc5bf8fd288558f33c2f9292857 100644 (file)
@@ -24,8 +24,7 @@ qemu_cfg_select(u16 f)
 static void
 qemu_cfg_read(u8 *buf, int len)
 {
-    while (len--)
-        *(buf++) = inb(PORT_QEMU_CFG_DATA);
+    insb(PORT_QEMU_CFG_DATA, buf, len);
 }
 
 static void