History log of /seL4-refos-master/projects/util_libs/libplatsupport/src/plat/pc99/ltimer.c
Revision Date Author Comments
# 155a803b 20-Jul-2020 Kent McLeod <Kent.Mcleod@data61.csiro.au>

trivial: Fix compiler warnings

- Mark unused variables unused
- Initialize uninitialized variables


# 588faf18 21-Nov-2019 Kent McLeod <Kent.Mcleod@data61.csiro.au>

pc99, ltimer: Downgrade expected errors to warning

- If the ACPI isn't present don't try and parse HPET info.
- Don't print an error in function used to check if acpi tables are
accessible.


# 008818a9 21-Nov-2019 Kent McLeod <Kent.Mcleod@data61.csiro.au>

pc99,ltimer: Don't program timer if timeout small

If the timeout is smaller than the minimum timeout then don't try to
reprogram the timer.


# 409e3bc3 25-Aug-2019 Damon Lee <Damon.Lee@data61.csiro.au>

pc99: Ack interrupts before handling timer

PC99 interrupts are edge triggered and not level triggered so interrupts
should be acknowledged before handling any hardware related operations.
This commit changes the PC99 ltimer so that a custom IRQ callback is
called instead of the common callback. The custom IRQ callback
acknowledges the interrupts before handling hardware operations.


# ef47d09d 08-Aug-2019 Damon Lee <Damon.Lee@data61.csiro.au>

libplatsupport: Refactor the internal handle_irq

Now that the handle_irq functions are no longer externally visible, this
commits refactors the handle_irq functions so that they can be accessed
internally. Also add logic to invoke the user supplied callbacks after
handling the timer IRQ.


# 80c6eb35 08-Aug-2019 Damon Lee <Damon.Lee@data61.csiro.au>

libplatsupport: Remove handle_irq from ltimers

The 'handle_irq' function is no longer necessary and shouldn't be called
externally as the IRQs will be managed by the IRQ handling functions of
the IRQ interface.


# 6e800582 08-Aug-2019 Damon Lee <Damon.Lee@data61.csiro.au>

libplatsupport: Allow user callbacks for ltimer

With the IRQ changes to the ltimer, IRQs are now managed internally.
This poses a problem with the management of the time manager and other
services which rely on having known that an interrupt arrived for the
timers. This also isn't a good idea as it presents a leaky abstraction
in that the services infers events based on interrupts received.

This commit adds the ability to allow users to supply a callback
that'll be called when certain events occur for the timer, e.g. timeouts
and etc.


# 0431e3a2 01-Aug-2019 Damon Lee <Damon.Lee@data61.csiro.au>

libplatsupport: Add IRQ register logic to ltimers

This commit adds IRQ registration logic to the ltimer driver level.
Instead of treating interrupt allocation being a OS/environment specific
thing, this commit now uses the OS/environment agnostic IRQ interface to
register these interrupts. Also fix bugs/clean-up the logic of the init
and destroy functions.


# a8a25716 13-Mar-2018 Adrian Danis <Adrian.Danis@data61.csiro.au>

libplatsupport: Try and handle ETIME errors from hpet

There is no way for the caller of this function (as it is part of an abstract interface)
to know how to resolve and recover from this error. As such this change attempts to
first recover from the error internally, and then panic if that fails.


# f4a64260 11-Dec-2017 adamf <a.felizzi@student.unsw.edu.au>

libplatsupport: Refactor ltimer_describe_with_rsdp

Moved ltimer_default_describe_with_rsdp into pc99 timer
implementation.


# 5a2ed916 11-Dec-2017 adamf <a.felizzi@student.unsw.edu.au>

libplatsupport: Modifications to RSDP parsing

Moved the parsing of the RSDP out of the table parsing procedure,
(_acpi_parse_tables). If the RSDP is not provided for ACPI
initialization, it will be searched for in the BIOS segment.
Modified the acpi_t struct to store the whole
RSDP object rather than the physical address of the object.


# fc7c1155 06-Dec-2017 adamf <a.felizzi@student.unsw.edu.au>

libplatsupport: Initialize ACPI with given RSDP

Enable ACPI initialization by passing an RSDP object rather
than searching for it within the BIOS section. Updated default
logical timer initialization to initialize the ACPI with a given
RSDP object.


# c46f5ef0 09-Oct-2017 Anna Lyons <Anna.Lyons@data61.csiro.au>

platsupport: convert EINVAL to ETIME for pit

When we use the pit to set an absolute timeout it's possible the time is
too small, in which case the pit will return EINVAL and the absolute
time has already passed.


# 9b35bd5d 08-Oct-2017 Anna Lyons <Anna.Lyons@data61.csiro.au>

platsupport: set further irqs in pit ltimer

If a user requests a timeout that is too much for the PIT (> PIT_MAX_NS)
set the irq to come in at PIT_MAX_NS but also add another timeout in
handle_irq until the timeout requested is satisfied.

Periodic timeouts > PIT_MAX_NS are still not supported.


# dae158f7 05-Oct-2017 Anna Lyons <Anna.Lyons@data61.csiro.au>

platsupport: expose pit constants, improve pit ltimer

- expose pit constants (min and max ns it can handle)
- modify pit ltimer to be able to set absolute and relative timeouts for
the pit that are greater than what the pit can handle by setting
a shorter timerout
- however, periodic timeouts which are greater than the max value the
pit can handle are NOT yet implemented
- otherwise just set a shorter timeout
- update pit error messages and codes. As the PIT is not an absolute
time source it doesn't make sense to return ETIME, instead return EINVAL
as the arguments are invalid


# 453dbe69 28-Sep-2017 Anna Lyons <Anna.Lyons@data61.csiro.au>

platsupport: request tsc freq from pit ltimer


# a3d3c5fe 24-Sep-2017 Adrian Danis <Adrian.Danis@data61.csiro.au>

libplatsupport: Explicitly disable PIT if it would collide with HPET

Given that the current timer interface assumes no multiplexing of timer interrupts this
change attempts to make sure the PIT is in a state where it's not generating interrupts
if the HPET is being initialized to use the shared HPET line.


# 4bb0bd8f 24-Sep-2017 Adrian Danis <Adrian.Danis@data61.csiro.au>

libplatsupport: Declare 'error' variable at start of function

This is to prepare for adding new code before the original declaration of the
error variable


# 06771d98 21-Aug-2017 Adrian Danis <Adrian.Danis@data61.csiro.au>

libplatsupport: Remove include for library we do not depend on

Platsupport does not (and is not suppose to) depend upon libsel4, which is where
this include file comes from. As a result this library will fail to compile if
the libsel4 headers don't just happen to be in an include path

This commit duplicates the desired constant from the header until a proper
refactor can be done


# 261c229b 10-Aug-2017 Adrian Danis <Adrian.Danis@data61.csiro.au>

libplatsupport: Explain HPET delivery location


# 78cf38f0 10-Aug-2017 Adrian Danis <Adrian.Danis@data61.csiro.au>

libplatsupport: Correct polarity of HPET interrupt

The HPET is defined in the specification to always be active HIGH, regardless of whether
it is configured to use level or edge triggered delivery


# 12ef6aa8 25-Jul-2017 Anna Lyons <Anna.Lyons@data61.csiro.au>

trivial: fix licenses


# 74f421c4 19-Jul-2017 Anna Lyons <Anna.Lyons@data61.csiro.au>

Add ltimer implementation for PC99

Users either the PIT + TSC or HPET