Files
@ d0a14f973771
Branch filter:
Location: vmkdrivers/BLD/build/HEADERS/vmkapi-current-all-public/vmkernel64/release/core/vmkapi_machine_memory.h
d0a14f973771
5.3 KiB
text/x-chdr
ESXi-5.0-U1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 | /* **********************************************************
* Copyright 2010 VMware, Inc. All rights reserved.
* **********************************************************/
/*
* @VMKAPIMOD_LICENSE@
*/
/*
******************************************************************************
* Machine Memory Interface */ /**
*
* \addtogroup Core
* @{
* \defgroup MachMem Machine Memory
* @{
******************************************************************************
*/
#ifndef _VMKAPI_CORE_MACHINEMEMORY_H_
#define _VMKAPI_CORE_MACHINEMEMORY_H_
/** \cond never */
#ifndef VMK_HEADER_INCLUDED_FROM_VMKAPI_H
#error This vmkapi file should never be included directly but only via vmkapi.h
#endif
/** \endcond never */
/*
******************************************************************************
* vmk_MachMemMaxAddr -- */ /**
*
* \brief Returns the highest machine address ESX supports on this system.
*
* \return Machine address of the highest machine address that the system
* supports.
*
* \note The number does not correlate with the maximum amount of memory
* available in the system.
* \note This function will not block.
*
******************************************************************************
*/
vmk_MA vmk_MachMemMaxAddr(void);
/*
******************************************************************************
* vmk_VA2MA -- */ /**
*
* \brief Get the machine address backing the supplied virtual address
*
* \param[in] va Virtual address to resolve
* \param[in] length Length of the virtual buffer that is assumed to be
* physically contiguous.
* \param[out] ma The backing machine address
*
* \return VMK_OK on success, error code otherwise
*
* \note This function will not block.
*
******************************************************************************
*/
VMK_ReturnStatus vmk_VA2MA(
vmk_VA va,
vmk_ByteCount length,
vmk_MA *ma);
/*
******************************************************************************
* vmk_MA2VA -- */ /**
*
* \brief Get the virtual address for a machine address that was resolved from a
* previously allocated virtual buffer
*
* \param[in] ma Machine address to resolve
* \param[in] length Length of the virtual buffer that this ma refers to
* \param[out] va The corresponding virtual address
*
* \return VMK_OK on success, error code otherwise
*
* \note This function should not be used to resolve arbitrary machine
* addresses to virtual addresses. Arbitrary machine addresses can be
* mapped using the mapping interface.
* \note This function will not block.
*
******************************************************************************
*/
VMK_ReturnStatus vmk_MA2VA(
vmk_MA ma,
vmk_ByteCount length,
vmk_VA *va);
/*
******************************************************************************
* vmk_MAGetConstraint -- */ /**
*
* \brief Get the most restrictive physical address constraint for the given MA
*
* \param[in] ma Machine address to resolve
*
* \return Physical address constraint
*
* \note This function will not block.
*
******************************************************************************
*/
vmk_MemPhysAddrConstraint
vmk_MAGetConstraint(vmk_MA ma);
/*
******************************************************************************
* vmk_MAAssertIOAbilityInt --
*
* This function is used internally by vmk_MAAssertIOAbility. VMKAPI clients
* should not call this function directly.
*
******************************************************************************
*/
/** \cond nodoc */
void vmk_MAAssertIOAbilityInt(
vmk_MA ma,
vmk_ByteCount len);
/** \endcond */
/*
******************************************************************************
* vmk_MAAssertIOAbility -- */ /**
*
* \brief Panic the system if a region of machine memory does not
* support IO.
*
* \note This function only performs a check on debug builds.
*
* \param[in] ma Starting machine address of the range to check
* \param[in] len Length of the range to check in bytes
*
* \note This function will not block.
*
******************************************************************************
*/
static VMK_ALWAYS_INLINE void
vmk_MAAssertIOAbility(
vmk_MA ma,
vmk_ByteCount len)
{
#ifdef VMX86_DEBUG
vmk_MAAssertIOAbilityInt(ma, len);
#endif
}
/*
******************************************************************************
* vmk_MAGetZeroBuffer -- */ /**
*
* \brief Return the machine address of the global zero buffer
*
* \param[out] len Global zero buffer size in bytes
*
* \return Machine address for the global zero buffer
*
* \note This function will not block.
*
******************************************************************************
*/
vmk_MA
vmk_MAGetZeroBuffer(vmk_ByteCount *len);
#endif
/** @} */
/** @} */
|