@@ -200,30 +200,34 @@ static int check_memory_ranges()
200200static void load_wolfboot (void )
201201{
202202 size_t wolfboot_size , bss_size ;
203+ uint32_t wolfboot_start ;
203204
204205 if (check_memory_ranges () != 0 ) {
205206 wolfBoot_printf ("wolfboot overlaps with loader data...stop" ENDLINE );
206207 panic ();
207208 }
208209
209- wolfBoot_printf ("loading wolfboot at %x..." ENDLINE ,
210- (uint32_t )WOLFBOOT_LOAD_BASE - IMAGE_HEADER_SIZE );
210+ wolfboot_start = (uint32_t )WOLFBOOT_LOAD_BASE - IMAGE_HEADER_SIZE ;
211211 wolfboot_size = _wolfboot_flash_end - _wolfboot_flash_start ;
212- memcpy ((uint8_t * )WOLFBOOT_LOAD_BASE - IMAGE_HEADER_SIZE ,
213- _wolfboot_flash_start , wolfboot_size );
212+ x86_log_memory_load (wolfboot_start , wolfboot_start + wolfboot_size ,
213+ "wolfboot" );
214+ memcpy ((uint8_t * )wolfboot_start ,_wolfboot_flash_start , wolfboot_size );
214215 bss_size = wb_end_bss - wb_start_bss ;
216+ x86_log_memory_load ((uint32_t )(uintptr_t )wb_start_bss ,
217+ (uint32_t )(uintptr_t )(wb_start_bss + bss_size ),
218+ "wolfboot .bss" );
215219 memset (wb_start_bss , 0 , bss_size );
216220 wolfBoot_printf ("load wolfboot end" ENDLINE );
217221}
218222
219223static void load_fsp_s_to_ram (void )
220224{
221225 size_t fsp_s_size ;
222- wolfBoot_printf ( "loading FSP_S at %x..." ENDLINE ,
223- ( uint32_t )( FSP_S_LOAD_BASE - IMAGE_HEADER_SIZE )) ;
226+ uint32_t fsp_start ;
227+ fsp_start = FSP_S_LOAD_BASE - IMAGE_HEADER_SIZE ;
224228 fsp_s_size = _end_fsp_s - _fsp_s_hdr ;
225- memcpy (( uint8_t * ) FSP_S_LOAD_BASE - IMAGE_HEADER_SIZE ,
226- _fsp_s_hdr , fsp_s_size );
229+ x86_log_memory_load ( fsp_start , fsp_start + fsp_s_size , "FSPS" );
230+ memcpy (( uint8_t * ) fsp_start , _fsp_s_hdr , fsp_s_size );
227231}
228232
229233/*!
@@ -252,8 +256,8 @@ static void jump_into_wolfboot(void)
252256 uint32_t cr3 ;
253257 int ret ;
254258
255- wolfBoot_printf ( "building identity map at %x...\r\n" ,
256- ( uint32_t ) params -> page_table );
259+ x86_log_memory_load (( uint32_t )( uintptr_t ) params -> page_table , params -> page_table + x86_paging_get_page_table_size () ,
260+ "IdentityPageTablePage" );
257261 ret = x86_paging_build_identity_mapping (MEMORY_4GB ,
258262 (uint8_t * )(uintptr_t )params -> page_table );
259263 if (ret != 0 ) {
@@ -334,11 +338,15 @@ static inline void memory_init_data_bss(void)
334338{
335339 uint32_t * datamem_p ;
336340 uint32_t * dataflash_p ;
341+ x86_log_memory_load ((uint32_t )(uintptr_t )_start_data ,
342+ (uint32_t )(uintptr_t )_end_data , "stage1 .data" );
337343 datamem_p = (uint32_t * )_start_data ;
338344 dataflash_p = (uint32_t * )_stored_data ;
339345 while (datamem_p < (uint32_t * )_end_data ) {
340346 * (datamem_p ++ ) = * (dataflash_p ++ );
341347 }
348+ x86_log_memory_load ((uint32_t )(uintptr_t )_start_bss ,
349+ (uint32_t )(uintptr_t )_end_bss , "stage1 .bss" );
342350 memset (_start_bss , 0 , (_end_bss - _start_bss ));
343351}
344352
@@ -696,6 +704,7 @@ void start(uint32_t stack_base, uint32_t stack_top, uint64_t timestamp,
696704 stage2_params -> tpm_policy_size );
697705#endif
698706
707+ wolfBoot_printf ("TOLUM: 0x%x\r\n" , stage2_params -> tolum );
699708 /* change_stack_and_invoke() never returns.
700709 *
701710 * Execution here is eventually transferred to memory_ready_entry
0 commit comments