Re: KeGetCurrentProcessorNumber returning wrong value?
- From: "Mark Roddy" <markr@xxxxxxxxxxxxxx>
- Date: Fri, 25 Jan 2008 08:45:22 -0500
The googles seems to have somebody else complaining about this on a w2k3 x64 system here : http://article.gmane.org/gmane.comp.emulators.xen.devel/47654
This is a dual core amd systme. Then again he is also running Xen, so who knows what is actually going on.
KeGetCurrentProcessorNumber just fetches to processor number out of the KPCR structure for the current processor on an x86 system - windbg can do the same thing and dump the entire structure as well. On an x64 system it does this:
__forceinline
ULONG
KeGetCurrentProcessorNumber (
VOID
)
{
return (ULONG)__readgsword(0x184);
}
where readgsword is one of a collection of functions for the x64 that " Define functions to read and write the uer TEB and the system PCR/PRCB." Once again perhaps windbg and a timely debug breakpoint would help.
Also here: http://msdn2.microsoft.com/en-us/library/bb332189.aspx
"Andy Grover" <andy.grover@xxxxxxxxxx> wrote in message news:OsiGMcxXIHA.2268@xxxxxxxxxxxxxxxxxxxxxxx
A friend of mine is seeing this function return 256, on a system with 2 CPUs. Why might it be doing this?
Thanks -- Andy
.
- Follow-Ups:
- Re: KeGetCurrentProcessorNumber returning wrong value?
- From: Andy Grover
- Re: KeGetCurrentProcessorNumber returning wrong value?
- References:
- KeGetCurrentProcessorNumber returning wrong value?
- From: Andy Grover
- KeGetCurrentProcessorNumber returning wrong value?
- Prev by Date: Re: How to use MSVAD wave on terminal server
- Next by Date: Re: Screen flash on Vista 64 with XPDM video drivers
- Previous by thread: KeGetCurrentProcessorNumber returning wrong value?
- Next by thread: Re: KeGetCurrentProcessorNumber returning wrong value?
- Index(es):