Deleted Added
sdiff udiff text old ( 7903:7fcfb515d7bf ) new ( 7913:70b56a9ac1b2 )
full compact
1/*
2 * Copyright (c) 2008 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 27 unchanged lines hidden (view full) ---

36#include "mem/packet_access.hh"
37#include "sim/system.hh"
38
39X86ISA::I82094AA::I82094AA(Params *p) : PioDevice(p),
40 IntDev(this, p->int_latency),
41 latency(p->pio_latency), pioAddr(p->pio_addr),
42 extIntPic(p->external_int_pic), lowestPriorityOffset(0)
43{
44 // This assumes there's only one I/O APIC in the system
45 initialApicId = id = p->apic_id;
46 assert(id <= 0xf);
47 arbId = id;
48 regSel = 0;
49 RedirTableEntry entry = 0;
50 entry.mask = 1;
51 for (int i = 0; i < TableSize; i++) {
52 redirTable[i] = entry;
53 pinStates[i] = false;
54 }
55}
56
57Tick
58X86ISA::I82094AA::read(PacketPtr pkt)
59{
60 assert(pkt->getSize() == 4);
61 Addr offset = pkt->getAddr() - pioAddr;
62 switch(offset) {
63 case 0:
64 pkt->set<uint32_t>(regSel);

--- 26 unchanged lines hidden (view full) ---

91 pkt->makeAtomicResponse();
92 return latency;
93}
94
95void
96X86ISA::I82094AA::writeReg(uint8_t offset, uint32_t value)
97{
98 if (offset == 0x0) {
99 id = bits(value, 27, 24);
100 } else if (offset == 0x1) {
101 // The IOAPICVER register is read only.
102 } else if (offset == 0x2) {
103 arbId = bits(value, 27, 24);
104 } else if (offset >= 0x10 && offset <= (0x10 + TableSize * 2)) {
105 int index = (offset - 0x10) / 2;
106 if (offset % 2) {
107 redirTable[index].topDW = value;
108 redirTable[index].topReserved = 0;
109 } else {
110 redirTable[index].bottomDW = value;
111 redirTable[index].bottomReserved = 0;

--- 161 unchanged lines hidden ---