All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Cédric Le Goater" <clg@kaod.org>
To: openbmc@lists.ozlabs.org
Subject: Re: [PATCH qemu 00/12] SMC and network support
Date: Thu, 23 Jun 2016 19:00:56 +0200	[thread overview]
Message-ID: <c3003f09-8281-d22a-eeb9-6ef126a39192@kaod.org> (raw)
In-Reply-To: <1464556805-4340-1-git-send-email-clg@kaod.org>

Hello,


On 05/29/2016 11:19 PM, Cédric Le Goater wrote:
> 
> The following patchset adds to the qemu palmetto-bmc platform initial
> support for the AST2400 SMC controllers and for the FTGMAC100 network
> adapter. The device models don't implement all the features the HW
> proposes but they are complete enough to run OpenBMC on a qemu guest.
> 
> To boot one, use the following command line :
> 
>   $ qemu-system-arm -m 256 -M palmetto-bmc -nographic -nodefaults  \
> 	-mtdblock ./flash-palmetto-20160512040959  \
> 	-mtdblock ./palmetto.pnor 
> 	-net nic -net user,hostfwd=:127.0.0.1:2222-:22,hostname=qemu
> 	
> or, if you have a libvirt bridge, you can tie the nic to it :
> 	
> 	-net nic,macaddr=C0:FF:EE:00:00:02,model=ftgmac100 \
> 	-net bridge,id=net0,helper=/usr/lib/qemu/qemu-bridge-helper,br=virbr0 
> 
> The first block device uses the file './flash-palmetto-20160512040959'
> which will act as a SPI flash module for the BMC, handled by the
> SMC/FMC controller. The second block device uses the file
> './palmetto.pnor' which is an OpenPower firmware image for a palmetto
> OpenPower system. This one will be handled by the SMC/SPI controller.
> 
> 
> Code is based on Andrew's qemu and the full tree can be found here
> 
>     https://github.com/legoater/qemu/commits/aspeed
> 
> Flash images can be grabbed here :
> 
>     https://openpower.xyz/job/openbmc-build/distro=ubuntu,target=palmetto/lastSuccessfulBuild/artifact/images/palmetto/flash-palmetto
>     https://openpower.xyz/job/openpower-op-build/distro=ubuntu,target=palmetto/lastSuccessfulBuild/artifact/images/palmetto.pnor

Here is a quick update as I just did a rebase of my branch on mainline qemu 
(commit c7288767523f) :

	https://github.com/legoater/qemu/commits/aspeed

A couple of patches, that have been sent and discussed on qemu-devel@ but 
not merged yet, are included : 

	a828f92a1807 hw/misc: Add a model for the ASPEED System Control Unit
	1181e14788a9 ast2400: Integrate the SCU model and set silicon revision
	e17aa27fa6b8 palmetto-bmc: Configure the SCU's hardware strapping register
	26582428d17c ssi: change ssi_slave_init to be a realize ops
	7b50ed94582f m25p80: qdev-ify drive property
	9d058cd9dd81 ast2400: add SMC controllers (FMC and SPI)
	1f92166a189d ast2400: add SPI flash slave object
	a1fff8b8776f ast2400: create SPI flash slaves
	b93fe85af7b8 tests: add a m25p80 test

plus these for booting from the rom. There are some changes due to the rework 
of the previous and "fixes" for the block layer ... Looks stable now and mostly
ok.

	2f0dabacf3b9 m25p80: use synchronous writes to update the block backend
	0e7345a2d430 m25p80: add a m25p80_set_rom_storage() routine
	3f02fba0c02f ast2400: handle SPI flash Command mode (read only)
	8325fc4b1ad9 ast2400: use contents of first SPI flash as a rom

These are devices enhancements, nothing major :

	85f49de1c31e m25p80: add RDCR instruction for Macronix chip
	c519cdde94c6 m25p80: add mx25l25635f chip
	a520956879b1 ast2400: use a mx25l25635f chip
	31871f768618 hw/misc: add a TMP42{1,2,3} device model
	b09b8a5088a2 ast2400: add a temp sensor device on I2C bus 3
	8750ab3e2400 ast2400: add a rtc device on I2C bus 0

and to finish, the network device which has not changed but should with 
the recent findings on the ast2500 :

	4e57f68ccaf5 net: add FTGMAC100 support
	ba7a28c66ec3 ast2400: add a FTGMAC100 nic


To give it a try, use :

	$ qemu-system-arm -m 256 -M palmetto-bmc -nographic -nodefaults  \
		-drive file=flash-palmetto,format=raw,if=mtd \
		-drive file=palmetto.pnor,format=raw,if=mtd \ 
		-net nic -net user,hostfwd=:127.0.0.1:2222-:22,hostname=qemu
		-serial stdio

and if you have a libvirt bridge :

	 	-net nic,macaddr=C0:FF:EE:00:00:02,model=ftgmac100 \
		-net bridge,id=net0,helper=/usr/lib/qemu/qemu-bridge-helper,br=virbr0 


I could boot the OpenBMC 1.0 image with it. Comments welcome !

Cheers,

C.

  parent reply	other threads:[~2016-06-23 17:08 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-29 21:19 [PATCH qemu 00/12] SMC and network support Cédric Le Goater
2016-05-29 21:19 ` [PATCH qemu 01/12] ast2400: add SMC controllers (FMC and SPI) Cédric Le Goater
2016-06-07  2:08   ` Andrew Jeffery
2016-06-08 11:53     ` Cédric Le Goater
2016-05-29 21:19 ` [PATCH qemu 02/12] ast2400: add SPI flash slave object Cédric Le Goater
2016-06-07  5:34   ` Andrew Jeffery
2016-06-08 12:42     ` Cédric Le Goater
2016-05-29 21:19 ` [PATCH qemu 03/12] ast2400: create SPI flash slaves Cédric Le Goater
2016-06-07  5:56   ` Andrew Jeffery
2016-06-08 12:46     ` Cédric Le Goater
2016-05-29 21:19 ` [PATCH qemu 04/12] m25p80: add a get storage routine Cédric Le Goater
2016-05-29 21:19 ` [PATCH qemu 05/12] ast2400: handle SPI flash Command mode (read only) Cédric Le Goater
2016-06-07  6:04   ` Andrew Jeffery
2016-05-29 21:19 ` [PATCH qemu 06/12] ast2400: use contents of first SPI flash as a rom Cédric Le Goater
2016-06-07  6:24   ` Andrew Jeffery
2016-06-09 10:42     ` Cédric Le Goater
2016-05-29 21:20 ` [PATCH qemu 07/12] m25p80: add RDCR instruction for Macronix chip Cédric Le Goater
2016-05-29 21:20 ` [PATCH qemu 08/12] m25p80: add mx25l25635f chip Cédric Le Goater
2016-05-29 21:20 ` [PATCH qemu 09/12] ast2400: use a " Cédric Le Goater
2016-06-07  6:29   ` Andrew Jeffery
2016-05-29 21:20 ` [PATCH qemu 10/12] ast2400: add a BT device Cédric Le Goater
2016-06-07  7:15   ` Andrew Jeffery
2016-05-29 21:20 ` [PATCH qemu 11/12] net: add FTGMAC100 support Cédric Le Goater
2016-06-08  3:50   ` Andrew Jeffery
2016-05-29 21:20 ` [PATCH qemu 12/12] ast2400: add a FTGMAC100 nic Cédric Le Goater
2016-06-07  7:26   ` Andrew Jeffery
2016-06-23 17:00 ` Cédric Le Goater [this message]
2016-06-24  7:06   ` [PATCH qemu 00/12] SMC and network support Joel Stanley
2016-06-24  7:18     ` Cédric Le Goater
2016-06-27 16:09   ` Andrew Jeffery

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=c3003f09-8281-d22a-eeb9-6ef126a39192@kaod.org \
    --to=clg@kaod.org \
    --cc=openbmc@lists.ozlabs.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 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.