Eboot.bin initialized my Network card correctly and I can transfer OS image
from debug to target machine. However, once OS gets loaded into target
machine, KITL.dll gets invoked on behalf of OS. Because KITL.dll is loaded
into virtual space, I need to convert bus address into virtual address. I am
doing that by calling two functions as below
HalTranslateBusAddress which returns 0x0 in “AddressSpace” and system
physical address in “TranslatedAddress”. Because I am using memory base I
need to call MmMapIoSpace with TranslatedAddress returned in
HalTranslateBusAddress call to get the system virtual address. Somehow
MmMapIoSPace return same virtual address as physical address. And when I use
that returned virtual address accessing my hardware(NIC) it cause my machine
to reboot.
I have seen sample code for KITL and found that all KITL driver uses IO base
and not memory base for accessing PCI/PCIe hardwares. I am not sure where I
am going wrong?
Kindly suggest me.
Thanks
Sincerely,
Tushar Dave
So if all is well with EBOOT, and up until your KITL tx/rx are used in
the kernel, most likely your MMU kernel map is not correct, or your
KITL routines are hardcoded to use Physical addresses.
Good Luck,
Joel
(I am using 512 MB RAM and CEPC BSP)
Based on my OEMAddressTable, physical address 0x00000000 - 0x20000000
mapped to virtual address 0x80000000 - 0xA0000000 . Also I tried adding
mapping in OEMAddressTable (startup.asm) .......(see line below)
dd 0x70000000, 0x50100000, 0x00040000 ; 128KBytes memory
but this doesn't work.
Below is fraction from 3 files that hepls understanding OS memory mappings.
1. file : startup.asm
_OEMAddressTable:
dd 80000000h, 0, 20000000h
dd 0, 0, 0
------------------------------------------------------
2. file : boot.bib
MEMORY
EBOOT 00130000 00040000 RAMIMAGE
RAM 00170000 00070000 RAM
ETH_DMA 00200000 00020000 RESERVED
dwReservedArea 00000000 00220000 FIXUPVAR
3. file :config.bib
NK 80220000 009E0000 RAMIMAGE
RAM 80C00000 1E000000 RAM
nk.exe :dwOEMTotalRAM 0 20000000 FIXUPVAR
-------------------------------------------------------------------
I appreciate your help.
Thanks.
Sincerely,
Tushar Dave
--
Dean Ramsier - eMVP
BSQUARE Corporation
"Tushar" <Tus...@discussions.microsoft.com> wrote in message
news:4DFA9B8B-5938-407D...@microsoft.com...
You might acquire a cheap PCI NE2000 card to test with. This might
help, as it has a working driver. They're cheap.
What are you doing that is different than the CEPC code?
Does your BIOS map PCI addresses differently than the CEPC reference
platform?
You will never be able to use the entire 512 MB of physical RAM. The 512
MB address space is shared with any IO you want to map, the 512 MB of
RAM support is "theoretical". In real life you can't map it all if you
need to map some IO as well.
See:
http://msdn.microsoft.com/en-us/library/bb331824.aspx
http://msdn.microsoft.com/en-us/library/aa914933.aspx
http://msdn.microsoft.com/en-us/library/aa909199.aspx
Good luck,
Michel Verhagen, eMVP
Check out my blog: http://GuruCE.com/blog
GuruCE Ltd.
Microsoft Embedded Partner
http://GuruCE.com
Consultancy, training and development services.
In my case, BIOS map the network card at memory address 0x50100000 ( that is
BAR[0] of of PCIe config space) , If I want to access my hardware (NIC) from
Windows CE using this (0x50100000) address then Do I need to map this
physical address to some virtual address ?
Because BAR[0] is my physical bus address. I am using HalTranslateBusAddress
function(that translate physical bus address to system physical address)
which in my case returned same 0x50100000. Then I am calling MmMapIoSpace
function (to translate physical address to virtual address) but it also
return same virtual address (in my case 0x50100000)
So finally I am using 0x50100000 address to access my device from windows
CE, and which cause error (might be page fault or some internal error which
reboot windows ce machine).
Hence, I think I need to map physical address to virtual address manually!!
Right?
Any address outside range 0x80000000 - 0x9FFFFFFF can’t handle by WinCE
(CEPC) because only those addresses are mapped (OEMAddressTable)
I hope I explained my question!
Thank you very much for your time and help. I appreciate your responses.
Sincerely,
Tushar Dave