i8259.cc (11793:ef606668d247) i8259.cc (13229:b45254f2733a)
1/*
2 * Copyright (c) 2004-2005 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;

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

51X86ISA::I8259::read(PacketPtr pkt)
52{
53 assert(pkt->getSize() == 1);
54 switch(pkt->getAddr() - pioAddr)
55 {
56 case 0x0:
57 if (readIRR) {
58 DPRINTF(I8259, "Reading IRR as %#x.\n", IRR);
1/*
2 * Copyright (c) 2004-2005 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;

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

51X86ISA::I8259::read(PacketPtr pkt)
52{
53 assert(pkt->getSize() == 1);
54 switch(pkt->getAddr() - pioAddr)
55 {
56 case 0x0:
57 if (readIRR) {
58 DPRINTF(I8259, "Reading IRR as %#x.\n", IRR);
59 pkt->set(IRR);
59 pkt->setLE(IRR);
60 } else {
61 DPRINTF(I8259, "Reading ISR as %#x.\n", ISR);
60 } else {
61 DPRINTF(I8259, "Reading ISR as %#x.\n", ISR);
62 pkt->set(ISR);
62 pkt->setLE(ISR);
63 }
64 break;
65 case 0x1:
66 DPRINTF(I8259, "Reading IMR as %#x.\n", IMR);
63 }
64 break;
65 case 0x1:
66 DPRINTF(I8259, "Reading IMR as %#x.\n", IMR);
67 pkt->set(IMR);
67 pkt->setLE(IMR);
68 break;
69 }
70 pkt->makeAtomicResponse();
71 return latency;
72}
73
74Tick
75X86ISA::I8259::write(PacketPtr pkt)
76{
77 assert(pkt->getSize() == 1);
68 break;
69 }
70 pkt->makeAtomicResponse();
71 return latency;
72}
73
74Tick
75X86ISA::I8259::write(PacketPtr pkt)
76{
77 assert(pkt->getSize() == 1);
78 uint8_t val = pkt->get();
78 uint8_t val = pkt->getLE<uint8_t>();
79 switch (pkt->getAddr() - pioAddr) {
80 case 0x0:
81 if (bits(val, 4)) {
82 DPRINTF(I8259, "Received initialization command word 1.\n");
83 IMR = 0;
84 edgeTriggered = bits(val, 3);
85 DPRINTF(I8259, "%s triggered mode.\n",
86 edgeTriggered ? "Edge" : "Level");

--- 262 unchanged lines hidden ---
79 switch (pkt->getAddr() - pioAddr) {
80 case 0x0:
81 if (bits(val, 4)) {
82 DPRINTF(I8259, "Received initialization command word 1.\n");
83 IMR = 0;
84 edgeTriggered = bits(val, 3);
85 DPRINTF(I8259, "%s triggered mode.\n",
86 edgeTriggered ? "Edge" : "Level");

--- 262 unchanged lines hidden ---