cmos.hh (5634:22553ec2f177) cmos.hh (5827:ac2c268bf4f1)
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;

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

33
34#include "dev/io_device.hh"
35#include "dev/mc146818.hh"
36#include "params/Cmos.hh"
37
38namespace X86ISA
39{
40
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;

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

33
34#include "dev/io_device.hh"
35#include "dev/mc146818.hh"
36#include "params/Cmos.hh"
37
38namespace X86ISA
39{
40
41class IntPin;
41class IntSourcePin;
42
43class Cmos : public BasicPioDevice
44{
45 protected:
46 Tick latency;
47
48 uint8_t address;
49
50 static const int numRegs = 128;
51
52 uint8_t regs[numRegs];
53
54 uint8_t readRegister(uint8_t reg);
55 void writeRegister(uint8_t reg, uint8_t val);
56
57 class X86RTC : public MC146818
58 {
59 protected:
42
43class Cmos : public BasicPioDevice
44{
45 protected:
46 Tick latency;
47
48 uint8_t address;
49
50 static const int numRegs = 128;
51
52 uint8_t regs[numRegs];
53
54 uint8_t readRegister(uint8_t reg);
55 void writeRegister(uint8_t reg, uint8_t val);
56
57 class X86RTC : public MC146818
58 {
59 protected:
60 IntPin * intPin;
60 IntSourcePin * intPin;
61 public:
62 X86RTC(EventManager *em, const std::string &n, const struct tm time,
61 public:
62 X86RTC(EventManager *em, const std::string &n, const struct tm time,
63 bool bcd, Tick frequency, IntPin * _intPin) :
63 bool bcd, Tick frequency, IntSourcePin * _intPin) :
64 MC146818(em, n, time, bcd, frequency), intPin(_intPin)
65 {
66 }
67 protected:
68 void handleEvent();
69 } rtc;
70
71 public:

--- 18 unchanged lines hidden ---
64 MC146818(em, n, time, bcd, frequency), intPin(_intPin)
65 {
66 }
67 protected:
68 void handleEvent();
69 } rtc;
70
71 public:

--- 18 unchanged lines hidden ---