/* * This isync() shouldn't be necessary as the kernel is not excepted to run * any instruction in userspace soon after the update of segments and 'rfi' * instruction is used to return to userspace, but hash based cores * (at least G3) seem to exhibit a random behaviour when the 'isync' is not * there. 603 cores don't have this behaviour so don't do the 'isync' as it * saves several CPU cycles.
*/
.macro uus_isync #ifdef CONFIG_PPC_BOOK3S_604
BEGIN_MMU_FTR_SECTION
isync
END_MMU_FTR_SECTION_IFSET(MMU_FTR_HPTE_TABLE) #endif
.endm
/* * This macro defines the mapping from contexts to VSIDs (virtual * segment IDs). We use a skew on both the context and the high 4 bits * of the 32-bit virtual address (the "effective segment ID") in order * to spread out the entries in the MMU hash table. Note, if this * function is changed then hash functions will have to be * changed to correspond.
*/ #define CTX_TO_VSID(c, id) ((((c) * (897 * 16)) + (id * 0x111)) & 0xffffff)
/* * Hardware Page Table Entry * Note that the xpn and x bitfields are used only by processors that * support extended addressing; otherwise, those bits are reserved.
*/ struct hash_pte { unsignedlong v:1; /* Entry is valid */ unsignedlong vsid:24; /* Virtual segment identifier */ unsignedlong h:1; /* Hash algorithm indicator */ unsignedlong api:6; /* Abbreviated page index */ unsignedlong rpn:20; /* Real (physical) page number */ unsignedlong xpn:3; /* Real page number bits 0-2, optional */ unsignedlong r:1; /* Referenced */ unsignedlong c:1; /* Changed */ unsignedlong w:1; /* Write-thru cache mode */ unsignedlong i:1; /* Cache inhibited */ unsignedlong m:1; /* Memory coherence */ unsignedlong g:1; /* Guarded */ unsignedlong x:1; /* Real page number bit 3, optional */ unsignedlong pp:2; /* Page protection */
};
/* We happily ignore the smaller BATs on 601, we don't actually use * those definitions on hash32 at the moment anyway
*/ #define mmu_virtual_psize MMU_PAGE_4K #define mmu_linear_psize MMU_PAGE_256M
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.