Changeset 742
- Timestamp:
- Dec 10, 2015, 1:38:43 PM (9 years ago)
- Location:
- soft/giet_vm
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/giet_boot/boot.c
r732 r742 1952 1952 1953 1953 // Each processor get kernel entry virtual address 1954 unsigned int kernel_entry = (unsigned int)&kernel_init_vbase;1954 unsigned int kernel_entry = 0x80000000; 1955 1955 1956 1956 #if BOOT_DEBUG_ELF -
soft/giet_vm/giet_kernel/giet.s
r346 r742 1 1 /************************************************************************************ 2 * GIET: Interruption/Exception/Trap Handler for MIPS32 processor 2 * This file contains the two entry points in the GIET_VM code: 3 * - the _init entry point (from the boot code) is 0x80000000 4 * - the _giet entry point (from user applications) is 0x80000180 5 * => The base address of the segment containing this code MUST be 0x80000000. 3 6 * 4 * The base address of the segment containing this code MUST be 0x80000000, in 5 * order to have the entry point at address 0x80000180!!! All messages are 6 * printed on the TTY corresponding to the task&processor identifiers. 7 * 8 * It uses two arrays of functions: 7 * The _giet uses two arrays of functions: 9 8 * - the _cause_vector[16] array defines the 16 causes to enter the GIET 10 9 * it is initialized in th exc_handler.c file … … 14 13 15 14 .section .giet, "ax", @progbits 16 .space 0x180 15 16 /* 17 * INIT entry point (at address 0x80000000) 18 */ 19 20 .func _init 21 .type _init, %function 22 23 _init: 24 la $26, _kernel_init 25 jr $26 /* jump to _kernel_init */ 26 27 .endfunc 28 .size _init, .-_init 29 30 .space 0x170 /* the _entry function occupies 16 bytes */ 17 31 18 32 /* … … 29 43 addu $26, $26, $27 /* $26 <= &_cause_vector[XCODE] */ 30 44 lw $26, ($26) /* $26 <= _cause_vector[XCODE] */ 31 jr $26 /* Jump indexed by XCODE */45 jr $26 /* Jump to handler indexed by XCODE */ 32 46 33 47 .endfunc … … 35 49 36 50 /* 37 * *** Sys tem Call Handler ***51 * *** Syscall Handler *** 38 52 * 39 53 * A system call is handled as a special function call. -
soft/giet_vm/giet_kernel/kernel.ld
r516 r742 16 16 { 17 17 *(.giet) 18 *(.kinit) 18 19 *(.text) 19 20 } … … 24 25 *(.kdata) 25 26 } 26 27 . = kernel_init_vbase;28 seg_kernel_init :29 {30 *(.kinit)31 }32 27 } 33 28 -
soft/giet_vm/giet_kernel/kernel_init.c
r725 r742 137 137 138 138 //////////////////////////////////////////////////////////////////////////////// 139 // This kernel_init() function completes the kernel initialisation in 5 steps:139 // This _kernel_init() function completes the kernel initialisation in 5 steps: 140 140 // Step 0 is done by processor[0,0,0]. Steps 1 to 4 are executed in parallel 141 141 // by all processors. … … 146 146 // - step 4 : Each processor set sp, sr, ptpr, epc registers values. 147 147 //////////////////////////////////////////////////////////////////////////////// 148 __attribute__((section (".kinit"))) void kernel_init()148 __attribute__((section (".kinit"))) void _kernel_init() 149 149 { 150 150 // gpid : hardware processor index (fixed format: X_WIDTH|Y_WIDTH|P_WIDTH) -
soft/giet_vm/giet_python/mapping.py
r737 r742 623 623 kernel_data_found = False 624 624 kernel_code_found = False 625 kernel_init_found = False626 625 for vseg in self.globs: 627 626 … … 645 644 kernel_code_size = vseg.length 646 645 kernel_code_found = True 647 648 if ( vseg.name[0:15] == 'seg_kernel_init' ):649 kernel_init_vbase = vseg.vbase650 kernel_init_size = vseg.length651 kernel_init_found = True652 646 653 647 # check if all required vsegs have been found … … 672 666 sys.exit() 673 667 674 if ( kernel_init_found == False ):675 print '[genmap error] in giet_vsegs()'676 print ' seg_kernel_init vseg missing'677 sys.exit()678 679 668 # build string 680 669 s = '/* Generated by genmap for %s */\n' % self.name … … 692 681 s += 'kernel_data_vbase = 0x%x;\n' % kernel_data_vbase 693 682 s += 'kernel_data_size = 0x%x;\n' % kernel_data_size 694 s += '\n'695 s += 'kernel_init_vbase = 0x%x;\n' % kernel_init_vbase696 s += 'kernel_init_size = 0x%x;\n' % kernel_init_size697 683 s += '\n' 698 684
Note: See TracChangeset
for help on using the changeset viewer.