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. More...
 

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()

FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL  )

◆ vmware_present()

int vmware_present ( void  )

Detect VMware presence.

Return values
rcReturn status code

Definition at line 45 of file vmware.c.

45  {
49 
50  /* Perform backdoor call */
51  vmware_cmd_get_version ( &version, &magic, &product_type );
52 
53  /* Check for VMware presence */
54  if ( magic != VMW_MAGIC ) {
55  DBGC ( VMW_MAGIC, "VMware not present\n" );
56  return -ENOENT;
57  }
58 
59  DBGC ( VMW_MAGIC, "VMware product type %04x version %08x detected\n",
61  return 0;
62 }
#define DBGC(...)
Definition: compiler.h:505
uint32_t magic
Magic signature.
Definition: fdt.h:12
#define ENOENT
No such file or directory.
Definition: errno.h:514
#define VMW_MAGIC
VMware backdoor magic value.
Definition: vmware.h:18
unsigned int uint32_t
Definition: stdint.h:12
u32 version
Driver version.
Definition: ath9k_hw.c:1983
static uint32_t uint32_t * product_type
Definition: vmware.h:38

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