I hear you on having to do what the boss wants, but perhaps he/she needs
to rethink what the cost of the requirement is, as this one is just not
going to go very well. Minimally, changing the RTC without Window’s
knowledge is not something that the kernel is planning on occurring. In
particular, some of the state information is cached by the HAL (like
frequency). What problems inconsistent values between actual RTC and
HAL values might cause, I have no idea, but it certainly doesn’t sound
like a stable setup. Also, Microsoft’s usage of the RTC with regards to
Universal Time has been the focus of much complaint from other vendors -
whether it is justified, I have no idea - and access to the RTC is
documented as “blocked io,” whatever that works out to be. That it
works on a PIC based machine is probably useless, unless you’re going to
run on some very old machines, as most everything is now based on ACPI,
which has it’s own contributions to the issue. This is not really my
thing, but I believe, minimally, this includes power management/wakeup,
as the whole thing is centered around the assumption that the RTC always
remains powered.
If forced to proceed with this one with changing the requirements or
adding some hardware, I would read my chipset documentation thoroughly.
There may be something in there that could help that would be less
hostile to Windows.
mm
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@siemens.com
Sent: Wednesday, July 18, 2007 15:38
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] Hooking the RTC periodic Interrupt
Here is why I want to use the RTC (and can not use any other timer):
The RTC is the only timer that is driven by an independet Crystal. In
our SW this is of importance. We need two independent timers with an
independent clock.
PS: We could use some external clock to do that but that is not allowed
in this game;)
I admit this sounds pretty crazy, but hey it’s my boss who sets the
rules 
So much for the why…
If I knew a little more what the RTC is used for under diffrent systems,
this would be already very help full. I found out that on singleCore/PIC
systems my code works pretty fine.
I hook the IDT with my RTCHandler, enable the RTC periodic Interrupts
(was turned off by default)and great my handler gets called. I can
change the frequency and everything is fine.
Now i run my code on a single core/APIC machine and suddenly i see that
the OS already enabled the RTC interrupt during BootUp and when i change
the RTC frequency my clock (trayIcon) goes faster. So this tells me the
OS uses the RTC periodic interrupt where as on my old PIC machine it did
not.
On a multicore system it’s the same the OS has allready enabled the
periodic Interrupt and changing the frequency causes hang and/or
bluescreen.
PS:I agree I don’t like the idea either but windows does not allow me to
share the IRQ8
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer