socsvn commit: r255932 - soc2013/zcore/head/usr.sbin/bhyve
zcore at FreeBSD.org
zcore at FreeBSD.org
Wed Aug 14 15:19:17 UTC 2013
Author: zcore
Date: Wed Aug 14 15:19:16 2013
New Revision: 255932
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=255932
Log:
map cmdlist/rfis when enabling CMD_ST/CMD_FRE
Modified:
soc2013/zcore/head/usr.sbin/bhyve/pci_ahci.c
Modified: soc2013/zcore/head/usr.sbin/bhyve/pci_ahci.c
==============================================================================
--- soc2013/zcore/head/usr.sbin/bhyve/pci_ahci.c Wed Aug 14 14:45:47 2013 (r255931)
+++ soc2013/zcore/head/usr.sbin/bhyve/pci_ahci.c Wed Aug 14 15:19:16 2013 (r255932)
@@ -73,6 +73,7 @@
struct blockif_ctxt *bctx;
struct pci_ahci_softc *pr_sc;
uint64_t cmd_lst;
+ uint64_t rfis;
uint32_t clb;
uint32_t clbu;
uint32_t fb;
@@ -390,29 +391,37 @@
break;
case AHCI_P_CMD:
{
- uint64_t clb;
p->cmd = value;
if (!(value & AHCI_P_CMD_ST)) {
p->cmd &= ~(AHCI_P_CMD_CR | AHCI_P_CMD_CCS_MASK);
p->ci = 0;
p->sact = 0;
- } else
+ } else {
+ uint64_t clb;
+
p->cmd |= AHCI_P_CMD_CR;
+ clb = (uint64_t)p->clbu << 32 | p->clb;
+ p->cmd_lst = paddr_guest2host(ahci_ctx(sc), clb,
+ AHCI_CL_SIZE * AHCI_MAX_SLOTS);
+ }
+
+ if (value & AHCI_P_CMD_FRE) {
+ uint64_t fb;
- if (value & AHCI_P_CMD_FRE)
p->cmd |= AHCI_P_CMD_FR;
- else
+ fb = (uint64_t)p->fbu << 32 | p->fb;
+ /* we don't support FBSCP, so rfis size is 256Bytes */
+ p->rfis = paddr_guest2host(ahci_ctx(sc), fb, 256);
+ } else {
p->cmd &= ~AHCI_P_CMD_FR;
+ }
if (value & AHCI_P_CMD_CLO) {
p->tfd = 0;
p->cmd &= ~AHCI_P_CMD_CLO;
}
- clb = (uint64_t)p->clbu << 32 | p->clb;
- p->cmd_lst = paddr_guest2host(ahci_ctx(sc), clb,
- AHCI_CL_SIZE * AHCI_MAX_SLOTS);
handle_cmd(p);
break;
}
More information about the svn-soc-all
mailing list