Changeset 255 for soft/giet_vm/xml


Ignore:
Timestamp:
Oct 9, 2013, 9:32:41 AM (11 years ago)
Author:
meunier
Message:
  • Added a syscall and some user functions to manipulate the Simulation Helper
  • Changed the the way the Vseg -> Pseg mapping is made during the boot to better utilize the address space (+ adaptation of the algorithm in memo)
  • Fixed a bug in boot_init (vobj_init): the vobj initialization could only be made for the first application (ptpr was not changed)
Location:
soft/giet_vm/xml
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/xml/mapping_info.h

    r253 r255  
    106106    PERIPH_TYPE_GCD       = 10,
    107107    PERIPH_TYPE_XCU       = 11,
    108 
    109     PERIPH_TYPE_MAX_VALUE = 12,
     108    PERIPH_TYPE_SIM       = 12,
     109
     110    PERIPH_TYPE_MAX_VALUE = 13,
    110111};
    111112
     
    142143    unsigned int iob_cluster;        // index of cluster containing IOB controler
    143144    unsigned int iob_cluster_bis;    // index of cluster containing second IOB controler
     145    unsigned int sim_cluster;        // index of cluster containing the Simulation Helper
     146    unsigned int sim_cluster_bis;    // index of cluster containing the Simulation Helper
    144147
    145148    unsigned int psegs;              // total number of physical segments (for all clusters)
     
    182185    unsigned int type;           // RAM / ROM / PERI
    183186    unsigned int cluster;        // index of cluster containing pseg
    184     paddr_t      next_base;      // first free page base address
    185187} mapping_pseg_t;
    186188
     
    206208    unsigned int vbase;          // base address in virtual space
    207209    paddr_t      pbase;          // base address in physical space
     210    unsigned int pbase_set;
    208211    unsigned int length;         // size (bytes)
    209212    unsigned int psegid;         // physical segment global index
     
    234237
    235238/////////////////////////////
    236 typedef struct __attribute__((packed))  mapping_vobj_s 
     239typedef struct __attribute__((packed))  mapping_vobj_s
    237240{
    238241    char         name[32];       // vobj name (unique in a vspace)
  • soft/giet_vm/xml/xml_parser.c

    r253 r255  
    748748    ////////// set vobj_offset attributes
    749749    vseg[vseg_index]->vobj_offset = vobj_index;
     750    // Init pbase_set to false
     751    vseg[vseg_index]->pbase_set = 0;
    750752
    751753#if XML_PARSER_DEBUG
     
    12731275            }
    12741276        }
     1277        else if (strcmp(str, "SIM") == 0)
     1278        {
     1279            periph[periph_index]->type = PERIPH_TYPE_SIM;
     1280            if (header->sim_cluster == 0xFFFFFFFF) 
     1281            {
     1282                header->sim_cluster = cluster_index;
     1283            }
     1284            else if (header->sim_cluster_bis == 0xFFFFFFFF)
     1285            {
     1286                header->sim_cluster_bis = cluster_index;
     1287            }
     1288            else
     1289            {
     1290                error = 1;
     1291            }
     1292        }
    12751293        // The TIM, ICU, XICU, DMA, MEMC peripherals are replicated in all clusters
    12761294        // but it must exist only one component of each type per cluster
     
    20862104    header->cma_cluster = 0xFFFFFFFF;
    20872105    header->iob_cluster = 0xFFFFFFFF;
     2106    header->sim_cluster = 0xFFFFFFFF;
    20882107    header->tty_cluster_bis = 0xFFFFFFFF;
    20892108    header->nic_cluster_bis = 0xFFFFFFFF;
     
    20922111    header->cma_cluster_bis = 0xFFFFFFFF;
    20932112    header->iob_cluster_bis = 0xFFFFFFFF;
     2113    header->sim_cluster_bis = 0xFFFFFFFF;
    20942114
    20952115    ///////// set signature
     
    21622182    }
    21632183
    2164     //#if XML_PARSER_DEBUG
     2184    #if XML_PARSER_DEBUG
    21652185    printf("%s\n", file_path);
    2166     //#endif
     2186    #endif
    21672187
    21682188    return fdout;
     
    24242444    ld_write(fdout, "seg_iob_base            ",   periph_vbase_array[PERIPH_TYPE_IOB]);
    24252445    ld_write(fdout, "seg_gcd_base            ",   periph_vbase_array[PERIPH_TYPE_GCD]);
     2446    ld_write(fdout, "seg_sim_base            ",   periph_vbase_array[PERIPH_TYPE_SIM]);
    24262447
    24272448    file_write(fdout, "\n");
Note: See TracChangeset for help on using the changeset viewer.