Hi,

I am working on an ICOP x86 300 Mhz based deviced with Windows CE 6.0. We
generated the OS image. I would like to reach directly the VGA memory to
make some fact graphic operations. VGA controller is XGI Volari Z9s. I
worked with s3c2410 before, this unit has source code for the LCD and also
headers for memory area that the LCD frame buffer use. How can I find the
memory area for VGA for this unit?

in config.bib the memory are as:

DMA 80100000 00030000 RESERVED ; Native DMA reserved.
BOOTARGS 801FFF00 00000100 RESERVED ; Boot arguments
EDBG_DMA 80200000 00020000 RESERVED ; EDBG DMA buffer
FRAMEBUF 800A0000 00020000 RESERVED

in startup.asm

_OEMAddressTable:
dd 80000000h, 0

Any idea wellcomes.

Best regards,

RE: Location of Frame Buffer by MattGoslineMSFT

MattGoslineMSFT
Mon Aug 11 11:11:04 PDT 2008


Take a look at the constructor for the GPEFlat object under
public\common\oak\drivers\display\vgaflat\gpeflat.cpp.

The bootloader creates a BOOT_ARGS structure at runtime for various drivers
to use. One of the members of this BOOT_ARGS structure is name
pvFlatFrameBuffer and contains the pointer that you are looking for.

Hope this helps,

-Matt

--
This posting is provided AS IS with no warranties and confers no rights. --
Matt Gosline


"Han" wrote:

> Hi,
>
> I am working on an ICOP x86 300 Mhz based deviced with Windows CE 6.0. We
> generated the OS image. I would like to reach directly the VGA memory to
> make some fact graphic operations. VGA controller is XGI Volari Z9s. I
> worked with s3c2410 before, this unit has source code for the LCD and also
> headers for memory area that the LCD frame buffer use. How can I find the
> memory area for VGA for this unit?
>
> in config.bib the memory are as:
>
> DMA 80100000 00030000 RESERVED ; Native DMA reserved.
> BOOTARGS 801FFF00 00000100 RESERVED ; Boot arguments
> EDBG_DMA 80200000 00020000 RESERVED ; EDBG DMA buffer
> FRAMEBUF 800A0000 00020000 RESERVED
>
> in startup.asm
>
> _OEMAddressTable:
> dd 80000000h, 0
>
> Any idea wellcomes.
>
> Best regards,

RE: Location of Frame Buffer by Han

Han
Mon Aug 11 13:26:38 PDT 2008

Dear Matt,

Thanks for the hint. I think the information I was lookign for:

m_VirtualFrameBuffer = (DWORD)VirtualAlloc(0, fbSize, MEM_RESERVE,
PAGE_NOACCESS);

if ( m_VirtualFrameBuffer )
{
if (VirtualCopy((void *)m_VirtualFrameBuffer, (void
*)(m_pvFlatFrameBuffer >> 8), fbSize, PAGE_READWRITE | PAGE_NOCACHE |
PAGE_PHYSICAL))
{
CeSetMemoryAttributes ((void *)m_VirtualFrameBuffer, (void
*)(m_pvFlatFrameBuffer >> 8), fbSize, PAGE_WRITECOMBINE);
}
}

m_pvFlatFrameBuffer = 0x800A0000; is exactly where my vga buffer memory
located.

Hope this works. I can only test it tomorrow, because I have no hardware
with me.

Thanks.

RE: Location of Frame Buffer by Han

Han
Tue Aug 12 01:05:01 PDT 2008

Hi,

Virtual copy always returns 0. I checked the reason with GetLastError, it
returns 87 . Any idea what could be the reson?

Best regards,

HAN


RE: Location of Frame Buffer by CL

CL
Tue Aug 12 02:07:01 PDT 2008

Try
VirtualCopy((void *)m_VirtualFrameBuffer, (void
*)(m_pvFlatFrameBuffer), fbSize, PAGE_READWRITE | PAGE_NOCACHE |
PAGE_PHYSICAL))

As I know, the 2nd parameter needs to right shift 8 bits only if it is
physical address.

"Han" wrote:

> Hi,
>
> Virtual copy always returns 0. I checked the reason with GetLastError, it
> returns 87 . Any idea what could be the reson?
>
> Best regards,
>
> HAN
>

RE: Location of Frame Buffer by Han

Han
Tue Aug 12 02:36:02 PDT 2008

Hi,

This adress is physical address. I used to can reach the physical address
easily, because I can compile the OS as full kernel mode. Now as far as I
understand I have to write a Device Driver to reach the physical memory since
Wnidws Ce 6.0. Is there any sample device driver for this purpose?

"C.L" wrote:

> Try
> VirtualCopy((void *)m_VirtualFrameBuffer, (void
> *)(m_pvFlatFrameBuffer), fbSize, PAGE_READWRITE | PAGE_NOCACHE |
> PAGE_PHYSICAL))
>
> As I know, the 2nd parameter needs to right shift 8 bits only if it is
> physical address.
>
> "Han" wrote:
>
> > Hi,
> >
> > Virtual copy always returns 0. I checked the reason with GetLastError, it
> > returns 87 . Any idea what could be the reson?
> >
> > Best regards,
> >
> > HAN
> >

Re: Location of Frame Buffer by Bruce

Bruce
Tue Aug 12 03:39:18 PDT 2008

This explains how to interpret the results of GetLastError():
http://geekswithblogs.net/BruceEitman/archive/2008/07/14/platform-builder-interpreting-getlasterror.aspx

--
Bruce Eitman (eMVP)
Senior Engineer
Bruce.Eitman AT EuroTech DOT com
My BLOG http://geekswithblogs.net/bruceeitman

EuroTech Inc.
www.EuroTech.com

"Han" <Han@discussions.microsoft.com> wrote in message
news:85CB1B51-A351-49BF-BD11-BEEE39AF42D5@microsoft.com...
> Hi,
>
> Virtual copy always returns 0. I checked the reason with GetLastError, it
> returns 87 . Any idea what could be the reson?
>
> Best regards,
>
> HAN
>



Re: Location of Frame Buffer by Bruce

Bruce
Tue Aug 12 03:40:49 PDT 2008

Double check that. Everything else in this thread suggests that you are
using a virtual address.

Maybe if you tell us what you are really trying to do with the address,
someone will suggest a better way.

--
Bruce Eitman (eMVP)
Senior Engineer
Bruce.Eitman AT EuroTech DOT com
My BLOG http://geekswithblogs.net/bruceeitman

EuroTech Inc.
www.EuroTech.com

"Han" <Han@discussions.microsoft.com> wrote in message
news:0900C41F-D4D2-47EE-B926-308236CC2AEA@microsoft.com...
> Hi,
>
> This adress is physical address. I used to can reach the physical address
> easily, because I can compile the OS as full kernel mode. Now as far as I
> understand I have to write a Device Driver to reach the physical memory
> since
> Wnidws Ce 6.0. Is there any sample device driver for this purpose?
>
> "C.L" wrote:
>
>> Try
>> VirtualCopy((void *)m_VirtualFrameBuffer, (void
>> *)(m_pvFlatFrameBuffer), fbSize, PAGE_READWRITE | PAGE_NOCACHE |
>> PAGE_PHYSICAL))
>>
>> As I know, the 2nd parameter needs to right shift 8 bits only if it is
>> physical address.
>>
>> "Han" wrote:
>>
>> > Hi,
>> >
>> > Virtual copy always returns 0. I checked the reason with GetLastError,
>> > it
>> > returns 87 . Any idea what could be the reson?
>> >
>> > Best regards,
>> >
>> > HAN
>> >



Re: Location of Frame Buffer by Han

Han
Tue Aug 12 05:44:00 PDT 2008

Dear Sir,

Thank you for the information. What exactly I want to do is : Read directly
from framebuffer (like a char pointer). So far, only the most reasonable
method I could find is, copy the screen to a DIB to get pointer to read it.

The idea is: The device I am doing the tests has VGA controller on it. But
actual device will not have a VGA controller , it will be connected to an STN
LCD with GPIO.
It is very slow process. (Took 40 ms to update the screen) Now copy the
screen to DIB and display on screen tooks total 80-90 ms, if I can directly
read from the Framebuffer, I think I can gain some time around 20-30 ms. 2-3
updates per second is enough for the application, but I have some other
process running at the same time, so if I can make the update time shorter ,
it will help alot.

Best regards,

Han

"Bruce Eitman [eMVP]" wrote:

> Double check that. Everything else in this thread suggests that you are
> using a virtual address.
>
> Maybe if you tell us what you are really trying to do with the address,
> someone will suggest a better way.
>
> --
> Bruce Eitman (eMVP)
> Senior Engineer
> Bruce.Eitman AT EuroTech DOT com
> My BLOG http://geekswithblogs.net/bruceeitman
>
> EuroTech Inc.
> www.EuroTech.com
>
> "Han" <Han@discussions.microsoft.com> wrote in message
> news:0900C41F-D4D2-47EE-B926-308236CC2AEA@microsoft.com...
> > Hi,
> >
> > This adress is physical address. I used to can reach the physical address
> > easily, because I can compile the OS as full kernel mode. Now as far as I
> > understand I have to write a Device Driver to reach the physical memory
> > since
> > Wnidws Ce 6.0. Is there any sample device driver for this purpose?
> >
> > "C.L" wrote:
> >
> >> Try
> >> VirtualCopy((void *)m_VirtualFrameBuffer, (void
> >> *)(m_pvFlatFrameBuffer), fbSize, PAGE_READWRITE | PAGE_NOCACHE |
> >> PAGE_PHYSICAL))
> >>
> >> As I know, the 2nd parameter needs to right shift 8 bits only if it is
> >> physical address.
> >>
> >> "Han" wrote:
> >>
> >> > Hi,
> >> >
> >> > Virtual copy always returns 0. I checked the reason with GetLastError,
> >> > it
> >> > returns 87 . Any idea what could be the reson?
> >> >
> >> > Best regards,
> >> >
> >> > HAN
> >> >
>
>
>

Re: Location of Frame Buffer by Han

Han
Tue Aug 26 23:43:00 PDT 2008

When I switch to Ce 5.0 full kernel mode, now I can reach the frame buffer
directly without any problem.

"Bruce Eitman [eMVP]" wrote:

> This explains how to interpret the results of GetLastError():
> http://geekswithblogs.net/BruceEitman/archive/2008/07/14/platform-builder-interpreting-getlasterror.aspx
>
> --
> Bruce Eitman (eMVP)
> Senior Engineer
> Bruce.Eitman AT EuroTech DOT com
> My BLOG http://geekswithblogs.net/bruceeitman
>
> EuroTech Inc.
> www.EuroTech.com
>
> "Han" <Han@discussions.microsoft.com> wrote in message
> news:85CB1B51-A351-49BF-BD11-BEEE39AF42D5@microsoft.com...
> > Hi,
> >
> > Virtual copy always returns 0. I checked the reason with GetLastError, it
> > returns 87 . Any idea what could be the reson?
> >
> > Best regards,
> >
> > HAN
> >
>
>
>