sysMmuMapAdd - VxWorks

This is a discussion on sysMmuMapAdd - VxWorks ; Does sysMmuMapAdd() have to be done at system init time, in sysLib.c? I am trying to use this function from my application but my call to usrMmuInit fails. The error code is not shown due the system rebooting before the ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: sysMmuMapAdd

  1. sysMmuMapAdd

    Does sysMmuMapAdd() have to be done at system init time, in
    sysLib.c?

    I am trying to use this function from my application but my call to
    usrMmuInit fails. The error code is not shown due the system rebooting
    before the print is output.

    printExc ("usrRoot: MMU configuration failed, errno = %#x", errno,
    0,0,0,0);

    Any advise on where and how to perform this set up?


  2. Re: sysMmuMapAdd



    On Jan 25, 9:02 am, "Bendont" wrote:

    > Does sysMmuMapAdd() have to be done at system init time, in
    > sysLib.c?


    It has to be done before MMU initialization. All sysMmuMapAdd() does is
    update the sysPhysMemDesc[] array. This array is used by the MMU
    initialization routine. Calling sysMmuMapAdd() again after the system
    has already booted has no effect. Note that you can't call usrMmuInit()
    a second time, if that's what you're trying to do.

    > I am trying to use this function from my application but my call to
    > usrMmuInit fails. The error code is not shown due the system rebooting
    > before the print is output.
    >
    > printExc ("usrRoot: MMU configuration failed, errno = %#x", errno,
    > 0,0,0,0);
    >
    > Any advise on where and how to perform this set up?


    You did not specify what version of VxWorks you have. (You should have.
    Please do so in the future). I'm assuming 5.5.x. The sysPhysMemDesc[]
    array is used to initialize the MMU via the vmBaseGlobalMapInit()
    routine. What you may be able to do is create a new array containing a
    description of the new mapping that you want to create and pass that to
    vmBaseGlobalMapInit(). I *think* this will set up the new mapping
    without affecting existing mappings. I have not tried this myself
    though.

    -Bill


  3. Re: sysMmuMapAdd

    Thanks Bill,

    Sorry, the VXWorks version is 5.4.

    I am trying to call 'sysMmuMapAdd' and 'usrMmuInit' after the system
    has booted. I will look into 'vmBaseGlobalMapInit'.


    On Jan 26, 12:17 am, "Bill" wrote:
    > On Jan 25, 9:02 am, "Bendont" wrote:
    >
    > > Does sysMmuMapAdd() have to be done at system init time, in
    > > sysLib.c?It has to be done before MMU initialization. All sysMmuMapAdd() does is

    > update the sysPhysMemDesc[] array. This array is used by the MMU
    > initialization routine. Calling sysMmuMapAdd() again after the system
    > has already booted has no effect. Note that you can't call usrMmuInit()
    > a second time, if that's what you're trying to do.
    >
    > > I am trying to use this function from my application but my call to
    > > usrMmuInit fails. The error code is not shown due the system rebooting
    > > before the print is output.

    >
    > > printExc ("usrRoot: MMU configuration failed, errno = %#x", errno,
    > > 0,0,0,0);

    >
    > > Any advise on where and how to perform this set up?You did not specify what version of VxWorks you have. (You should have.

    > Please do so in the future). I'm assuming 5.5.x. The sysPhysMemDesc[]
    > array is used to initialize the MMU via the vmBaseGlobalMapInit()
    > routine. What you may be able to do is create a new array containing a
    > description of the new mapping that you want to create and pass that to
    > vmBaseGlobalMapInit(). I *think* this will set up the new mapping
    > without affecting existing mappings. I have not tried this myself
    > though.
    >
    > -Bill



+ Reply to Thread