25 Jul 2015

QEMU 2.4 and virtio-pci

I wrote in previous posts about QEMU and how to run ARM UEFI on it.

posted at: 00:57 | path: /drafts | permanent link to this entry

03 Feb 2015

Foundation model with ARM trusted firmware and UEFI

So, as I wrote in Foundation Model - a line in the sand?, a lot of things have changed in the underlying platform for the ARM Foundation Model for ARMv8. So I thought I would describe how to set one up ... on the right side of the line.

Installing the model

First of all, you need to download the ARMv8 Foundation Platform - which requires registering for an account on the ARM download portal. Extract the archive to a suitable location.

Building UEFI

The recent versions of Foundation Model are actually software compatible with the FVP Base model. The "Foundation_v8" image does not work on these, and since Linaro 2014.09, we have renamed that platform "foundation_legacy".

Secondly, the "fvp" UEFI build (like the Juno one) now expects to be loaded by ARM Trusted Firmware. So I've updated our build scripts to deal with this in a mostly automated fashion: uefi-build.sh has a new parameter -a to specify the location of an ARM Trusted Firmware checkout. It will then, based on configuration options in platforms.config, build UEFI, build ARM Trusted Firmware into a bl1.bin image, and then package the UEFI image with additional Trusted Firmware components into a fip.bin image.

Of course, you can also download our pre-built monthly release images, and skip the build instructions.

$ git clone git://git.linaro.org/uefi/uefi-tools.git
$ git clone https://github.com/ARM-software/arm-trusted-firmware.git
$ git clone git://git.linaro.org/uefi/linaro-edk2.git
$ cd linaro-edk2
$ ../uefi-tools/uefi-build.sh -a ../arm-trusted-firmware -b DEBUG fvp

Booting the system

Now grab the bl1.bin and fip.bin from Build/ArmVExpress-FVP-AArch64/DEBUG_GCC48/FV/ (or download them), and launch the foundation model.

$ Foundation_Platformpkg/models/Linux64_GCC-4.1/Foundation_Platform \
	--cores=2 \
	--gicv3 \
	--data=bl1.bin@0x0 \
	--data=fip.bin@0x08000000 \

disk.img is an optional parameter for adding a virtio block device image file, to use as a local filesystem. For very basic UEFI, GRUB or Linux kernel testing, it can be omitted.

We specify that bl1.bin (the Trusted Firmware system startup code) and fip.bin are loaded into RAM at predefined locations. We also specify that we use the GICv3 variant of the modelled system, which affects the memory map. Currently the EDK2 code still puts this GIC into legacy mode, but without --gicv3 it will look for the interrupt controller registers in the wrong location. --cores=2 is not necessary, but makes the model emulate just 2 cores rather than the default 8 - which makes the model run faster while still letting you have fun with software concurrency.

posted at: 23:46 | path: /drafts | permanent link to this entry

29 Oct 2014

Using Ovmf to test kernel SMBIOS support

qemu-system-x86_64 -m 1024 -smbios type=1,manufacturer=Leif,product=Smurf -hda sda.img -pflash pflash.img

posted at: 17:58 | path: /drafts | permanent link to this entry

14 Aug 2014

A month off

One nice thing about working for ARM is that once every four years, you get four extra weeks of holiday in a year - called a sabbatical. Especially with the British scepticism with regards to longer normal holidays, this makes for a very welcome break.

Last time I spent those weeks working in the garden, helping rig the Cambridge Beer Festival, attending the Cambridge Beer Festival and helping tear down the Cambridge Beer festival.

Being in my 9th year of employment with ARM, I now have my second one coming up, and I'll be spending it with Maria in the US, traveling aound a bit.

We will start out in San Francisco, before flying over to Denver, drive up to Estes Park (and stay there for just over a week), and then back down to Boulder. Then we commence the road trip: to Colorado National Monument, Zion National Park, Monument Valley, Durango (taking the narrow-gauge railway to Silverton), Las Cruces (New Mexico Chile Pepper Institute), Big Bend National Park, Fredericksburg and arriving in Austin where we hang around and meet up with various friends. Then flight back to SFO and straigt onto Linaro Connect.

posted at: 22:33 | path: /drafts | permanent link to this entry