- Timestamp:
- Jul 30, 2012, 6:14:22 PM (12 years ago)
- Location:
- soft/giet_vm/memo
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/memo/Makefile
r173 r187 9 9 INCLUDES = -Iinclude/libelfpp -Iinclude/libelfpp/elfpp -Iinclude/ -I../xml 10 10 memo.x: $(SRCS) $(HDRS) 11 g++ -Wall -g $(SRCS) $(INCLUDES) -o memo.x 11 #g++ -Wall -g $(SRCS) $(INCLUDES) -o memo.x 12 g++ -Wall -g -DDISTRIBUTED_SCHEDULERS $(SRCS) $(INCLUDES) -o memo.x 12 13 13 14 debug: $(SRCS) $(HDRS) -
soft/giet_vm/memo/include/memo.h
r173 r187 96 96 97 97 //The following functions handle the map.bin structure 98 //inspired from the boot_handler.c of the GIET 98 //inspired from the boot_init.c of the GIET 99 mapping_cluster_t* get_cluster_base( mapping_header_t* header ); 99 100 mapping_pseg_t* get_pseg_base( mapping_header_t* header ); 100 101 mapping_vspace_t* get_vspace_base( mapping_header_t* header ); … … 102 103 mapping_vobj_t* get_vobj_base( mapping_header_t* header ); 103 104 void print_mapping_info(void* desc); 104 void pseg_map( mapping_pseg_t* pseg);105 105 void vseg_map( mapping_vseg_t* vseg); 106 106 void buildMap(void* desc); -
soft/giet_vm/memo/src/memo.cpp
r173 r187 39 39 #include "memo.h" 40 40 41 //#define MOVER_DEBUG 41 //#define MOVER_DEBUG 42 42 43 43 MeMo::MeMo( const std::string &filename, … … 203 203 // various mapping_info data structure access functions 204 204 ///////////////////////////////////////////////////////////////////////////// 205 205 mapping_cluster_t* MeMo::get_cluster_base( mapping_header_t* header ) 206 { 207 return (mapping_cluster_t*) ((char*)header + 208 MAPPING_HEADER_SIZE); 209 } 206 210 ///////////////////////////////////////////////////////////////////////////// 207 211 mapping_pseg_t* MeMo::get_pseg_base( mapping_header_t* header ) … … 332 336 } // end print_mapping_info() 333 337 334 //////////////////////////////////////////335 void MeMo::pseg_map( mapping_pseg_t* pseg)336 {337 std::string name(pseg->name);338 m_psegh.m_pSegs.push_back(PSeg(name, pseg->base, pseg->length));339 }340 341 338 342 339 ////////////////////////////////////////// … … 536 533 mapping_header_t* header = (mapping_header_t*)desc; 537 534 535 mapping_cluster_t* cluster = get_cluster_base( header ); 538 536 mapping_vspace_t* vspace = get_vspace_base( header ); 539 537 mapping_pseg_t* pseg = get_pseg_base( header ); … … 546 544 #endif 547 545 548 for ( size_t pseg_id = 0 ; pseg_id < header->psegs ; pseg_id++ ) 549 { 550 pseg_map( &pseg[pseg_id]); 546 #ifdef DISTRIBUTED_SCHEDULERS 547 char found; 548 #endif 549 550 for ( size_t cluster_id = 0 ; cluster_id < header->clusters ; cluster_id++ ) 551 { 552 553 #ifdef DISTRIBUTED_SCHEDULERS 554 found = 0; 555 #endif 556 557 for ( size_t pseg_id = cluster[cluster_id].pseg_offset ; 558 pseg_id < cluster[cluster_id].pseg_offset + cluster[cluster_id].psegs ; 559 pseg_id++ ) 560 { 561 //build pseg 562 std::string name(pseg[pseg_id].name); 563 PSeg *ps = new PSeg(name, pseg[pseg_id].base, pseg[pseg_id].length); 564 565 #ifdef DISTRIBUTED_SCHEDULERS 566 if ( (pseg[pseg_id].type == PSEG_TYPE_RAM) && (found == 0) ) 567 { 568 ps->incNextLma( (cluster[cluster_id].procs << 12) ); 569 found = 1; 570 } 571 #endif 572 m_psegh.m_pSegs.push_back(*ps); 573 574 } 551 575 } 552 576
Note: See TracChangeset
for help on using the changeset viewer.