diff options
author | Miguel Serrano <mserrano@umich.edu> | 2005-07-28 11:47:06 -0400 |
---|---|---|
committer | Miguel Serrano <mserrano@umich.edu> | 2005-07-28 11:47:06 -0400 |
commit | 6a8ae7a6a040876e697dfa8b837e1ba1bd7e1fd5 (patch) | |
tree | 1aba5f9f04e6ed1cf7b8fd48688dcde27ea47146 /dev/pciconfigall.cc | |
parent | 4f2480a18bdf98792e2ebf3471ce7cd3109ef824 (diff) | |
download | gem5-6a8ae7a6a040876e697dfa8b837e1ba1bd7e1fd5.tar.xz |
ghgfsdf
dev/pciconfigall.cc:
removed union.
dev/pcidev.cc:
.
dev/rtcreg.h:
more macros to avoid magic numbers.
dev/tsunami_io.cc:
replaced magic numbers, no more advancing RTC as it isn't reaaly necessary.
dev/tsunami_io.hh:
removed declarations of things that go unused.
dev/uart8250.cc:
reading the Interrupt ID register should clear TX interrupt flag.
dev/uart8250.hh:
useful #defines.
kern/freebsd/freebsd_system.cc:
kern/freebsd/freebsd_system.hh:
nothing.
python/m5/objects/Pci.py:
new PciFake.
--HG--
extra : convert_revision : 88259704f5b215591d1416360180810fcda14d26
Diffstat (limited to 'dev/pciconfigall.cc')
-rw-r--r-- | dev/pciconfigall.cc | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/dev/pciconfigall.cc b/dev/pciconfigall.cc index 7d86c3e1b..8c6657ceb 100644 --- a/dev/pciconfigall.cc +++ b/dev/pciconfigall.cc @@ -152,21 +152,17 @@ PciConfigAll::write(MemReqPtr &req, const uint8_t *data) int func = (daddr >> 8) & 0x7; int reg = daddr & 0xFF; - union { - uint8_t byte_value; - uint16_t half_value; - uint32_t word_value; - }; + uint32_t word_value = 0; if (devices[device][func] == NULL) panic("Attempting to write to config space on non-existant device\n"); else { switch (req->size) { case sizeof(uint8_t): - byte_value = *(uint8_t*)data; + word_value = *(uint8_t*)data; break; case sizeof(uint16_t): - half_value = *(uint16_t*)data; + word_value = *(uint16_t*)data; break; case sizeof(uint32_t): word_value = *(uint32_t*)data; |