a small bug in bootloader

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




I find a small bug in bootloader !
in bootloader/boot.S file:
Codes have a small problem as follows:
 
@ Set up hvbar so hvc comes back here.
     ldr r0, =vectors
     mov r7, #0xfffffff0
     smc #0    @ Set HVBAR
           ........
  
/* Once we get rid of monitor.S,
   use these smc vectors too! */
vectors:
    .word 0 /* reset */
    .word 0 /* undef */
    .word 0 /* svc */
    .word 0 /* pabt */
    .word 0 /* dabt */
    b into_hyp_mode /* hvc */
    .word 0 /* irq */
    .word 0 /* fiq */
            .........
         
let's review the HVBAR register.
         
|31                                             5|4            0|
|      Hyp_Vector_Base_Address      | UNK/SBZP |
         
Now, in our environment, the address of vectors is not
alignment (the last 5 bits is not 0). So, the value we set
to HVBAR is wrong.
For the problem, we can change the codes like this:
          .......
.align 5
vectors:
     .word 0 /* reset */
     .word 0 /* undef */
          .......

--
Regards
Wang Haibin
_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/cucslists/listinfo/kvmarm

[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux