All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Cédric Le Goater" <clg@kaod.org>
To: Thomas Huth <thuth@redhat.com>,
	BALATON Zoltan <balaton@eik.bme.hu>,
	LEROY Christophe <christophe.leroy@csgroup.eu>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	"dbarboza@redhat.com" <dbarboza@redhat.com>,
	"QEMU Developers" <qemu-devel@nongnu.org>,
	"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
	"Greg Kurz" <groug@kaod.org>, "Alexander Graf" <agraf@csgraf.de>,
	qemu-ppc <qemu-ppc@nongnu.org>, "Cleber Rosa" <crosa@redhat.com>,
	"Hervé Poussineau" <hpoussin@reactos.org>,
	"Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"David Gibson" <david@gibson.dropbear.id.au>
Subject: Re: Deprecate the ppc405 boards in QEMU?
Date: Wed, 20 Oct 2021 16:41:48 +0200	[thread overview]
Message-ID: <b713a091-848d-8164-2ff8-7953ac605ad2@kaod.org> (raw)
In-Reply-To: <a4d1571d-0419-054d-b127-8c0b57425f6b@redhat.com>

On 10/20/21 16:34, Thomas Huth wrote:
> On 20/10/2021 16.31, BALATON Zoltan wrote:
>> On Wed, 20 Oct 2021, LEROY Christophe wrote:
>>> Le 20/10/2021 à 12:10, Cédric Le Goater a écrit :
>>>> I dont understand how
>>>>
>>>>    static bd_t bd;
>>>>
>>>> can be updated in the kernel.
>>>>
>>>
>>> It's not updated in the kernel.
>>>
>>> It is supposed to be provided by UBoot to Linux Kernel. But modern
>>> kernels don't take that anymore, they take a device tree. For this
>>> reason cuboot takes the content of bd to build/update the device tree.
>>>
>>> Looks like QEMU also provides the bd, see ref405ep_init()
>>>
>>> I managed to get a kernel booting with the following change (and with
>>> CONFIG_ETHERNET removed)
>>>
>>> diff --git a/arch/powerpc/boot/cuboot-hotfoot.c
>>> b/arch/powerpc/boot/cuboot-hotfoot.c
>>> index 888a6b9bfead..63a9545ff55d 100644
>>> --- a/arch/powerpc/boot/cuboot-hotfoot.c
>>> +++ b/arch/powerpc/boot/cuboot-hotfoot.c
>>> @@ -132,6 +132,12 @@ void platform_init(unsigned long r3, unsigned long
>>> r4, unsigned long r5,
>>>                    unsigned long r6, unsigned long r7)
>>>  {
>>>         CUBOOT_INIT();
>>> +        bd.bi_intfreq = 133333333;
>>> +        bd.bi_busfreq = 33333333;
>>> +        bd.bi_procfreq = 133333333;
>>> +        bd.bi_plb_busfreq = 33333333;
>>> +        bd.bi_pci_busfreq = 33333333;
>>> +        bd.bi_opbfreq = 33333333;
>>>         platform_ops.fixups = hotfoot_fixups;
>>>          platform_ops.exit = ibm40x_dbcr_reset;
>>>         fdt_init(_dtb_start);
>>
>> So maybe taihu should also provide this boot info when linux_boot is true (i.e. using -kernel) like the ref405ep does? Usually when using -kernel without -bios then QEMU has to also emulate enough of what the firmware would otherwise do like setting up devices and setting boot environment. Or if we have both -bios and -kernel then maybe -kernel should tell the firmware to boot a kernel but that may need a way to do that like setting variables in nvram but we don't have models of that in taihu. This taihu machine seems to be an early skeleton that wasn't finished, the ref405ep seems to be more advanced.
> 
> I agree, looking code, the ref405ep board seems to be in a better shape than the taihu board. My u-boot image seems to run fine with both machines, so I'd suggest that we deprecate (and later remove) the taihu board, and keep the ref405ep board in QEMU if it is still helpful for Christophe (or anybody else).

Yes. It could nearly run userspace, if one was available.

Thanks,

C.

U-Boot 2015.10-00236-g677f970bc6-dirty (Oct 06 2021 - 08:59:53 +0200)

CPU:   AMCC PowerPC 405EP Rev. B at 770 MHz (PLB=256 OPB=128 EBC=128)
        I2C boot EEPROM disabled
        Internal PCI arbiter enabled
        16 KiB I-Cache 16 KiB D-Cache
Board: Taihu - AMCC PPC405EP Evaluation Board
I2C:   ready
DRAM:  128 MiB
Flash: ## Unknown FLASH on Bank 0 - Size = 0x00000000 = 0 MB
## Unknown FLASH on Bank 1 - Size = 0x00000000 = 0 MB
0 Bytes
*** Warning - bad CRC, using default environment

PCI:   Bus Dev VenId DevId Class Int
PCI:
Net:   No ethernet found.

Type run flash_nfs to mount root filesystem over NFS

Hit any key to stop autoboot:  0
=> bootm 0x1000000
## Booting kernel from Legacy Image at 01000000 ...
    Image Name:   Linux-5.15.0-rc6-dirty
    Image Type:   PowerPC Linux Kernel Image (gzip compressed)
    Data Size:    3870579 Bytes = 3.7 MiB
    Load Address: 00800000
    Entry Point:  00801ad0
    Verifying Checksum ... OK
    Uncompressing Kernel Image ... OK
Memory <- <0x0 0x8000000> (128MB)
CPU clock-frequency <- 0x7f28155 (133MHz)
CPU timebase-frequency <- 0x7f28155 (133MHz)
/plb: clock-frequency <- 1fca055 (33MHz)
/plb/opb: clock-frequency <- 1fca055 (33MHz)
/plb/ebc: clock-frequency <- 1fca055 (33MHz)
/plb/opb/serial@ef600300: clock-frequency <- 1d1079 (2MHz)
/plb/opb/serial@ef600400: clock-frequency <- 1d1079 (2MHz)
ethernet0: local-mac-address <- 00:00:00:00:00:00
ethernet1: local-mac-address <- 00:00:2d:e5:44:80
Fixing devtree for 4M Flash

zImage starting: loaded at 0x00800000 (sp: 0x07eaabb0)
Decompression error: 'Not a gzip file'
No valid compressed data found, assume uncompressed data
Allocating 0x73f274 bytes for kernel...
0x71c0f0 bytes of uncompressed data copied

Linux/PowerPC load:
Finalizing device tree... flat tree at 0xf43960
Linux version 5.15.0-rc6-dirty (legoater@yukon) (powerpc64-linux-gnu-gcc (GCC) 11.2.1 20210728 (Red Hat Cross 11.2.1-1), GNU ld version 2.35.2-1.fc34) #4 Wed Oct 20 16:37:46 CEST 2021
Using PowerPC 40x Platform machine description
printk: bootconsole [udbg0] enabled
-----------------------------------------------------
phys_mem_size     = 0x8000000
dcache_bsize      = 0x20
icache_bsize      = 0x20
cpu_features      = 0x0000000000000100
   possible        = 0x0000000000000100
   always          = 0x0000000000000100
cpu_user_features = 0x86000000 0x00000000
mmu_features      = 0x00000004
-----------------------------------------------------
Zone ranges:
   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
Movable zone start for each node
Early memory node ranges
   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
MMU: Allocated 1088 bytes of context maps for 255 contexts
Built 1 zonelists, mobility grouping on.  Total pages: 32512
Kernel command line:
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
mem auto-init: stack:off, heap alloc:off, heap free:off
Kernel virtual memory layout:
   * 0xffbdf000..0xfffff000  : fixmap
   * 0xc9000000..0xffbdf000  : vmalloc & ioremap
Memory: 122444K/131072K available (4908K kernel code, 224K rwdata, 1300K rodata, 852K init, 136K bss, 8628K reserved, 0K cma-reserved)
SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
NR_IRQS: 512, nr_irqs: 512, preallocated irqs: 16
UIC0 (32 IRQ sources) at DCR 0xc0
random: get_random_u32 called from start_kernel+0x498/0x5f8 with crng_init=0
clocksource: timebase: mask: 0xffffffffffffffff max_cycles: 0x1ec031343f, max_idle_ns: 440795203544 ns
clocksource: timebase mult[7800000] shift[24] registered
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
futex hash table entries: 256 (order: -1, 3072 bytes, linear)
NET: Registered PF_NETLINK/PF_ROUTE protocol family
DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations
              
thermal_sys: Registered thermal governor 'step_wise'
PCI host bridge /plb/pci@ec000000 (primary) ranges:
  MEM 0x0000000080000000..0x000000009fffffff -> 0x0000000080000000
   IO 0x00000000e8000000..0x00000000e800ffff -> 0x0000000000000000
4xx PCI DMA offset set to 0x00000000
4xx PCI DMA window base to 0x0000000000000000
DMA window size 0x0000000080000000
PCI: Probing PCI hardware
PCI host bridge to bus 0008:00
pci_bus 0008:00: root bus resource [io  0x0000-0xffff]
pci_bus 0008:00: root bus resource [mem 0x80000000-0x9fffffff]
pci_bus 0008:00: root bus resource [bus 00-ff]
pci_bus 0008:00: busn_res: [bus 00-ff] end is updated to ff
pci_bus 0008:00: busn_res: [bus 00-ff] end is updated to 00
pci_bus 0008:00: resource 4 [io  0x0000-0xffff]
pci_bus 0008:00: resource 5 [mem 0x80000000-0x9fffffff]
vgaarb: loaded
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
PTP clock support registered
clocksource: Switched to clocksource timebase
NET: Registered PF_INET protocol family
IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
TCP: Hash tables configured (established 1024 bind 1024)
UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
NET: Registered PF_UNIX/PF_LOCAL protocol family
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
PCI: CLS 0 bytes, default 32
workingset: timestamp_bits=30 max_order=15 bucket_order=0
io scheduler mq-deadline registered
io scheduler kyber registered
Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
printk: console [ttyS0] disabled
serial8250.0: ttyS0 at MMIO 0xef600400 (irq = 16, base_baud = 119047) is a 16550A
printk: console [ttyS0] enabled
printk: console [ttyS0] enabled
printk: bootconsole [udbg0] disabled
printk: bootconsole [udbg0] disabled
serial8250.0: ttyS1 at MMIO 0xef600300 (irq = 17, base_baud = 119047) is a 16550A
printk: console [ttyS0] disabled
printk: console [ttyS0] enabled
ef600300.serial: ttyS1 at MMIO 0xef600300 (irq = 17, base_baud = 119047) is a 16550
brd: module loaded
libphy: Fixed MDIO Bus: probed
NET: Registered PF_INET6 protocol family
Segment Routing with IPv6
In-situ OAM (IOAM) with IPv6
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered PF_PACKET protocol family
drmem: No dynamic reconfiguration memory found
Freeing unused kernel image (initmem) memory: 852K
Kernel memory protection not selected by kernel config.
Run /init as init process
init[1]: illegal instruction (4) at 10038380 nip 10038380 lr 10034be0 code 1 in busybox[10000000+61000]
init[1]: code: 6129c000 7f914840 419d0350 562be13e 380bffff 2b800020 409d0314 3d204330
init[1]: code: 6c008000 91210018 3d201006 9001001c <c1a9b834> c8010018 fc006828 fc000018
Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004
CPU: 0 PID: 1 Comm: init Not tainted 5.15.0-rc6-dirty #4
Call Trace:
[c0815da0] [c0024408] panic+0x11c/0x2e0 (unreliable)
[c0815e00] [c0026038] do_exit+0x8b0/0x908
[c0815e50] [c0027044] do_group_exit+0x34/0x9c
[c0815e70] [c0033bd0] get_signal+0x174/0x734
[c0815ec0] [c0007794] do_notify_resume+0x70/0x2b0
[c0815f20] [c000ca7c] interrupt_exit_user_prepare_main+0x6c/0xe0
[c0815f40] [c000f1e0] interrupt_return+0x14/0x148
--- interrupt: 700 at 0x10038380
NIP:  10038380 LR: 10034be0 CTR: 1000db60
REGS: c0815f50 TRAP: 0700   Not tainted  (5.15.0-rc6-dirty)
MSR:  0008c030 <EE,PR,IR,DR>  CR: 40000024  XER: 00000000

GPR00: 8000005a bf9c7d90 100791f8 000005a4 bf9c8144 0000001f 00000001 1000026c
GPR08: 0000c030 10060000 00001000 0000005b 72656773 00000000 00000000 00000000
GPR16: 00000000 000005b0 00000000 100726ec 00000000 00000000 00000000 00000000
GPR24: 00000000 00000002 00000002 bf9c8144 10070000 000005a4 bf9c8144 000005a4
NIP [10038380] 0x10038380
LR [10034be0] 0x10034be0
--- interrupt: 700
Rebooting in 180 seconds..
QEMU 6.1.50 monitor - type 'help' for more information


  reply	other threads:[~2021-10-20 14:43 UTC|newest]

Thread overview: 93+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-27  4:48 [PATCH v3 0/7] Reduce load on ppc target maintainers David Gibson
2021-09-27  4:48 ` [PATCH v3 1/7] qemu: Split machine_ppc.py acceptance tests David Gibson
2021-09-27  4:50   ` Philippe Mathieu-Daudé
2021-09-27 16:44   ` Philippe Mathieu-Daudé
2021-09-27 16:53     ` Cédric Le Goater
2021-09-27 17:18       ` Philippe Mathieu-Daudé
2021-09-27  4:48 ` [PATCH v3 2/7] MAINTAINERS: Remove machine specific files from ppc TCG CPUs entry David Gibson
2021-09-27  4:48 ` [PATCH v3 3/7] MAINTAINERS: Remove David & Greg as reviewers for a number of boards David Gibson
2021-09-27  4:48 ` [PATCH v3 4/7] MAINTAINERS: Orphan obscure ppc platforms David Gibson
2021-10-01  8:35   ` Deprecate the ppc405 boards in QEMU? (was: [PATCH v3 4/7] MAINTAINERS: Orphan obscure ppc platforms) Thomas Huth
2021-10-01  9:14     ` Christophe Leroy
2021-10-01  9:43       ` Thomas Huth
2021-10-01 11:12         ` Peter Maydell
2021-10-01 12:04           ` Thomas Huth
2021-10-01 13:04             ` Christophe Leroy
2021-10-01 13:14               ` Cédric Le Goater
2021-10-01 13:24               ` Peter Maydell
2021-10-01 14:18               ` Thomas Huth
2021-10-05  0:48                 ` David Gibson
2021-10-05  4:44                   ` Christophe Leroy
2021-10-05  6:18                     ` Alexey Kardashevskiy
2021-10-05  6:42                       ` Thomas Huth
2021-10-05  8:05                         ` Alexey Kardashevskiy
2021-10-05  8:07                           ` Thomas Huth
2021-10-05  8:51                             ` Deprecate the ppc405 boards in QEMU? Thomas Huth
2021-10-05 12:17                               ` BALATON Zoltan
2021-10-05 12:35                                 ` Thomas Huth
2021-10-05 21:53                                   ` BALATON Zoltan
2021-10-06  6:39                                     ` Thomas Huth
2021-10-06  7:25                                     ` Thomas Huth
2021-10-11  8:10                                       ` Thomas Huth
2021-10-11  9:20                                         ` David Gibson
2021-10-11 13:24                                           ` Thomas Huth
2021-10-19  9:31                                             ` Christophe Leroy
2021-10-19  9:39                                               ` Thomas Huth
2021-10-19  9:48                                                 ` Christophe Leroy
2021-10-19 10:07                                                   ` BALATON Zoltan
2021-10-19 11:11                                                     ` Thomas Huth
2021-10-19 11:51                                                       ` Christophe Leroy
2021-10-19 12:38                                                         ` BALATON Zoltan
2021-10-19 13:44                                                           ` Christophe Leroy
2021-10-19 14:24                                                             ` Christophe Leroy
2021-10-19 14:56                                                               ` BALATON Zoltan
2021-10-19 16:12                                                                 ` Christophe Leroy
2021-10-19 20:55                                                                   ` Cédric Le Goater
2021-10-19 21:30                                                                   ` Cédric Le Goater
2021-10-20  9:02                                                                     ` Christophe Leroy
2021-10-20 10:10                                                                       ` Cédric Le Goater
2021-10-20 13:27                                                                         ` LEROY Christophe
2021-10-20 14:31                                                                           ` BALATON Zoltan
2021-10-20 14:34                                                                             ` Thomas Huth
2021-10-20 14:41                                                                               ` Cédric Le Goater [this message]
2021-10-20 15:03                                                                                 ` LEROY Christophe
2021-10-20 14:39                                                                           ` Cédric Le Goater
2021-10-20 15:28                                                                             ` LEROY Christophe
2021-10-20 10:21                                                       ` Philippe Mathieu-Daudé
2021-10-20 11:40                                                         ` BALATON Zoltan
2021-10-20 10:12                                                     ` CLI: Using -bios AND -kernel Philippe Mathieu-Daudé
2021-10-20 10:54                                                       ` Thomas Huth
2021-10-20 11:35                                                         ` BALATON Zoltan
2021-10-19  9:41                                               ` Deprecate the ppc405 boards in QEMU? Greg Kurz
2021-10-05  8:14                       ` Deprecate the ppc405 boards in QEMU? (was: [PATCH v3 4/7] MAINTAINERS: Orphan obscure ppc platforms) Cédric Le Goater
2021-10-05 12:20                         ` BALATON Zoltan
2021-10-05 12:29                           ` Thomas Huth
2021-10-20 10:26                             ` Philippe Mathieu-Daudé
2021-10-20 11:42                               ` BALATON Zoltan
2021-10-20 12:43                                 ` Cédric Le Goater
2021-10-20 13:16                                   ` LEROY Christophe
2021-10-20 15:04                                     ` Simon Marchi
2021-10-21  6:48                                     ` Christophe Leroy
2021-10-21  7:25                                       ` Deprecate the ppc405 boards in QEMU? Thomas Huth
2021-10-21  8:01                                         ` Christophe Leroy
2021-10-28 12:24                                     ` Deprecate the ppc405 boards in QEMU? (was: [PATCH v3 4/7] MAINTAINERS: Orphan obscure ppc platforms) Luis Machado
2021-10-28 17:27                                       ` Christophe Leroy
2021-10-20 13:35                                   ` Deprecate the ppc405 boards in QEMU? Thomas Huth
2021-10-20 14:55                                     ` BALATON Zoltan
2021-10-20 15:04                                       ` Thomas Huth
2021-10-20 14:16                                   ` Deprecate the ppc405 boards in QEMU? (was: [PATCH v3 4/7] MAINTAINERS: Orphan obscure ppc platforms) BALATON Zoltan
2021-10-05  8:49                     ` Daniel P. Berrangé
2021-10-05 16:15                       ` Philippe Mathieu-Daudé
2021-10-05 16:20                         ` Daniel P. Berrangé
2021-10-27  4:06                           ` Philippe Mathieu-Daudé
2021-10-27  8:40                             ` Cédric Le Goater
2021-10-27 10:42                               ` Christophe Leroy
2021-10-27 10:48                                 ` Philippe Mathieu-Daudé
2021-10-27 17:03                                 ` Cédric Le Goater
2021-09-27  4:48 ` [PATCH v3 5/7] MAINTAINERS: Remove David & Greg as reviewers/co-maintainers of powernv David Gibson
2021-09-27  4:48 ` [PATCH v3 6/7] MAINTAINERS: Add information for OpenPIC David Gibson
2021-09-29  7:08   ` Mark Cave-Ayland
2021-09-27  4:48 ` [PATCH v3 7/7] MAINTAINERS: Demote sPAPR from "Supported" to "Maintained" David Gibson
2021-09-30  1:15 ` [PATCH v3 0/7] Reduce load on ppc target maintainers David Gibson
2021-10-06  9:52   ` Alexey Kardashevskiy
2021-10-06 11:03     ` Greg Kurz

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=b713a091-848d-8164-2ff8-7953ac605ad2@kaod.org \
    --to=clg@kaod.org \
    --cc=agraf@csgraf.de \
    --cc=balaton@eik.bme.hu \
    --cc=christophe.leroy@csgroup.eu \
    --cc=crosa@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=dbarboza@redhat.com \
    --cc=groug@kaod.org \
    --cc=hpoussin@reactos.org \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=thuth@redhat.com \
    --cc=wainersm@redhat.com \
    /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.