third_party/virtualbox/src/VBox/Devices/Network/DevE1000.cpp
/**
 * Default register read handler.
 *
 * Retrieves the value of register from register array in device state structure.
 * Bits corresponding to 0s in 'readable' mask will always read as 0s.
 *
 * @remarks The 'mask' parameter is simply ignored as masking and shifting is
 *          done in the caller.
 *
 * @returns VBox status code.
 *
 * @param   pThis       The device state structure.
 * @param   offset      Register offset in memory-mapped frame.
 * @param   index       Register index in register array.
 * @thread  EMT
 */
Default register read handler.
Retrieves the value of register from register array in device state structure.
Bits corresponding to 0s in 'readable' mask will always read as 0s.

@remarks The 'mask' parameter is simply ignored as masking and shifting is
done in the caller.

@returns VBox status code.

@param   pThis       The device state structure.
@param   offset      Register offset in memory-mapped frame.
@param   index       Register index in register array.
@thread  EMT
Default register read handler . Retrieves the value of register from register array in device state structure . Bits corresponding to 0s in ' readable ' mask will always read as 0s . @remarks The ' mask ' parameter is simply ignored as masking and shifting is done in the caller . @returns VBox status code . @param pThis The device state structure . @param offset Register offset in memory - mapped frame . @param index Register index in register array . @thread EMT
static int e1kRegReadDefault(PE1KSTATE pThis, uint32_t offset, uint32_t index, uint32_t *pu32Value)
{
    RT_NOREF_PV(offset);
    AssertReturn(index < E1K_NUM_OF_32BIT_REGS, VERR_DEV_IO_ERROR);
    *pu32Value = pThis->auRegs[index] & g_aE1kRegMap[index].readable;
    return VINF_SUCCESS;
}
static int e1kRegReadDefault ( PE1KSTATE pThis , uint32_t offset , uint32_t index , uint32_t * pu32Value ) { RT_NOREF_PV ( offset ) ; AssertReturn ( index < E1K_NUM_OF_32BIT_REGS , VERR_DEV_IO_ERROR ) ; * pu32Value = pThis -> auRegs [ index ] & g_aE1kRegMap [ index ] . readable ; return VINF_SUCCESS ; }
Default register read handler.
Default register read handler .