[PATCH qemu 00/12] SMC and network support

Andrew Jeffery andrew at aj.id.au
Tue Jun 28 02:09:48 AEST 2016


On Thu, 2016-06-23 at 19:00 +0200, Cédric Le Goater wrote:
> 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 !

I've updated openbmc/qemu master with the latest version of these
patches based on the upstream SCU code. So Joel, you can now use the
openbmc/qemu tree for CI testing on the flash blobs.

Cheers,

Andrew
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part
URL: <http://lists.ozlabs.org/pipermail/openbmc/attachments/20160628/95f63961/attachment.sig>


More information about the openbmc mailing list