FLASH access/FMD question.

From: Ten (anonymous_at_tentechnologies.com)
Date: 09/07/04


Date: Tue, 7 Sep 2004 16:58:17 -0400

Hi,

We have a Renesas SH7727 CPU on a custom SBC. It was derived from a MobyTel
platform with a few modifications. The reset vector starts executing code
from H'00000000; this is the FLASH. The bootloader determines if it is
executing from FLASH or RAM; if FLASH, copies itself to RAM then jumps to
RAM and boots -- nothing unusual here.

>From our application, we want to write a single block at the end of the
FLASH, 0x3FeFFF to 0x3FfFFF and read it back. We don't need BinFS or a full
file system overlay; we just need one block for some statistics tracking.

We have code to access the FLASH. It does things like enable chip, write,
disbable chip. However, any memory access (from an application or driver)
it makes failes with 0xC0000005 access violation.

I've researched this on the NG, PB Help, and the SH7727 hardware manual and
have a couple of questions.

On the NG, the suggestion for accessing FLASH was to use
HalTranskateBusAddress/MmMapIoSpace or TransBusAddrToVirtual. This takes a
bus number. I'm guessing Internal or ProcessorInternal. What is the
difference?

Since the boot loader can access the FLASH and our apps and drivers can't,
I'm wondering if there is something that happens after the boot loader and
before the OS is up to change access to the FLASH. CPU privelege, MMU, or
something like that.

Here's the config.bib, do I need to reserve memory for accessing the FLASH
device in "raw" mode?

Thanks,
Nick.

MEMORY
IF IMGFLASH !
 NK 8D000000 00280000 RAMIMAGE
 RAM 8D280000 00570000 RAM
ENDIF

IF IMGFLASH
IF IMGEBOOT
 NK 80080000 01000000 RAMIMAGE
ENDIF
IF IMGEBOOT !
 NK 80000000 03f00000 RAMIMAGE
ENDIF
 RAM 8d000000 007fffff RAM
ENDIF

; Common RAM areas
 DISPLAY 8c008000 00013000 RESERVED
 EDBG 8c030000 00020000 RESERVED
 DRV_GLB 8c150000 00010000 RESERVED
 FRAMEBUF 8C300000 00096000 RESERVED

CONFIG

IF IMGFLASH !
   AUTOSIZE=ON
ENDIF

; @CESYSGEN IF !NK_NKNOCOMP
    COMPRESSION=ON
; @CESYSGEN ENDIF !NK_NKNOCOMP
; @CESYSGEN IF NK_NKNOCOMP
    COMPRESSION=OFF
; @CESYSGEN ENDIF NK_NKNOCOMP

IF IMGPROFILER
   PROFILE=ON
ENDIF
IF IMGPROFILER !
   PROFILE=OFF
ENDIF

   KERNELFIXUPS=ON

;
; ROMFLAGS is a bitmask of options for the kernel
; ROMFLAGS 0x0001 Disallow Paging
; ROMFLAGS 0x0002 Not all KMode
; ROMFLAGS 0x0010 Trust Module only
;
IF IMGTRUSTROMONLY
    IF IMGNOTALLKMODE
       ROMFLAGS=12
    ENDIF
    IF IMGNOTALLKMODE !
       ROMFLAGS=10
    ENDIF
ENDIF

IF IMGTRUSTROMONLY !
    IF IMGNOTALLKMODE
       ROMFLAGS=2
    ENDIF
    IF IMGNOTALLKMODE !
       ROMFLAGS=0
    ENDIF
ENDIF

IF IMGFLASH !
IF STORE_RAM_TO_FLASH
 ROMOFFSET=F3F1F000
 BOOTJUMP=A0000000
ENDIF
ENDIF



Relevant Pages

  • Re: FlashROM as a disk in CE 5.0
    ... The flash is 64 MB starting at 92500000, ... RAM 83100000 $RAM ... Reserve ZBANK virtual block (No physical memory ... attribute memory space. ...
    (microsoft.public.windowsce.embedded)
  • Re: FlashROM as a disk in CE 5.0
    ... Will try to build debug and look for messages related to flash. ... RAM 83100000 $RAM ... Reserve ZBANK virtual block (No physical memory ... attribute memory space. ...
    (microsoft.public.windowsce.embedded)
  • RE: FlashROM as as a FAT-disk in CE 5.0?
    ... You need a flash media driver: ... Eboot.bib and virtual memory map and possibly ... RAM 83100000 $RAM ... Reserve ZBANK virtual block (No physical memory ...
    (microsoft.public.windowsce.platbuilder)
  • Re: FlashROM as a disk in CE 5.0
    ... Will try to build debug and look for messages related to flash. ... RAM 83100000 $RAM ... Reserve ZBANK virtual block (No physical memory ... attribute memory space. ...
    (microsoft.public.windowsce.embedded)
  • RE: Checksum Failure on OS download to Flash
    ... To download the kernel to flash and TRY to XIP, ... > Eboot comes configured to download the OS to RAM. ... >; @CESYSGEN ENDIF NK_NKNOCOMP ...
    (microsoft.public.windowsce.embedded)