All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robin Murphy <robin.murphy@arm.com>
To: Mark Rutland <mark.rutland@arm.com>, Geoff Levand <geoff@infradead.org>
Cc: Pratyush Anand <panand@redhat.com>,
	AKASHI Takahiro <takahiro.akashi@linaro.org>,
	Simon Horman <horms@verge.net.au>,
	kexec@lists.infradead.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v1 3/4] arm64: Add arm64 kexec support
Date: Thu, 21 Jul 2016 11:50:42 +0100	[thread overview]
Message-ID: <5790A902.6070601@arm.com> (raw)
In-Reply-To: <20160721103120.GB20559@leverpostej>

On 21/07/16 11:31, Mark Rutland wrote:
[...]
>>>> +
>>>> +> > 	> > if (*p == 0)
>>>> +> > 	> > 	> > return 0;
>>>> +
>>>> +> > 	> > errno = 0;
>>>> +
>>>> +> > 	> > v = strtoull(p, NULL, 0);
>>>> +
>>>> +> > 	> > if (errno)
>>>> +> > 	> > 	> > return 0;
>>>> +
>>>> +> > 	> > return v;
>>>> +}
>>>
>>> It looks like the purgatory code expects angel SWI as the earlycon,
>>
>> Maybe you saw the debug_brk macro in entry.S?  I should remove
>> that and just loop.
> 
> Ah, sorry. For some reason I got that confused with the sink code. My
> bad.
> 
> Now I see that's assuming an 8-bit MMIO register.
> 
>>> whereas many other earlycons exist (with pl011 being extremely popular).
>>> Regardless, if we assume a particular UART type, we should explicitly
>>> verify that here. Otherwise the purgatory code will likely bring down
>>> the system, and it will be very painful to debug.
>>>
>>> Please explicitly check for the supported earlycon name.
>>
>> Purgatory just writes bytes to the address given.  Are there
>> UARTs that don't have TX as the first port?
> 
> I'm not sure, but it's certainly possible. The generic earlycon binding
> doesn't guarantee that the first address is a TX register. Even if they
> don't exist today, they could in a month's time, so I don't think we
> should assume anything.

The Exynos UART (drivers/tty/serial/samsung.c) is one which comes to
mind as definitely existing, and on arm64 systems to boot. The TX
register is at offset 0x20 there.

Robin.

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

WARNING: multiple messages have this Message-ID (diff)
From: robin.murphy@arm.com (Robin Murphy)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v1 3/4] arm64: Add arm64 kexec support
Date: Thu, 21 Jul 2016 11:50:42 +0100	[thread overview]
Message-ID: <5790A902.6070601@arm.com> (raw)
In-Reply-To: <20160721103120.GB20559@leverpostej>

On 21/07/16 11:31, Mark Rutland wrote:
[...]
>>>> +
>>>> +> > 	> > if (*p == 0)
>>>> +> > 	> > 	> > return 0;
>>>> +
>>>> +> > 	> > errno = 0;
>>>> +
>>>> +> > 	> > v = strtoull(p, NULL, 0);
>>>> +
>>>> +> > 	> > if (errno)
>>>> +> > 	> > 	> > return 0;
>>>> +
>>>> +> > 	> > return v;
>>>> +}
>>>
>>> It looks like the purgatory code expects angel SWI as the earlycon,
>>
>> Maybe you saw the debug_brk macro in entry.S?  I should remove
>> that and just loop.
> 
> Ah, sorry. For some reason I got that confused with the sink code. My
> bad.
> 
> Now I see that's assuming an 8-bit MMIO register.
> 
>>> whereas many other earlycons exist (with pl011 being extremely popular).
>>> Regardless, if we assume a particular UART type, we should explicitly
>>> verify that here. Otherwise the purgatory code will likely bring down
>>> the system, and it will be very painful to debug.
>>>
>>> Please explicitly check for the supported earlycon name.
>>
>> Purgatory just writes bytes to the address given.  Are there
>> UARTs that don't have TX as the first port?
> 
> I'm not sure, but it's certainly possible. The generic earlycon binding
> doesn't guarantee that the first address is a TX register. Even if they
> don't exist today, they could in a month's time, so I don't think we
> should assume anything.

The Exynos UART (drivers/tty/serial/samsung.c) is one which comes to
mind as definitely existing, and on arm64 systems to boot. The TX
register is at offset 0x20 there.

Robin.

  reply	other threads:[~2016-07-21 10:50 UTC|newest]

Thread overview: 90+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-19 23:28 [PATCH v1 0/4] arm64 kexec-tools patches Geoff Levand
2016-07-19 23:28 ` Geoff Levand
2016-07-19 23:28 ` [PATCH v1 4/4] arm64: Add support for binary image files Geoff Levand
2016-07-19 23:28   ` Geoff Levand
2016-07-19 23:28 ` [PATCH v1 3/4] arm64: Add arm64 kexec support Geoff Levand
2016-07-19 23:28   ` Geoff Levand
2016-07-20 15:39   ` Mark Rutland
2016-07-20 15:39     ` Mark Rutland
2016-07-20 19:19     ` Geoff Levand
2016-07-20 19:19       ` Geoff Levand
2016-07-21 10:31       ` Mark Rutland
2016-07-21 10:31         ` Mark Rutland
2016-07-21 10:50         ` Robin Murphy [this message]
2016-07-21 10:50           ` Robin Murphy
2016-07-21 21:49           ` Geoff Levand
2016-07-21 21:49             ` Geoff Levand
2016-07-22  4:08             ` Pratyush Anand
2016-07-22  4:08               ` Pratyush Anand
2016-07-22  5:33               ` AKASHI Takahiro
2016-07-22  5:33                 ` AKASHI Takahiro
2016-07-22  9:54               ` Mark Rutland
2016-07-22  9:54                 ` Mark Rutland
2016-07-22 10:03               ` Robin Murphy
2016-07-22 10:03                 ` Robin Murphy
2016-07-22 13:56                 ` Pratyush Anand
2016-07-22 13:56                   ` Pratyush Anand
2016-07-22 17:59                   ` Robin Murphy
2016-07-22 17:59                     ` Robin Murphy
2016-07-25 21:56                 ` Geoff Levand
2016-07-25 21:56                   ` Geoff Levand
2016-07-20 17:53   ` Pratyush Anand
2016-07-20 17:53     ` Pratyush Anand
2016-07-20 20:33     ` Geoff Levand
2016-07-20 20:33       ` Geoff Levand
2016-07-20 20:54   ` [PATCH v1.2 " Geoff Levand
2016-07-20 20:54     ` Geoff Levand
2016-07-22  7:12     ` AKASHI Takahiro
2016-07-22  7:12       ` AKASHI Takahiro
2016-07-26  0:37       ` Geoff Levand
2016-07-26  0:37         ` Geoff Levand
2016-07-25 14:28     ` Ruslan Bilovol
2016-07-25 14:28       ` Ruslan Bilovol
2016-07-25 20:50       ` Geoff Levand
2016-07-25 20:50         ` Geoff Levand
2016-07-26  1:36         ` Ruslan Bilovol
2016-07-26  1:36           ` Ruslan Bilovol
2016-07-26  8:16           ` AKASHI Takahiro
2016-07-26  8:16             ` AKASHI Takahiro
2016-07-26 21:26             ` Ruslan Bilovol
2016-07-26 21:26               ` Ruslan Bilovol
2016-07-26 21:54               ` Geoff Levand
2016-07-26 21:54                 ` Geoff Levand
2016-07-19 23:28 ` [PATCH v1 1/4] kexec: (bugfix) calc correct end address of memory ranges in device tree Geoff Levand
2016-07-19 23:28   ` Geoff Levand
2016-07-27 22:45   ` Thiago Jung Bauermann
2016-07-27 22:45     ` Thiago Jung Bauermann
2016-07-27 23:23     ` Russell King - ARM Linux
2016-07-27 23:23       ` Russell King - ARM Linux
2016-07-28 23:54       ` Thiago Jung Bauermann
2016-07-28 23:54         ` Thiago Jung Bauermann
2016-07-29  8:27         ` Russell King - ARM Linux
2016-07-29  8:27           ` Russell King - ARM Linux
2016-07-29 17:12           ` Geoff Levand
2016-07-29 17:12             ` Geoff Levand
2016-07-29 17:23             ` Russell King - ARM Linux
2016-07-29 17:23               ` Russell King - ARM Linux
2016-08-01  4:52               ` AKASHI Takahiro
2016-08-01  4:52                 ` AKASHI Takahiro
2016-09-06  0:29                 ` Memory range end be inclusive or exclusive? " AKASHI Takahiro
2016-09-06  0:29                   ` AKASHI Takahiro
2016-10-31  8:50                   ` AKASHI Takahiro
2016-10-31  8:50                     ` AKASHI Takahiro
2016-11-07  8:17                     ` Simon Horman
2016-11-07  8:17                       ` Simon Horman
2016-07-19 23:28 ` [PATCH v1 2/4] kexec: Add common device tree routines Geoff Levand
2016-07-19 23:28   ` Geoff Levand
2016-07-22  7:19   ` AKASHI Takahiro
2016-07-22  7:19     ` AKASHI Takahiro
2016-07-27 18:11     ` Geoff Levand
2016-07-27 18:11       ` Geoff Levand
2016-07-20  4:30 ` [PATCH v1 0/4] arm64 kexec-tools patches AKASHI Takahiro
2016-07-20  4:30   ` AKASHI Takahiro
2016-07-26 23:05 ` Simon Horman
2016-07-26 23:05   ` Simon Horman
2016-07-27  5:57   ` AKASHI Takahiro
2016-07-27  5:57     ` AKASHI Takahiro
2016-07-28 18:09   ` Geoff Levand
2016-07-28 18:09     ` Geoff Levand
2016-07-29  0:31     ` Simon Horman
2016-07-29  0:31       ` Simon Horman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5790A902.6070601@arm.com \
    --to=robin.murphy@arm.com \
    --cc=geoff@infradead.org \
    --cc=horms@verge.net.au \
    --cc=kexec@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=panand@redhat.com \
    --cc=takahiro.akashi@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.