qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gleb Natapov <gleb@redhat.com>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: kevin@koconnor.net, qemu-devel@nongnu.org, kvm@vger.kernel.org,
	The OpenBIOS Mailinglist <openbios@openbios.org>
Subject: [Qemu-devel] Re: [PATCHv8 00/16] boot order specification
Date: Sat, 11 Dec 2010 18:06:17 +0200	[thread overview]
Message-ID: <20101211160617.GA9026@redhat.com> (raw)
In-Reply-To: <AANLkTi=-uEELKjvUz5Uu2w3=dqUj+DXXpTmhsN5zB2-Z@mail.gmail.com>

On Sat, Dec 11, 2010 at 03:13:35PM +0000, Blue Swirl wrote:
> On Wed, Dec 8, 2010 at 11:34 AM, Gleb Natapov <gleb@redhat.com> wrote:
> > Forget to save a couple of buffers before sending version 7 :(
> >
> > Anthony, Blue can this be applied now?
> 
> I made some more tests, this time with PPC. I modified OpenBIOS to
> print out the boot device list:
> 
> $ qemu-system-ppc -drive if=none,id=hda,file=/dev/null -device
> ide-drive,drive=hda,bootindex=1 -drive if=none,id=cd,file=/dev/null
> -device ide-drive,drive=cd,bootindex=0 -nographic -prom-env
> 'auto-boot?=false' -L .
> qemu-system-ppc: pci_add_option_rom: failed to find romfile "vgabios-stdvga.bin"
> Could not open option rom 'pxe-ne2k_pci.bin': No such file or directory
> 
> >> =============================================================
> >> OpenBIOS 1.0 [Nov 28 2010 19:37]
> >> Configuration device id QEMU version 1 machine id 2
> >> CPUs: 1
> >> Memory: 128M
> >> UUID: 00000000-0000-0000-0000-000000000000
> >> CPU type PowerPC,750
> >> bootindex /grackle@fec00000/ide@3/drive@1/disk@1
> >> /grackle@fec00000/ide@3/drive@1/disk@0
> Welcome to OpenBIOS v1.0 built on Nov 28 2010 19:37
> 
> 0 > show-devs
> 7be6324 /
> 7be6440 /aliases
> 7be64e4 /openprom (BootROM)
> 7bebfa0 /openprom/client-services
> 7be668c /options
> 7be6704 /chosen
> 7be67e8 /builtin
> 7be688c /builtin/console
> 7bebcac /packages
> 7becda8 /packages/cmdline
> 7becee8 /packages/disk-label
> 7bedb58 /packages/terminal-emulator
> 7bee548 /packages/deblocker
> 7bee89c /packages/hfsplus-files
> 7beeb3c /packages/hfs-files
> 7beedd8 /packages/ext2-files
> 7bef010 /packages/iso9660-files
> 7bef248 /packages/grubfs-files
> 7bef480 /packages/mac-parts
> 7bef6b8 /packages/pc-parts
> 7bef8ec /packages/xcoff-loader
> 7bef9b8 /packages/elf-loader
> 7befa80 /packages/bootinfo-loader
> 7bed958 /cpus
> 7bf2fe8 /cpus/PowerPC,750@0 (cpu)
> 7beda58 /memory@0 (memory)
> 7befb4c /pci@80000000 (pci)
> 7beff64 /pci@80000000/QEMU,VGA@1 (display)
> 7bf0438 /pci@80000000/NE2000@2 (network)
> 7bf0814 /pci@80000000/pci-ata@3 (pci-ide)
> 7bf0c50 /pci@80000000/pci-ata@3/ata-1@500 (ata)
> 7bf0dd0 /pci@80000000/pci-ata@3/ata-2@600 (ata)
> 7bf0f50 /pci@80000000/pci-ata@3/ata-2@600/disk@1 (block)
> 7bf131c /pci@80000000/pci-ata@3/ata-2@600/disk@0 (block)
> 7bf1674 /pci@80000000/mac-io@4 (mac-io)
> 7bf1b54 /pci@80000000/mac-io@4/via-cuda@16000 (via-cuda)
> 7bf1d70 /pci@80000000/mac-io@4/via-cuda@16000/adb (adb)
> 7bf1ed8 /pci@80000000/mac-io@4/via-cuda@16000/adb/keyboard@8 (keyboard)
> 7bf2080 /pci@80000000/mac-io@4/via-cuda@16000/adb/mouse@9 (mouse)
> 7bf220c /pci@80000000/mac-io@4/via-cuda@16000/rtc (rtc)
> 7bf23f4 /pci@80000000/mac-io@4/nvram@60000 (nvram)
> 7bf2614 /pci@80000000/mac-io@4/escc@13000 (escc)
> 7bf271c /pci@80000000/mac-io@4/escc@13000/ch-a@13020 (serial)
> 7bf29b4 /pci@80000000/mac-io@4/escc@13000/ch-b@13000 (serial)
> 7bf2c20 /pci@80000000/mac-io@4/ata-3@20000 (ata)
>  ok
> 
> /grackle@fec00000/ide@3/drive@1/disk@1 does not match
> /pci@80000000/pci-ata@3/ata-2@600/disk@1.
> 
hw/ppc_oldworld.c has:
pci_bus = pci_grackle_init(0xfec00000, pic);
i.e it registers pci controller at MMIO address 0xfec00000. 0x80000000
is isa mmio base. Why OpenBIOS uses 80000000 as address of pci
controller? May be on real HW all memory access above 0x80000000 is
redirected to pci controller and it emulates isa? Then we should fix
qemu to do the same.

> I wonder where '@80000000' comes from. A dump of original g3beige
> device tree is here:
> http://penguinppc.org/historical/dev-trees-html/g3_beige_300.html
> 
> But actually the tree generated by OpenBIOS looks more like g3bw one:
> http://penguinppc.org/historical/dev-trees-html/g3bw_400.html
> 
> How can we get the names to be more compatible? At least
> s/grackle/pci/ is easy to do in QEMU, but which instance (QEMU or
> OpenBIOS) should handle pci-ata vs ide change?
http://playground.sun.com/pub/p1275/bindings/pci/pci2_1.pdf has table on
page 10 that defines how pci class code should be translated into OF
name. This is what my patch is using. pci-ata does not look spec
compliant (or is there more up-to-date spec?)

>                                                 What should we do with
> ata-2@600 vs drive@1?
There is no available IDE OF binding spec, so I when with the way
OpenBIOS reports ata on qemu-x86. I have no idea what 600 in ata-2@600
may mean, but looking at g3_beige_300.html there is no such node there
and looking at any other device tree in http://penguinppc.org/historical/dev-trees-html/
I haven't found one that use this kind of addressing for pci-ata. 
http://penguinppc.org/historical/dev-trees-html/g3bw_400.html for
instance has pci@80000000/pci-bridge@d/pci-ata@1/ata-4. ata-2@600 kind of
addressing is used by devices on mac-io bus which I do not think we
emulate in qemu. So it looks like OpneBIOS is wrong here.

--
			Gleb.

  reply	other threads:[~2010-12-11 16:06 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-08 11:34 [Qemu-devel] [PATCHv8 00/16] boot order specification Gleb Natapov
2010-12-08 11:34 ` [Qemu-devel] [PATCHv8 01/16] Introduce fw_name field to DeviceInfo structure Gleb Natapov
2010-12-08 11:34 ` [Qemu-devel] [PATCHv8 02/16] Introduce new BusInfo callback get_fw_dev_path Gleb Natapov
2010-12-08 11:34 ` [Qemu-devel] [PATCHv8 03/16] Keep track of ISA ports ISA device is using in qdev Gleb Natapov
2010-12-08 11:34 ` [Qemu-devel] [PATCHv8 04/16] Add get_fw_dev_path callback to ISA bus " Gleb Natapov
2010-12-08 11:34 ` [Qemu-devel] [PATCHv8 05/16] Store IDE bus id in IDEBus structure for easy access Gleb Natapov
2010-12-08 11:34 ` [Qemu-devel] [PATCHv8 06/16] Add get_fw_dev_path callback to IDE bus Gleb Natapov
2010-12-08 11:35 ` [Qemu-devel] [PATCHv8 07/16] Add get_fw_dev_path callback for system bus Gleb Natapov
2010-12-08 11:35 ` [Qemu-devel] [PATCHv8 08/16] Add get_fw_dev_path callback for pci bus Gleb Natapov
2010-12-08 11:35 ` [Qemu-devel] [PATCHv8 09/16] Record which USBDevice USBPort belongs too Gleb Natapov
2010-12-08 11:35 ` [Qemu-devel] [PATCHv8 10/16] Add get_fw_dev_path callback for usb bus Gleb Natapov
2010-12-08 11:35 ` [Qemu-devel] [PATCHv8 11/16] Add get_fw_dev_path callback to scsi bus Gleb Natapov
2010-12-08 11:35 ` [Qemu-devel] [PATCHv8 12/16] Add bootindex parameter to net/block/fd device Gleb Natapov
2011-01-28 13:29   ` Markus Armbruster
2011-01-28 15:53     ` Gleb Natapov
2011-01-28 17:19       ` Markus Armbruster
2011-02-02 15:08   ` Markus Armbruster
2011-02-02 15:10     ` Gleb Natapov
2011-02-02 15:12       ` Gleb Natapov
2010-12-08 11:35 ` [Qemu-devel] [PATCHv8 13/16] Change fw_cfg_add_file() to get full file path as a parameter Gleb Natapov
2010-12-08 11:35 ` [Qemu-devel] [PATCHv8 14/16] Add bootindex for option roms Gleb Natapov
2010-12-08 11:35 ` [Qemu-devel] [PATCHv8 15/16] Add notifier that will be called when machine is fully created Gleb Natapov
2010-12-08 11:35 ` [Qemu-devel] [PATCHv8 16/16] Pass boot device list to firmware Gleb Natapov
2010-12-11 15:13 ` [Qemu-devel] Re: [PATCHv8 00/16] boot order specification Blue Swirl
2010-12-11 16:06   ` Gleb Natapov [this message]
2010-12-11 17:19     ` Blue Swirl
2010-12-11 18:02       ` Gleb Natapov
2010-12-11 18:27         ` Gleb Natapov
2010-12-11 19:06           ` Blue Swirl
2010-12-11 19:11             ` Gleb Natapov
2010-12-11 23:27               ` Benjamin Herrenschmidt
2010-12-11 18:59         ` Blue Swirl
2010-12-11 23:22     ` Benjamin Herrenschmidt
2010-12-14 19:59       ` Andreas Färber
2010-12-14 20:31         ` Benjamin Herrenschmidt
2010-12-14 23:02           ` Alexander Graf
2010-12-17 14:05             ` Andreas Färber
2010-12-11 22:10 ` Blue Swirl

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=20101211160617.GA9026@redhat.com \
    --to=gleb@redhat.com \
    --cc=blauwirbel@gmail.com \
    --cc=kevin@koconnor.net \
    --cc=kvm@vger.kernel.org \
    --cc=openbios@openbios.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).