Changeset View
Changeset View
Standalone View
Standalone View
sys/amd64/vmm/amd/amdvi_hw.c
Show First 20 Lines • Show All 508 Lines • ▼ Show 20 Lines | amdvi_dump_cmds(struct amdvi_softc *softc, int count) | ||||
*/ | */ | ||||
off = MOD_DEC(ctrl->cmd_head, sizeof(struct amdvi_cmd), | off = MOD_DEC(ctrl->cmd_head, sizeof(struct amdvi_cmd), | ||||
softc->cmd_max); | softc->cmd_max); | ||||
for (i = 0; off != ctrl->cmd_tail && i < count; i++) { | for (i = 0; off != ctrl->cmd_tail && i < count; i++) { | ||||
cmd = (struct amdvi_cmd *)((uint8_t *)softc->cmd + off); | cmd = (struct amdvi_cmd *)((uint8_t *)softc->cmd + off); | ||||
printf(" [CMD%d, off:0x%x] opcode= 0x%x 0x%x" | printf(" [CMD%d, off:0x%x] opcode= 0x%x 0x%x" | ||||
" 0x%x 0x%lx\n", i, off, cmd->opcode, | " 0x%x 0x%lx\n", i, off, cmd->opcode, | ||||
cmd->word0, cmd->word1, cmd->addr); | cmd->word0, cmd->word1, cmd->addr); | ||||
off = (off + sizeof(struct amdvi_cmd)) % | off = MOD_INC(off, sizeof(struct amdvi_cmd), softc->cmd_max); | ||||
(softc->cmd_max * sizeof(struct amdvi_cmd)); | |||||
} | } | ||||
} | } | ||||
static int | static int | ||||
amdvi_init_event(struct amdvi_softc *softc) | amdvi_init_event(struct amdvi_softc *softc) | ||||
{ | { | ||||
struct amdvi_ctrl *ctrl; | struct amdvi_ctrl *ctrl; | ||||
▲ Show 20 Lines • Show All 930 Lines • Show Last 20 Lines |