qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Jiaxun Yang" <jiaxun.yang@flygoat.com>
To: "Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"QEMU devel" <qemu-devel@nongnu.org>
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
	"Laurent Vivier" <laurent@vivier.eu>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Cornelia Huck" <cohuck@redhat.com>
Subject: Re: [PATCH 3/4] hw/m68k/virt: Add a pflash controller for BIOS firmware
Date: Tue, 18 Jun 2024 15:37:45 +0100	[thread overview]
Message-ID: <16f2e94d-7229-472a-9059-f89c3d0db93b@app.fastmail.com> (raw)
In-Reply-To: <150942af-8727-4594-a817-c53c5bb8e04f@linaro.org>



在2024年6月18日六月 下午12:47,Philippe Mathieu-Daudé写道:
> Hi Jiaxun,
>
> On 27/5/24 19:15, Jiaxun Yang wrote:
>> Add a 8 MiB pflash controller for BIOS firmware, and boot
>> from it if possible.
>> 
>> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
>> ---
>>   hw/m68k/Kconfig                                   |  1 +
>>   hw/m68k/virt.c                                    | 44 +++++++++++++++++++++++
>>   include/standard-headers/asm-m68k/bootinfo-virt.h |  1 +
>>   3 files changed, 46 insertions(+)
>> 
>> diff --git a/hw/m68k/Kconfig b/hw/m68k/Kconfig
>> index 4501da56ff6d..f233a5948f19 100644
>> --- a/hw/m68k/Kconfig
>> +++ b/hw/m68k/Kconfig
>> @@ -42,6 +42,7 @@ config M68K_VIRT
>>       select M68K_IRQC
>>       select FW_CFG_DMA
>>       select VIRT_CTRL
>> +    select PFLASH_CFI01
>>       select GOLDFISH_PIC
>>       select GOLDFISH_TTY
>>       select GOLDFISH_RTC
>> diff --git a/hw/m68k/virt.c b/hw/m68k/virt.c
>> index 7590e6515ac3..a2eebc0f2243 100644
>> --- a/hw/m68k/virt.c
>> +++ b/hw/m68k/virt.c
>> @@ -8,6 +8,7 @@
>>    */
>>   
>>   #include "qemu/osdep.h"
>> +#include "qemu/datadir.h"
>>   #include "qemu/units.h"
>>   #include "qemu/guest-random.h"
>>   #include "sysemu/sysemu.h"
>> @@ -28,6 +29,7 @@
>>   #include "sysemu/runstate.h"
>>   #include "sysemu/reset.h"
>>   
>> +#include "hw/block/flash.h"
>>   #include "hw/intc/m68k_irqc.h"
>>   #include "hw/misc/virt_ctrl.h"
>>   #include "hw/char/goldfish_tty.h"
>> @@ -97,6 +99,10 @@
>>   #define VIRT_XHCI_MMIO_BASE 0xff020000    /* MMIO: 0xff020000 - 0xff023fff */
>>   #define VIRT_XHCI_IRQ_BASE  PIC_IRQ(1, 2) /* PIC: #1, IRQ: #2 */
>>   
>> +#define VIRT_PFLASH_MMIO_BASE 0xff800000      /* MMIO: 0xff800000 - 0xffffffff */
>> +#define VIRT_PFLASH_SIZE      0x800000        /* 8 MiB */
>
> Do you need a real RW pflash or a ROM would be enough?

U-Boot needs somewhere to store env vars :-(
Probably a NVRAM would fit the purpose?

Thanks

>

-- 
- Jiaxun


  reply	other threads:[~2024-06-18 14:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-27 17:15 [PATCH 0/4] hw/m68k/virt: Add some devices Jiaxun Yang
2024-05-27 17:15 ` [PATCH 1/4] hw/m68k/virt: Add a XHCI controller Jiaxun Yang
2024-05-27 17:15 ` [PATCH 2/4] hw/m68k/virt: Add fw_cfg controller Jiaxun Yang
2024-05-27 17:15 ` [PATCH 3/4] hw/m68k/virt: Add a pflash controller for BIOS firmware Jiaxun Yang
2024-06-18 11:47   ` Philippe Mathieu-Daudé
2024-06-18 14:37     ` Jiaxun Yang [this message]
2024-05-27 17:15 ` [PATCH 4/4] hw/m68k/virt: Supply bootinfo for BIOS Jiaxun Yang
2024-06-18 11:45 ` [PATCH 0/4] hw/m68k/virt: Add some devices Philippe Mathieu-Daudé
2024-06-20 11:32 ` Laurent Vivier

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=16f2e94d-7229-472a-9059-f89c3d0db93b@app.fastmail.com \
    --to=jiaxun.yang@flygoat.com \
    --cc=cohuck@redhat.com \
    --cc=laurent@vivier.eu \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).