• Navigation überspringen
  • Zur Navigation
  • Zum Seitenende
Organisationsmenü öffnen Organisationsmenü schließen
Friedrich-Alexander-Universität Lehrstuhl für Informatik 4 (Systemsoftware)
  • FAUZur zentralen FAU Website
  1. Friedrich-Alexander-Universität
  2. Technische Fakultät
  3. Department Informatik
Suche öffnen
  • English
  • Campo
  • StudOn
  • FAUdir
  • Stellenangebote
  • Lageplan
  • Hilfe im Notfall
  1. Friedrich-Alexander-Universität
  2. Technische Fakultät
  3. Department Informatik
Friedrich-Alexander-Universität Lehrstuhl für Informatik 4 (Systemsoftware)
Menu Menu schließen
  • Lehrstuhl
    • Team
    • Aktuelles
    • Kontakt und Anfahrt
    • Leitbild
    • 50-jähriges Jubiläum
    Portal Lehrstuhl
  • Forschung
    • Forschungsbereiche
      • Betriebssysteme
      • Confidential Computing
      • Embedded Systems Software
      • Verteilte Systeme
    • Projekte
      • AIMBOS
      • BALu
      • BFT2Chain
      • DOSS
      • Mirador
      • NEON
      • PAVE
      • ResPECT
      • Watwa
    • Projektkampagnen
      • maRE
    • Seminar
      • Systemsoftware
    Portal Forschung
  • Publikationen
  • Lehre
    • Sommersemester 2025
      • Applied Software Architecture
      • Ausgewählte Kapitel der Systemsoftware
      • Betriebssystemtechnik
      • Projekt angewandte Systemsoftwaretechnik
      • System-Level Programming
      • Systemnahe Programmierung in C
      • Systemprogrammierung 1
      • Verteilte Systeme
    • Wintersemester 2025/26
      • Systemprogrammierung 2
      • Betriebssysteme
      • Middleware – Cloud Computing
      • Echtzeitsysteme
      • Virtuelle Maschinen
      • Web-basierte Systeme
      • Projekt angewandte Systemsoftwaretechnik
      • Aktuelle Entwicklung in Verteilten und Objektorientierten Betriebssystemen (für Bachelor-/Masterarbeit)
    Portal Lehre
  • Examensarbeiten
  1. Startseite
  2. Extern

Extern

Bereichsnavigation: Lehre
  • Betriebssysteme
    • Vorlesung
      • Folien
    • Übung
      • Seminar
      • Aufgaben
      • Aufgabe 0: C++ Streams
        • Aufgabe 1: Ein-/Ausgabe
          • Aufgabe 2: Unterbrechungen
            • Aufgabe 3: Pro-/Epilog
              • Aufgabe 4: Kontextwechsel
                • Aufgabe 5: Zeitscheiben
                  • Assembler Crashkurs
                    • C++ Crashkurs
                      • Entwicklungsumgebung
                        • FAQ
                          • Ruhmeshalle

                        Aufgabe 5: Zeitscheiben

                        Classes | Typedefs | Enumerations | Functions | Constants
                        HPET Namespace Reference

                        Abstraction of the HPET existing in "modern" computers (since ~2005) More...

                        Classes

                        struct  ConfigurationRegister.__unnamed38__
                         

                        Typedefs

                        typedef uint64_t InterruptStatusRegister
                         Global state register for interrupts. More...
                         

                        Enumerations

                        enum  RegisterOffset : uint16_t {
                          CAPABILITIES_AND_ID = 0x000 ,
                          CONFIGURATION = 0x010 ,
                          INTERRUPT_STATUS = 0x020 ,
                          MAIN_COUNTER = 0x0f0
                        }
                         Register Offsets. More...
                         
                        enum  CounterSize {
                          SIZE_32BIT = 0x0 ,
                          SIZE_64BIT = 0x1
                        }
                         Size of the global counter and the comparators.
                         

                        Functions

                        bool init ()
                         Initializes the HPET system from ACPI Table. More...
                         
                        void delay (uint64_t usecs)
                         Delays the caller's execution by approx. More...
                         
                        bool isEnabled ()
                         Checks whether the HPET system is enabled. More...
                         
                        void reset ()
                         Reset the global counter to zero. More...
                         
                        uint64_t get ()
                         
                        void enable ()
                         Activate the HPET system. More...
                         
                        void disable ()
                         Deactivate the HPET system. More...
                         
                        size_t countComparators ()
                         Retrieve the number of HPET comparators. More...
                         
                        Comparator * getComparator (size_t n)
                         Returns a pointer to the nth timer comparator. More...
                         

                        Constants

                        uintptr_t base_address = 0
                         

                        Detailed Description

                        Abstraction of the HPET existing in "modern" computers (since ~2005)

                        Today's systems contain, in addition to the old Programmable Interval Timer (PIT), several additional timers, the "High Precision Event Timers" (HPET). Those timers, developed by Intel and Microsoft, are intended as replacement for both the PIT and the CMOS Real Time Clock in the long run.

                        Unlike the PIT, the HPETs are in a well-define state at system boot, are configured via Memory Mapped IO, have a significantly higher precision, and support up to 256 independent comparators (depending on the architecture).

                        The HPET timers are implemented using a single counter and several comparators. The counter increments at a fixed frequency that is independent of the CPUs current frequency (which might change due to CPU power management). The only cause for reading a value smaller than previous values is a intermittent counter overflow.

                        After system boot, the HPET is in the following state:

                        1. The global counter is set to 0 and stopped.
                        2. The comparators' value registers are set to their maximum value.
                        3. All interrupts are disabled:
                          • The global activation bit is 0.
                          • Every comparators' interrupt-enable bit is set to 0
                          • The legacy mode is disabled
                        See also
                        IA-PC HPET (High Precision Event Timers) Specification 1.0a

                        Class Documentation

                        struct HPET::ConfigurationRegister.__unnamed38__
                        Class Members
                        uint64_t enabled: 1 Enables/disables the HPET.
                        uint64_t legacy_routing: 1 if 1, legacy routing is enabled
                        uint64_t __pad0__: 62

                        Typedef Documentation

                        typedef uint64_t HPET::InterruptStatusRegister

                        Global state register for interrupts.

                        This register is only required for level-triggered interrupts – it provides information about the comparator that issued an interrupt. To acknowledge the interrupt, the software is required to write 1 to the corresponding bit (writes of 0 have no effect).

                        For edge-triggered interrupts, the corresponding bit is always set to 0 and should be ignored.

                        See also
                        IA-PC HPET - 2.3.6 General Interrupt Status Register

                        Enumeration Type Documentation

                        enum HPET::RegisterOffset : uint16_t

                        Register Offsets.

                        See also
                        IA-PC HPET - 2.3.1 Register Overview
                        Enumerator
                        CAPABILITIES_AND_ID 

                        CapabilitiesAndIdRegister

                        CONFIGURATION 

                        ConfigurationRegister

                        INTERRUPT_STATUS 

                        InterruptStatusRegister

                        MAIN_COUNTER 

                        global counter

                        Function Documentation

                        bool HPET::init ( )

                        Initializes the HPET system from ACPI Table.

                        Returns
                        true on success, false on error
                        Optional:
                        Implement function
                        void HPET::delay ( uint64_t  usecs)

                        Delays the caller's execution by approx.

                        Actively waits by polling the main counter until at least the given micro seconds have passed

                        Parameters
                        usecstime to wait in micro seconds.
                        Optional:
                        Implement function
                        bool HPET::isEnabled ( )

                        Checks whether the HPET system is enabled.

                        Checks whether the HPET system is activated globally, i.e. the global counter is running and the comparators could send interrupts (if configured to do so).

                        Returns
                        true if enabled, false if disabled
                        Optional:
                        Implement function
                        void HPET::reset ( )

                        Reset the global counter to zero.

                        See also
                        IA-PC HPET - 2.3.7 Main Counter Register
                        Optional:
                        Implement function
                        void HPET::enable ( )

                        Activate the HPET system.

                        Activate the HPET system globally by enabling the global counter and, thereby, enabling all (previously configured) interrupts.

                        Optional:
                        Implement function
                        void HPET::disable ( )

                        Deactivate the HPET system.

                        Deactivates the HPET system globally by disabling the global counter and, thereby, disabling all interrupts.

                        Optional:
                        Implement function
                        size_t HPET::countComparators ( )

                        Retrieve the number of HPET comparators.

                        Returns
                        number of comparators.
                        Comparator * HPET::getComparator ( size_t  n)

                        Returns a pointer to the nth timer comparator.

                        Returns
                        A pointer to the timer comperator, or nullptr if invalid timer.
                        Friedrich-Alexander-Universität
                        Erlangen-Nürnberg

                        Schlossplatz 4
                        91054 Erlangen
                        • Impressum
                        • Datenschutz
                        • Barrierefreiheit
                        • Facebook
                        • RSS Feed
                        • Xing
                        Nach oben