65c65
< #include "mem/se_translating_port_proxy.hh"
---
> #include "mem/translating_port.hh"
67a68
> #include "sim/syscallreturn.hh"
123c124
< virtual bool copyIn(SETranslatingPortProxy* memproxy)
---
> virtual bool copyIn(TranslatingPort *memport)
125c126
< memproxy->readBlob(addr, bufPtr, size);
---
> memport->readBlob(addr, bufPtr, size);
132c133
< virtual bool copyOut(SETranslatingPortProxy* memproxy)
---
> virtual bool copyOut(TranslatingPort *memport)
134c135
< memproxy->writeBlob(addr, bufPtr, size);
---
> memport->writeBlob(addr, bufPtr, size);
403c404
< tgt->st_dev = TheISA::htog(tgt->st_dev);
---
> tgt->st_dev = htog(tgt->st_dev);
405c406
< tgt->st_ino = TheISA::htog(tgt->st_ino);
---
> tgt->st_ino = htog(tgt->st_ino);
412c413
< tgt->st_mode = TheISA::htog(tgt->st_mode);
---
> tgt->st_mode = htog(tgt->st_mode);
414c415
< tgt->st_nlink = TheISA::htog(tgt->st_nlink);
---
> tgt->st_nlink = htog(tgt->st_nlink);
416c417
< tgt->st_uid = TheISA::htog(tgt->st_uid);
---
> tgt->st_uid = htog(tgt->st_uid);
418c419
< tgt->st_gid = TheISA::htog(tgt->st_gid);
---
> tgt->st_gid = htog(tgt->st_gid);
423c424
< tgt->st_rdev = TheISA::htog(tgt->st_rdev);
---
> tgt->st_rdev = htog(tgt->st_rdev);
425c426
< tgt->st_size = TheISA::htog(tgt->st_size);
---
> tgt->st_size = htog(tgt->st_size);
427c428
< tgt->st_atimeX = TheISA::htog(tgt->st_atimeX);
---
> tgt->st_atimeX = htog(tgt->st_atimeX);
429c430
< tgt->st_mtimeX = TheISA::htog(tgt->st_mtimeX);
---
> tgt->st_mtimeX = htog(tgt->st_mtimeX);
431c432
< tgt->st_ctimeX = TheISA::htog(tgt->st_ctimeX);
---
> tgt->st_ctimeX = htog(tgt->st_ctimeX);
435c436
< tgt->st_blksize = TheISA::htog(tgt->st_blksize);
---
> tgt->st_blksize = htog(tgt->st_blksize);
437c438
< tgt->st_blocks = TheISA::htog(tgt->st_blocks);
---
> tgt->st_blocks = htog(tgt->st_blocks);
451c452
< tgt->st_atime_nsec = TheISA::htog(tgt->st_atime_nsec);
---
> tgt->st_atime_nsec = htog(tgt->st_atime_nsec);
453c454
< tgt->st_mtime_nsec = TheISA::htog(tgt->st_mtime_nsec);
---
> tgt->st_mtime_nsec = htog(tgt->st_mtime_nsec);
455c456
< tgt->st_ctime_nsec = TheISA::htog(tgt->st_ctime_nsec);
---
> tgt->st_ctime_nsec = htog(tgt->st_ctime_nsec);
466c467
< copyOutStatBuf(SETranslatingPortProxy* mem, Addr addr,
---
> copyOutStatBuf(TranslatingPort * mem, Addr addr,
477c478
< copyOutStat64Buf(SETranslatingPortProxy* mem, Addr addr,
---
> copyOutStat64Buf(TranslatingPort * mem, Addr addr,
532c533
< if (!tc->getMemProxy()->tryReadString(path,
---
> if (!tc->getMemPort()->tryReadString(path,
596c597
< sysinfo.copyOut(tc->getMemProxy());
---
> sysinfo.copyOut(tc->getMemPort());
610c611
< if (!tc->getMemProxy()->tryReadString(path,
---
> if (!tc->getMemPort()->tryReadString(path,
680c681
< process->allocateMem(process->mmap_end, diff);
---
> process->pTable->allocate(process->mmap_end, diff);
694,695c695
< process->allocateMem(start + old_length,
< new_length - old_length);
---
> process->pTable->allocate(start + old_length, new_length - old_length);
702c702,703
< process->pTable->unmap(start + new_length, old_length - new_length);
---
> process->pTable->deallocate(start + new_length, old_length -
> new_length);
716c717
< if (!tc->getMemProxy()->tryReadString(path,
---
> if (!tc->getMemPort()->tryReadString(path,
731c732
< copyOutStatBuf<OS>(tc->getMemProxy(), bufPtr, &hostBuf);
---
> copyOutStatBuf<OS>(tc->getMemPort(), bufPtr, &hostBuf);
746c747
< if (!tc->getMemProxy()->tryReadString(path,
---
> if (!tc->getMemPort()->tryReadString(path,
765c766
< copyOutStat64Buf<OS>(tc->getMemProxy(), bufPtr, &hostBuf);
---
> copyOutStat64Buf<OS>(tc->getMemPort(), bufPtr, &hostBuf);
796c797
< copyOutStat64Buf<OS>(tc->getMemProxy(), bufPtr, &hostBuf, (fd == 1));
---
> copyOutStat64Buf<OS>(tc->getMemPort(), bufPtr, &hostBuf, (fd == 1));
811c812
< if (!tc->getMemProxy()->tryReadString(path,
---
> if (!tc->getMemPort()->tryReadString(path,
826c827
< copyOutStatBuf<OS>(tc->getMemProxy(), bufPtr, &hostBuf);
---
> copyOutStatBuf<OS>(tc->getMemPort(), bufPtr, &hostBuf);
840c841
< if (!tc->getMemProxy()->tryReadString(path,
---
> if (!tc->getMemPort()->tryReadString(path,
860c861
< copyOutStat64Buf<OS>(tc->getMemProxy(), bufPtr, &hostBuf);
---
> copyOutStat64Buf<OS>(tc->getMemPort(), bufPtr, &hostBuf);
886c887
< copyOutStatBuf<OS>(tc->getMemProxy(), bufPtr, &hostBuf, (fd == 1));
---
> copyOutStatBuf<OS>(tc->getMemPort(), bufPtr, &hostBuf, (fd == 1));
901c902
< if (!tc->getMemProxy()->tryReadString(path,
---
> if (!tc->getMemPort()->tryReadString(path,
916c917
< OS::copyOutStatfsBuf(tc->getMemProxy(), bufPtr, &hostBuf);
---
> OS::copyOutStatfsBuf(tc->getMemPort(), bufPtr, &hostBuf);
941c942
< OS::copyOutStatfsBuf(tc->getMemProxy(), bufPtr, &hostBuf);
---
> OS::copyOutStatfsBuf(tc->getMemPort(), bufPtr, &hostBuf);
960c961
< SETranslatingPortProxy *p = tc->getMemProxy();
---
> TranslatingPort *p = tc->getMemPort();
969c970
< hiov[i].iov_len = TheISA::gtoh(tiov.iov_len);
---
> hiov[i].iov_len = gtoh(tiov.iov_len);
971c972
< p->readBlob(TheISA::gtoh(tiov.iov_base), (uint8_t *)hiov[i].iov_base,
---
> p->readBlob(gtoh(tiov.iov_base), (uint8_t *)hiov[i].iov_base,
1030,1053c1031,1033
< // are we ok with clobbering existing mappings? only set this to
< // true if the user has been warned.
< bool clobber = false;
<
< // try to use the caller-provided address if there is one
< bool use_provided_address = (start != 0);
<
< if (use_provided_address) {
< // check to see if the desired address is already in use
< if (!p->pTable->isUnmapped(start, length)) {
< // there are existing mappings in the desired range
< // whether we clobber them or not depends on whether the caller
< // specified MAP_FIXED
< if (flags & OS::TGT_MAP_FIXED) {
< // MAP_FIXED specified: clobber existing mappings
< warn("mmap: MAP_FIXED at 0x%x overwrites existing mappings\n",
< start);
< clobber = true;
< } else {
< // MAP_FIXED not specified: ignore suggested start address
< warn("mmap: ignoring suggested map address 0x%x\n", start);
< use_provided_address = false;
< }
< }
---
> if (start != 0) {
> warn("mmap: ignoring suggested map address 0x%x, using 0x%x",
> start, p->mmap_end);
1056,1065c1036,1042
< if (!use_provided_address) {
< // no address provided, or provided address unusable:
< // pick next address from our "mmap region"
< if (OS::mmapGrowsDown()) {
< start = p->mmap_end - length;
< p->mmap_end = start;
< } else {
< start = p->mmap_end;
< p->mmap_end += length;
< }
---
> // pick next address from our "mmap region"
> if (OS::mmapGrowsDown()) {
> start = p->mmap_end - length;
> p->mmap_end = start;
> } else {
> start = p->mmap_end;
> p->mmap_end += length;
1066a1044
> p->pTable->allocate(start, length);
1068,1069d1045
< p->allocateMem(start, length, clobber);
<
1087,1088c1063,1064
< rlp->rlim_cur = TheISA::htog(rlp->rlim_cur);
< rlp->rlim_max = TheISA::htog(rlp->rlim_max);
---
> rlp->rlim_cur = htog(rlp->rlim_cur);
> rlp->rlim_max = htog(rlp->rlim_max);
1094,1095c1070,1071
< rlp->rlim_cur = TheISA::htog(rlp->rlim_cur);
< rlp->rlim_max = TheISA::htog(rlp->rlim_max);
---
> rlp->rlim_cur = htog(rlp->rlim_cur);
> rlp->rlim_max = htog(rlp->rlim_max);
1105c1081
< rlp.copyOut(tc->getMemProxy());
---
> rlp.copyOut(tc->getMemPort());
1123c1099
< tp.copyOut(tc->getMemProxy());
---
> tp.copyOut(tc->getMemPort());
1138c1114
< if (!tc->getMemProxy()->tryReadString(path,
---
> if (!tc->getMemPort()->tryReadString(path,
1145c1121
< tp.copyIn(tc->getMemProxy());
---
> tp.copyIn(tc->getMemPort());
1150,1151c1126,1127
< hostTimeval[i].tv_sec = TheISA::gtoh((*tp)[i].tv_sec);
< hostTimeval[i].tv_usec = TheISA::gtoh((*tp)[i].tv_usec);
---
> hostTimeval[i].tv_sec = gtoh((*tp)[i].tv_sec);
> hostTimeval[i].tv_usec = gtoh((*tp)[i].tv_usec);
1196,1197c1172,1173
< rup->ru_utime.tv_sec = TheISA::htog(rup->ru_utime.tv_sec);
< rup->ru_utime.tv_usec = TheISA::htog(rup->ru_utime.tv_usec);
---
> rup->ru_utime.tv_sec = htog(rup->ru_utime.tv_sec);
> rup->ru_utime.tv_usec = htog(rup->ru_utime.tv_usec);
1211c1187
< rup.copyOut(tc->getMemProxy());
---
> rup.copyOut(tc->getMemPort());
1233c1209
< bufp->tms_utime = TheISA::htog(bufp->tms_utime);
---
> bufp->tms_utime = htog(bufp->tms_utime);
1236c1212
< bufp.copyOut(tc->getMemProxy());
---
> bufp.copyOut(tc->getMemPort());
1256,1257c1232,1233
< t = TheISA::htog(t);
< SETranslatingPortProxy *p = tc->getMemProxy();
---
> t = htog(t);
> TranslatingPort *p = tc->getMemPort();