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

Re: [Xen-devel] [PATCH RFC 8/8] xen/arm: Some early trap logging



On 09/13/2013 02:35 PM, Ian Campbell wrote:
> On Fri, 2013-09-13 at 14:26 +0100, Julien Grall wrote:
>> On 09/10/2013 03:18 PM, Ian Campbell wrote:
>>> Not for really for application, might be useful to someone?
>>
>> I think it could be useful for early debugging on new platform or until
>> init_traps initialized the correct handlers.
> 
> True. Perhaps only if debug=y?

Sounds good.

>> Can you update this patch with more information about the trap (reset,
>> undefined, ...)?
> 
> I will at some point, although not with too much urgency.

Ok. So with the modification above, I'm ok for this patch.

>>>
>>> Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
>>> ---
>>>  xen/arch/arm/arm32/head.S |   15 +++++++++++++++
>>>  1 file changed, 15 insertions(+)
>>>
>>> diff --git a/xen/arch/arm/arm32/head.S b/xen/arch/arm/arm32/head.S
>>> index 79e95b6..06d53ad 100644
>>> --- a/xen/arch/arm/arm32/head.S
>>> +++ b/xen/arch/arm/arm32/head.S
>>> @@ -366,6 +366,9 @@ paging:
>>>          bne   1b
>>>  
>>>  launch:
>>> +        adr   r0, early_trap_vector
>>> +        mcr   CP32(r0, VBAR_EL2)
>>> +        
>>>          ldr   r0, =init_stack        /* Find the boot-time stack */
>>>          ldr   sp, [r0]
>>>          add   sp, #STACK_SIZE        /* (which grows down from the top). */
>>> @@ -376,12 +379,24 @@ launch:
>>>          beq   start_xen              /* and disappear into the land of C */
>>>          b     start_secondary        /* (to the appropriate entry point) */
>>>  
>>> +trap_early:
>>> +        PRINT("\r\nEARLY TRAP\r\n")
>>>  /* Fail-stop
>>>   * r0: string explaining why */
>>>  fail:   PRINT("- Boot failed -\r\n")
>>>  1:      wfe
>>>          b     1b
>>>  
>>> +        .align 5
>>> +early_trap_vector:
>>> +        .word 0                         /* 0x00 - Reset */
>>> +        b trap_early                    /* 0x04 - Undefined Instruction */
>>> +        b trap_early                    /* 0x08 - Supervisor Call */
>>> +        b trap_early                    /* 0x0c - Prefetch Abort */
>>> +        b trap_early                    /* 0x10 - Data Abort */
>>> +        b trap_early                    /* 0x14 - Hypervisor */
>>> +        b trap_early                    /* 0x18 - IRQ */
>>> +        b trap_early                    /* 0x1c - FIQ */
>>>  
>>>  #ifdef EARLY_PRINTK
>>>  /* Bring up the UART.
>>>
>>
>>
> 
> 


-- 
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.