Hi,
I'm a bit confused about the "enable Full Kernel Mode" Feature in PB.

I read in MSDN that "The default mode in Windows CE .NET is to run every
thread in kernel mode..." .
Does this mean really by default every thread in every application is
running in Kernel mode?

I can't believe that! And then for what do I need the "enable Full Kernel
Mode" Switch?
I thought that Device drivers (and their threads) always run in UserMode
except the corresponding ISR. Applications (and their threads) run in User
Mode too. Isn't this true?

What happens to my system when i turn on "Enable Full Kernel Mode"?
Any ideas?

Re: enable Full Kernel Mode by Sajid

Sajid
Wed Aug 25 05:46:55 CDT 2004

can you give the msdn link ... where you read that default full kernel mode
option.


"MKossiek" <matthias.kossiek@inosoft.com> wrote in message
news:%23m56a6oiEHA.1644@tk2msftngp13.phx.gbl...
> Hi,
> I'm a bit confused about the "enable Full Kernel Mode" Feature in PB.
>
> I read in MSDN that "The default mode in Windows CE .NET is to run every
> thread in kernel mode..." .
> Does this mean really by default every thread in every application is
> running in Kernel mode?
>
> I can't believe that! And then for what do I need the "enable Full Kernel
> Mode" Switch?
> I thought that Device drivers (and their threads) always run in UserMode
> except the corresponding ISR. Applications (and their threads) run in User
> Mode too. Isn't this true?
>
> What happens to my system when i turn on "Enable Full Kernel Mode"?
> Any ideas?
>
>



Re: enable Full Kernel Mode by Steve

Steve
Wed Aug 25 15:45:08 CDT 2004

The terms UserMode and Kernel mode are confusing. When they say a driver
runs in UserMode it is in reference to the differences with the desktop
where there is a completely separate environment and APIs for kernel mode
device drivers. This architecture does not exist in Windows CE and all
drivers are just normal DLLs with access to all the same APIS as any
application has. (This is a HUGE difference in the driver models!)

So what, then, is Kernel mode in Windows CE? Under Kernel Mode in Windows
CE you have access to the kernel controlled virtual memory regions above the
2G mark (> = 0x80000000) without triggering an access violation
exception.That's the major difference. However with FULL kernel mode ALL
threads are ALWAYS running with Kernel mode on so there are some
optimizations the system can make to bypass certain security checks that are
made redundant by the fact that you have full access. This allows the system
to run faster.


FULL kernel mode enabled is the default configuration for the BSPs out of
the box but can be disabled by changing the ROMFLAGS settings in your
config.bib.

--
Steve Maillet
EmbeddedFusion
www.EmbeddedFusion.com

Do have an opinion on the effectiveness of Microsoft Windows Mobile and
Embedded newsgroups? Let us know!
https://www.windowsembeddedeval.com/community/newsgroups



Re: enable Full Kernel Mode by Sajid

Sajid
Wed Aug 25 22:59:04 CDT 2004

Hi Steve,

As you have pointed out that we can
disable the Full Kernel Mode by
ROMFLAGS settings in config.bib file.

Now, my question is, what is the use of
having the 'Enable Full Kernel Mode' option
in platform setting of PB.
and Who will over ride whom ?

suppose, I have disabled FUll Kernel Mode
by setting the ROMFLAGS. Next, I Enable
Full Kernel Mode in the
Platform\Platform settings... menu of PB.

what is going to happen ?
will the ROMFLAGS setting would be considered
or the PB platform settings... would be considered.

regards
sajid


"Steve Maillet (eMVP)" <nospam1@EntelechyConsulting.com> wrote in message
news:%23ufQzRuiEHA.1280@TK2MSFTNGP09.phx.gbl...
> The terms UserMode and Kernel mode are confusing. When they say a driver
> runs in UserMode it is in reference to the differences with the desktop
> where there is a completely separate environment and APIs for kernel mode
> device drivers. This architecture does not exist in Windows CE and all
> drivers are just normal DLLs with access to all the same APIS as any
> application has. (This is a HUGE difference in the driver models!)
>
> So what, then, is Kernel mode in Windows CE? Under Kernel Mode in Windows
> CE you have access to the kernel controlled virtual memory regions above
the
> 2G mark (> = 0x80000000) without triggering an access violation
> exception.That's the major difference. However with FULL kernel mode ALL
> threads are ALWAYS running with Kernel mode on so there are some
> optimizations the system can make to bypass certain security checks that
are
> made redundant by the fact that you have full access. This allows the
system
> to run faster.
>
>
> FULL kernel mode enabled is the default configuration for the BSPs out of
> the box but can be disabled by changing the ROMFLAGS settings in your
> config.bib.
>
> --
> Steve Maillet
> EmbeddedFusion
> www.EmbeddedFusion.com
>
> Do have an opinion on the effectiveness of Microsoft Windows Mobile and
> Embedded newsgroups? Let us know!
> https://www.windowsembeddedeval.com/community/newsgroups
>
>



Re: enable Full Kernel Mode by K

K
Wed Aug 25 23:11:55 CDT 2004

The "Enable Full Kernel Mode"option in PB's menu is only unset(clear) the
IMGNOTALLKMODE env. variable.
And the config.bib will assign a sutable value for ROMFLAGS by
IMGNOTALLKMODE, IMGTRUSTROMONLY etc.
So the option in the menu only influnce the IMGNOTALLKMODE enviroment
variable.

"Sajid" <sajidbmsATyahooDOTcom> ¼¶¼g©ó¶l¥ó·s»D
:e5YBJEyiEHA.2764@TK2MSFTNGP11.phx.gbl...
> Hi Steve,
>
> As you have pointed out that we can
> disable the Full Kernel Mode by
> ROMFLAGS settings in config.bib file.
>
> Now, my question is, what is the use of
> having the 'Enable Full Kernel Mode' option
> in platform setting of PB.
> and Who will over ride whom ?
>
> suppose, I have disabled FUll Kernel Mode
> by setting the ROMFLAGS. Next, I Enable
> Full Kernel Mode in the
> Platform\Platform settings... menu of PB.
>
> what is going to happen ?
> will the ROMFLAGS setting would be considered
> or the PB platform settings... would be considered.
>
> regards
> sajid
>
>
> "Steve Maillet (eMVP)" <nospam1@EntelechyConsulting.com> wrote in message
> news:%23ufQzRuiEHA.1280@TK2MSFTNGP09.phx.gbl...
> > The terms UserMode and Kernel mode are confusing. When they say a driver
> > runs in UserMode it is in reference to the differences with the desktop
> > where there is a completely separate environment and APIs for kernel
mode
> > device drivers. This architecture does not exist in Windows CE and all
> > drivers are just normal DLLs with access to all the same APIS as any
> > application has. (This is a HUGE difference in the driver models!)
> >
> > So what, then, is Kernel mode in Windows CE? Under Kernel Mode in
Windows
> > CE you have access to the kernel controlled virtual memory regions above
> the
> > 2G mark (> = 0x80000000) without triggering an access violation
> > exception.That's the major difference. However with FULL kernel mode ALL
> > threads are ALWAYS running with Kernel mode on so there are some
> > optimizations the system can make to bypass certain security checks that
> are
> > made redundant by the fact that you have full access. This allows the
> system
> > to run faster.
> >
> >
> > FULL kernel mode enabled is the default configuration for the BSPs out
of
> > the box but can be disabled by changing the ROMFLAGS settings in your
> > config.bib.
> >
> > --
> > Steve Maillet
> > EmbeddedFusion
> > www.EmbeddedFusion.com
> >
> > Do have an opinion on the effectiveness of Microsoft Windows Mobile and
> > Embedded newsgroups? Let us know!
> > https://www.windowsembeddedeval.com/community/newsgroups
> >
> >
>
>



Re: enable Full Kernel Mode by Steve

Steve
Thu Aug 26 12:18:01 CDT 2004

Not quite. Checking that box only sets an environment variable. That's - it
nothing more. IF (and ONLY IF) your config.bib has conditional tests for the
environment var then the makeimage process will include or not include the
appropriate ROMFLAGS setting based on the environment variable. (see the
sample config.bib files in the BSPs provided with PB for greater clarity on
that)

If config.bib does not have any conditional test then the check box has no
real impact on the build.

--
Steve Maillet
EmbeddedFusion
www.EmbeddedFusion.com

Do have an opinion on the effectiveness of Microsoft Windows Mobile and
Embedded newsgroups? Let us know!
https://www.windowsembeddedeval.com/community/newsgroups



Re: enable Full Kernel Mode by K

K
Thu Aug 26 22:29:55 CDT 2004

In this case(doe not Enable Full Kernel Mode), that's true your driver is in
User-mode, and it can not access the Memory Above 2GB
until you switch to Kernel Mode by using SetKMode (TRUE);

"MKossiek" <matthias.kossiek@inosoft.com> ¼¶¼g©ó¶l¥ó·s»D
:uyU2Ny4iEHA.2812@tk2msftngp13.phx.gbl...
> Ok, disabling "Enable Full Kernel Mode" will really cause PB to set
> ROMFLAGS= 12 or ROMFLAGS=2 and that disables all Treads to run in "FULL
> Kernel Mode".
> -> My CE Image does not run in Full Kernel Mode.
>
> In this case all my device drivers run in USER MODE and have no access to
> system memory above 2GB!?
> In this case I can switch to Kernel Mode with SetKMode(true) and have
access
> to memory above 2GB!?
>
>
>



Re: enable Full Kernel Mode by MKossiek

MKossiek
Fri Aug 27 02:10:03 CDT 2004

Ok, thats what i want to know!

So there is no reason to switch my Image to Full Kernel Mode except I want
to increase performance.

"K. S. Huang" <ks_huang@AlphaNetworks.com_remove.this> wrote in message
news:e$G5gY#iEHA.1644@tk2msftngp13.phx.gbl...
> In this case(doe not Enable Full Kernel Mode), that's true your driver is
in
> User-mode, and it can not access the Memory Above 2GB
> until you switch to Kernel Mode by using SetKMode (TRUE);
>
> "MKossiek" <matthias.kossiek@inosoft.com> ¼¶¼g©ó¶l¥ó·s»D
> :uyU2Ny4iEHA.2812@tk2msftngp13.phx.gbl...
> > Ok, disabling "Enable Full Kernel Mode" will really cause PB to set
> > ROMFLAGS= 12 or ROMFLAGS=2 and that disables all Treads to run in "FULL
> > Kernel Mode".
> > -> My CE Image does not run in Full Kernel Mode.
> >
> > In this case all my device drivers run in USER MODE and have no access
to
> > system memory above 2GB!?
> > In this case I can switch to Kernel Mode with SetKMode(true) and have
> access
> > to memory above 2GB!?
> >
> >
> >
>
>



Re: enable Full Kernel Mode by K

K
Fri Aug 27 02:57:57 CDT 2004

Actually, if you only Enable the Full Kernel mode but all of the drivers are
still the same,
the performance increasement will not be significant.

"MKossiek" <matthias.kossiek@inosoft.com> ¼¶¼g©ó¶l¥ó·s»D
:O1Hr5UAjEHA.2992@TK2MSFTNGP12.phx.gbl...
> Ok, thats what i want to know!
>
> So there is no reason to switch my Image to Full Kernel Mode except I want
> to increase performance.
>
> "K. S. Huang" <ks_huang@AlphaNetworks.com_remove.this> wrote in message