A few minor fixes to get things to build on Cygwin.
README: Clarify cygwin EIO error explanation. build/SConstruct: Cygwin header files cause uninitialized var warnings. dev/ide_ctrl.cc: Get rid of unnecessary byte-swap calls, some of which were too ambiguous for cygwin (or gcc 3.4.4). dev/pcidev.cc: Disambiguate arg for overloaded byte swap operation (and fix it to be the correct one). --HG-- extra : convert_revision : be37c6315aacbec6332b1d09e726b39b4aa18dce
This commit is contained in:
parent
40696ccda2
commit
03e256b0f0
6 changed files with 25 additions and 18 deletions
7
README
7
README
|
@ -65,9 +65,10 @@ To build and test the syscall-emulation simulator:
|
||||||
2. In $top/m5-test, run "./do-tests.pl -B ALPHA_SE".
|
2. In $top/m5-test, run "./do-tests.pl -B ALPHA_SE".
|
||||||
|
|
||||||
The tests should end with "finished do-tests successfully!"
|
The tests should end with "finished do-tests successfully!"
|
||||||
Note: if you're running under Cygwin several tests will fail with an
|
Note: if you're running under Cygwin, several tests will fail with an
|
||||||
"EIO icount mismatch". This is due to the lack of fesetround() under
|
"EIO trace inconsistency: ICNT mismatch" error. This is due to the
|
||||||
Cygwin causing differences in floating-point rounding.
|
lack of fesetround() under Cygwin causing differences in floating-point
|
||||||
|
rounding. Other than that discrepancy your simulator is working perfectly.
|
||||||
|
|
||||||
To build and test the full-system simualator:
|
To build and test the full-system simualator:
|
||||||
|
|
||||||
|
|
|
@ -254,6 +254,9 @@ default_env.Append(ENV = { 'M5_EXT' : EXT_SRCDIR })
|
||||||
default_env.Append(CCFLAGS='-pipe')
|
default_env.Append(CCFLAGS='-pipe')
|
||||||
default_env.Append(CCFLAGS='-fno-strict-aliasing')
|
default_env.Append(CCFLAGS='-fno-strict-aliasing')
|
||||||
default_env.Append(CCFLAGS=Split('-Wall -Wno-sign-compare -Werror -Wundef'))
|
default_env.Append(CCFLAGS=Split('-Wall -Wno-sign-compare -Werror -Wundef'))
|
||||||
|
if sys.platform == 'cygwin':
|
||||||
|
# cygwin has some header file issues...
|
||||||
|
default_env.Append(CCFLAGS=Split("-Wno-uninitialized"))
|
||||||
default_env.Append(CPPPATH=[os.path.join(EXT_SRCDIR + '/dnet')])
|
default_env.Append(CPPPATH=[os.path.join(EXT_SRCDIR + '/dnet')])
|
||||||
|
|
||||||
# libelf build is described in its own SConscript file. Using a
|
# libelf build is described in its own SConscript file. Using a
|
||||||
|
|
|
@ -484,8 +484,8 @@ IdeController::write(MemReqPtr &req, const uint8_t *data)
|
||||||
// select the current disk based on DEV bit
|
// select the current disk based on DEV bit
|
||||||
disk = getDisk(channel);
|
disk = getDisk(channel);
|
||||||
|
|
||||||
oldVal = letoh(bmi_regs.chan[channel].bmic);
|
oldVal = bmi_regs.chan[channel].bmic;
|
||||||
newVal = letoh(*data);
|
newVal = *data;
|
||||||
|
|
||||||
// if a DMA transfer is in progress, R/W control cannot change
|
// if a DMA transfer is in progress, R/W control cannot change
|
||||||
if (oldVal & SSBM) {
|
if (oldVal & SSBM) {
|
||||||
|
@ -501,8 +501,8 @@ IdeController::write(MemReqPtr &req, const uint8_t *data)
|
||||||
DPRINTF(IdeCtrl, "Stopping DMA transfer\n");
|
DPRINTF(IdeCtrl, "Stopping DMA transfer\n");
|
||||||
|
|
||||||
// clear the BMIDEA bit
|
// clear the BMIDEA bit
|
||||||
bmi_regs.chan[channel].bmis = letoh(
|
bmi_regs.chan[channel].bmis =
|
||||||
letoh(bmi_regs.chan[channel].bmis) & ~BMIDEA);
|
bmi_regs.chan[channel].bmis & ~BMIDEA;
|
||||||
|
|
||||||
if (disks[disk] == NULL)
|
if (disks[disk] == NULL)
|
||||||
panic("DMA stop for disk %d which does not exist\n",
|
panic("DMA stop for disk %d which does not exist\n",
|
||||||
|
@ -515,8 +515,8 @@ IdeController::write(MemReqPtr &req, const uint8_t *data)
|
||||||
DPRINTF(IdeCtrl, "Starting DMA transfer\n");
|
DPRINTF(IdeCtrl, "Starting DMA transfer\n");
|
||||||
|
|
||||||
// set the BMIDEA bit
|
// set the BMIDEA bit
|
||||||
bmi_regs.chan[channel].bmis = letoh(
|
bmi_regs.chan[channel].bmis =
|
||||||
letoh(bmi_regs.chan[channel].bmis) | BMIDEA);
|
bmi_regs.chan[channel].bmis | BMIDEA;
|
||||||
|
|
||||||
if (disks[disk] == NULL)
|
if (disks[disk] == NULL)
|
||||||
panic("DMA start for disk %d which does not exist\n",
|
panic("DMA start for disk %d which does not exist\n",
|
||||||
|
@ -528,7 +528,7 @@ IdeController::write(MemReqPtr &req, const uint8_t *data)
|
||||||
}
|
}
|
||||||
|
|
||||||
// update the register value
|
// update the register value
|
||||||
bmi_regs.chan[channel].bmic = letoh(newVal);
|
bmi_regs.chan[channel].bmic = newVal;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Bus master IDE status register
|
// Bus master IDE status register
|
||||||
|
@ -537,8 +537,8 @@ IdeController::write(MemReqPtr &req, const uint8_t *data)
|
||||||
if (req->size != sizeof(uint8_t))
|
if (req->size != sizeof(uint8_t))
|
||||||
panic("Invalid BMIS write size: %x\n", req->size);
|
panic("Invalid BMIS write size: %x\n", req->size);
|
||||||
|
|
||||||
oldVal = letoh(bmi_regs.chan[channel].bmis);
|
oldVal = bmi_regs.chan[channel].bmis;
|
||||||
newVal = letoh(*data);
|
newVal = *data;
|
||||||
|
|
||||||
// the BMIDEA bit is RO
|
// the BMIDEA bit is RO
|
||||||
newVal |= (oldVal & BMIDEA);
|
newVal |= (oldVal & BMIDEA);
|
||||||
|
@ -554,17 +554,20 @@ IdeController::write(MemReqPtr &req, const uint8_t *data)
|
||||||
else
|
else
|
||||||
(oldVal & IDEDMAE) ? newVal |= IDEDMAE : newVal &= ~IDEDMAE;
|
(oldVal & IDEDMAE) ? newVal |= IDEDMAE : newVal &= ~IDEDMAE;
|
||||||
|
|
||||||
bmi_regs.chan[channel].bmis = letoh(newVal);
|
bmi_regs.chan[channel].bmis = newVal;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Bus master IDE descriptor table pointer register
|
// Bus master IDE descriptor table pointer register
|
||||||
case BMIDTP0:
|
case BMIDTP0:
|
||||||
case BMIDTP1:
|
case BMIDTP1:
|
||||||
if (req->size != sizeof(uint32_t))
|
{
|
||||||
panic("Invalid BMIDTP write size: %x\n", req->size);
|
if (req->size != sizeof(uint32_t))
|
||||||
|
panic("Invalid BMIDTP write size: %x\n", req->size);
|
||||||
|
|
||||||
bmi_regs.chan[channel].bmidtp = letoh(
|
uint32_t host_data = letoh(*(uint32_t*)data);
|
||||||
letoh(*(uint32_t*)data) & ~0x3);
|
host_data &= ~0x3;
|
||||||
|
bmi_regs.chan[channel].bmidtp = htole(host_data);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
0
dev/isa_fake.cc
Executable file → Normal file
0
dev/isa_fake.cc
Executable file → Normal file
0
dev/isa_fake.hh
Executable file → Normal file
0
dev/isa_fake.hh
Executable file → Normal file
|
@ -203,7 +203,7 @@ PciDev::writeConfig(int offset, int size, const uint8_t *data)
|
||||||
|
|
||||||
case PCI0_ROM_BASE_ADDR:
|
case PCI0_ROM_BASE_ADDR:
|
||||||
if (letoh(data32) == 0xfffffffe)
|
if (letoh(data32) == 0xfffffffe)
|
||||||
config.expansionROM = letoh(0xffffffff);
|
config.expansionROM = htole((uint32_t)0xffffffff);
|
||||||
else
|
else
|
||||||
config.expansionROM = data32;
|
config.expansionROM = data32;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue