Hello
I’m trying to map the video memory in order to display text from a
boot driver. i know the memory for color display starts at 0xA0000 but
for some reason this isn’t working:
#define BUFFERSIZE 8192
PHYSICAL_ADDRESS paVideoMem;
PUCHAR pVideoMem = NULL;
paVideoMem.LowPart = 0xA0000;
pVideoMem = MmMapIoSpace(paVideoMem,BUFFERSIZE,FALSE);
*pVideoMem = 0x07690748 // should print H in the upper left corner
Any suggestions ?
Thanx.
1, Are you sure that your video card is actually mapped at A0000? In
WinDBG, do a “!pci 1 1” to see what the base address of the card is. You
want “BAR 1” address, as this is video memory. BAR 0 is usually the control
region, which you don’t want to touch. You could also use something like
“!dd [uc] a0000” or “!ed [uc] a0000 07690748” to test if the physical
address is actually your graphics card.
- Is the code below complete, i.e. do you not set the “highpart” of the
memory address to zero? If not, it may map a different (or no) region of
memory.
But more importantly, why? You should be able to use the following
technique (from e-mail by Maxim S. Shatskih):
InbvEnableDisplayString(TRUE) switches the screen to a mode where
string
can be displayed, the ZwDisplayString(PUNICODE_STRING) displays a string.
And your poke of the screen should display “Hi” in light grey, by the way.
I hope you don’t plan to do this in a production driver. At least not
without thorough error checking, so as to avoid problems where there is no
graphics card available in the machine.
–
Mats
Hello
I’m trying to map the video memory in order to display text from a
boot driver. i know the memory for color display starts at 0xA0000 but
for some reason this isn’t working:
#define BUFFERSIZE 8192
PHYSICAL_ADDRESS paVideoMem;
PUCHAR pVideoMem = NULL;
paVideoMem.LowPart = 0xA0000;
pVideoMem = MmMapIoSpace(paVideoMem,BUFFERSIZE,FALSE);
*pVideoMem = 0x07690748 // should print H in the upper left corner
Any suggestions ?
Thanx.
Questions? First check the Kernel Driver FAQ at http://www.
osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@3dlabs.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
ForwardSourceID:NT0000CFAE
(1) Be in VGA mode to see this memory mapped.
(2) Or go to a does full screen and go to a VGA mode to see this mapped.
(3) These are done thru the miniport.
(4) For a Super VGA mode the miniport will do VideoPortMapMemory() when
DirectDraw wants the Virutal Address of the Framebuffer.
Thanks
Mike Jones
“Sharon Sahar” wrote in message news:xxxxx@ntdev…
> Hello
>
> I’m trying to map the video memory in order to display text from a
> boot driver. i know the memory for color display starts at 0xA0000 but
> for some reason this isn’t working:
>
> #define BUFFERSIZE 8192
> PHYSICAL_ADDRESS paVideoMem;
> PUCHAR pVideoMem = NULL;
>
> paVideoMem.LowPart = 0xA0000;
> pVideoMem = MmMapIoSpace(paVideoMem,BUFFERSIZE,FALSE);
> *pVideoMem = 0x07690748 // should print H in the upper left corner
>
> Any suggestions ?
>
> Thanx.
>
I think the original poster wanted to do this BEFORE the display driver and
relevant miniport is loaded. Otherwise it doesn’t make much sense.
–
Mats
xxxxx@lists.osr.com wrote on 02/15/2005 03:21:57 PM:
(1) Be in VGA mode to see this memory mapped.
(2) Or go to a does full screen and go to a VGA mode to see this mapped.
(3) These are done thru the miniport.
(4) For a Super VGA mode the miniport will do VideoPortMapMemory() when
DirectDraw wants the Virutal Address of the Framebuffer.
Thanks
Mike Jones
“Sharon Sahar” wrote in message
news:xxxxx@ntdev…
> > Hello
> >
> > I’m trying to map the video memory in order to display text from a
> > boot driver. i know the memory for color display starts at 0xA0000 but
> > for some reason this isn’t working:
> >
> > #define BUFFERSIZE 8192
> > PHYSICAL_ADDRESS paVideoMem;
> > PUCHAR pVideoMem = NULL;
> >
> > paVideoMem.LowPart = 0xA0000;
> > pVideoMem = MmMapIoSpace(paVideoMem,BUFFERSIZE,FALSE);
> > *pVideoMem = 0x07690748 // should print H in the upper left corner
> >
> > Any suggestions ?
> >
> > Thanx.
> >
>
>
>
> —
> Questions? First check the Kernel Driver FAQ at http://www.
> osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@3dlabs.com
> To unsubscribe send a blank email to xxxxx@lists.osr.com
> ForwardSourceID:NT0000CFFE