All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Nathan Rossi <nathan@nathanrossi.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Peter Crosthwaite <crosthwaite.peter@gmail.com>,
	"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>,
	Michal Simek <michal.simek@xilinx.com>,
	Peter Crosthwaite <crosthwaitepeter@gmail.com>,
	Alistair Francis <alistair.francis@xilinx.com>,
	Guenter Roeck <linux@roeck-us.net>
Subject: Re: [Qemu-devel] [PATCH v2] hw/misc/zynq_slcr: Change CPU clock rate for Linux boots
Date: Mon, 14 Sep 2015 23:17:47 +1000	[thread overview]
Message-ID: <CA+aJhH3My015EZ8F6gQX9rX2AKxFUp=861-0ExR2fkiZ+k+FyA@mail.gmail.com> (raw)
In-Reply-To: <CAFEAcA_hKHKv3zNar9GP2jpd=-xOfOX9vvFbwLr-Ujn8Prjyiw@mail.gmail.com>

On Mon, Sep 14, 2015 at 10:07 PM, Peter Maydell
<peter.maydell@linaro.org> wrote:
> On 13 September 2015 at 23:42, Peter Crosthwaite
> <crosthwaitepeter@gmail.com> wrote:
>> On Sun, Sep 13, 2015 at 1:47 PM, Peter Maydell <peter.maydell@linaro.org> wrote:
>>> On 13 September 2015 at 21:22, Peter Crosthwaite
>>> <crosthwaitepeter@gmail.com> wrote:
>>>> There may be more changes worth making on is_linux. I don't have the
>>>> patch with the full list of FSBL-related SLCR changes handy and can't
>>>> seem to find it in any modern Yocto trees. Wondering if Yocto still
>>>> supports booting Zynq without FSBL (Nathan/Alistair may know more)?

I have been running QEMU without any patches for zynq in Yocto for
some time now. I have not experienced the bug mentioned, at least not
with the kernels I have been testing with. Is this something that is
more apparent in a 4.2 or newer kernel?

The only thing that was causing problems was the Ethernet kernel
driver demanding a valid 125mhz clock, that was solved by putting a
fixed clock in the device tree
(http://git.yoctoproject.org/cgit/cgit.cgi/meta-xilinx/tree/conf/machine/boards/qemu/qemuzynq-base.dtsi#n12).

>>>
>>> I'd prefer us not to propagate lots of "only if Linux boot"
>>> changes into devices. The GIC *must* have these because the
>>> kernel can't configure it otherwise from non-secure mode.
>>> I'm not sure that applies here.
>>>
>>
>> At least this change is a must. I have had this discussion with kernel
>> people before and they insist that initing the PLLs and clocks to
>> desired values is the job of the bootloader and the kernel reads back
>> the values from this core. It is same philosophy at the GIC init,
>> which is at the end of the day, done by some pre-boot software. The
>> same bootloader (FSBL) makes other changes that kernels past present
>> and future may rely on and it would be good to have those.
>
> The thing is that if we go down this path we end up incorporating
> most of a boot firmware into QEMU, scattered across different
> devices (and what do we do if we find that two boards want a
> single device set up differently?). The current in-QEMU ARM
> bootloader basically assumes a traditional 32-bit ARM setup,
> where the kernel didn't really trust the firmware or bootloader
> and did a lot of hardware setup itself. This model is starting
> to break down as modern kernels assume more that the firmware
> has done certain setup, but it's what QEMU's design here is based
> on.
>
> The other approach would be to actually run some firmware
> blob at startup, and let that do the setup.

For reference newer u-boot versions (mainline, not Xilinx) have
definitions for some Zynq boards and with the complete ps7_init.c
register configuration setup. So building a u-boot-spl firmware to do
this seems like an alternate solution. Although I am not exactly sure
how booting this setup would work, and I assume a custom ps7_init.c
might need to be created for QEMU.

Regards,
Nathan

  reply	other threads:[~2015-09-14 13:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-12 21:06 [Qemu-devel] [PATCH v2] hw/misc/zynq_slcr: Change CPU clock rate for Linux boots Guenter Roeck
2015-09-13 20:22 ` Peter Crosthwaite
2015-09-13 20:37   ` Guenter Roeck
2015-09-13 20:47   ` Peter Maydell
2015-09-13 21:51     ` Guenter Roeck
2015-09-13 22:42     ` Peter Crosthwaite
2015-09-14 12:07       ` Peter Maydell
2015-09-14 13:17         ` Nathan Rossi [this message]
2015-09-14 14:05           ` Guenter Roeck
2015-09-27  5:44           ` Peter Crosthwaite
2015-09-27  5:50 ` Peter Crosthwaite

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='CA+aJhH3My015EZ8F6gQX9rX2AKxFUp=861-0ExR2fkiZ+k+FyA@mail.gmail.com' \
    --to=nathan@nathanrossi.com \
    --cc=alistair.francis@xilinx.com \
    --cc=crosthwaite.peter@gmail.com \
    --cc=crosthwaitepeter@gmail.com \
    --cc=linux@roeck-us.net \
    --cc=michal.simek@xilinx.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.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.