* [for-6.0 PATCH 0/3] ppc: e500: Bump ppce500 u-boot to v2021.04
@ 2021-04-06 8:15 Bin Meng
2021-04-06 8:15 ` [for-6.0 PATCH 1/3] roms/Makefile: Update ppce500 u-boot build directory name Bin Meng
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Bin Meng @ 2021-04-06 8:15 UTC (permalink / raw)
To: David Gibson, qemu-devel, qemu-ppc
This series bumps the u-boot.e500 to v2021.04, which fixed a long
overdue broken pci issue caused by QEMU changes since Nov 2014.
While we are here, add a reST documentation for the ppce500 machine.
Please pull the full contents (binary) from https://github.com/lbmeng/qemu/
ppc branch.
Bin Meng (3):
roms/Makefile: Update ppce500 u-boot build directory name
roms/u-boot: Bump ppce500 u-boot to v2021.04 to fix broken pci support
docs/system: ppc: Add documentation for ppce500 machine
docs/system/ppc/ppce500.rst | 156 ++++++++++++++++++++++++++++++++++++
docs/system/target-ppc.rst | 1 +
pc-bios/u-boot.e500 | Bin 349148 -> 406920 bytes
roms/Makefile | 8 +-
roms/u-boot | 2 +-
5 files changed, 162 insertions(+), 5 deletions(-)
create mode 100644 docs/system/ppc/ppce500.rst
--
2.25.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [for-6.0 PATCH 1/3] roms/Makefile: Update ppce500 u-boot build directory name
2021-04-06 8:15 [for-6.0 PATCH 0/3] ppc: e500: Bump ppce500 u-boot to v2021.04 Bin Meng
@ 2021-04-06 8:15 ` Bin Meng
2021-04-06 8:15 ` [for-6.0 PATCH 2/3] roms/u-boot: Bump ppce500 u-boot to v2021.04 to fix broken pci support Bin Meng
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Bin Meng @ 2021-04-06 8:15 UTC (permalink / raw)
To: David Gibson, qemu-devel, qemu-ppc
Currently building ppce500 u-boot image results in
modified: roms/u-boot (untracked content)
As roms/u-boot/.gitignore indicates, update the build directory
name to build-e500 to eliminate this message.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
---
roms/Makefile | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/roms/Makefile b/roms/Makefile
index 5ffe3317ac..eeb5970348 100644
--- a/roms/Makefile
+++ b/roms/Makefile
@@ -154,10 +154,10 @@ slof:
cp SLOF/boot_rom.bin ../pc-bios/slof.bin
u-boot.e500:
- $(MAKE) -C u-boot O=build.e500 qemu-ppce500_config
+ $(MAKE) -C u-boot O=build-e500 qemu-ppce500_config
$(MAKE) -C u-boot CROSS_COMPILE=$(powerpc_cross_prefix) \
- O=build.e500
- $(powerpc_cross_prefix)strip u-boot/build.e500/u-boot -o \
+ O=build-e500
+ $(powerpc_cross_prefix)strip u-boot/build-e500/u-boot -o \
../pc-bios/u-boot.e500
u-boot.sam460:
@@ -205,7 +205,7 @@ clean:
$(MAKE) -C ipxe/src veryclean
$(MAKE) -C edk2/BaseTools clean
$(MAKE) -C SLOF clean
- rm -rf u-boot/build.e500
+ rm -rf u-boot/build-e500
$(MAKE) -C u-boot-sam460ex distclean
$(MAKE) -C skiboot clean
$(MAKE) -f Makefile.edk2 clean
--
2.25.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [for-6.0 PATCH 2/3] roms/u-boot: Bump ppce500 u-boot to v2021.04 to fix broken pci support
2021-04-06 8:15 [for-6.0 PATCH 0/3] ppc: e500: Bump ppce500 u-boot to v2021.04 Bin Meng
2021-04-06 8:15 ` [for-6.0 PATCH 1/3] roms/Makefile: Update ppce500 u-boot build directory name Bin Meng
@ 2021-04-06 8:15 ` Bin Meng
2021-04-06 8:15 ` [for-6.0 PATCH 3/3] docs/system: ppc: Add documentation for ppce500 machine Bin Meng
2021-04-08 2:39 ` [for-6.0 PATCH 0/3] ppc: e500: Bump ppce500 u-boot to v2021.04 David Gibson
3 siblings, 0 replies; 7+ messages in thread
From: Bin Meng @ 2021-04-06 8:15 UTC (permalink / raw)
To: David Gibson, qemu-devel, qemu-ppc
When QEMU originally supported the ppce500 machine back in Jan 2014,
it was created with a 1:1 mapping of PCI bus address. Things seemed
to change rapidly that in Nov 2014 with the following QEMU commits:
commit e6b4e5f4795b ("PPC: e500: Move CCSR and MMIO space to upper end of address space")
and
commit cb3778a0455a ("PPC: e500 pci host: Add support for ATMUs")
the PCI memory and IO physical address were moved to beyond 4 GiB,
but PCI bus address remained below 4 GiB, hence a non-identity
mapping was created. Unfortunately corresponding U-Boot updates
were missed along with the QEMU changes and the U-Boot QEMU ppce500
PCI support has been broken since then, until this issue was fixed
recently in U-Boot mainline v2021.04 release, specifically by the
following U-Boot series:
http://patchwork.ozlabs.org/project/uboot/list/?series=230985&state=*
The cross-compilation toolchain used to build the U-Boot image is:
https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/10.1.0/x86_64-gcc-10.1.0-nolibc-powerpc-linux.tar.xz
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
---
pc-bios/u-boot.e500 | Bin 349148 -> 406920 bytes
roms/u-boot | 2 +-
2 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/pc-bios/u-boot.e500 b/pc-bios/u-boot.e500
index 732660f348..d2e29f81d6 100644
Binary files a/pc-bios/u-boot.e500 and b/pc-bios/u-boot.e500 differ
diff --git a/roms/u-boot b/roms/u-boot
index d3689267f9..b46dd116ce 160000
--- a/roms/u-boot
+++ b/roms/u-boot
@@ -1 +1 @@
-Subproject commit d3689267f92c5956e09cc7d1baa4700141662bff
+Subproject commit b46dd116ce03e235f2a7d4843c6278e1da44b5e1
--
2.25.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [for-6.0 PATCH 3/3] docs/system: ppc: Add documentation for ppce500 machine
2021-04-06 8:15 [for-6.0 PATCH 0/3] ppc: e500: Bump ppce500 u-boot to v2021.04 Bin Meng
2021-04-06 8:15 ` [for-6.0 PATCH 1/3] roms/Makefile: Update ppce500 u-boot build directory name Bin Meng
2021-04-06 8:15 ` [for-6.0 PATCH 2/3] roms/u-boot: Bump ppce500 u-boot to v2021.04 to fix broken pci support Bin Meng
@ 2021-04-06 8:15 ` Bin Meng
2021-04-08 2:39 ` [for-6.0 PATCH 0/3] ppc: e500: Bump ppce500 u-boot to v2021.04 David Gibson
3 siblings, 0 replies; 7+ messages in thread
From: Bin Meng @ 2021-04-06 8:15 UTC (permalink / raw)
To: David Gibson, qemu-devel, qemu-ppc
This adds detailed documentation for PowerPC `ppce500` machine,
including the following information:
- Supported devices
- Hardware configuration information
- Boot options
- Running Linux kernel
- Running U-Boot
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
---
docs/system/ppc/ppce500.rst | 156 ++++++++++++++++++++++++++++++++++++
docs/system/target-ppc.rst | 1 +
2 files changed, 157 insertions(+)
create mode 100644 docs/system/ppc/ppce500.rst
diff --git a/docs/system/ppc/ppce500.rst b/docs/system/ppc/ppce500.rst
new file mode 100644
index 0000000000..7a815c1881
--- /dev/null
+++ b/docs/system/ppc/ppce500.rst
@@ -0,0 +1,156 @@
+ppce500 generic platform (``ppce500``)
+======================================
+
+QEMU for PPC supports a special ``ppce500`` machine designed for emulation and
+virtualization purposes.
+
+Supported devices
+-----------------
+
+The ``ppce500`` machine supports the following devices:
+
+* PowerPC e500 series core (e500v2/e500mc/e5500/e6500)
+* Configuration, Control, and Status Register (CCSR)
+* Multicore Programmable Interrupt Controller (MPIC) with MSI support
+* 1 16550A UART device
+* 1 Freescale MPC8xxx I2C controller
+* 1 Pericom pt7c4338 RTC via I2C
+* 1 Freescale MPC8xxx GPIO controller
+* Power-off functionality via one GPIO pin
+* 1 Freescale MPC8xxx PCI host controller
+* VirtIO devices via PCI bus
+
+Hardware configuration information
+----------------------------------
+
+The ``ppce500`` machine automatically generates a device tree blob ("dtb")
+which it passes to the guest, if there is no ``-dtb`` option. This provides
+information about the addresses, interrupt lines and other configuration of
+the various devices in the system.
+
+If users want to provide their own DTB, they can use the ``-dtb`` option.
+These DTBs should have the following requirements:
+
+* The number of subnodes under /cpus node should match QEMU's ``-smp`` option
+* The /memory reg size should match QEMU’s selected ram_size via ``-m``
+
+Both ``qemu-system-ppc`` and ``qemu-system-ppc64`` provide emulation for the
+following 32-bit PowerPC CPUs:
+
+* e500v2
+* e500mc
+
+Additionally ``qemu-system-ppc64`` provides support for the following 64-bit
+PowerPC CPUs:
+
+* e5500
+* e6500
+
+The CPU type can be specified via the ``-cpu`` command line. If not specified,
+it creates a machine with e500v2 core. The following example shows an e6500
+based machine creation:
+
+.. code-block:: bash
+
+ $ qemu-system-ppc64 -nographic -M ppce500 -cpu e6500
+
+Boot options
+------------
+
+The ``ppce500`` machine can start using the standard -kernel functionality
+for loading a payload like an OS kernel (e.g.: Linux), or U-Boot firmware.
+
+When -bios is omitted, the default pc-bios/u-boot.e500 firmware image is used
+as the BIOS. QEMU follows below truth table to select which payload to execute:
+
+===== ========== =======
+-bios -kernel payload
+===== ========== =======
+ N N u-boot
+ N Y kernel
+ Y don't care u-boot
+===== ========== =======
+
+When both -bios and -kernel are present, QEMU loads U-Boot and U-Boot in turns
+automatically loads the kernel image specified by the -kernel parameter via
+U-Boot's built-in "bootm" command, hence a legacy uImage format is required in
+such senario.
+
+Running Linux kernel
+--------------------
+
+Linux mainline v5.11 release is tested at the time of writing. To build a
+Linux mainline kernel that can be booted by the ``ppce500`` machine in
+64-bit mode, simply configure the kernel using the defconfig configuration:
+
+.. code-block:: bash
+
+ $ export ARCH=powerpc
+ $ export CROSS_COMPILE=powerpc-linux-
+ $ make corenet64_smp_defconfig
+ $ make menuconfig
+
+then manually select the following configuration:
+
+ Platform support > Freescale Book-E Machine Type > QEMU generic e500 platform
+
+To boot the newly built Linux kernel in QEMU with the ``ppce500`` machine:
+
+.. code-block:: bash
+
+ $ qemu-system-ppc64 -M ppce500 -cpu e5500 -smp 4 -m 2G \
+ -display none -serial stdio \
+ -kernel vmlinux \
+ -initrd /path/to/rootfs.cpio \
+ -append "root=/dev/ram"
+
+To build a Linux mainline kernel that can be booted by the ``ppce500`` machine
+in 32-bit mode, use the same 64-bit configuration steps except the defconfig
+file should use corenet32_smp_defconfig.
+
+To boot the 32-bit Linux kernel:
+
+.. code-block:: bash
+
+ $ qemu-system-ppc{64|32} -M ppce500 -cpu e500mc -smp 4 -m 2G \
+ -display none -serial stdio \
+ -kernel vmlinux \
+ -initrd /path/to/rootfs.cpio \
+ -append "root=/dev/ram"
+
+Running U-Boot
+--------------
+
+U-Boot mainline v2021.04 release is tested at the time of writing. To build a
+U-Boot mainline bootloader that can be booted by the ``ppce500`` machine, use
+the qemu-ppce500_defconfig with similar commands as described above for Linux:
+
+.. code-block:: bash
+
+ $ export CROSS_COMPILE=powerpc-linux-
+ $ make qemu-ppce500_defconfig
+
+You will get u-boot file in the build tree.
+
+When U-Boot boots, you will notice the following if using with ``-cpu e6500``:
+
+.. code-block:: none
+
+ CPU: Unknown, Version: 0.0, (0x00000000)
+ Core: e6500, Version: 2.0, (0x80400020)
+
+This is because we only specified a core name to QEMU and it does not have a
+meaningful SVR value which represents an actual SoC that integrates such core.
+You can specify a real world SoC device that QEMU has built-in support but all
+these SoCs are e500v2 based MPC85xx series, hence you cannot test anything
+built for P4080 (e500mc), P5020 (e5500) and T2080 (e6500).
+
+By default a VirtIO standard PCI networking device is connected as an ethernet
+interface at PCI address 0.1.0, but we can switch that to an e1000 NIC by:
+
+.. code-block:: bash
+
+ $ qemu-system-ppc -M ppce500 -smp 4 -m 2G \
+ -display none -serial stdio \
+ -bios u-boot \
+ -nic tap,ifname=tap0,script=no,downscript=no,model=e1000
diff --git a/docs/system/target-ppc.rst b/docs/system/target-ppc.rst
index 67905b8f2a..4f6eb93b17 100644
--- a/docs/system/target-ppc.rst
+++ b/docs/system/target-ppc.rst
@@ -20,5 +20,6 @@ help``.
ppc/embedded
ppc/powermac
ppc/powernv
+ ppc/ppce500
ppc/prep
ppc/pseries
--
2.25.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [for-6.0 PATCH 0/3] ppc: e500: Bump ppce500 u-boot to v2021.04
2021-04-06 8:15 [for-6.0 PATCH 0/3] ppc: e500: Bump ppce500 u-boot to v2021.04 Bin Meng
` (2 preceding siblings ...)
2021-04-06 8:15 ` [for-6.0 PATCH 3/3] docs/system: ppc: Add documentation for ppce500 machine Bin Meng
@ 2021-04-08 2:39 ` David Gibson
2021-04-08 3:07 ` Bin Meng
3 siblings, 1 reply; 7+ messages in thread
From: David Gibson @ 2021-04-08 2:39 UTC (permalink / raw)
To: Bin Meng; +Cc: qemu-ppc, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1319 bytes --]
On Tue, Apr 06, 2021 at 04:15:10PM +0800, Bin Meng wrote:
> This series bumps the u-boot.e500 to v2021.04, which fixed a long
> overdue broken pci issue caused by QEMU changes since Nov 2014.
>
> While we are here, add a reST documentation for the ppce500 machine.
>
> Please pull the full contents (binary) from https://github.com/lbmeng/qemu/
> ppc branch.
This is much to late to go into ppc-for-6.0, but I'm happy to queue it
for 6.1. However, I'm not sure which branch from your site I need to
pull in.
>
>
> Bin Meng (3):
> roms/Makefile: Update ppce500 u-boot build directory name
> roms/u-boot: Bump ppce500 u-boot to v2021.04 to fix broken pci support
> docs/system: ppc: Add documentation for ppce500 machine
>
> docs/system/ppc/ppce500.rst | 156 ++++++++++++++++++++++++++++++++++++
> docs/system/target-ppc.rst | 1 +
> pc-bios/u-boot.e500 | Bin 349148 -> 406920 bytes
> roms/Makefile | 8 +-
> roms/u-boot | 2 +-
> 5 files changed, 162 insertions(+), 5 deletions(-)
> create mode 100644 docs/system/ppc/ppce500.rst
>
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [for-6.0 PATCH 0/3] ppc: e500: Bump ppce500 u-boot to v2021.04
2021-04-08 2:39 ` [for-6.0 PATCH 0/3] ppc: e500: Bump ppce500 u-boot to v2021.04 David Gibson
@ 2021-04-08 3:07 ` Bin Meng
2021-04-08 3:14 ` David Gibson
0 siblings, 1 reply; 7+ messages in thread
From: Bin Meng @ 2021-04-08 3:07 UTC (permalink / raw)
To: David Gibson; +Cc: qemu-ppc, qemu-devel@nongnu.org Developers
Hi David,
On Thu, Apr 8, 2021 at 10:39 AM David Gibson
<david@gibson.dropbear.id.au> wrote:
>
> On Tue, Apr 06, 2021 at 04:15:10PM +0800, Bin Meng wrote:
> > This series bumps the u-boot.e500 to v2021.04, which fixed a long
> > overdue broken pci issue caused by QEMU changes since Nov 2014.
> >
> > While we are here, add a reST documentation for the ppce500 machine.
> >
> > Please pull the full contents (binary) from https://github.com/lbmeng/qemu/
> > ppc branch.
>
> This is much to late to go into ppc-for-6.0, but I'm happy to queue it
> for 6.1.
I think this should go 6.0 because it is a bug fix for the long
overdue broken pci support in the U-Boot binary that QEMU ships.
> However, I'm not sure which branch from your site I need to pull in.
>
It's the ppc branch, as I mentioned in this cover letter.
> >
> >
> > Bin Meng (3):
> > roms/Makefile: Update ppce500 u-boot build directory name
> > roms/u-boot: Bump ppce500 u-boot to v2021.04 to fix broken pci support
> > docs/system: ppc: Add documentation for ppce500 machine
> >
Regards,
Bin
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [for-6.0 PATCH 0/3] ppc: e500: Bump ppce500 u-boot to v2021.04
2021-04-08 3:07 ` Bin Meng
@ 2021-04-08 3:14 ` David Gibson
0 siblings, 0 replies; 7+ messages in thread
From: David Gibson @ 2021-04-08 3:14 UTC (permalink / raw)
To: Bin Meng; +Cc: qemu-ppc, qemu-devel@nongnu.org Developers
[-- Attachment #1: Type: text/plain, Size: 1404 bytes --]
On Thu, Apr 08, 2021 at 11:07:22AM +0800, Bin Meng wrote:
> Hi David,
>
> On Thu, Apr 8, 2021 at 10:39 AM David Gibson
> <david@gibson.dropbear.id.au> wrote:
> >
> > On Tue, Apr 06, 2021 at 04:15:10PM +0800, Bin Meng wrote:
> > > This series bumps the u-boot.e500 to v2021.04, which fixed a long
> > > overdue broken pci issue caused by QEMU changes since Nov 2014.
> > >
> > > While we are here, add a reST documentation for the ppce500 machine.
> > >
> > > Please pull the full contents (binary) from https://github.com/lbmeng/qemu/
> > > ppc branch.
> >
> > This is much to late to go into ppc-for-6.0, but I'm happy to queue it
> > for 6.1.
>
> I think this should go 6.0 because it is a bug fix for the long
> overdue broken pci support in the U-Boot binary that QEMU ships.
No. If we were early in the hard freeze, then maybe. But this
certainly isn't a regression - it's been broken for 6+ years, which
means we don't have a case to put it in rc3.
>
> > However, I'm not sure which branch from your site I need to pull in.
> >
>
> It's the ppc branch, as I mentioned in this cover letter.
Sorry, I missed that. I've now merged these patches into ppc-for-6.1.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-04-08 3:26 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-06 8:15 [for-6.0 PATCH 0/3] ppc: e500: Bump ppce500 u-boot to v2021.04 Bin Meng
2021-04-06 8:15 ` [for-6.0 PATCH 1/3] roms/Makefile: Update ppce500 u-boot build directory name Bin Meng
2021-04-06 8:15 ` [for-6.0 PATCH 2/3] roms/u-boot: Bump ppce500 u-boot to v2021.04 to fix broken pci support Bin Meng
2021-04-06 8:15 ` [for-6.0 PATCH 3/3] docs/system: ppc: Add documentation for ppce500 machine Bin Meng
2021-04-08 2:39 ` [for-6.0 PATCH 0/3] ppc: e500: Bump ppce500 u-boot to v2021.04 David Gibson
2021-04-08 3:07 ` Bin Meng
2021-04-08 3:14 ` David Gibson
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).