Describes the behavior change brought about by remapping the cache attributes and the access permissions on the ARMv6K (ARM1176 & ARM11MPCore), ARMv7 (Cortex-8N), and future platforms.
The ARMv6-style page table reserves three bits in the page/directory table for access permission, so eight possible values are available. The use of four possible access permissions is sufficient. Therefore, removing the surplus access permissions frees up one page table bit that is used by Symbian platform internally.
The shadow pages kernel interface is valid on all platforms except for the emulator. On ARMv6 and previous platforms, shadow pages are created using access permission PrivilegedRW/UserRO, this is not supported by the limited set of encoding. Shadow pages are now mapped as PrivilegedRO/UserRO, instead.
class Epoc { public: ... IMPORT_C static TInt AllocShadowPage(TLinAddr aRomAddr); IMPORT_C static TInt FreeShadowPage(TLinAddr aRomAddr); IMPORT_C static TInt FreezeShadowPage(TLinAddr aRomAddr); ... };
This represents a serious behaviour break in the kernel interface. A device driver (running on ARMv7) that creates a shadow page and then attempts to alter the content of the page now panics.
This is a common use case for run-mode debuggers. However, a debugging interface is already provided, see DebugSupport in ...\memmodel\epoc\platform.h, where breakpoints are managed internally by the kernel. Therefore, it is believed that a run-time debugger that uses the CodeModifier implementation in the kernel should not be affected by this change.
After a shadow page is created using Epoc::AllocShadowPage(), the kernel allows the device driver to alter its content using Epoc::CopyToShadowMemory().
ARMv6 architecture uses a large number of bits in the page table to describe all of the options for inner and outer cachability. No applications use all of these options simultaneously so a smaller number of configurable options has been implemented to meet the needs of the system.
This alternative cache mapping allows up to eight different mappings in page tables. The Symbian platform kernel and device drivers do not need more than four or five different cache mappings.
Cache mapping cannot be altered during run-time. It must be configured before the MMU is initialised.
See the Bootstrap Port Implementation Tutorial.
The kernel supports the following types of memory:
The complete set of memory types supported by Symbian platform are represented by the values of the TMemoryType enum.
The TMappingAttributes constants allow the cache attributes to be manipulated. On remapped platforms, these map into TMemoryType as follows:
Memory type described by TMappingAttributes |
Memory type |
Return error |
|
Takes no effect. Only the inner cache description matters. This policy is already in place on ARMv5 platforms with L210, where the page table does not support a separate description of the inner and outer cache attributes. |
Mapping ARMv6K or ARMv7 onto TMappingAttributes
To describe memory on ARMv6K or ARMv7 using the original TMappingAttributes bit mask, the device driver should use the following values:
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.