changeset d04fa4674b1b in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=d04fa4674b1b
description:
X86: Make the time on the RTC configurable.
diffstat:
1 file changed, 1 deletion(-)
src/dev/x86/south_bridge/cmos.hh | 1 -
diffs (62 lines):
diff -r ea7d3676ac8d -r d04fa4674b1b src/dev/x86/south_bridge/SouthBridge.py
--- a/src/dev/x86/south_bridge/SouthBridge.py Fri Oct 10 23:39:53 2008 -0700
+++ b/src/dev/x86/south_bridge/SouthBridge.py Fri Oct 10 23:42:31 2008 -0700
@@ -32,4 +32,6 @@
class SouthBridge(PioDevice):
type = 'SouthBridge'
+ time = Param.Time('01/01/2009',
+ "System time to use ('Now' for actual time)")
pio_latency = Param.Latency('1ns', "Programmed IO latency in simticks")
diff -r ea7d3676ac8d -r d04fa4674b1b src/dev/x86/south_bridge/cmos.hh
--- a/src/dev/x86/south_bridge/cmos.hh Fri Oct 10 23:39:53 2008 -0700
+++ b/src/dev/x86/south_bridge/cmos.hh Fri Oct 10 23:42:31 2008 -0700
@@ -44,8 +44,6 @@
protected:
uint8_t address;
- struct tm foo_time;
-
static const int numRegs = 128;
uint8_t regs[numRegs];
@@ -70,22 +68,17 @@
public:
- Cmos(EventManager *em) : rtc(em, "rtc", foo_time, true, ULL(5000000000))
+ Cmos(EventManager *em, Tick _latency, struct tm time) :
+ SubDevice(_latency), rtc(em, "rtc", time, true, ULL(5000000000))
{
memset(regs, 0, numRegs * sizeof(uint8_t));
address = 0;
}
- Cmos(EventManager *em, Tick _latency) : SubDevice(_latency),
- rtc(em, "rtc", foo_time, true, ULL(5000000000))
- {
- memset(regs, 0, numRegs * sizeof(uint8_t));
- address = 0;
- }
-
- Cmos(EventManager *em, Addr start, Addr size, Tick _latency) :
+ Cmos(EventManager *em, Addr start, Addr size,
+ Tick _latency, struct tm time) :
SubDevice(start, size, _latency),
- rtc(em, "rtc", foo_time, true, ULL(5000000000))
+ rtc(em, "rtc", time, true, ULL(5000000000))
{
memset(regs, 0, numRegs * sizeof(uint8_t));
address = 0;
diff -r ea7d3676ac8d -r d04fa4674b1b src/dev/x86/south_bridge/south_bridge.cc
--- a/src/dev/x86/south_bridge/south_bridge.cc Fri Oct 10 23:39:53 2008 -0700
+++ b/src/dev/x86/south_bridge/south_bridge.cc Fri Oct 10 23:42:31 2008 -0700
@@ -70,7 +70,7 @@
pic1(0x20, 2, p->pio_latency),
pic2(0xA0, 2, p->pio_latency),
pit(this, p->name + ".pit", 0x40, 4, p->pio_latency),
- cmos(this, 0x70, 2, p->pio_latency),
+ cmos(this, 0x70, 2, p->pio_latency, p->time),
speaker(&pit, 0x61, 1, p->pio_latency)
{
addDevice(pic1);
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev