Statistics
| Branch: | Revision:

root / hw / hpet.c @ 5844997a

History | View | Annotate | Download (22.7 kB)

# Date Author Comment
74475455 03/21/2011 10:23 am Paolo Bonzini

change all other clock references to use nanosecond resolution accessors

This was done with:

sed -i 's/qemu_get_clock\>/qemu_get_clock_ns/' \
$(git grep -l 'qemu_get_clock\>' )
sed -i 's/qemu_new_timer\>/qemu_new_timer_ns/' \
$(git grep -l 'qemu_new_timer\>' )...
ee951a37 02/21/2011 04:46 pm Jan Kiszka

isa-bus: Remove bogus IRQ sharing check

Nothing prevented IRQ sharing on the ISA bus in principle. Not all
boards supported this, neither each and every card nor driver and OS.
Still, there existed valid IRQ sharing scenarios, (at least) two of them
can also be found in QEMU: >2 PC UARTs and the PREP IDE buses....

dd703b99 02/12/2011 11:45 am Blue Swirl

hpet: make optional

Ignore failure with hpet device creation.

Signed-off-by: Blue Swirl <>

2507c12a 12/11/2010 05:24 pm Alexander Graf

Add endianness as io mem parameter

As stated before, devices can be little, big or native endian. The
target endianness is not of their concern, so we need to push things
down a level.

This patch adds a parameter to cpu_register_io_memory that allows a
device to choose its endianness. For now, all devices simply choose...

d2c5efd8 06/16/2010 12:43 am Stefan Weil

Fix comparison which always returned false

Comparing an 8 bit value with ~0 does not work as expected.
Replace ~0 by UINT8_MAX in comparison and also in assignment
(and fix coding style, too).

Cc: Gleb Natapov <>
Cc: Anthony Liguori <>...

072c2c31 06/14/2010 07:12 pm Jan Kiszka

hpet: Init capability register only once

The capability register is read-only from guest POV, so we do not need
to update it on reset.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

40ac17cd 06/14/2010 07:12 pm Gleb Natapov

pass info about hpets to seabios.]

Currently HPET ACPI table is created regardless of whether qemu actually
created hpet device. This may confuse some guests that don't check that
hpet is functional before using it. Solve this by passing info about
hpets in qemu to seabios via fw config interface. Additional benefit is...

be4b44c5 06/13/2010 03:33 pm Jan Kiszka

hpet: Make number of timers configurable

One HPET block supports up to 32 timers. Allow to instantiate more than
the recommended and implemented minimum of 3. The number is configured
via the qdev property "timers". It is also saved/restored so that it
need not match between migration peers....

8caa0065 06/13/2010 03:33 pm Jan Kiszka

hpet: Add MSI support

This implements the HPET capability of routing IRQs to the front-side
bus, aka MSI support. This feature can be enabled via the qdev property
"msi" and is off by default.

Note that switching it on can cause guests (at least Linux) to use the...

7d932dfd 06/13/2010 03:33 pm Jan Kiszka

hpet/rtc: Rework RTC IRQ replacement by HPET

Allow the intercept the RTC IRQ for the HPET legacy mode. Then push
routing to IRQ8 completely into the HPET. This allows to turn
hpet_in_legacy_mode() into a private function. Furthermore, this stops
the RTC from clearing IRQ8 even if the HPET is in control....

b7eaa6c7 06/13/2010 03:33 pm Jan Kiszka

hpet: Drop static state

Instead of keeping a static reference around, pass the state to
hpet_enabled and hpet_get_ticks. All callers now have it at hand. Will
once allow to instantiate the HPET more than a single time.

Signed-off-by: Jan Kiszka <>...

22a9fe38 06/13/2010 03:33 pm Jan Kiszka

hpet: Add support for level-triggered interrupts

By implementing this feature we can also remove a nasty way to kill qemu
(by trying to enable level-triggered hpet interrupts).

Signed-off-by: Jan Kiszka <>
Signed-off-by: Blue Swirl <>

ad0a6551 06/13/2010 03:32 pm Jan Kiszka

hpet: Silence warning on write to running main counter

Setting the main counter while the HPET is enabled may not be a good
idea of the guest, but it is supported and should, thus, not spam the
host console with warnings.

Signed-off-by: Jan Kiszka <>...

7afbecc9 06/13/2010 03:32 pm Jan Kiszka

hpet: Move static timer field initialization

Properly initialize HPETTimer::tn and HPETTimer::state once during
hpet_init instead of (re-)writing them on every reset.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Blue Swirl <>

822557eb 06/13/2010 03:32 pm Jan Kiszka

hpet: Convert to qdev

Register the HPET as a sysbus device and create it that way. As it can
route its IRQs to any ISA IRQ, we need to connect it to all 24 of them.
Once converted to qdev, we can move reset handler and vmstate
registration into its hands as well....

9cec89e8 06/13/2010 03:32 pm Jan Kiszka

hpet: Start/stop timer when HPET_TN_ENABLE is modified

We have to update the qemu timer when the per-timer enable bit is
toggled, just like for HPET_CFG_ENABLE changes.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Blue Swirl <>

6982d664 06/13/2010 03:32 pm Jan Kiszka

hpet: Catch out-of-bounds timer access

Also prevent out-of-bounds write access to the timers but don't spam the
host console if it triggers.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Blue Swirl <>

27bb0b2d 06/13/2010 03:32 pm Jan Kiszka

hpet: Coding style cleanups and some refactorings

This moves the private HPET structures into the C module, simplifies
some helper functions and fixes most coding style issues (biggest chunk
was improper switch-case indention). No functional changes.

Signed-off-by: Jan Kiszka <>...

d0f2c4c6 02/07/2010 01:03 am malc

Do not use dprintf

dprintf is already claimed by POSIX1, and on at least one system
is implemented as a macro

[1] http://www.opengroup.org/onlinepubs/9699919799/functions/dprintf.html

Signed-off-by: malc <>

c1699988 11/07/2009 10:06 am Glauber Costa

v3: don't call reset functions on cpu initialization

There is absolutely no need to call reset functions when initializing
devices. Since we are already registering them, calling qemu_system_reset()
should suffice. Actually, it is what happens when we reboot the machine,...

d4bfa4d7 10/05/2009 05:32 pm Juan Quintela

vmstate: remove const from pre_save() functions

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

e59fb374 10/05/2009 05:32 pm Juan Quintela

vmstate: add version_id argument to post_load

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

c227f099 10/02/2009 12:12 am Anthony Liguori

Revert "Get rid of _t suffix"

In the very least, a change like this requires discussion on the list.

The naming convention is goofy and it causes a massive merge problem. Something
like this must be presented on the list first so people can provide input...

99a0949b 10/01/2009 09:45 pm malc

Get rid of _t suffix

Some not so obvious bits, slirp and Xen were left alone for the time
being.

Signed-off-by: malc <>

e6cb4d45 09/11/2009 07:10 pm Juan Quintela

vmstate: port hpet device

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

67f0875e 09/11/2009 07:10 pm Juan Quintela

hpet: it is imposible that qemu_timer field is NULL at this point

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

d60efc6b 08/25/2009 09:29 pm Blue Swirl

Make CPURead/WriteFunc structure 'const'

Signed-off-by: Blue Swirl <>

ce536cfd 07/27/2009 10:08 pm Beth Kon

HPET fixes for reg writes

This patch addresses the problems found by Andriy Gapon:

- The code was incorrectly overwriting the high order 32
bits of the timer and hpet config registers. This didn't show up
in testing because linux and windows use hpet in legacy mode,...

7d93b1fa 07/17/2009 01:28 am Beth Kon

Reset HPET config register on hpet_reset

Without this, after system reset, hpet does not detect transition from
non-legacy to legacy mode.

Signed-off-by: Beth Kon <>
Signed-off-by: Anthony Liguori <>

8167ee88 07/16/2009 11:47 pm Blue Swirl

Update to a hopefully more future proof FSF address

Signed-off-by: Blue Swirl <>

a08d4367 06/29/2009 10:18 pm Jan Kiszka

Revert "Introduce reset notifier order"

This reverts commit 8217606e6edb49591b4a6fd5a0d1229cebe470a9 (and
updates later added users of qemu_register_reset), we solved the
problem it originally addressed less invasively.

Signed-off-by: Jan Kiszka <>...

1eed09cb 06/16/2009 11:18 pm Avi Kivity

Remove io_index argument from cpu_register_io_memory()

The parameter is always zero except when registering the three internal
io regions (ROM, unassigned, notdirty). Remove the parameter to reduce
the API's power, thus facilitating future change.

Signed-off-by: Avi Kivity <>...

8217606e 05/22/2009 06:50 pm Jan Kiszka

Introduce reset notifier order

Add the parameter 'order' to qemu_register_reset and sort callbacks on
registration. On system reset, callbacks with lower order will be
invoked before those with higher order. Update all existing users to the
standard order 0....

37873241 04/17/2009 11:50 pm aliguori

hpet: Fix emulation of HPET_TN_SETVAL (Jan Kiszka)

While Intel's spec is not that clear here, latest changes to Linux' HPET
code (commit c23e253e67c9d8a91a0ffa33c1f571a17f0a2403, "x86: hpet: stop
HPET_COUNTER when programming periodic mode") strongly suggest that...

35730fa0 01/16/2009 11:38 pm aurel32

hpet config mask fix

I discovered a bug in the hpet code that caused Windows to boot without
hpet. The config mask I was using was preventing the guest from placing
the hpet into 32 bit mode.

(Beth Kon)

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6357 c046a42c-6fe2-441c-8c8c-71466251a162

fad6cb1a 01/05/2009 12:05 am aurel32

Update FSF address in GPL/LGPL boilerplate

The attached patch updates the FSF address in the GPL/LGPL boilerplate
in most GPL/LGPLed files, and also in COPYING.LIB.

Signed-off-by: Stuart Brady <>
Signed-off-by: Aurelien Jarno <>...

c50c2d68 12/19/2008 12:42 am aurel32

Remove trailing spaces introduced by commit 6081

Signed-off-by: Aurelien Jarno <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6085 c046a42c-6fe2-441c-8c8c-71466251a162

bf4f74c0 12/19/2008 12:42 am aurel32

Fix warnings introduced by commit 6081

Signed-off-by: Aurelien Jarno <>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6084 c046a42c-6fe2-441c-8c8c-71466251a162

16b29ae1 12/18/2008 01:28 am aliguori

Add HPET emulation to qemu (Beth Kon)

This patch adds HPET emulation. It can be disabled with -disable-hpet. An hpet
provides a more finely granular clocksource than otherwise available on PC.
This means that latency-dependent applications (e.g. multimedia) will generally...