From: Luc Michel <luc.michel@greensocs.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>, qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
qemu-arm@nongnu.org, "Philippe Mathieu-Daudé" <philmd@redhat.com>,
"Andrew Baumann" <Andrew.Baumann@microsoft.com>
Subject: Re: [PATCH v2 13/13] hw/arm/raspi: Add the Raspberry Pi Zero machine
Date: Tue, 18 Feb 2020 09:49:58 +0100 [thread overview]
Message-ID: <cccdf237-a477-0662-930b-df05def200d3@greensocs.com> (raw)
In-Reply-To: <20200217114533.17779-14-f4bug@amsat.org>
On 2/17/20 12:45 PM, Philippe Mathieu-Daudé wrote:
> Add a Raspberry Pi Zero machine.
>
> $ qemu-system-arm -M raspi0w -serial stdio \
> -kernel raspberrypi/firmware/boot/kernel.img \
> -dtb raspberrypi/firmware/boot/bcm2708-rpi-zero-w.dtb \
> -append 'printk.time=0 earlycon=pl011,0x20201000 console=ttyAMA0'
> [ 0.000000] Booting Linux on physical CPU 0x0
> [ 0.000000] Linux version 4.19.69+ (dom@buildbot) (gcc version 4.9.3 (crosstool-NG crosstool-ng-1.22.0-88-g8460611)) #1261 Tue Sep 3 20:21:01 BST 2019
> [ 0.000000] CPU: ARMv6-compatible processor [410fb767] revision 7 (ARMv7), cr=00c5387d
> [ 0.000000] CPU: VIPT aliasing data cache, unknown instruction cache
> [ 0.000000] OF: fdt: Machine model: Raspberry Pi Zero W
> [ 0.000000] earlycon: pl11 at MMIO 0x20201000 (options '')
> [ 0.000000] bootconsole [pl11] enabled
> [ 0.000000] Memory policy: Data cache writeback
> [ 0.000000] cma: Reserved 8 MiB at 0x1b800000
> [ 0.000000] random: get_random_bytes called from start_kernel+0x8c/0x49c with crng_init=0
> [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 113680
> [ 0.000000] Kernel command line: printk.time=0 earlycon=pl011,0x20201000 console=ttyAMA0 root=/dev/mmcblk0 rootwait
> Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
> Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
> Memory: 434380K/458752K available (6971K kernel code, 635K rwdata, 2080K rodata, 464K init, 797K bss, 16180K reserved, 8192K cma-reserved)
> Virtual kernel memory layout:
> vector : 0xffff0000 - 0xffff1000 ( 4 kB)
> fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
> vmalloc : 0xdc800000 - 0xff800000 ( 560 MB)
> lowmem : 0xc0000000 - 0xdc000000 ( 448 MB)
> modules : 0xbf000000 - 0xc0000000 ( 16 MB)
> .text : 0x(ptrval) - 0x(ptrval) (6973 kB)
> .init : 0x(ptrval) - 0x(ptrval) ( 464 kB)
> .data : 0x(ptrval) - 0x(ptrval) ( 636 kB)
> .bss : 0x(ptrval) - 0x(ptrval) ( 798 kB)
> SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
> ftrace: allocating 25193 entries in 74 pages
> NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
> sched_clock: 32 bits at 1000kHz, resolution 1000ns, wraps every 2147483647500ns
> clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275 ns
> bcm2835: system timer (irq = 27)
> Console: colour dummy device 80x30
> ...
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Luc Michel <luc.michel@greensocs.com>
> ---
> hw/arm/raspi.c | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c
> index 2d9f4e3085..d59d7c4294 100644
> --- a/hw/arm/raspi.c
> +++ b/hw/arm/raspi.c
> @@ -324,6 +324,15 @@ static void raspi_machine_class_common_init(MachineClass *mc,
> mc->default_ram_size = board_ram_size(board_rev);
> };
>
> +static void raspi0w_machine_class_init(ObjectClass *oc, void *data)
> +{
> + MachineClass *mc = MACHINE_CLASS(oc);
> + RaspiMachineClass *rmc = RASPI_MACHINE_CLASS(oc);
> +
> + rmc->board_rev = 0x9000c1;
> + raspi_machine_class_common_init(mc, rmc->board_rev);
> +};
> +
> static void raspi1b_machine_class_init(ObjectClass *oc, void *data)
> {
> MachineClass *mc = MACHINE_CLASS(oc);
> @@ -357,6 +366,10 @@ static void raspi3b_machine_class_init(ObjectClass *oc, void *data)
>
> static const TypeInfo raspi_machine_types[] = {
> {
> + .name = MACHINE_TYPE_NAME("raspi0w"),
> + .parent = TYPE_RASPI_MACHINE,
> + .class_init = raspi0w_machine_class_init,
> + }, {
> .name = MACHINE_TYPE_NAME("raspi1b"),
> .parent = TYPE_RASPI_MACHINE,
> .class_init = raspi1b_machine_class_init,
>
prev parent reply other threads:[~2020-02-18 8:56 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-17 11:45 [PATCH v2 00/13] hw/arm: Add raspi0 and raspi1 machines Philippe Mathieu-Daudé
2020-02-17 11:45 ` [PATCH v2 01/13] hw/arm/raspi: Remove ignore_memory_transaction_failures on the raspi2 Philippe Mathieu-Daudé
2020-02-18 9:07 ` Luc Michel
2020-02-17 11:45 ` [PATCH v2 02/13] hw/arm/raspi: Avoid using TypeInfo::class_data pointer Philippe Mathieu-Daudé
2020-02-18 16:50 ` Igor Mammedov
2020-02-17 11:45 ` [PATCH v2 03/13] hw/arm/raspi: Use more specific machine names Philippe Mathieu-Daudé
2020-02-18 9:07 ` Luc Michel
2020-02-17 11:45 ` [PATCH v2 04/13] hw/arm/raspi: Introduce RaspiProcessorId enum Philippe Mathieu-Daudé
2020-02-18 8:24 ` Luc Michel
2020-02-17 11:45 ` [PATCH v2 05/13] hw/arm/raspi: Remove use of the 'version' value in the board code Philippe Mathieu-Daudé
2020-02-18 8:35 ` Luc Michel
2020-02-17 11:45 ` [PATCH v2 06/13] hw/arm/bcm2836: Restrict BCM283XClass declaration to C source Philippe Mathieu-Daudé
2020-02-18 8:55 ` Luc Michel
2020-02-17 11:45 ` [PATCH v2 07/13] hw/arm/bcm2836: QOM'ify more by adding class_init() to each SoC type Philippe Mathieu-Daudé
2020-02-18 17:04 ` Igor Mammedov
2020-02-18 17:39 ` Philippe Mathieu-Daudé
2020-02-19 17:28 ` Igor Mammedov
2020-02-17 11:45 ` [PATCH v2 08/13] hw/arm/bcm2836: Introduce BCM283XClass::core_count Philippe Mathieu-Daudé
2020-02-18 9:00 ` Luc Michel
2020-02-17 11:45 ` [PATCH v2 09/13] hw/arm/bcm2836: Only provide "enabled-cpus" property to multicore SoCs Philippe Mathieu-Daudé
2020-02-18 9:01 ` Luc Michel
2020-02-17 11:45 ` [PATCH v2 10/13] hw/arm/bcm2836: Split out common realize() code Philippe Mathieu-Daudé
2020-02-18 9:03 ` Luc Michel
2020-02-17 11:45 ` [PATCH v2 11/13] hw/arm/bcm2836: Introduce the BCM2835 SoC Philippe Mathieu-Daudé
2020-02-18 9:04 ` Luc Michel
2020-02-17 11:45 ` [PATCH v2 12/13] hw/arm/raspi: Add the Raspberry Pi B+ machine Philippe Mathieu-Daudé
2020-02-18 8:48 ` Luc Michel
2020-02-18 9:35 ` Philippe Mathieu-Daudé
2020-02-18 16:48 ` Igor Mammedov
2020-02-21 18:30 ` Eduardo Habkost
2020-02-22 22:19 ` Niek Linnenbank
2020-02-24 8:55 ` Philippe Mathieu-Daudé
2020-09-21 16:45 ` Philippe Mathieu-Daudé
2020-02-17 11:45 ` [PATCH v2 13/13] hw/arm/raspi: Add the Raspberry Pi Zero machine Philippe Mathieu-Daudé
2020-02-18 8:49 ` Luc Michel [this message]
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=cccdf237-a477-0662-930b-df05def200d3@greensocs.com \
--to=luc.michel@greensocs.com \
--cc=Andrew.Baumann@microsoft.com \
--cc=f4bug@amsat.org \
--cc=peter.maydell@linaro.org \
--cc=philmd@redhat.com \
--cc=qemu-arm@nongnu.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).