Download VxWorks

Transcript
VxWorks 5.5
BSP Developer’s Guide
When defining the global mappings in sysPhysMemDesc[ ], make sure that the
amount of virtual memory being mapped does not exceed 66 MB. Also keep in
mind that additional virtual memory space may be mapped at run-time for private
virtual memory in each of the eight contexts.
SPARC Reference MMU
The SPARC Reference MMU page size is 4KB. Because this does not agree with the
default definition of VM_PAGE_SIZE in config/all/configAll.h, add the following
#undef/#define sequence to config/bspname/config.h:
#undef VM_PAGE_SIZE
#define VM_PAGE_SIZE 4096
Due to a 32-bit physical address assumption in vmLib, it is impossible to fully
represent the 36-bit physical addresses of the SPARC Reference MMU model.
Thus, for the current version of vmLib, physical addresses must be physical page
numbers (that is, physical address shifted to the right by PAGE_SHIFT, or 12 bits).
This affects calls to vmGlobalMap( ), vmMap( ), and vmTranslate( ), as well as
specifications in the sysPhysMemDesc[ ] array. For each of these calls (and
specifications), do the PAGE_SHIFT of the physical address.
For supporting multiple contexts, the SPARC Reference MMU implements a
fourth layer in an otherwise three-layer page table indexed by the current context
number. This table is variable in size and is defined by the constants exported from
the BSP as follows:
mmuInitNumContexts
Initial number of contexts in table (which is rounded up to a power of 2 as well
as what fits on a physical page).
mmuMaxNumContexts
Maximum number of contexts in table (not necessarily different than
mmuInitNumContexts).
mmuContextTableAlign
Alignment required for context table.
Each of these can be determined from documentation of the particular SPARC
Reference MMU chips. BSP designers may want to limit mmuMaxNumContexts
to prevent the table from getting overly large (on implementations that allow a
large number of context table entries).
86