CPU 에 따라 Cache Policy, mem_types, protection_map 설정한다.
smdk2410 에서의 설정 내용으로 cache_policies[CPOLICY_WRITEBACK] 을 설정한다.
.policy = "writeback",
.cr_mask = 0,
.pmd = PMD_SECT_WB,
.pte = PTE_BUFFERABLE|PTE_CACHEABLE,
#define PMD_SECT_WB (PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE)
protection_map[0]=0x0000000f L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_CACHEABLE | L_PTE_BUFFERABLE
protection_map[1]=0x0000005f L_PTE_USER | L_PTE_EXEC | L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_CACHEABLE | L_PTE_BUFFERABLE
protection_map[2]=0x0000005f
protection_map[3]=0x0000005f
protection_map[4]=0x0000005f
protection_map[5]=0x0000005f
protection_map[6]=0x0000005f
protection_map[7]=0x0000005f
protection_map[8]=0x0000000f
protection_map[9]=0x0000005f
protection_map[10]=0x0000007f L_PTE_USER | L_PTE_WRITE | L_PTE_EXEC | L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_CACHEABLE | L_PTE_BUFFERABLE
protection_map[11]=0x0000007f
protection_map[12]=0x0000005f
protection_map[13]=0x0000005f
protection_map[14]=0x0000007f
protection_map[15]=0x0000007f
[MT_DEVICE]
prot_pte 0x000000a3 L_PTE_DIRTY | L_PTE_WRITE | L_PTE_YOUNG | L_PTE_PRESENT
prot_l1 0x00000011 PMD_BIT4 | PMD_TYPE_TABLE
prot_sect 0x00000412 PMD_SECT_AP_WRITE | PMD_BIT4 | PMD_TYPE_SECT | PMD_SECT_UNCACHED
domain 0x00000002 DOMAIN_IO
[MT_CACHECLEAN]
prot_pte 0x00000000
prot_l1 0x00000000
prot_sect 0x0000001e PMD_BIT4 | PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE | PMD_TYPE_SECT
domain 0x00000000 DOMAIN_KERNEL
[MT_MINICLEAN]
prot_pte 0x00000000
prot_l1 0x00000000
prot_sect 0x0000001a PMD_SECT_TEX(1) | PMD_BIT4 | PMD_SECT_CACHEABLE | PMD_TYPE_SECT
domain 0x00000000 DOMAIN_KERNEL
[MT_LOW_VECTORS]
prot_pte 0x000000cf L_PTE_DIRTY | L_PTE_EXEC | L_PTE_CACHEABLE | L_PTE_BUFFERABLE | L_PTE_YOUNG | L_PTE_PRESENT
prot_l1 0x00000011 PMD_BIT4 | PMD_TYPE_TABLE
prot_sect 0x00000000
domain 0x00000001 DOMAIN_USER
[MT_HIGH_VECTORS]
prot_pte 0x000000df L_PTE_DIRTY | L_PTE_EXEC | L_PTE_USER | L_PTE_CACHEABLE | L_PTE_BUFFERABLE | L_PTE_YOUNG | L_PTE_PRESENT
prot_l1 0x00000011 PMD_BIT4 | PMD_TYPE_TABLE
prot_sect 0x00000000
domain 0x00000001 DOMAIN_USER
[MT_MEMORY]
prot_pte 0x00000000
prot_l1 0x00000000
prot_sect 0x0000041e PMD_SECT_AP_WRITE | PMD_BIT4 | PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE | PMD_TYPE_SECT
domain 0x00000000 DOMAIN_KERNEL
[MT_ROM]
prot_pte 0x00000000
prot_l1 0x00000000
prot_sect 0x0000001e PMD_BIT4 | PMD_SECT_CACHEABLE | PMD_SECT_BUFFERABLE | PMD_TYPE_SECT
domain 0x00000000 DOMAIN_KERNEL
[MT_IXP2000_DEVICE]
prot_pte 0x000000a3 L_PTE_DIRTY | L_PTE_WRITE | L_PTE_YOUNG | L_PTE_PRESENT
prot_l1 0x00000011 PMD_BIT4 | PMD_TYPE_TABLE
prot_sect 0x00001416 PMD_SECT_TEX(1) | PMD_SECT_AP_WRITE | PMD_BIT4 | PMD_SECT_BUFFERABLE | PMD_TYPE_SECT | PMD_SECT_UNCACHED
domain 0x00000002 DOMAIN_IO
[MT_NONSHARED_DEVICE]
prot_pte 0x00000000
prot_l1 0x00000011 PMD_BIT4 | PMD_TYPE_TABLE
prot_sect 0x00002412 PMD_SECT_TEX(2) | PMD_SECT_AP_WRITE | PMD_BIT4 | PMD_TYPE_SECT
domain 0x00000002 DOMAIN_IO
'리눅스커널' 카테고리의 다른 글
[ cpu_architecture ] arch/arm/kernel/setup.c (0) | 2009.10.02 |
---|---|
[ ecc_mask ] arch/arm/mm/mmu.c (0) | 2009.10.02 |
[ convert_to_tag_list ] arch/arm/kernel/setup.c (0) | 2009.10.02 |
[ setup_processor ] arch/arm/kernel/setup.c (0) | 2009.10.02 |
[ setup_arch ] arch/arm/kernel/setup.c (0) | 2009.10.02 |