Re: Simple PB question...

From: Dean Ramsier (ramsiernospam_at_nospam.com)
Date: 03/10/05


Date: Thu, 10 Mar 2005 17:29:55 -0500

Anywhere in OEMInit() should be fine. I don't know where your OEMInit
function is located, that would be BSP specific. You'll need to rebuild the
kernel portion of the BSP, it's probably easier to just rebuild the whole
BSP than figure out incremental builds. A sysgen of the entire OS is not
necessary.

-- 
Dean Ramsier - eMVP
Vibren Technologies
http://www.vibren.com/Products/schema_bsp.htm
"photon209" <photon209@discussions.microsoft.com> wrote in message
news:D188349D-CD39-4337-A0BD-A4E253FA0A58@microsoft.com...
>
> Er, this certainly sounds like it.  I'm new here, so, er, where in the
> OEMINit function would I call NKForceCleanBoot ();?  Beginning?  I take it
> that's in it init.c file of the Kernel?  A clean build would be needed?
>
> "Dean Ramsier" wrote:
>
> > You are not properly clearing the object store in OEMInit().  The line
> >
> > > Booting kernel with existing memory configuration:
> >
> > indicates that the kernel thinks this is a soft boot where RAM contents
have
> > been preserved and are valid and are requested.  This is most likely not
the
> > case, especially if you've done a power cycle.  So, the old object store
> > (which includes the registry) is being used even though it is most
likely
> > corrupt.
> >
> > Note that the kernel just looks at a couple magic memory locations to
decide
> > if RAM is valid, and it's quite common for those locations to keep their
> > state even after a short power cycle/reset.
> >
> > Be sure to call NKForceCleanBoot() in OEMInit to ensure that you're
getting
> > a clean restart.
> > -- 
> > Dean Ramsier - eMVP
> >
> >
> > "photon209" <photon209@discussions.microsoft.com> wrote in message
> > news:830B3F9D-0160-4AAC-9DB0-70BEDAB29C54@microsoft.com...
> > > It appears that either something has to be left in RAM for my image to
> > boot,
> > > or FLASH is getting corrupted somehow.
> > > If I burn and run an image, it at least starts.  If I cycle power,
> > debugging
> > > messages stop and it doesn't start.  Here are the last few messages:
> > >
> > > OEMLaunch: Calling JumpTo(0x80001000)
> > > Windows CE Kernel for MIPS Built on Jun 24 2004 at 18:22:07
> > > Error Reporting Memory Reserved, dump size = 00020000
> > > Booting Windows CE version 5.00 for (MIPS32)
> > > MIPS16 Instructions NOT Supported
> > > &pTOC = 8000209c, pTOC = 80e3106c, pTOC->ulRamFree = 80e74000,
MemForPT =
> > > 00000000
> > >
> > > Booting kernel with existing memory configuration:
> > > Memory Sections:
> > > [0] : start: 80a75000, extension: 00004000, length: 01166000
> > > [1] : start: 00000000, extension: 00000010, length: 00000000
> > > [2] : start: 00000000, extension: 00000000, length: 00004010
> > > [3] : start: 00000000, extension: 00000000, length: 00000000
> > >
> > >
> > > and that's it.  it hangs.
> > >
> > > I'm getting super frustrated here.  I can't seem to track when changes
I
> > > make will take effect, or even work.  I have had builds that work
after a
> > > power cycle, but now it seems this build does not.  All I've been
changing
> > > are registry settings in an attempt to get DHCP and AutoIP to work
(still
> > > doesn't).  I've tried everything from Build and Sysgen with clean, to
> > build
> > > image (making sure the project.reg is right).  I see my changes in the
> > > 'default.fdf' file.  But sometimes the build freezes, sometimes it
looks
> > like
> > > the changes didn't take, and sometimes it partially works (like DHCP
does,
> > > AutoIP does not).
> > >
> > > "Dean Ramsier" wrote:
> > >
> > > > There are several ways to have a persistent registry.  The most
common
> > one
> > > > now is to use a Hive based registry, assuming you have a persistent
file
> > > > system available for your use.  The hive registry would be
automatically
> > > > reset if you load a new image that has new base registry settings.
> > > >
> > > > In your case, I'm guessing you're registry changes aren't actually
> > making it
> > > > into your build.  Could be because you've edited project.reg in the
> > wrong
> > > > location and your changes were overwritten, or because you changed
it in
> > the
> > > > right location but the file never got copied to the flat release
> > directory
> > > > before making the image, or you didn't actually get a new image made
> > > > successfully.
> > > >
> > > > Note that you should be changing project.reg in your project tree,
not
> > in
> > > > the flat release directory.
> > > >
> > > > You can look in default.fdf file in the flat release directory to
see
> > what
> > > > the actual contents of the registry will be in your new image.
> > > >
> > > >
> > > >
> > > > -- 
> > > > Dean Ramsier - eMVP
> > > >
> > > >
> > > > "photon209" <photon209@discussions.microsoft.com> wrote in message
> > > > news:B28F4EA5-7B86-4991-8AB2-B44358F86326@microsoft.com...
> > > > >
> > > > > Bruce,
> > > > >
> > > > > I've made no specfic settings I know of to make the registry
> > persistent.
> > > > It
> > > > > seems like having settings persist would be a benefit, not a
hazard,
> > but I
> > > > > would expect a new image to reset those settings.  I know my code
does
> > > > > nothing specfic about cleaning RAM either.  I don't think the
> > bootloader
> > > > > clears RAM.
> > > > > Is there some straightforward way to make the registry persistent
thru
> > > > power
> > > > > cycle?
> > > > >
> > > > > "Bruce Eitman (eMVP)" wrote:
> > > > >
> > > > > > That would be really, really bad.  When the new image is loaded,
the
> > > > Object
> > > > > > Store should be cleaned, especially the RAM registry.  Do you
have a
> > > > > > persistent registry?  That can be a problem, but it too should
be
> > > > cleared
> > > > > > when you load a new image.
> > > > > >
> > > > > > Bruce
> > > > > >
> > > > > > "photon209" <photon209@discussions.microsoft.com> wrote in
message
> > > > > > news:3356541D-90DB-41B8-91B0-174A87CAEFD9@microsoft.com...
> > > > > > >
> > > > > > > Thanks, good to know. I think my confusion yesterday came from
> > never
> > > > > > > power-cycling my target.  My guess is that changes to registry
> > > > settings
> > > > > > > are
> > > > > > > saved in RAM, then applied to the settings from flash.  So it
> > appeared
> > > > > > > that
> > > > > > > my changes weren't getting set - they were, they were just
> > overwritten
> > > > by
> > > > > > > what was in ram - which I also guess is not cleared when a new
> > image
> > > > is
> > > > > > > loaded.  Am I assuming correctly?
> > > > > > >
> > > > > > >
> > > > > > > "Dean Ramsier" wrote:
> > > > > > >
> > > > > > >> buildrel
> > > > > > >> makeimg
> > > > > > >>
> > > > > > >> No clean is necessary, no build is necessary.  You just need
to
> > make
> > > > sure
> > > > > > >> the new project.reg ends up in the flat release directory
> > (buildrel),
> > > > and
> > > > > > >> then make the image (makeimg)
> > > > > > >>
> > > > > > >> -- 
> > > > > > >> Dean Ramsier - eMVP
> > > > > > >>
> > > > > > >>
> > > > > > >> "photon209" <photon209@discussions.microsoft.com> wrote in
> > message
> > > > > > >> news:A0876A0B-E186-40C6-A2E7-3982827C63A1@microsoft.com...
> > > > > > >> >
> > > > > > >> > What build settings do I need to have changes in the
> > project.reg
> > > > file
> > > > > > >> take?
> > > > > > >> >
> > > > > > >> > Clean Build OS?
> > > > > > >> > Clean Build Project?
> > > > > > >> > Is Clean required?
> > > > > > >> >
> > > > > > >> > Changes don't always seem to take for me....
> > > > > > >>
> > > > > > >>
> > > > > > >>
> > > > > >
> > > > > >
> > > > > >
> > > >
> > > >
> > > >
> >
> >
> >


Relevant Pages

  • Re: Debugging nk.bin..
    ... Before OEMInit is called OEMInitDebugSerial is called. ... In my bsp i predicted the flow to be like this... ... Then the code checks if we were in Kernel side or eboot side (startup ... I am actually in the process of migrating 4.2 bsp to 5.0. ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Unresolved external _NkForceCleanBoot in function _OEMInit
    ... and the NKForceCleanBoot API was added to cover this condition. ... one recipe for forcing a clean boot was: ... void OEMInit() ... It seems strange that the kernel loaded coredll to call kernel-only ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Does Evaluation version work fine..?
    ... I have set g_OalLogmask = 0xffffffff in OEMInit() ... and below is the debug message I get on my debug console. ... Old or invalid version stamp in kernel structures - starting clean! ... could be due to evaluation version. ...
    (microsoft.public.windowsce.platbuilder)
  • Kernel hangs in KernelFindMemory
    ... I am new to kernel porting and i am porting WINCE5.0 to ARM926EJS ... ; ROMFLAGS 0x0001 Disallow Paging ... OEMInit:-> ... ldr r3, =0x20300000;sdram base address ...
    (microsoft.public.windowsce.platbuilder)
  • IXDP425: SwitchToDataCoherent
    ... but when i download kernel image i see in the debug console: ... OEMInit: Beginning Kernel level Initialization of IXDP425 ... IXDP425/IXCDP1100 Development Platform" from Intel site. ...
    (microsoft.public.windowsce.platbuilder)