Changeset 230
- Timestamp:
- Feb 22, 2013, 4:03:48 PM (12 years ago)
- Location:
- soft/giet_vm
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/boot/boot_init.c
r228 r230 740 740 741 741 // get physical segment pointer 742 mapping_pseg_t * pseg = boot_pseg_get(vseg->psegid);742 mapping_pseg_t * pseg = boot_pseg_get(vseg->psegid); 743 743 744 744 // compute vseg physical base address … … 757 757 // loop on vobjs contained in vseg to : 758 758 // (1) computes the length of the vseg, 759 // (2) initiali se the vaddr and paddr fields of all vobjs,760 // (3) initiali se the page table pointers arrays759 // (2) initialize the vaddr and paddr fields of all vobjs, 760 // (3) initialize the page table pointers arrays 761 761 762 762 cur_vaddr = vseg->vbase; … … 766 766 if (vobj[vobj_id].align) { 767 767 cur_paddr = align_to(cur_paddr, vobj[vobj_id].align); 768 cur_vaddr = align_to(cur_vaddr, vobj[vobj_id].align); 768 769 } 769 770 // set vaddr/paddr for current vobj 770 771 vobj[vobj_id].vaddr = cur_vaddr; 771 772 vobj[vobj_id].paddr = cur_paddr; 772 773 773 774 // initialise boot_ptabs_vaddr[] if current vobj is a PTAB 774 775 if (vobj[vobj_id].type == VOBJ_TYPE_PTAB) { … … 1191 1192 boot_puts(" / paddr = "); 1192 1193 boot_putx(vobj[vobj_id].paddr); 1194 boot_puts(" / vaddr = "); 1195 boot_putx(vobj[vobj_id].vaddr); 1193 1196 boot_puts(" / length = "); 1194 1197 boot_putx(vobj[vobj_id].length); 1198 boot_puts(" / buffer = "); 1199 boot_putx(memspace->buffer); 1200 boot_puts(" / size = "); 1201 boot_putx(memspace->size); 1195 1202 boot_puts("\n"); 1196 1203 #endif 1197 1204 break; 1198 1205 } 1199 case VOBJ_TYPE_PTAB: // nothing to initiali se1206 case VOBJ_TYPE_PTAB: // nothing to initialize 1200 1207 { 1201 1208 ptab_found = 1; … … 1211 1218 case VOBJ_TYPE_CONST: 1212 1219 { 1220 unsigned int *addr = (unsigned int *) vobj[vobj_id].paddr; 1221 *addr = vobj[vobj_id].init; 1213 1222 #if BOOT_DEBUG_VOBJS 1214 1223 boot_puts("CONST : "); … … 1217 1226 boot_putx(vobj[vobj_id].paddr); 1218 1227 boot_puts(" / init = "); 1219 boot_putx( vobj[vobj_id].init);1228 boot_putx(*addr); 1220 1229 boot_puts("\n"); 1221 1230 #endif 1222 unsigned int *addr = (unsigned int *) vobj[vobj_id].paddr;1223 *addr = vobj[vobj_id].init;1224 1231 break; 1225 1232 } … … 1228 1235 boot_puts("\n[INIT ERROR] illegal vobj type: "); 1229 1236 boot_putd(vobj[vobj_id].type); 1230 boot_puts("\n 1237 boot_puts("\n"); 1231 1238 boot_exit(); 1232 1239 } -
soft/giet_vm/libs/libsrl/srl_args.h
r228 r230 7 7 #define SRL_GET_BARRIER(port) (srl_barrier_t) APP_GET_ARG(port, VOBJ_TYPE_BARRIER) 8 8 #define SRL_GET_LOCK(port) APP_GET_ARG(port, VOBJ_TYPE_LOCK) 9 #define SRL_GET_CONST(port) APP_GET_ARG(port, VOBJ_TYPE_CONST)10 9 #define SRL_GET_MEMSPACE(port) (srl_memspace_t) APP_GET_ARG(port, VOBJ_TYPE_MEMSPACE) 11 10 … … 14 13 ({ \ 15 14 unsigned int vbase; \ 16 if (giet_vobj_get_vbase(APP_NAME , a lias_##task_name.port, type, &vbase))\15 if (giet_vobj_get_vbase(APP_NAME , args->port, type, &vbase)) \ 17 16 { \ 18 17 srl_log_printf(NONE, "\n[ERROR] in "#task_name" task :\n"); \ 19 18 srl_log_printf(NONE, " undefined port <"#port"> for channel \"%s\": %x\n", \ 20 a lias_##task_name.port, vbase);\19 args->port, vbase); \ 21 20 srl_log_printf(TRACE, "*** &"#port" = %x\n\n", vbase); \ 22 21 srl_exit(); \ … … 29 28 30 29 30 #define SRL_GET_CONST(port) \ 31 ({ \ 32 unsigned int vbase; \ 33 if (giet_vobj_get_vbase(APP_NAME, args->port, VOBJ_TYPE_CONST, &vbase)) { \ 34 srl_log_printf(NONE, "\n[ERROR] in some task :\n"); \ 35 srl_log_printf(NONE, " undefined port <"#port"> for channel \"%s\": %x\n", \ 36 args->port, vbase); \ 37 srl_log_printf(TRACE, "*** &"#port" = %x\n\n", vbase); \ 38 srl_exit(); \ 39 } \ 40 else \ 41 srl_log_printf(TRACE, "%s:%d: arg of %s, from %s; &"#port" = %x\n\n", \ 42 __FILE__, __LINE__, APP_NAME, #port, vbase); \ 43 *(int *) vbase; \ 44 }) 45 31 46 32 47 #endif -
soft/giet_vm/sys/sys_handler.c
r229 r230 148 148 unsigned int vobj_id; 149 149 150 151 150 // scan vspaces 152 151 for (vspace_id = 0; vspace_id < header->vspaces; vspace_id++) { … … 162 161 _puts("*** Error in _get_obj: wrong type\n"); 163 162 _release_lock(&_tty_put_lock); 164 return -1; // wrong type163 return -1; // wrong type 165 164 } 166 165 *res_vobj = &vobj[vobj_id]; -
soft/giet_vm/xml/xml_parser.c
r228 r230 777 777 const char * tag = (const char *) xmlTextReaderConstName(reader); 778 778 779 if (strcmp(tag, "vseg") == 0) {779 if (strcmp(tag, "vseg") == 0) { 780 780 vsegNode(reader); 781 781 } 782 else if (strcmp(tag, "task") == 0) {782 else if (strcmp(tag, "task") == 0) { 783 783 taskNode(reader); 784 784 } 785 else if (strcmp(tag, "#text") == 0 786 else if (strcmp(tag, "#comment") == 0 787 else if (strcmp(tag, "vspace") == 0 785 else if (strcmp(tag, "#text") == 0) { } 786 else if (strcmp(tag, "#comment") == 0) { } 787 else if (strcmp(tag, "vspace") == 0) { 788 788 vspace[vspace_index]->vobjs = vobj_loc_index; 789 789 vspace[vspace_index]->tasks = task_loc_index ;
Note: See TracChangeset
for help on using the changeset viewer.