Skip to content
This repository has been archived by the owner on Mar 21, 2019. It is now read-only.

bztsrc/qemu-local-timer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

QEMU ARM Control Local Timer Periodic IRQ support

IMPORTANT NOTE: as of Mar 15 2019, this has been merged with qemu mainline, so no need to manually apply this patch any more.

This patch adds the ARM Control Local Timer (see BCM2836 QA7 section 4.11 "Local timer" page 17) periodic IRQ feature to qemu. This patch is provided as-is, without any kind of warranty in the hope that it will be useful.

The features are very limited; because 0x4000001C Core timer access is not implemented yet, there's not much point in enabling the timer without the interrupt enable bit. You can route the interrupt to one of the cores' IRQ or FIQ line by writing 0x40000024, and you can set up a periodic interrupt with 38.4MHz frequency by writing the divider into 0x40000034. Prescaler are not taken into account. When the IRQ fired, you'll see it in 0x40000040+4*N bit 11, and you can acknowledge it by writing 1<<31 to 0x40000038. Pretty much that's all that this patch does.

Usage

  1. download latest qemu source
  2. overwrite files from this repo (or if you prefer patches, the diff is here)
  3. compile qemu
./configure --target-list=aarch64-softmmu --enable-modules --enable-tcg-interpreter --enable-debug-tcg
make -j4
  1. install qemu
sudo make install

Enjoy!

bzt

About

Implements the ARM Control Local Timer in qemu

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages