- /*
- ** PCI hostcard can't cope with 32 bit accesses and so need to copy
- ** data to a local buffer, and then dripfeed the card.
- */
- if (HostP->Type == RIO_PCI) {
- /* int offset; */
-
- DownCode = sysbrk(rbp->Count);
- if (!DownCode) {
- rio_dprintk(RIO_DEBUG_BOOT, "No system memory available\n");
- p->RIOError.Error = NOT_ENOUGH_CORE_FOR_PCI_COPY;
- func_exit();
- return -ENOMEM;
- }
- bzero(DownCode, rbp->Count);
-
- if (copyin((int) rbp->DataP, DownCode, rbp->Count) == COPYFAIL) {
- rio_dprintk(RIO_DEBUG_BOOT, "Bad copyin of host data\n");
- sysfree(DownCode, rbp->Count);
- p->RIOError.Error = COPYIN_FAILED;
- func_exit();
- return -EFAULT;
- }
-
- HostP->Copy(DownCode, StartP, rbp->Count);