Hi there.
I have an "interesting" problem. While playing with the framebuffer bits and pieces I've come across something strange.
If somebody with an ARM device and PlatformBuilder (or preferably lots of people with lots of different ARM devices) can run this code:
(include "pkfuncs.h", and the messageboxes may hide behind other windows when they come up
)
and tell me what you get.
Just for the record, I get:
0x8c0b9600
0x1000
0 <---- I expected 12 here
0xfffff000
What I'm concerned about is that the 3rd value ([2]), KINX_PFN_SHIFT, returns *ZERO* on my iPAQ. This was not what I was expecting.
The KINX_PAGESIZE /is/ correct - 4KB, and the mask masks the correct 12 bits... However, I was expecting the shift to return the shift to go from a physical address to a page number (i.e. log2(KINX_PAGESIZE)==12).
It's work-roundable, of course, but it just isn't what I expected and I thought that maybe the iPAQ's config was screwy, so if people can run the proggie and post the values they get, I'd be obliged.
Thanks very much,
Refractor
I have an "interesting" problem. While playing with the framebuffer bits and pieces I've come across something strange.
If somebody with an ARM device and PlatformBuilder (or preferably lots of people with lots of different ARM devices) can run this code:
- Code:
unsigned short buffer[128];
unsigned short buffer2[128];
for(int i=0;i<4;i++)
{
_ultow( UserKInfo[i], buffer, 16 );
_itow(i,buffer2,10);
MessageBox(NULL,buffer,buffer2,MB_OK);
}
(include "pkfuncs.h", and the messageboxes may hide behind other windows when they come up
and tell me what you get.
Just for the record, I get:
0x8c0b9600
0x1000
0 <---- I expected 12 here
0xfffff000
What I'm concerned about is that the 3rd value ([2]), KINX_PFN_SHIFT, returns *ZERO* on my iPAQ. This was not what I was expecting.
The KINX_PAGESIZE /is/ correct - 4KB, and the mask masks the correct 12 bits... However, I was expecting the shift to return the shift to go from a physical address to a page number (i.e. log2(KINX_PAGESIZE)==12).
It's work-roundable, of course, but it just isn't what I expected and I thought that maybe the iPAQ's config was screwy, so if people can run the proggie and post the values they get, I'd be obliged.
Thanks very much,
Refractor