iPXE
Functions
vmware.c File Reference

VMware backdoor mechanism. More...

#include <stdint.h>
#include <errno.h>
#include <ipxe/vmware.h>

Go to the source code of this file.

Functions

 FILE_LICENCE (GPL2_OR_LATER_OR_UBDL)
int vmware_present (void)
 Detect VMware presence.

Detailed Description

VMware backdoor mechanism.

Based on the unofficial documentation at

http://sites.google.com/site/chitchatvmback/backdoor

Definition in file vmware.c.


Function Documentation

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )
int vmware_present ( void  )

Detect VMware presence.

Return values:
rcReturn status code

Definition at line 45 of file vmware.c.

References DBGC, ENOENT, magic, version, and VMW_MAGIC.

                            {
        uint32_t version;
        uint32_t magic;
        uint32_t product_type;

        /* Perform backdoor call */
        vmware_cmd_get_version ( &version, &magic, &product_type );

        /* Check for VMware presence */
        if ( magic != VMW_MAGIC ) {
                DBGC ( VMW_MAGIC, "VMware not present\n" );
                return -ENOENT;
        }

        DBGC ( VMW_MAGIC, "VMware product type %04x version %08x detected\n",
               product_type, version );
        return 0;
}