summaryrefslogtreecommitdiff
path: root/Kernel/IO.h
diff options
context:
space:
mode:
authorLiav A <liavalb@gmail.com>2020-02-05 02:54:52 +0200
committerAndreas Kling <kling@serenityos.org>2020-02-05 18:58:27 +0100
commit6070fe581bb1b4af05374de0cd268f8d88ed6e63 (patch)
tree24f89f67be4259dcf08d31498f14bfcf62ad61bb /Kernel/IO.h
parent0c20f98c1c70481184569ff10ced19e334249b9f (diff)
downloadserenity-6070fe581bb1b4af05374de0cd268f8d88ed6e63.zip
Kernel: Add support for high bandwidth IO communication with VMWare
Diffstat (limited to 'Kernel/IO.h')
-rw-r--r--Kernel/IO.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/Kernel/IO.h b/Kernel/IO.h
index a1503c6649..f72db71982 100644
--- a/Kernel/IO.h
+++ b/Kernel/IO.h
@@ -99,6 +99,20 @@ inline void vmware_out(VMWareCommand& command)
: "+a"(command.ax), "+b"(command.bx), "+c"(command.cx), "+d"(command.dx), "+S"(command.si), "+D"(command.di));
}
+inline void vmware_highbandwidth_send(VMWareCommand& command) {
+
+ command.magic = VMWARE_MAGIC;
+ command.port = VMWARE_PORT_HIGHBANDWIDTH;
+
+ asm volatile("cld; rep; outsb" : "+a"(command.ax), "+b"(command.bx), "+c"(command.cx), "+d"(command.dx), "+S"(command.si), "+D"(command.di));
+}
+
+inline void vmware_highbandwidth_get(VMWareCommand& command) {
+ command.magic = VMWARE_MAGIC;
+ command.port = VMWARE_PORT_HIGHBANDWIDTH;
+ asm volatile("cld; rep; insb" : "+a"(command.ax), "+b"(command.bx), "+c"(command.cx), "+d"(command.dx), "+S"(command.si), "+D"(command.di));
+}
+
inline void delay()
{
// ~3 microsecs