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

Re: [Xen-devel] [PATCH 3/4] xen: set the right flags when enabling interrupts for 8250



在 2013-7-26,20:01,Julien Grall <julien.grall@xxxxxxxxxx> 写道:

> On 07/26/2013 12:01 PM, Chen Baozi wrote:
>> 
>> On Jul 26, 2013, at 6:42 PM, Julien Grall <julien.grall@xxxxxxxxxx> wrote:
>> 
>>> On 07/26/2013 04:31 AM, Chen Baozi wrote:
>>>> 
>>>> On Jul 26, 2013, at 9:14 AM, Chen Baozi <baozich@xxxxxxxxx> wrote:
>>>> 
>>>>> 
>>>>> On Jul 25, 2013, at 8:33 PM, Julien Grall <julien.grall@xxxxxxxxxx> wrote:
>>>>> 
>>>>>> On 07/25/2013 12:31 PM, Chen Baozi wrote:
>>>>>>> 
>>>>>>> On Jul 25, 2013, at 7:17 PM, Julien Grall <julien.grall@xxxxxxxxxx> 
>>>>>>> wrote:
>>>>>>> 
>>>>>>>> On 07/25/2013 10:14 AM, Chen Baozi wrote:
>>>>>>>> 
>>>>>>>>> Besides this test, I noticed that we set a timer to poll UART after 
>>>>>>>>> enabling
>>>>>>>>> the interrupt. And the timer initialization codes are platform 
>>>>>>>>> specific, which
>>>>>>>>> should be implemented in xen/arch/arm/platforms/omap5.c for example. 
>>>>>>>>> However,
>>>>>>>>> I haven't done this yet. (I used to plan to turn to this work after 
>>>>>>>>> UART porting
>>>>>>>>> has been done.) Is it a possible factor that may cause my issues?
>>>>>>>> 
>>>>>>>> Xen uses the arch timers to handle the time. On some platform (for
>>>>>>>> instance the Arndale), it's not enabled by default.
>>>>>>>> 
>>>>>>>> If the omap5 boot with the arch timers enabled, you don't need to
>>>>>>>> implement the init_time callback.
>>>>>>>> 
>>>>>>>> Do you know if Xen receives timer interrupts?
>>>>>>> 
>>>>>>> Any way that I could confirm this?
>>>>>>> 
>>>>>>> There is a line of boot message:
>>>>>>> 
>>>>>>> "Using generic timer at 0 KHz."
>>>>>> 
>>>>>> It seems the arch timer is not configured/enabled. Do you know if U-boot
>>>>>> enables it?
>>>>> 
>>>>> I could see clocks.c/clocks.o in its u-boot sources, but I don't think 
>>>>> U-boot has already enabled it, for I could read such lines from Linux 
>>>>> kernel boot messages:
>>> 
>>> Are you trying to boot Linux on bare metal or as dom0?
>> 
>> bare metal.
>> 
>>> 
>>>>> """
>>>>> OMAP clockevent source: GPTIMER1 at 32768 Hz
>>>>> sched_clock: 32 bits at 32kHz, resolution 30517ns, wraps every 131071999s
>>>>> OMAP clocksource: 32k_counter at 32768 Hz
>>>>> arch_timer: No interrupt available, giving up
>>> 
>>> Do you have a "arm,armv7-timer" compatible node in your DTS with
>>> interrupts? Here Linux can't find an appropriate interrupt.
>> 
>> You reminds me that the DTS shipped along with the board has issues on 
>> "arm,armv7-timer". I have corrected it for xen but leave the bare metal 
>> booting dtb the original status.
>> 
>>> 
>>>>> omap5_realtime_timer_init: arch_timer_register failed -22
>>>>> 
>>>>>> 
>>>>>> It's not clear to me, how you need to implement init_time. Do you have a
>>>>>> datasheet with the board? If yes, is there a section for the section 
>>>>>> timer?
>>>>> 
>>>>> Yes, TI has published an 49.6MB Technical Reference Manual online with 88 
>>>>> pages section about timer.
>>>> 
>>>> Wait. I think I might make a mistake. The "arch timer" is different from 
>>>> "timer" as devices, right? The timer section in Technical Reference Manual 
>>>> seems to be the latter one, for it is  connect to the Level-4 interconnect 
>>>> of OMAP5432 and described as "ti,omap5430-timer" in DTS. I think the "arch 
>>>> timer" you mentioned should refer to "arm,armv7-timer", right?
>>> 
>>> By "arch timer" I mean "arm,armv7-timer".
>> 
>> Thanks. So I think the codes to start with it is 
>> linux/drivers/clocksource/arm_arch_timer.c: arch_timer_init(). The 
>> linux/arch/arm/mach-omap2/timer.c is for the timer device "ti,omap543-timer".
> 
> arch_timer_init is already implemented in init_xen_time
> (xen/arch/arm/time.c).
> On some board, the arch timer is not enabled by default and need a
> "workaround" for this purpose.
> 
> For instance on the Arndale, we need to enable the MCTimer. I think you
> need to do something like that for the OMAP.
> 
> Do you know if the boot CPU already start in HYP mode? If no, did you
> set up correctly the timer in mode_switch.S?

I have patched the u-boot. The boot CPU now starts in HYP mode.

Cheers,

Baozi
_______________________________________________
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®.