Changeset 407 for trunk/tools/bootloader_tsar
- Timestamp:
- Nov 7, 2017, 3:08:12 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/bootloader_tsar/boot.c
r401 r407 807 807 } 808 808 809 boot_printf("\n[BOOT] core[%x,%d] loaded boot_info at cycle %d\n",809 boot_printf("\n[BOOT] core[%x,%d] loaded arch_info at cycle %d\n", 810 810 cxy , lid , boot_get_proctime() ); 811 811 … … 901 901 902 902 // display address extensions 903 uint32_t cp2_data_ext;904 uint32_t cp2_ins_ext;905 asm volatile( "mfc2 %0, $24" : "=&r" (cp2_data_ext) );906 asm volatile( "mfc2 %0, $25" : "=&r" (cp2_ins_ext) );907 boot_printf("\n[BOOT] core[%x,%d] CP2_DATA_EXT = %x / CP2_INS_EXT = %x\n",908 903 // uint32_t cp2_data_ext; 904 // uint32_t cp2_ins_ext; 905 // asm volatile( "mfc2 %0, $24" : "=&r" (cp2_data_ext) ); 906 // asm volatile( "mfc2 %0, $25" : "=&r" (cp2_ins_ext) ); 907 // boot_printf("\n[BOOT] core[%x,%d] CP2_DATA_EXT = %x / CP2_INS_EXT = %x\n", 908 // cxy , lid , cp2_data_ext , cp2_ins_ext ); 909 909 910 910 // Wait until all local cores in cluster ready … … 930 930 931 931 // display address extensions 932 uint32_t cp2_data_ext;933 uint32_t cp2_ins_ext;934 asm volatile( "mfc2 %0, $24" : "=&r" (cp2_data_ext) );935 asm volatile( "mfc2 %0, $25" : "=&r" (cp2_ins_ext) );936 boot_printf("\n[BOOT] core[%x,%d] CP2_DATA_EXT = %x / CP2_INS_EXT = %x\n",937 932 // uint32_t cp2_data_ext; 933 // uint32_t cp2_ins_ext; 934 // asm volatile( "mfc2 %0, $24" : "=&r" (cp2_data_ext) ); 935 // asm volatile( "mfc2 %0, $25" : "=&r" (cp2_ins_ext) ); 936 // boot_printf("\n[BOOT] core[%x,%d] CP2_DATA_EXT = %x / CP2_INS_EXT = %x\n", 937 // cxy , lid , cp2_data_ext , cp2_ins_ext ); 938 938 939 939 // Wait until all local cores in cluster ready … … 941 941 } 942 942 943 // Ech core compute stack pointer to the kernel idle-thread descriptor. 943 // Each core initialise the following registers before jumping to kernel: 944 // - sp_29 : stack pointer on idle thread, 945 // - c0_sr : reset BEV bit 946 // - a0_04 : pointer on boot_info structure 947 // - c0_ebase : kentry_base(and jump to kernel_entry. 948 944 949 // The array of idle-thread descriptors is allocated in the kdata segment, 945 950 // just after the boot_info structure 946 947 951 uint32_t sp; 948 952 uint32_t base; … … 951 955 uint32_t psize = CONFIG_PPM_PAGE_SIZE; 952 956 953 954 957 // compute base address of idle thread descriptors array 955 958 if( offset & pmask ) base = seg_kdata_base + (offset & ~pmask) + psize; … … 959 962 sp = base + ((lid + 1) * CONFIG_THREAD_DESC_SIZE) - 16; 960 963 961 // Each cores initialise stack pointer,962 // reset the BEV bit in status register,963 // register "boot_info" argument in a0,964 // and jump to kernel_entry.965 964 asm volatile( "mfc0 $27, $12 \n" 966 965 "lui $26, 0xFFBF \n" … … 970 969 "move $4, %0 \n" 971 970 "move $29, %1 \n" 972 "jr %2 \n" 973 :: "r"(boot_info) , "r"(sp) , "r"(kernel_entry) ); 971 "mtc0 %2, $15, 1 \n" 972 "jr %3 \n" 973 :: "r"(boot_info) , 974 "r"(sp) , 975 "r"(boot_info->kentry_base), 976 "r"(kernel_entry) ); 974 977 975 978 } // boot_loader()
Note: See TracChangeset
for help on using the changeset viewer.