📄 memmodel.t
字号:
@c@c COPYRIGHT (c) 1988-2002.@c On-Line Applications Research Corporation (OAR).@c All rights reserved.@c@c $Id: memmodel.t,v 1.8 2002/01/17 21:47:46 joel Exp $@c@chapter Memory Model@section IntroductionA processor may support any combination of memorymodels ranging from pure physical addressing to complex demandpaged virtual memory systems. RTEMS supports a flat memorymodel which ranges contiguously over the processor's allowableaddress space. RTEMS does not support segmentation or virtualmemory of any kind. The appropriate memory model for RTEMSprovided by the targeted processor and related characteristicsof that model are described in this chapter.@section Flat Memory ModelThe PowerPC architecture supports a variety of memory models.RTEMS supports the PowerPC using a flat memory model with paging disabled. In this mode, the PowerPC automaticallyconverts every address from a logical to a physical addresseach time it is used. The PowerPC uses information providedin the Block Address Translation (BAT) to convert these addresses.Implementations of the PowerPC architecture may be thirty-two or sixty-four bit.The PowerPC architecture supports a flat thirty-two or sixty-four bit addressspace with addresses ranging from 0x00000000 to 0xFFFFFFFF (4gigabytes) in thirty-two bit implementations or to 0xFFFFFFFFFFFFFFFF in sixty-four bit implementations. Each address is representedby either a thirty-two bit or sixty-four bit value and is byte addressable. The address may be used to reference a single byte, half-word(2-bytes), word (4 bytes), or in sixty-four bit implementations adoubleword (8 bytes). Memory accesses within the address space areperformed in big or little endian fashion by the PowerPC basedupon the current setting of the Little-endian mode enable bit (LE)in the Machine State Register (MSR). While the processor is inbig endian mode, memory accesses which are not properly alignedgenerate an "alignment exception" (vector offset 0x00600). Inlittle endian mode, the PowerPC architecture does not requirethe processor to generate alignment exceptions.The following table lists the alignment requirements for a varietyof data accesses:@ifset use-ascii@example@group +--------------+-----------------------+ | Data Type | Alignment Requirement | +--------------+-----------------------+ | byte | 1 | | half-word | 2 | | word | 4 | | doubleword | 8 | +--------------+-----------------------+@end group@end example@end ifset@ifset use-tex@sp 1@tex\centerline{\vbox{\offinterlineskip\halign{\vrule\strut#&\hbox to 1.75in{\enskip\hfil#\hfil}&\vrule#&\hbox to 1.75in{\enskip\hfil#\hfil}&\vrule#\cr\noalign{\hrule}&\bf Data Type &&\bf Alignment Requirement&\cr\noalign{\hrule}&byte&&1&\cr\noalign{\hrule}&half-word&&2&\cr\noalign{\hrule}&word&&4&\cr\noalign{\hrule}&doubleword&&8&\cr\noalign{\hrule}}}\hfil}@end tex@end ifset @ifset use-html@html<CENTER> <TABLE COLS=2 WIDTH="60%" BORDER=2><TR><TD ALIGN=center><STRONG>Data Type</STRONG></TD> <TD ALIGN=center><STRONG>Alignment Requirement</STRONG></TD></TR><TR><TD ALIGN=center>byte</TD> <TD ALIGN=center>1</TD></TR><TR><TD ALIGN=center>half-word</TD> <TD ALIGN=center>2</TD></TR><TR><TD ALIGN=center>word</TD> <TD ALIGN=center>4</TD></TR><TR><TD ALIGN=center>doubleword</TD> <TD ALIGN=center>8</TD></TR> </TABLE></CENTER>@end html@end ifsetDoubleword load and store operations are only available in PowerPC CPU models which are sixty-four bit implementations.RTEMS does not directly support any PowerPC Memory ManagementUnits, therefore, virtual memory or segmentation systemsinvolving the PowerPC are not supported.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -