1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:57:44 +00:00

Kernel: Move the VMWare helpers out of the IO namespace

This commit is contained in:
Liav A 2020-02-05 19:38:45 +02:00 committed by Andreas Kling
parent 8e8f5c212b
commit f6ce24eb48
3 changed files with 41 additions and 36 deletions

View file

@ -89,30 +89,6 @@ inline void repeated_out16(u16 port, const u8* data, int data_size)
: "d"(port));
}
inline void vmware_out(VMWareCommand& command)
{
command.magic = VMWARE_MAGIC;
command.port = VMWARE_PORT;
command.si = 0;
command.di = 0;
asm volatile("in %%dx, %0"
: "+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