summaryrefslogtreecommitdiff
path: root/src/dev/mc146818.cc
AgeCommit message (Collapse)Author
2016-11-09style: [patch 1/22] use /r/3648/ to reorganize includesBrandon Potter
2016-02-06style: remove trailing whitespaceSteve Reinhardt
Result of running 'hg m5style --skip-all --fix-white -a'.
2015-07-07sim: Refactor the serialization base classAndreas Sandberg
Objects that are can be serialized are supposed to inherit from the Serializable class. This class is meant to provide a unified API for such objects. However, so far it has mainly been used by SimObjects due to some fundamental design limitations. This changeset redesigns to the serialization interface to make it more generic and hide the underlying checkpoint storage. Specifically: * Add a set of APIs to serialize into a subsection of the current object. Previously, objects that needed this functionality would use ad-hoc solutions using nameOut() and section name generation. In the new world, an object that implements the interface has the methods serializeSection() and unserializeSection() that serialize into a named /subsection/ of the current object. Calling serialize() serializes an object into the current section. * Move the name() method from Serializable to SimObject as it is no longer needed for serialization. The fully qualified section name is generated by the main serialization code on the fly as objects serialize sub-objects. * Add a scoped ScopedCheckpointSection helper class. Some objects need to serialize data structures, that are not deriving from Serializable, into subsections. Previously, this was done using nameOut() and manual section name generation. To simplify this, this changeset introduces a ScopedCheckpointSection() helper class. When this class is instantiated, it adds a new /subsection/ and subsequent serialization calls during the lifetime of this helper class happen inside this section (or a subsection in case of nested sections). * The serialize() call is now const which prevents accidental state manipulation during serialization. Objects that rely on modifying state can use the serializeOld() call instead. The default implementation simply calls serialize(). Note: The old-style calls need to be explicitly called using the serializeOld()/serializeSectionOld() style APIs. These are used by default when serializing SimObjects. * Both the input and output checkpoints now use their own named types. This hides underlying checkpoint implementation from objects that need checkpointing and makes it easier to change the underlying checkpoint storage code.
2015-04-03dev: (un)serialize fix for the RTC and RTC Timer Interrupt eventsNikos Nikoleris
Restoring from a checkpoint fails if either the RTC or the RTC Timer Interrrupt event is disabled. The restored machine tried incorrectly to schedule the next event with negative offset. Committed by: Nilay Vaish <nilay@cs.wisc.edu>
2015-01-03dev: prevent RTC events firing before startupCagdas Dirik
This change includes edits to MC146818 timer to prevent RTC events firing before startup to comply with SimObject initialization call sequence. Committed by: Nilay Vaish <nilay@cs.wisc.edu>
2013-06-04dev: Clarify why updates are delayed when the MC14818 is activatedAndreas Sandberg
2013-06-03dev: Add support for disabling ticking and the divider in MC146818Andreas Sandberg
Some Linux versions disable updates (regB.set = 1) to prevent the chip from updating its internal state while the OS is updating it. Support for this was already there, this patch merely disables the check in writeReg that prevented it from being enabled. The patch also includes support for disabling the divider, which is used to control when clock updates should start after setting the internal RTC state. These changes are required to boot most vanilla Linux distributions that update the RTC settings at boot.
2013-06-03dev: Clean up MC146818 register (A & B) handlingAndreas Sandberg
Rewrite reg A & B handling to use the bitunion stuff instead of bit masking. Add better error messages when the kernel tries to enable unsupported stuff.
2012-03-01ARM: Add RTC device for ARM platforms.Ali Saidi
This change implements a PL031 real time clock. --HG-- rename : src/dev/arm/timer_sp804.cc => src/dev/arm/rtc_pl031.cc rename : src/dev/arm/timer_sp804.hh => src/dev/arm/rtc_pl031.hh
2011-10-10mc146818: Correctly serialize tickEventNilay Vaish
'tickEvent' was not being serialized as in its place 'event' was being used. This patch rectifies this error.
2011-04-15trace: reimplement the DTRACE function so it doesn't use a vectorNathan Binkert
At the same time, rename the trace flags to debug flags since they have broader usage than simply tracing. This means that --trace-flags is now --debug-flags and --trace-help is now --debug-help
2011-04-15includes: sort all includesNathan Binkert
2011-01-07Replace curTick global variable with accessor functions.Steve Reinhardt
This step makes it easy to replace the accessor functions (which still access a global variable) with ones that access per-thread curTick values.
2010-09-16devices: undo cset 017baf09599f that added timer drain functions.Steve Reinhardt
It's not the right fix for the checkpoint deadlock problem Brad was having, and creates another bug where the system can deadlock on restore. Brad can't reproduce the original bug right now, so we'll wait until it arises again and then try to fix it the right way then.
2010-08-20devices: Fixed periodic interrupts to work with drainingBrad Beckmann
Added drain functions to the RTC and 8254 timer so that periodic interrupts stop when the system is draining. This patch is needed to checkpoint in timing mode. Otherwise under certain situations, the event queue will never be completely empty.
2010-04-15tick: rename Clock namespace to SimClockNathan Binkert
2009-11-18m5: fixed destructor to deschedule the tickEvent and eventBrad Beckmann
2009-10-15fixed MC146818 checkpointing bug and added isa serialization calls to ↵Brad Beckmann
simple_thread
2009-08-20RTC: Make calls to writeData update the RTCs internal representation of time.Gabe Black
2009-08-20X86: Make the real time clock actually keep track of time.Gabe Black
2009-08-20X86: Don't insist on binary encoding for the RTC since we implement BCD.Gabe Black
2009-02-25Devices: Make the RTC device reflect the use of BCD in its status registers.Gabe Black
2009-01-25Dev: Make the RTC device ignore writes to a read only bit.Gabe Black
2008-10-09eventq: convert all usage of events to use the new API.Nathan Binkert
For now, there is still a single global event queue, but this is necessary for making the steps towards a parallelized m5.
2008-03-25Devices: Separate out the MC146818 RTC so both Alpha and X86 can use it.Gabe Black
--HG-- extra : convert_revision : 1e7f5185654ed0845678c2169c702d3b977159ed