Changeset 44d0758 in mainline


Ignore:
Timestamp:
2006-11-22T18:35:17Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
aca95f6b
Parents:
eb353b3
Message:

Add option to compile the sparc64 kernel without the TTE_CV bit support.
The bit is not used by default now.
Enabling it may theoretically lead to physical memory inconsistencies until code that
mitigates the problem is written.

Location:
kernel
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • kernel/Makefile

    reb353b3 r44d0758  
    9090ifeq ($(CONFIG_NS16550),y)
    9191        DEFS += -DCONFIG_NS16550
     92endif
     93
     94ifeq ($(CONFIG_VIRT_IDX_CACHE),y)
     95        DEFS += -DCONFIG_VIRT_IDX_CACHE
    9296endif
    9397
  • kernel/arch/sparc64/src/mm/tlb.c

    reb353b3 r44d0758  
    112112        data.l = locked;
    113113        data.cp = cacheable;
     114#ifdef CONFIG_VIRT_IDX_CACHE
    114115        data.cv = cacheable;
     116#endif /* CONFIG_VIRT_IDX_CACHE */
    115117        data.p = true;
    116118        data.w = true;
     
    147149        data.l = false;
    148150        data.cp = t->c;
     151#ifdef CONFIG_VIRT_IDX_CACHE
    149152        data.cv = t->c;
     153#endif /* CONFIG_VIRT_IDX_CACHE */
    150154        data.p = t->k;          /* p like privileged */
    151155        data.w = ro ? false : t->w;
     
    181185        data.l = false;
    182186        data.cp = t->c;
     187#ifdef CONFIG_VIRT_IDX_CACHE
    183188        data.cv = t->c;
     189#endif /* CONFIG_VIRT_IDX_CACHE */
    184190        data.p = t->k;          /* p like privileged */
    185191        data.w = false;
  • kernel/arch/sparc64/src/mm/tsb.c

    reb353b3 r44d0758  
    101101        tsb->data.pfn = t->frame >> PAGE_WIDTH;
    102102        tsb->data.cp = t->c;
     103#ifdef CONFIG_VIRT_IDX_CACHE
    103104        tsb->data.cv = t->c;
     105#endif /* CONFIG_VIRT_IDX_CACHE */
    104106        tsb->data.p = t->k;             /* p as privileged */
    105107        tsb->data.v = t->p;
     
    141143        tsb->data.pfn = t->frame >> PAGE_WIDTH;
    142144        tsb->data.cp = t->c;
     145#ifdef CONFIG_VIRT_IDX_CACHE
    143146        tsb->data.cv = t->c;
     147#endif /* CONFIG_VIRT_IDX_CACHE */
    144148        tsb->data.p = t->k;             /* p as privileged */
    145149        tsb->data.w = ro ? false : t->w;
  • kernel/arch/sparc64/src/start.S

    reb353b3 r44d0758  
    123123        membar #Sync
    124124
     125#ifdef CONFIG_VIRT_IDX_CACHE
     126#define TTE_LOW_DATA(imm)       (TTE_CP | TTE_CV | TTE_P | LMA | (imm))
     127#else /* CONFIG_VIRT_IDX_CACHE */
     128#define TTE_LOW_DATA(imm)       (TTE_CP | TTE_P | LMA | (imm))
     129#endif /* CONFIG_VIRT_IDX_CACHE */
     130
    125131#define SET_TLB_DATA(r1, r2, imm) \
    126         set TTE_CV | TTE_CP | TTE_P | LMA | imm, %r1; \
     132        set TTE_LOW_DATA(imm), %r1; \
    127133        or %r1, %l5, %r1; \
    128134        mov PAGESIZE_4M, %r2; \
     
    349355.global kernel_8k_tlb_data_template
    350356kernel_8k_tlb_data_template:
    351         .quad ((1 << TTE_V_SHIFT) | TTE_CV | TTE_CP | TTE_P | TTE_W)
     357#ifdef CONFIG_VIRT_IDX_CACHE
     358        .quad ((1 << TTE_V_SHIFT) | (PAGESIZE_8K << TTE_SIZE_SHIFT) | TTE_CP | TTE_CV | TTE_P | TTE_W)
     359#else /* CONFIG_VIRT_IDX_CACHE */
     360        .quad ((1 << TTE_V_SHIFT) | (PAGESIZE_8K << TTE_SIZE_SHIFT) | TTE_CP | TTE_P | TTE_W)
     361#endif /* CONFIG_VIRT_IDX_CACHE */
  • kernel/kernel.config

    reb353b3 r44d0758  
    9999
    100100# Virtually indexed cache support
    101 ! [ARCH=sparc64] CONFIG_VIRT_IDX_SUPPORT (n/y)
     101! [ARCH=sparc64] CONFIG_VIRT_IDX_CACHE (n/y)
    102102
    103103
Note: See TracChangeset for help on using the changeset viewer.