mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 09:58:14 +00:00
Kernel: Add support for high bandwidth IO communication with VMWare
This commit is contained in:
parent
0c20f98c1c
commit
6070fe581b
3 changed files with 28 additions and 0 deletions
14
Kernel/IO.h
14
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue