From 32b52fe7126091692c0a76314bb3692fa3f70d27 Mon Sep 17 00:00:00 2001 From: Benjamin Nash Date: Wed, 13 Jul 2005 12:30:13 -0400 Subject: Various changes to m5/dev files to work with FreeBSD. dev/ide_ctrl.cc: dev/ide_disk.cc: dev/pcidev.cc: Made endian-independent. dev/ide_disk.hh: fixed. dev/pciconfigall.cc: The data to write is contained in a 32-bit unsigned int now. The union method would not have worked on big-endian machines. dev/pcidev.hh: Fixed typo. dev/tsunami_io.cc: Return zero on RTC alarm reads. dev/uart8250.cc: Fix uart interrupt handling. --HG-- extra : convert_revision : b5c08e8e77644c399c20888666406805ff1b6649 --- dev/ide_disk.hh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'dev/ide_disk.hh') diff --git a/dev/ide_disk.hh b/dev/ide_disk.hh index 0fcd863ec..9799e2d38 100644 --- a/dev/ide_disk.hh +++ b/dev/ide_disk.hh @@ -84,6 +84,7 @@ class PrdTableEntry { #define LCYL_OFFSET (4) #define HCYL_OFFSET (5) #define SELECT_OFFSET (6) +#define DRIVE_OFFSET (6) #define STATUS_OFFSET (7) #define COMMAND_OFFSET (7) @@ -105,10 +106,7 @@ class PrdTableEntry { typedef struct CommandReg { uint16_t data; - union { - uint8_t error; - uint8_t features; - }; + uint8_t error; uint8_t sec_count; uint8_t sec_num; uint8_t cyl_low; @@ -272,7 +270,7 @@ class IdeDisk : public SimObject } // Device register read/write - uint16_t read(const Addr &offset, RegType_t type); + void read(const Addr &offset, RegType_t type, uint8_t *data); void write(const Addr &offset, bool byte, bool cmdBlk, const uint8_t *data); // Start/abort functions -- cgit v1.2.3