From: Robert Niemi <robert.den.klurige@googlemail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Patch: Integrator/CP reference clock cycle counter
Date: Thu, 12 Mar 2009 08:22:36 +0100 [thread overview]
Message-ID: <47d9bb870903120022i6cb74249l2040da3287075a36@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1019 bytes --]
Below is a patch to the integrator/cp implementation, adding support for
CM_REFCNT.
The behaviour is not strictly correct, since the counter should be zeroed
upon reset. But it wraps fairly often so this flaw shouldn't really affect
anyone.
BTW, is this the correct place to submit patches?
/Rob
--- qemu_svn/trunk/hw/integratorcp.c 2009-03-12 07:10:23.000000000 +0100
+++ qemu/hw/integratorcp.c 2009-03-12 07:22:34.000000000 +0100
@@ -14,6 +14,7 @@
#include "boards.h"
#include "arm-misc.h"
#include "net.h"
+#include "qemu-timer.h"
typedef struct {
uint32_t flash_offset;
@@ -71,8 +72,7 @@ static uint32_t integratorcm_read(void *
case 9: /* CM_INIT */
return s->cm_init;
case 10: /* CM_REFCT */
- /* ??? High frequency timer. */
- cpu_abort(cpu_single_env, "integratorcm_read: CM_REFCT");
+ return muldiv64(qemu_get_clock(vm_clock), 24000000,
ticks_per_sec);
case 12: /* CM_FLAGS */
return s->cm_flags;
case 14: /* CM_NVFLAGS */
[-- Attachment #2: Type: text/html, Size: 1251 bytes --]
reply other threads:[~2009-03-12 7:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=47d9bb870903120022i6cb74249l2040da3287075a36@mail.gmail.com \
--to=robert.den.klurige@googlemail.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).