* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
#include <sys/asm_linkage.h>
#define PKT_BUF_ADDR_ALIGNMENT 8
* Propagate an interrupt received from an snet device to the
ldx [%g3 + SNET_INO], %g3
GUEST2VDEVSTATE(%g2, %g1)
!! %g1 = &guestp->vdev_state
VINO2MAPREG(%g1, %g3, %g2)
brz,pt %g0, vdev_intr_generate
* The hypervisor simply provides a mechanism for the device driver
* to communicate with the snet device. The hypervisor doesn't
* For performance reasons, ldx and stx are used in hcall_snet_read and
* hcall_snet_write functions. Therefore the source and target buffer
* must be double word aligned and also the size of the buffers must
* be double word aligned.
* arg1 target real address (%o0)
ENTRY_NP(hcall_snet_read)
btst PKT_BUF_ADDR_ALIGNMENT - 1, %o0
bnz,pn %xcc, herr_badalign
RA2PA_RANGE_CONV_UNK_SIZE(%g1, %o0, %g4, herr_noraddr, %g3, %g2)
SET_SIZE(hcall_snet_read)
* arg1 source real address (%o0)
ENTRY_NP(hcall_snet_write)
btst PKT_BUF_ADDR_ALIGNMENT - 1, %o0
bnz,pn %xcc, herr_badalign
RA2PA_RANGE_CONV_UNK_SIZE(%g1, %o0, %g4, herr_noraddr, %g3, %g2)
SET_SIZE(hcall_snet_write)
#endif /* ifdef T1_FPGA_SNET */