📄 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.6 2002/01/17 21:47:47 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 SPARC architecture supports a flat 32-bit addressspace with addresses ranging from 0x00000000 to 0xFFFFFFFF (4gigabytes). Each address is represented by a 32-bit value andis byte addressable. The address may be used to reference asingle byte, half-word (2-bytes), word (4 bytes), or doubleword(8 bytes). Memory accesses within this address space areperformed in big endian fashion by the SPARC. Memory accesseswhich are not properly aligned generate a "memory address notaligned" trap (type number 7). The following table lists thealignment requirements for a variety of 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 must use a pairof registers as their source or destination. This pair ofregisters must be an adjacent pair of registers with the firstof the pair being even numbered. For example, a validdestination for a doubleword load might be input registers 0 and1 (i0 and i1). The pair i1 and i2 would be invalid. [NOTE:Some assemblers for the SPARC do not generate an error if an oddnumbered register is specified as the beginning register of thepair. In this case, the assembler assumes that what theprogrammer meant was to use the even-odd pair which ends at thespecified register. This may or may not have been a correctassumption.]RTEMS does not support any SPARC Memory ManagementUnits, therefore, virtual memory or segmentation systemsinvolving the SPARC are not supported.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -