cmos.cc (5827:ac2c268bf4f1) | cmos.cc (5898:541097c69e22) |
---|---|
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) --- 51 pkt->set(address); 52 break; 53 case 0x1: 54 pkt->set(readRegister(address)); 55 break; 56 default: 57 panic("Read from undefined CMOS port.\n"); 58 } | 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) --- 51 pkt->set(address); 52 break; 53 case 0x1: 54 pkt->set(readRegister(address)); 55 break; 56 default: 57 panic("Read from undefined CMOS port.\n"); 58 } |
59 pkt->makeAtomicResponse(); |
|
59 return latency; 60} 61 62Tick 63X86ISA::Cmos::write(PacketPtr pkt) 64{ 65 assert(pkt->getSize() == 1); 66 switch(pkt->getAddr() - pioAddr) 67 { 68 case 0x0: 69 address = pkt->get<uint8_t>(); 70 break; 71 case 0x1: 72 writeRegister(address, pkt->get<uint8_t>()); 73 break; 74 default: 75 panic("Write to undefined CMOS port.\n"); 76 } | 60 return latency; 61} 62 63Tick 64X86ISA::Cmos::write(PacketPtr pkt) 65{ 66 assert(pkt->getSize() == 1); 67 switch(pkt->getAddr() - pioAddr) 68 { 69 case 0x0: 70 address = pkt->get<uint8_t>(); 71 break; 72 case 0x1: 73 writeRegister(address, pkt->get<uint8_t>()); 74 break; 75 default: 76 panic("Write to undefined CMOS port.\n"); 77 } |
78 pkt->makeAtomicResponse(); |
|
77 return latency; 78} 79 80uint8_t 81X86ISA::Cmos::readRegister(uint8_t reg) 82{ 83 assert(reg < numRegs); 84 uint8_t val; --- 32 unchanged lines hidden --- | 79 return latency; 80} 81 82uint8_t 83X86ISA::Cmos::readRegister(uint8_t reg) 84{ 85 assert(reg < numRegs); 86 uint8_t val; --- 32 unchanged lines hidden --- |