From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47050) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbSY7-0004Z5-E1 for qemu-devel@nongnu.org; Mon, 14 Sep 2015 08:07:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZbSY4-0005nm-7U for qemu-devel@nongnu.org; Mon, 14 Sep 2015 08:07:55 -0400 Received: from mail-vk0-f45.google.com ([209.85.213.45]:34689) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbSY4-0005nf-43 for qemu-devel@nongnu.org; Mon, 14 Sep 2015 08:07:52 -0400 Received: by vkhf67 with SMTP id f67so57557473vkh.1 for ; Mon, 14 Sep 2015 05:07:51 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <1442091963-10658-1-git-send-email-linux@roeck-us.net> From: Peter Maydell Date: Mon, 14 Sep 2015 13:07:32 +0100 Message-ID: Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH v2] hw/misc/zynq_slcr: Change CPU clock rate for Linux boots List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite Cc: Peter Crosthwaite , "qemu-devel@nongnu.org Developers" , Alistair Francis , Nathan Rossi , Michal Simek , Guenter Roeck On 13 September 2015 at 23:42, Peter Crosthwaite wrote: > On Sun, Sep 13, 2015 at 1:47 PM, Peter Maydell wrote: >> On 13 September 2015 at 21:22, Peter Crosthwaite >> 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'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. thanks -- PMM