@@ -59,7 +59,7 @@ static size_t kernel_size;
59
59
static bool kernel_32bit ;
60
60
61
61
/* We backup the previous vectors here before copying our own */
62
- static uint8_t old_vectors [0x2000 ];
62
+ static uint8_t old_vectors [EXCEPTION_VECTORS_END ];
63
63
64
64
#ifdef SKIBOOT_GCOV
65
65
void skiboot_gcov_done (void );
@@ -379,9 +379,9 @@ static bool load_kernel(void)
379
379
* If the kernel is at 0, restore it as it was overwritten
380
380
* by our vectors.
381
381
*/
382
- if (kernel_entry < 0x2000 ) {
382
+ if (kernel_entry < EXCEPTION_VECTORS_END ) {
383
383
cpu_set_sreset_enable (false);
384
- memcpy (NULL , old_vectors , 0x2000 );
384
+ memcpy (NULL , old_vectors , EXCEPTION_VECTORS_END );
385
385
sync_icache ();
386
386
}
387
387
} else {
@@ -739,14 +739,16 @@ void copy_exception_vectors(void)
739
739
/* Backup previous vectors as this could contain a kernel
740
740
* image.
741
741
*/
742
- memcpy (old_vectors , NULL , 0x2000 );
742
+ memcpy (old_vectors , NULL , EXCEPTION_VECTORS_END );
743
743
744
- /* Copy from 0x100 to 0x2000 , avoid below 0x100 as this is
745
- * the boot flag used by CPUs still potentially entering
744
+ /* Copy from 0x100 to EXCEPTION_VECTORS_END , avoid below 0x100 as
745
+ * this is the boot flag used by CPUs still potentially entering
746
746
* skiboot.
747
747
*/
748
- BUILD_ASSERT ((& reset_patch_end - & reset_patch_start ) < 0x1f00 );
749
- memcpy ((void * )0x100 , (void * )(SKIBOOT_BASE + 0x100 ), 0x1f00 );
748
+ BUILD_ASSERT ((& reset_patch_end - & reset_patch_start ) <
749
+ EXCEPTION_VECTORS_END - 0x100 );
750
+ memcpy ((void * )0x100 , (void * )(SKIBOOT_BASE + 0x100 ),
751
+ EXCEPTION_VECTORS_END - 0x100 );
750
752
sync_icache ();
751
753
}
752
754
0 commit comments