儲存庫 vbox 的更動 62622
- 時間撮記:
- 2016-7-28 下午02:53:44 (8 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Devices/USB/DevOHCI.cpp
r62621 r62622 4191 4191 static int HcRevision_r(PCOHCI pThis, uint32_t iReg, uint32_t *pu32Value) 4192 4192 { 4193 RT_NOREF2(pThis, iReg); 4193 4194 Log2(("HcRevision_r() -> 0x10\n")); 4194 4195 *pu32Value = 0x10; /* OHCI revision 1.0, no emulation. */ … … 4201 4202 static int HcRevision_w(POHCI pThis, uint32_t iReg, uint32_t u32Value) 4202 4203 { 4204 RT_NOREF3(pThis, iReg, u32Value); 4203 4205 Log2(("HcRevision_w(%#010x) - denied\n", u32Value)); 4204 4206 AssertMsgFailed(("Invalid operation!!! u32Value=%#010x\n", u32Value)); … … 4211 4213 static int HcControl_r(PCOHCI pThis, uint32_t iReg, uint32_t *pu32Value) 4212 4214 { 4215 RT_NOREF1(iReg); 4213 4216 uint32_t ctl = pThis->ctl; 4214 4217 Log2(("HcControl_r -> %#010x - CBSR=%d PLE=%d IE=%d CLE=%d BLE=%d HCFS=%#x IR=%d RWC=%d RWE=%d\n", … … 4224 4227 static int HcControl_w(POHCI pThis, uint32_t iReg, uint32_t val) 4225 4228 { 4229 RT_NOREF1(iReg); 4230 4226 4231 /* log it. */ 4227 4232 uint32_t chg = pThis->ctl ^ val; NOREF(chg); … … 4295 4300 status, status & 1, (status >> 1) & 1, (status >> 2) & 1, (status >> 3) & 1, (status >> 16) & 3)); 4296 4301 *pu32Value = status; 4302 RT_NOREF1(iReg); 4297 4303 return VINF_SUCCESS; 4298 4304 } … … 4303 4309 static int HcCommandStatus_w(POHCI pThis, uint32_t iReg, uint32_t val) 4304 4310 { 4311 RT_NOREF1(iReg); 4312 4305 4313 /* log */ 4306 4314 uint32_t chg = pThis->status ^ val; NOREF(chg); … … 4347 4355 (val >> 6) & 1, (val >> 30) & 1)); 4348 4356 *pu32Value = val; 4357 RT_NOREF1(iReg); 4349 4358 return VINF_SUCCESS; 4350 4359 } … … 4355 4364 static int HcInterruptStatus_w(POHCI pThis, uint32_t iReg, uint32_t val) 4356 4365 { 4366 RT_NOREF1(iReg); 4367 4357 4368 uint32_t res = pThis->intr_status & ~val; 4358 4369 uint32_t chg = pThis->intr_status ^ res; NOREF(chg); … … 4395 4406 (val >> 6) & 1, (val >> 30) & 1, (val >> 31) & 1)); 4396 4407 *pu32Value = val; 4408 RT_NOREF1(iReg); 4397 4409 return VINF_SUCCESS; 4398 4410 } … … 4403 4415 static int HcInterruptEnable_w(POHCI pThis, uint32_t iReg, uint32_t val) 4404 4416 { 4417 RT_NOREF1(iReg); 4405 4418 uint32_t res = pThis->intr | val; 4406 4419 uint32_t chg = pThis->intr ^ res; NOREF(chg); … … 4445 4458 4446 4459 *pu32Value = val; 4460 RT_NOREF1(iReg); 4447 4461 return VINF_SUCCESS; 4448 4462 } … … 4453 4467 static int HcInterruptDisable_w(POHCI pThis, uint32_t iReg, uint32_t val) 4454 4468 { 4469 RT_NOREF1(iReg); 4455 4470 uint32_t res = pThis->intr & ~val; 4456 4471 uint32_t chg = pThis->intr ^ res; NOREF(chg); … … 4487 4502 Log2(("HcHCCA_r() -> %#010x\n", pThis->hcca)); 4488 4503 *pu32Value = pThis->hcca; 4504 RT_NOREF1(iReg); 4489 4505 return VINF_SUCCESS; 4490 4506 } … … 4497 4513 Log2(("HcHCCA_w(%#010x) - old=%#010x new=%#010x\n", Value, pThis->hcca, Value & OHCI_HCCA_MASK)); 4498 4514 pThis->hcca = Value & OHCI_HCCA_MASK; 4515 RT_NOREF1(iReg); 4499 4516 return VINF_SUCCESS; 4500 4517 } … … 4507 4524 Log2(("HcPeriodCurrentED_r() -> %#010x\n", pThis->per_cur)); 4508 4525 *pu32Value = pThis->per_cur; 4526 RT_NOREF1(iReg); 4509 4527 return VINF_SUCCESS; 4510 4528 } … … 4520 4538 AssertMsg(!(val & 7), ("Invalid alignment, val=%#010x\n", val)); 4521 4539 pThis->per_cur = val & ~7; 4540 RT_NOREF1(iReg); 4522 4541 return VINF_SUCCESS; 4523 4542 } … … 4530 4549 Log2(("HcControlHeadED_r() -> %#010x\n", pThis->ctrl_head)); 4531 4550 *pu32Value = pThis->ctrl_head; 4551 RT_NOREF1(iReg); 4532 4552 return VINF_SUCCESS; 4533 4553 } … … 4541 4561 AssertMsg(!(val & 7), ("Invalid alignment, val=%#010x\n", val)); 4542 4562 pThis->ctrl_head = val & ~7; 4563 RT_NOREF1(iReg); 4543 4564 return VINF_SUCCESS; 4544 4565 } … … 4551 4572 Log2(("HcControlCurrentED_r() -> %#010x\n", pThis->ctrl_cur)); 4552 4573 *pu32Value = pThis->ctrl_cur; 4574 RT_NOREF1(iReg); 4553 4575 return VINF_SUCCESS; 4554 4576 } … … 4563 4585 AssertMsg(!(val & 7), ("Invalid alignment, val=%#010x\n", val)); 4564 4586 pThis->ctrl_cur = val & ~7; 4587 RT_NOREF1(iReg); 4565 4588 return VINF_SUCCESS; 4566 4589 } … … 4573 4596 Log2(("HcBulkHeadED_r() -> %#010x\n", pThis->bulk_head)); 4574 4597 *pu32Value = pThis->bulk_head; 4598 RT_NOREF1(iReg); 4575 4599 return VINF_SUCCESS; 4576 4600 } … … 4584 4608 AssertMsg(!(val & 7), ("Invalid alignment, val=%#010x\n", val)); 4585 4609 pThis->bulk_head = val & ~7; /** @todo The ATI OHCI controller on my machine enforces 16-byte address alignment. */ 4610 RT_NOREF1(iReg); 4586 4611 return VINF_SUCCESS; 4587 4612 } … … 4594 4619 Log2(("HcBulkCurrentED_r() -> %#010x\n", pThis->bulk_cur)); 4595 4620 *pu32Value = pThis->bulk_cur; 4621 RT_NOREF1(iReg); 4596 4622 return VINF_SUCCESS; 4597 4623 } … … 4606 4632 AssertMsg(!(val & 7), ("Invalid alignment, val=%#010x\n", val)); 4607 4633 pThis->bulk_cur = val & ~7; 4634 RT_NOREF1(iReg); 4608 4635 return VINF_SUCCESS; 4609 4636 } … … 4617 4644 Log2(("HcDoneHead_r() -> 0x%#08x\n", pThis->done)); 4618 4645 *pu32Value = pThis->done; 4646 RT_NOREF1(iReg); 4619 4647 return VINF_SUCCESS; 4620 4648 } … … 4625 4653 static int HcDoneHead_w(POHCI pThis, uint32_t iReg, uint32_t val) 4626 4654 { 4655 RT_NOREF3(pThis, iReg, val); 4627 4656 Log2(("HcDoneHead_w(0x%#08x) - denied!!!\n", val)); 4628 4657 /*AssertMsgFailed(("Illegal operation!!! val=%#010x\n", val)); - OS/2 does this */ … … 4640 4669 val, val & 0x3fff, (val >> 16) & 0x7fff, val >> 31)); 4641 4670 *pu32Value = val; 4671 RT_NOREF1(iReg); 4642 4672 return VINF_SUCCESS; 4643 4673 } … … 4648 4678 static int HcFmInterval_w(POHCI pThis, uint32_t iReg, uint32_t val) 4649 4679 { 4680 RT_NOREF1(iReg); 4681 4650 4682 /* log */ 4651 4683 uint32_t chg = val ^ ((pThis->fit << 31) | (pThis->fsmps << 16) | pThis->fi); NOREF(chg); … … 4673 4705 static int HcFmRemaining_r(PCOHCI pThis, uint32_t iReg, uint32_t *pu32Value) 4674 4706 { 4707 RT_NOREF1(iReg); 4675 4708 uint32_t Value = pThis->frt << 31; 4676 4709 if ((pThis->ctl & OHCI_CTL_HCFS) == OHCI_USB_OPERATIONAL) … … 4699 4732 static int HcFmRemaining_w(POHCI pThis, uint32_t iReg, uint32_t val) 4700 4733 { 4734 RT_NOREF3(pThis, iReg, val); 4701 4735 Log2(("HcFmRemaining_w(%#010x) - denied\n", val)); 4702 4736 AssertMsgFailed(("Invalid operation!!! val=%#010x\n", val)); … … 4709 4743 static int HcFmNumber_r(PCOHCI pThis, uint32_t iReg, uint32_t *pu32Value) 4710 4744 { 4745 RT_NOREF1(iReg); 4711 4746 uint32_t val = (uint16_t)pThis->HcFmNumber; 4712 4747 Log2(("HcFmNumber_r() -> %#010x - FN=%#x(%d) (32-bit=%#x(%d))\n", val, val, val, pThis->HcFmNumber, pThis->HcFmNumber)); … … 4720 4755 static int HcFmNumber_w(POHCI pThis, uint32_t iReg, uint32_t val) 4721 4756 { 4757 RT_NOREF3(pThis, iReg, val); 4722 4758 Log2(("HcFmNumber_w(%#010x) - denied\n", val)); 4723 4759 AssertMsgFailed(("Invalid operation!!! val=%#010x\n", val)); … … 4731 4767 static int HcPeriodicStart_r(PCOHCI pThis, uint32_t iReg, uint32_t *pu32Value) 4732 4768 { 4769 RT_NOREF1(iReg); 4733 4770 Log2(("HcPeriodicStart_r() -> %#010x - PS=%d\n", pThis->pstart, pThis->pstart & 0x3fff)); 4734 4771 *pu32Value = pThis->pstart; … … 4742 4779 static int HcPeriodicStart_w(POHCI pThis, uint32_t iReg, uint32_t val) 4743 4780 { 4781 RT_NOREF1(iReg); 4744 4782 Log2(("HcPeriodicStart_w(%#010x) => PS=%d\n", val, val & 0x3fff)); 4745 4783 if (val & ~0x3fff) … … 4754 4792 static int HcLSThreshold_r(PCOHCI pThis, uint32_t iReg, uint32_t *pu32Value) 4755 4793 { 4794 RT_NOREF2(pThis, iReg); 4756 4795 Log2(("HcLSThreshold_r() -> %#010x\n", OHCI_LS_THRESH)); 4757 4796 *pu32Value = OHCI_LS_THRESH; … … 4773 4812 static int HcLSThreshold_w(POHCI pThis, uint32_t iReg, uint32_t val) 4774 4813 { 4814 RT_NOREF3(pThis, iReg, val); 4775 4815 Log2(("HcLSThreshold_w(%#010x) => LST=0x%03x(%d)\n", val, val & 0x0fff, val & 0x0fff)); 4776 4816 AssertMsg(val == OHCI_LS_THRESH, … … 4785 4825 static int HcRhDescriptorA_r(PCOHCI pThis, uint32_t iReg, uint32_t *pu32Value) 4786 4826 { 4827 RT_NOREF1(iReg); 4787 4828 uint32_t val = pThis->RootHub.desc_a; 4788 4829 #if 0 /* annoying */ … … 4800 4841 static int HcRhDescriptorA_w(POHCI pThis, uint32_t iReg, uint32_t val) 4801 4842 { 4843 RT_NOREF1(iReg); 4802 4844 uint32_t chg = val ^ pThis->RootHub.desc_a; NOREF(chg); 4803 4845 Log2(("HcRhDescriptorA_w(%#010x) => %sNDP=%d %sPSM=%d %sNPS=%d %sDT=%d %sOCPM=%d %sNOCP=%d %sPOTGT=%#x - %sPowerSwitching Set%sPower\n", … … 4837 4879 val, val & 0xffff, val >> 16)); 4838 4880 *pu32Value = val; 4881 RT_NOREF1(iReg); 4839 4882 return VINF_SUCCESS; 4840 4883 } … … 4845 4888 static int HcRhDescriptorB_w(POHCI pThis, uint32_t iReg, uint32_t val) 4846 4889 { 4890 RT_NOREF1(iReg); 4847 4891 uint32_t chg = pThis->RootHub.desc_b ^ val; NOREF(chg); 4848 4892 Log2(("HcRhDescriptorB_w(%#010x) => %sDR=0x%04x %sPPCM=0x%04x\n", … … 4869 4913 val, val & 1, (val >> 1) & 1, (val >> 15) & 1, (val >> 16) & 1, (val >> 17) & 1, (val >> 31) & 1)); 4870 4914 *pu32Value = val; 4915 RT_NOREF1(iReg); 4871 4916 return VINF_SUCCESS; 4872 4917 } … … 4926 4971 (chg >> 17) & 1 ? "*" : "", (val >> 17) & 1, 4927 4972 (chg >> 31) & 1 ? "*" : "", (val >> 31) & 1)); 4973 RT_NOREF1(iReg); 4928 4974 return VINF_SUCCESS; 4929 4975 #else /* !IN_RING3 */ 4976 RT_NOREF3(pThis, iReg, val); 4930 4977 return VINF_IOM_R3_MMIO_WRITE; 4931 4978 #endif /* !IN_RING3 */ … … 5063 5110 uint32_t old_state = p->fReg; 5064 5111 5065 # ifdef LOG_ENABLED5112 # ifdef LOG_ENABLED 5066 5113 /* 5067 5114 * Log it. … … 5083 5130 Log2((" %s", apszCmdNames[j])); 5084 5131 Log2(("\n")); 5085 # endif5132 # endif 5086 5133 5087 5134 /* Write to clear any of the change bits: CSC, PESC, PSSC, OCIC and PRSC */ … … 5159 5206 return VINF_SUCCESS; 5160 5207 #else /* !IN_RING3 */ 5208 RT_NOREF3(pThis, iReg, val); 5161 5209 return VINF_IOM_R3_MMIO_WRITE; 5162 5210 #endif /* !IN_RING3 */ … … 5224 5272 { 5225 5273 POHCI pThis = PDMINS_2_DATA(pDevIns, POHCI); 5274 RT_NOREF1(pvUser); 5226 5275 5227 5276 /* Paranoia: Assert that IOMMMIO_FLAGS_READ_DWORD works. */ … … 5254 5303 { 5255 5304 POHCI pThis = PDMINS_2_DATA(pDevIns, POHCI); 5305 RT_NOREF1(pvUser); 5256 5306 5257 5307 /* Paranoia: Assert that IOMMMIO_FLAGS_WRITE_DWORD_ZEROED works. */
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器