Changeset 316 for soft/giet_vm/giet_boot


Ignore:
Timestamp:
Jun 8, 2014, 4:48:49 PM (10 years ago)
Author:
cfuguet
Message:

boot.c:

  • Initializing Local, Remote and Dirty flags of each pte2 to 1. The goal is to avoid the hardware update mechanism for these flags. This is a performance optimization that can be made because mentioned flags are not exploited by GIET_VM.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_boot/boot.c

    r309 r316  
    412412
    413413        flags = PTE_V;
    414         if (vseg[vseg_id].mode & C_MODE_MASK) flags = flags | PTE_C;
    415         if (vseg[vseg_id].mode & X_MODE_MASK) flags = flags | PTE_X;
    416         if (vseg[vseg_id].mode & W_MODE_MASK) flags = flags | PTE_W;
    417         if (vseg[vseg_id].mode & U_MODE_MASK) flags = flags | PTE_U;
     414        if (vseg[vseg_id].mode & C_MODE_MASK) flags |= PTE_C;
     415        if (vseg[vseg_id].mode & X_MODE_MASK) flags |= PTE_X;
     416        if (vseg[vseg_id].mode & W_MODE_MASK) flags |= PTE_W;
     417        if (vseg[vseg_id].mode & U_MODE_MASK) flags |= PTE_U;
     418       
     419        // These three flags (Local, Remote and Dirty) are set to 1 to reduce
     420        // latency of TLB miss (L/R) and write (D): Avoid hardware update
     421        // mechanism for these flags. This optimization can be performed
     422        // because GIET_VM does nothing with these flags.
     423
     424        flags |= PTE_L;
     425        flags |= PTE_R;
     426        flags |= PTE_D;
    418427
    419428#if BOOT_DEBUG_PT
     
    445454
    446455        flags = PTE_V;
    447         if (vseg[vseg_id].mode & C_MODE_MASK)  flags = flags | PTE_C;
    448         if (vseg[vseg_id].mode & X_MODE_MASK)  flags = flags | PTE_X;
    449         if (vseg[vseg_id].mode & W_MODE_MASK)  flags = flags | PTE_W;
    450         if (vseg[vseg_id].mode & U_MODE_MASK)  flags = flags | PTE_U;
     456        if (vseg[vseg_id].mode & C_MODE_MASK) flags |= PTE_C;
     457        if (vseg[vseg_id].mode & X_MODE_MASK) flags |= PTE_X;
     458        if (vseg[vseg_id].mode & W_MODE_MASK) flags |= PTE_W;
     459        if (vseg[vseg_id].mode & U_MODE_MASK) flags |= PTE_U;
     460
     461        // Flags set for optimization (as explained above)
     462
     463        flags |= PTE_L;
     464        flags |= PTE_R;
     465        flags |= PTE_D;
    451466
    452467#if BOOT_DEBUG_PT
     
    20492064                case PERIPH_TYPE_IOB:    // vci_io_bridge component
    20502065                {
     2066#if 0
    20512067                    // initialize r_xicu_base & r_xicu_size registers
    20522068                    unsigned int base = (unsigned int)&seg_xcu_base;
     
    20732089                        // pseg_base[IOB_IOMMU_ACTIVE] = 1;       
    20742090                    }
     2091#endif
    20752092                    break;
    20762093                }
Note: See TracChangeset for help on using the changeset viewer.