<s>
In	O
computer	B-General_Concept
science	I-General_Concept
,	O
execute	B-Application
in	I-Application
place	I-Application
(	O
XIP	B-Application
)	O
is	O
a	O
method	O
of	O
executing	O
programs	O
directly	O
from	O
long-term	O
storage	O
rather	O
than	O
copying	O
it	O
into	O
RAM	B-Architecture
.	O
</s>
<s>
It	O
is	O
an	O
extension	O
of	O
using	O
shared	B-Operating_System
memory	I-Operating_System
to	O
reduce	O
the	O
total	O
amount	O
of	O
memory	O
required	O
.	O
</s>
<s>
The	O
storage	O
must	O
provide	O
a	O
similar	O
interface	O
to	O
the	O
CPU	B-General_Concept
as	O
regular	O
memory	O
(	O
or	O
an	O
adaptive	O
layer	O
must	O
be	O
present	O
)	O
.	O
</s>
<s>
This	O
interface	O
must	O
provide	O
sufficiently	O
fast	O
read	O
operations	O
with	O
a	O
random	B-General_Concept
access	I-General_Concept
pattern	O
.	O
</s>
<s>
The	O
file	B-Application
system	I-Application
,	O
if	O
one	O
is	O
used	O
,	O
needs	O
to	O
expose	O
appropriate	O
mapping	O
functions	O
.	O
</s>
<s>
The	O
program	O
must	O
either	O
be	O
linked	B-Application
to	O
be	O
aware	O
of	O
the	O
address	O
the	O
storage	O
appears	O
at	O
in	O
the	O
system	O
or	O
be	O
position-independent	B-Operating_System
.	O
</s>
<s>
The	O
storage	O
requirements	O
are	O
usually	O
met	O
by	O
using	O
NOR	O
flash	O
memory	O
or	O
EEPROM	B-General_Concept
,	O
which	O
can	O
be	O
addressed	O
as	O
individual	O
words	O
for	O
read	O
operations	O
,	O
although	O
it	O
is	O
a	O
bit	O
slower	O
than	O
normal	O
system	O
RAM	B-Architecture
in	O
most	O
setups	O
.	O
</s>
<s>
Typically	O
,	O
the	O
First	O
Stage	O
Boot	O
Loader	O
is	O
an	O
XIP	B-Application
program	O
that	O
is	O
linked	B-Application
to	O
run	O
at	O
the	O
address	O
at	O
which	O
the	O
flash	O
chip(s )	O
are	O
mapped	O
at	O
power-up	O
and	O
contains	O
a	O
minimal	O
program	O
to	O
set	O
up	O
the	O
system	O
RAM	B-Architecture
(	O
which	O
depends	O
on	O
the	O
components	O
used	O
on	O
the	O
individual	O
boards	O
and	O
cannot	O
be	O
generalized	O
enough	O
so	O
that	O
the	O
proper	O
sequence	O
could	O
be	O
embedded	O
into	O
the	O
processor	O
hardware	O
)	O
and	O
then	O
loads	O
the	O
second	O
stage	O
bootloader	O
or	O
the	O
OS	B-Operating_System
kernel	I-Operating_System
into	O
RAM	B-Architecture
.	O
</s>
<s>
Some	O
processors	O
either	O
embed	O
a	O
small	O
amount	O
of	O
SRAM	O
in	O
the	O
chip	O
itself	O
,	O
or	O
allow	O
using	O
the	O
onboard	O
cache	O
memory	O
as	O
RAM	B-Architecture
,	O
to	O
make	O
this	O
first	O
stage	O
boot	O
loader	O
easier	O
to	O
write	O
using	O
high-level	O
language	O
.	O
</s>
<s>
For	O
a	O
kernel	B-Operating_System
or	O
bootloader	O
,	O
address	B-General_Concept
space	I-General_Concept
generally	O
is	O
assigned	O
internally	O
,	O
so	O
in	O
order	O
to	O
use	O
XIP	B-Application
for	O
them	O
,	O
it	O
is	O
sufficient	O
to	O
instruct	O
the	O
linker	B-Application
to	O
place	O
unmodifiable	O
and	O
modifiable	O
data	O
in	O
different	O
address	B-General_Concept
ranges	I-General_Concept
and	O
provide	O
a	O
mechanism	O
for	O
the	O
modifiable	O
data	O
to	O
be	O
copied	O
to	O
writable	O
memory	O
before	O
any	O
code	O
is	O
run	O
that	O
assumes	O
that	O
data	O
can	O
be	O
accessed	O
normally	O
.	O
</s>
<s>
If	O
address	B-General_Concept
space	I-General_Concept
is	O
assigned	O
externally	O
,	O
such	O
as	O
in	O
an	O
application	O
program	O
that	O
is	O
run	O
on	O
a	O
system	O
that	O
does	O
not	O
provide	O
virtual	B-Architecture
memory	I-Architecture
,	O
the	O
compiler	O
needs	O
to	O
access	O
all	O
modifiable	O
data	O
by	O
adding	O
an	O
offset	O
to	O
a	O
pointer	O
to	O
a	O
private	O
copy	O
of	O
the	O
data	O
area	O
.	O
</s>
<s>
BIOS	B-Operating_System
and	O
UEFI	B-Architecture
use	O
XIP	B-Application
to	O
initialize	O
the	O
main	O
memory	O
.	O
</s>
<s>
XIP	B-Application
places	O
requirements	O
on	O
file	B-Application
systems	I-Application
that	O
are	O
often	O
difficult	O
to	O
meet	O
.	O
</s>
<s>
In	O
systems	O
without	O
a	O
page	B-General_Concept
table	I-General_Concept
,	O
the	O
entire	O
file	O
must	O
be	O
stored	O
within	O
consecutive	O
bytes	O
and	O
must	O
not	O
be	O
fragmented	O
,	O
while	O
flash	O
based	O
file	B-Application
systems	I-Application
often	O
aim	O
to	O
distribute	O
data	O
into	O
sectors	O
of	O
the	O
flash	O
chip	O
that	O
have	O
the	O
least	O
erase	O
cycles	O
and	O
even	B-Application
out	I-Application
the	I-Application
wear	I-Application
on	O
the	O
chip	O
,	O
prolonging	O
its	O
lifetime	O
.	O
</s>
<s>
All	O
these	O
complications	O
and	O
the	O
speed	O
tradeoff	O
mean	O
that	O
XIP	B-Application
is	O
generally	O
only	O
used	O
for	O
first	O
stage	O
bootloaders	O
or	O
when	O
RAM	B-Architecture
is	O
in	O
extremely	O
short	O
supply	O
.	O
</s>
<s>
In	O
particular	O
,	O
second	O
through	O
fourth	O
generation	O
video	O
game	O
consoles	O
connect	O
the	O
ROM	B-Protocol
cartridge	I-Protocol
's	O
address	O
and	O
data	O
bus	O
to	O
that	O
of	O
the	O
console	O
,	O
which	O
lets	O
(	O
for	O
example	O
)	O
the	O
Atari	O
2600	O
work	O
with	O
only	O
the	O
128	O
bytes	O
of	O
RAM	B-Architecture
in	O
its	O
joystick	B-Device
interface	I-Device
IC	I-Device
.	O
</s>
<s>
A	O
relatively	O
new	O
file	B-Application
system	I-Application
for	O
Linux	O
,	O
called	O
AXFS	B-Application
(	O
Advanced	O
XIP	B-Application
File	B-Application
System	I-Application
)	O
,	O
aims	O
to	O
overcome	O
some	O
of	O
the	O
shortcomings	O
associated	O
with	O
XIP	B-Application
,	O
especially	O
in	O
regard	O
to	O
the	O
in-place	O
execution	O
of	O
user-space	B-Operating_System
applications	O
.	O
</s>
<s>
It	O
makes	O
for	O
instance	O
possible	O
to	O
split	O
up	O
an	O
executable	O
binary	O
file	O
into	O
"	O
XIP	B-Application
regions	O
"	O
,	O
thus	O
avoiding	O
the	O
restriction	O
of	O
fragmentation	O
that	O
was	O
mentioned	O
above	O
.	O
</s>
<s>
A	O
NetBSD	B-Device
implementation	O
is	O
also	O
under	O
development	O
.	O
</s>
