Re: KITL ethernet driver in windows CE 6.0 fails



Restrict yourself to the range between 0x80000000-0x9FFFFFFF. That means
you can't map in the entire 512MB of RAM.

--
Dean Ramsier - eMVP
BSQUARE Corporation


"Tushar" <Tushar@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:4DFA9B8B-5938-407D-AE02-B1738323C98F@xxxxxxxxxxxxxxxx
Hi Joel,
Thanks for your answer. But is there any way I can map 0x50100000 physical
address to virtual address (any Virtual addr thats not already used) . I
am
using memory base to access my hardware. BIOS mapped the Hw to 0x50100000
memory address (PCIe BAR [0])

(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




"Joel Winarske" wrote:

Generally the addressing for EBOOT is setup as Physical is Virtual,
and once the kernel boots everything becomes Virtual addressing.

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


On Jun 9, 2:05 pm, Tushar <Tus...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Hi,
I am developing KITL Ethernet driver for Windows CE 6.0. There are two
binaries 1) eboot.bin 2) KITL.dll .

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




.



Relevant Pages

  • Re: KITL ethernet driver in windows CE 6.0 fails
    ... But is there any way I can map 0x50100000 physical ... and once the kernel boots everything becomes Virtual addressing. ... KITL routines are hardcoded to use Physical addresses. ... Because I am using memory base I ...
    (microsoft.public.windowsce.platbuilder)
  • Re: KITL ethernet driver in windows CE 6.0 fails
    ... BIOS map the network card at memory address 0x50100000 (that is ... you can't map in the entire 512MB of RAM. ... using memory base to access my hardware. ... KITL routines are hardcoded to use Physical addresses. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: [OT] Documentation for PC Architecture
    ... > physical RAM? ... > If you use the MMU to map a virtual address to the physical addresses from ... things like AT-PS/2 keyboard (do you have USB keyboard? ... the programs write to the current console... ...
    (Linux-Kernel)
  • Re: Opteron box and 4Gb memory
    ... Board is a SuperMicro H8DCE. ... Seems odd if they can't just map memory as: ... Where did they map the rest of the ram? ... Please read the FAQ at http://www.tux.org/lkml/ ...
    (Linux-Kernel)
  • Re: merge two png pic
    ... than you can probably store in RAM ... I want to download a map from google map with high precision ... Mostly Google maps uses normally tiles of sizes 256x256 pixel, ...
    (comp.lang.python)

Loading