<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Another attempt at blogging</title>
    <link>http://longhouse.vikings.scot/</link>
    <description>ARM, open source and stuff...</description>
    <language>en</language>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <generator>blosxom/2.1.2</generator>

  <item>
    <title>Moving the blog</title>
    <pubDate>Sat, 05 Aug 2017 00:00:00 +0100</pubDate>
    <link>http://longhouse.vikings.scot/2017/08/05#old_blog</link>
    <category>/life</category>
    <guid isPermaLink="false">http://longhouse.vikings.scot/life/old_blog</guid>
    <description>
&lt;p/&gt;Well, it was never going to last forever. I have abandoned this blog. The content has been migrated over to
&lt;a href=&quot;https://station.eciton.net/&quot;&gt;my new blog&lt;/a&gt;, and new posts are being added there. Move along, nothing to see here...</description>
  </item>
  <item>
    <title>QEMU USB host device pass-through</title>
    <pubDate>Tue, 13 Dec 2016 18:09:00 +0000</pubDate>
    <link>http://longhouse.vikings.scot/2016/12/13#qemu-usb-passthrough</link>
    <category>/uefi</category>
    <guid isPermaLink="false">http://longhouse.vikings.scot/uefi/qemu-usb-passthrough</guid>
    <description>
&lt;h2&gt;Speeding up UEFI driver development&lt;/h2&gt;
&lt;p/&gt;While working on the ChaosKey UEFI driver, I once again found myself in a situation of tedium: how to simplify driver development when the target for my device driver is firmware. Moving around a USB key with a FAT filesystem may be a completely valid thing to do in order to install a pre-existing driver. But when you are trying to learn how to write drivers for a new platform (and write &lt;a href=&quot;http://blog.eciton.net/uefi/uefi-driver-part1.html&quot;&gt;blog posts about it&lt;/a&gt;), the &lt;i&gt;modify -&gt; compile -&gt; copy -&gt; reboot -&gt; load -&gt; fail -&gt; try again&lt;/i&gt; cycle gets quite tedious. As usual, QEMU has/is the answer, letting you pass a USB device controlled by the host over to the guest.

&lt;h3&gt;Make sure your QEMU is built with libusb support&lt;/h3&gt;
&lt;p/&gt;Unsurprisingly, in order to support passing through USB device access to guests, QEMU needs to know how to deal with USB - and it does this using libusb. Most Linux distributions package a version of QEMU with libusb support enabled, but if you are building your own version from source, make sure the output from configure contains &lt;pre&gt;libusb            yes&lt;/pre&gt; If it does not, under Debian, &lt;code&gt;$ sudo apt-get build-dep qemu&lt;/code&gt; should do the trick - anywhere else make sure you manually install libusb v1.0 or later (Debian&apos;s &lt;code&gt;libusb-dev&lt;/code&gt; package is v0.1, which will not work), with development headers.
Without libusb support, you&apos;ll get the error message &lt;code&gt;&apos;usb-host&apos; is not a valid device model name&lt;/code&gt; when following the below instructions.

&lt;h3&gt;Identifying your device&lt;/h3&gt;
&lt;p/&gt;Once your QEMU is ready, in order to pass a device through to a guest, you must first locate it on the host.
&lt;pre&gt;$ lsusb
...
Bus 008 Device 002: ID 1d50:60c6 OpenMoko, Inc
Bus 008 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
....&lt;/pre&gt;
The vendor ID (1d50) of ChaosKey is taken from the &lt;a href=&quot;http://wiki.openmoko.org/wiki/USB_Product_IDs&quot;&gt;OpenMoko project&lt;/a&gt;, which has repurposed their otherwise unused device registry space for various community/homebrew devices.

&lt;p/&gt;If you want to be able to access the device as non-root, ensure the device node under &lt;pre&gt;/dev/bus/usb/&amp;lt;bus&amp;gt;/&amp;lt;device&amp;gt;&lt;/pre&gt; (in this case &lt;code&gt;/dev/bus/usb/008/002&lt;/code&gt;) has suitable read-write access for your user.

&lt;h3&gt;Launching QEMU&lt;/h3&gt;
&lt;p/&gt;Unlike the x86 default &quot;pc&quot; machine, QEMU has no default machine type for ARM. The &quot;generic virtualized platform&quot; type &lt;i&gt;virt&lt;/i&gt; has no USB attached by default, so we need to manually add one. &lt;code&gt;ich-usb-uhci1&lt;/code&gt; supports high-speed, and so is needed for some devices to work under emulation. Using the &quot;virtual FAT&quot; support in QEMU is the easiest way to get a driver into UEFI without recompiling. The example below uses a subdirectory called &lt;code&gt;fatdir&lt;/code&gt; which QEMU generates an emulated FAT filesystem from.

&lt;p/&gt;
&lt;pre&gt;
USB_HOST_BUS=8
USB_HOST_PORT=2
AARCH64_OPTS=&quot;-pflash QEMU_EFI.fd -cpu cortex-a57 -M virt -usb -device ich9-usb-uhci1&quot;
X86_OPTS=&quot;-pflash OVMF.fd -usb&quot;
COMMON_OPTS=&quot;-device usb-host,bus=usb-bus.0,hostbus=$USB_HOST_BUS,hostport=$USB_HOST_PORT -nographic -net none -hda fat:fatdir/&quot;
&lt;/pre&gt;

&lt;p/&gt;
This can then be executed as&lt;br/&gt;
&lt;code&gt;$ qemu-system-x86_64 $X86_OPTS $COMMON_OPTS&lt;/code&gt;&lt;br/&gt;
or&lt;br/&gt;
&lt;code&gt;$ qemu-system-aarch64 $AARCH64_OPTS $COMMON_OPTS&lt;/code&gt;&lt;br/&gt;
respectively.&lt;br/&gt;

&lt;p/&gt;
&lt;b&gt;Note:&lt;/b&gt; Ordering of some of the above options is important.&lt;br/&gt;
&lt;b&gt;Note2:&lt;/b&gt; That AARCH64 &lt;code&gt;QEMU_EFI.fd&lt;/code&gt; needs to be extended to 64MB in order for QEMU to be happy with it. &lt;a href=&quot;http://blog.eciton.net/uefi/qemu-arm-uefi.html&quot;&gt;See this older post for an example.&lt;/a&gt;

&lt;p/&gt;
My usage then looks like the following, after having been dropped into the UEFI shell, with a bunch of overly verbose debug messages in my last compiled version of the driver:
&lt;pre&gt;
Shell&gt; load fs0:\ChaosKeyDxe.efi
*** Installed ChaosKey driver! ***
Image &apos;FS0:\ChaosKeyDxe.efi&apos; loaded at 47539000 - Success
Shell&gt; y (0x1D50:0x60C6) is my homeboy!
1 supported languages
0: 0409
Manufacturer: altusmetrum.org
Product: ChaosKey-hw-1.0-sw-1.6.6
Serial: 001c00325346430b20333632
&lt;/pre&gt;

&lt;p/&gt;
And, yes, those last three lines are actually read from the USB device connected to host QEMU is running on.

&lt;h3&gt;Final comments&lt;/h3&gt;
&lt;p/&gt;
One thing that is unsurprising, but very cool and useful, is that this works well cross-architecture. So you can test that your drivers are truly portable by building (and testing) them for AARCH64, EBC and X64 without having to move around between physical machines.

&lt;p/&gt;
Oh, and another useful command in this cycle is &lt;code&gt;reset -s&lt;/code&gt; in the UEFI shell, which &quot;powers down&quot; the machine and exits QEMU.</description>
  </item>
  <item>
    <title>UEFI Driver Development - Part 1</title>
    <pubDate>Tue, 13 Sep 2016 22:02:00 +0100</pubDate>
    <link>http://longhouse.vikings.scot/2016/09/13#uefi-driver-part1</link>
    <category>/uefi</category>
    <guid isPermaLink="false">http://longhouse.vikings.scot/uefi/uefi-driver-part1</guid>
    <description>
&lt;p/&gt;One of the key features of UEFI is that the specification and the APIs/ABIs it guarantees provides the ability to produce portable applications, drivers and libraries (in the form of protocols). On the simpler side, by letting you compile the driver once for each architecture - and on the more space age side by letting you build a single driver that works across all architectures (using &lt;a href=&quot;http://vzimmer.blogspot.co.uk/2015/08/efi-byte-code.html&quot;&gt;EFI Byte Code&lt;/a&gt;). The extra magic comes in the form of Option ROM support, which lets plug-in PCI cards keep a driver onboard, informing UEFI to load it on boot. (Any jokes about Forth drivers for Open Firmware go here.)

&lt;p/&gt;So, having never actually written a UEFI driver from scratch, and most of the drivers I have come across having really been platform drivers, I figured that would be a good start to write a standalone driver from scratch. And the outcome is this slightly hands-on blog post series. This part covers:
&lt;ul&gt;
  &lt;li&gt;creating a new driver from scratch&lt;/li&gt;
  &lt;li&gt;building it as a standalone driver&lt;/li&gt;
  &lt;li&gt;loading it from the UEFI Shell&lt;/li&gt;
  &lt;li&gt;having it detect the presence of a device it recognizes&lt;/li&gt;
  &lt;li&gt;unloading it from the UEFI Shell&lt;/li&gt;
&lt;/ul&gt;

&lt;p/&gt;Having just come across a hardware random number generator called &lt;a href=&quot;http://altusmetrum.org/ChaosKey/&quot;&gt;ChaosKey&lt;/a&gt;, I figured this would make an excellent candidate.

&lt;h2&gt;Creating a standalone UEFI driver from scratch&lt;/h2&gt;
&lt;p/&gt;Since UEFI drivers are meant to be standalone buildable, they tend to be kept in separate directories. Since this driver is intended to run during/after DXE phase, let&apos;s put everything in a directory called &lt;a href=&quot;https://git.linaro.org/people/leif.lindholm/OpenPlatformPkg.git/tree/b1f241e7e2cc0e241d737d1533f0a95008520637:/Drivers/Usb/Misc/ChaosKeyDxe&quot;&gt;ChaosKeyDxe&lt;/a&gt; (CamelCase mandatory - link takes you to the directory in git, where you can view the files directly).

&lt;h3&gt;Create a build information file&lt;/h3&gt;
&lt;p/&gt;First of all, we need a build information file (&lt;b&gt;.inf&lt;/b&gt;). The format of the build information file is described in the &lt;i&gt;EDK II INF File Spec&lt;/i&gt;, which can be found in the &lt;a href=&quot;https://github.com/tianocore/tianocore.github.io/wiki/EDK-II-Specifications&quot;&gt;EDK2 github pages&lt;/a&gt;.

&lt;p/&gt;Start with a [Defines] section
&lt;pre&gt;
[Defines]
  INF_VERSION                    = 0x00010019
  BASE_NAME                      = ChaosKeyDxe
  FILE_GUID                      = 9A54122B-F5E4-40D8-AE61-A71E406ED449
  MODULE_TYPE                    = UEFI_DRIVER
  VERSION_STRING                 = 1.0
  ENTRY_POINT                    = ChaosKeyEntryPoint
  UNLOAD_IMAGE                   = ChaosKeyUnload
&lt;/pre&gt;

&lt;p/&gt;The &lt;b&gt;INF_VERSION&lt;/b&gt; reflects which version of the INF file format is being followed, in this case 1.25 (&lt;code&gt;0x0001.0x0019&lt;/code&gt;). Interestingly, nearly all build information files I have come across before specify 0x00010005 ... cargo culting from earlier examples.&lt;br/&gt;&lt;br/&gt;
Followed by &lt;b&gt;BASE_NAME&lt;/b&gt;, the single word identifier used for this component. To keep things simple, I&apos;m reusing the directory name, for the same reasons.&lt;br/&gt;&lt;br/&gt;
And then a &lt;b&gt;FILE_GUID&lt;/b&gt;, generated uniquely for this file - for example through &lt;a href=&quot;https://www.guidgenerator.com/online-guid-generator.aspx&quot;&gt;this online generator&lt;/a&gt;, ensuring &lt;i&gt;Uppcase&lt;/i&gt; and &lt;i&gt;Hyphens&lt;/i&gt; are both ticked. If this string is copied from an existing template rather than uniquely generated, &lt;i&gt;really&lt;/i&gt; bad stuff will happen.&lt;br/&gt;&lt;br/&gt;
And then &lt;b&gt;MODULE_TYPE&lt;/b&gt; to tell the build system we are producing a UEFI_DRIVER.&lt;br/&gt;&lt;br/&gt;
A &lt;b&gt;VERSION_STRING&lt;/b&gt; is also required - this is simply a UCS2 string indicating the version of the driver.&lt;br/&gt;&lt;br/&gt;
The &lt;b&gt;ENTRY_POINT&lt;/b&gt; function is automatically called at driver load time, and needs to contain code that registers the driver with the system, and do any other global setup needed to make the driver ready to set up individual devices.&lt;br/&gt;&lt;br/&gt;
&lt;b&gt;UNLOAD_IMAGE&lt;/b&gt; points to the function cleaning up after the driver when it is to be unloaded. This is not really mandatory for a driver expected to be used for booting the system (it will be discarded by the operating system anyway, unless it takes specific actions to keep bits resident), but it comes in very handy for development.

&lt;p/&gt;The build information file usually includes a (commentary only) stanza stating which architectures the executable is expected to work on.
&lt;pre&gt;#
#  VALID_ARCHITECTURES           = AARCH64 ARM EBC IA32 IPF X64
#&lt;/pre&gt;
The remainder of the file simply specifies which source files are used to build the driver, which declaration files it uses (&lt;code&gt;MdePkg/MdePkg.dec&lt;/code&gt;), which library classes it needs (resolved into specific libraries by the build description file) and which protocols it consumes.
&lt;pre&gt;[Sources]
  ChaosKeyDriver.h
  DriverBinding.c

[Packages]
  MdePkg/MdePkg.dec

[LibraryClasses]
  UefiBootServicesTableLib
  UefiDriverEntryPoint
  UefiLib

[Protocols]
  gEfiUsbIoProtocolGuid
&lt;/pre&gt;

&lt;h3&gt;Adding some actual code&lt;/h3&gt;
&lt;p/&gt;Since we are not yet implementing any actual functionality beyond discovery, the only C source file added at this point is &lt;code&gt;DriverBinding.c&lt;/code&gt;. This all comes down to implementing an instance of &lt;code&gt;EFI_DRIVER_BINDING_PROTOCOL&lt;/code&gt;. Let us go through that, function by function.

&lt;h4&gt;EntryPoint&lt;/h4&gt;
&lt;p/&gt;All the &lt;a href=&quot;https://git.linaro.org/people/leif.lindholm/OpenPlatformPkg.git/blob/b1f241e7e2cc0e241d737d1533f0a95008520637:/Drivers/Usb/Misc/ChaosKeyDxe/DriverBinding.c#l180&quot;&gt;entry point function&lt;/a&gt; does is register the protocol instance, as defined in the &lt;code&gt;gUsbDriverBinding&lt;/code&gt; struct, with the system - and return &lt;code&gt;EFI_SUCCESS&lt;/code&gt;, printing an informational message as it does so. The &lt;code&gt;gUsbDriverBinding&lt;/code&gt; struct contains pointers to the &lt;code&gt;Supported()&lt;/code&gt;, &lt;code&gt;Start()&lt;/code&gt; and &lt;code&gt;Stop()&lt;/code&gt; functions defined by the protocol, as well as a &lt;code&gt;Version&lt;/code&gt; number which lets UEFI pick the most up to date driver if multiple are available.

&lt;h4&gt;Supported&lt;/h4&gt;
&lt;p/&gt;When a new device is detected in the system, UEFI will ask all of the plausible drivers whether they know how to deal with it, by calling their &lt;a href=&quot;https://git.linaro.org/people/leif.lindholm/OpenPlatformPkg.git/blob/b1f241e7e2cc0e241d737d1533f0a95008520637:/Drivers/Usb/Misc/ChaosKeyDxe/DriverBinding.c#l29&quot;&gt;&lt;code&gt;Supported()&lt;/code&gt;&lt;/a&gt; function. This implementation is probably one of the few bits of this driver that is pretty much feature complete - all it really needs to do is to find the USB manufacturer/device IDs and see if they are ones the driver knows how to handle. It then returns &lt;code&gt;EFI_UNSUPPORTED&lt;/code&gt; if this is a device it does not support, or &lt;code&gt;EFI_SUCCESS&lt;/code&gt; if it is a device it supports.

&lt;h4&gt;Start/Stop&lt;/h4&gt;
&lt;p/&gt;&lt;code&gt;Start()&lt;/code&gt; and &lt;code&gt;Stop()&lt;/code&gt; are left empty for now, returning &lt;code&gt;EFI_UNSUPPORTED&lt;/code&gt; whenever they are called. This is something that will be filled in in part 2 of this series.

&lt;h4&gt;UnloadImage&lt;/h4&gt;
&lt;p/&gt;Finally, when (if!) we unload the driver, &lt;a href=&quot;https://git.linaro.org/people/leif.lindholm/OpenPlatformPkg.git/blob/b1f241e7e2cc0e241d737d1533f0a95008520637:/Drivers/Usb/Misc/ChaosKeyDxe/DriverBinding.c#l219&quot;&gt;&lt;code&gt;UnloadImage()&lt;/code&gt;&lt;/a&gt; ensures that the bits that were registered by &lt;code&gt;EntryPoint()&lt;/code&gt; are unregistered again.

&lt;h2&gt;Building and using the driver&lt;/h2&gt;
&lt;h3&gt;Building the standalone driver&lt;/h3&gt;
&lt;p/&gt;In order to build a standalone driver, you need a platform description (&lt;code&gt;.dsc&lt;/code&gt;) file, mapping your library dependencies to actually available libraries. One way of doing this is to implement your own complete &lt;code&gt;.dsc&lt;/code&gt;. However, this is exactly what EDK2&apos;s &lt;code&gt;OptionRomPkg/OptionRomPkg.dsc&lt;/code&gt; provides. So a simpler way can be to simply add the &lt;code&gt;.inf&lt;/code&gt; to the &lt;code&gt;[Components]&lt;/code&gt; section of &lt;code&gt;OptionRomPkg.dsc&lt;/code&gt;. After that, the build should be as easy as:
&lt;p/&gt;&lt;pre&gt;GCC5_AARCH64_PREFIX=aarch64-linux-gnu- build -a AARCH64 -t GCC5 -p OptionRomPkg/OptionRomPkg.dsc -m OpenPlatformPkg/Drivers/Usb/Misc/ChaosKeyDxe/ChaosKeyDxe.inf&lt;/pre&gt;


&lt;h3&gt;Loading the driver&lt;/h3&gt;
&lt;p/&gt;For this example (and because Juno&apos;s built-in magical program-over-USB filesystem is insane), let&apos;s load the driver from a USB key. For simplicity&apos;s sake, have it plugged in when powering on and drop into the UEFI Shell. In my case, the USB key ended up as filesystem &lt;code&gt;FS2:&lt;/code&gt;.
&lt;pre&gt;Shell&gt; FS2:
FS2:\&gt; load ChaosKeyDxe.efi
add-symbol-file /home/leif/work/git/edk2/Build/OptionRomPkg/DEBUG_GCC5/AARCH64/OpenPlatformPkg/Drivers/Usb/Misc/ChaosKeyDxe/ChaosKeyDxe/DEBUG/ChaosKeyDxe.dll 0xF85E4000
Loading driver at 0x000F85E3000 EntryPoint=0x000F85E4044 ChaosKeyDxe.efi
*** Installed ChaosKey driver! ***
Image &apos;FS2:\ChaosKeyDxe.efi&apos; loaded at F85E3000 - Success
FS2:\&gt; 
&lt;/pre&gt;

&lt;p/&gt;At this point, you can verify that the driver has loaded by invoking the &lt;code&gt;drivers&lt;/code&gt; command:
&lt;pre&gt;FS2:\&gt; drivers
             T   D
             Y C I
             P F A
DRV VERSION  E G G #D  #C  DRIVER NAME                         IMAGE PATH
=== ======== = = = === === =================================== ==========
 23 00000030 D N N   1   0 &lt;null string&gt;                       Fv(B73FE497-B92E-416E-8326-45AD0D270092)/FvFile(1DF18DA0-A18B-11DF-8C3A-0002A5D5C51B)
...
 6F 0000000A D N N   1   0 &lt;null string&gt;                       Fv(B73FE497-B92E-416E-8326-45AD0D270092)/FvFile(4579B72D-7EC4-4DD4-8486-083C86B182A7)
 9E 0000000A ? N N   0   0 &lt;null string&gt;                       FS2:\ChaosKeyDxe.efi
&lt;/pre&gt;
You can see how the driver is loaded, and has the driver handle number &lt;code&gt;9E&lt;/code&gt;.

&lt;p/&gt;Now, plug in the ChaosKey:
&lt;pre&gt;FS2:\&gt; ChaosKey (0x1D50:0x60C6) is my homeboy!
UsbSelectConfig: failed to connect driver Not Found, ignored
&lt;/pre&gt;
We can see how the &lt;code&gt;Supported()&lt;/code&gt; function is invoked, and we then see an error message. The error is triggered by our empty &lt;code&gt;Start()&lt;/code&gt; function returning EFI_UNSUPPORTED when UEFI attempts to bring the device online. We&apos;ll fix that bit in part 2 of the series.

&lt;h3&gt;Unloading the driver&lt;/h3&gt;
&lt;p/&gt;During development, it can be handy to be able to load/unload without a full reboot. To do so, just call &lt;code&gt;unload&lt;/code&gt; with the driver handle you got from the &lt;code&gt;drivers&lt;/code&gt; command. Add the &lt;code&gt;-v&lt;/code&gt; option to get some extra output.
&lt;pre&gt;FS2:\&gt; unload -v 9E
     Revision......: 0x00001000
     ParentHandle..: FD317918
     SystemTable...: FDF30018
     DeviceHandle..: FD243918
     FilePath......: FC98FF98
     OptionsSize...: 0
     LoadOptions...: &lt;null string&gt;
     ImageBase.....: F85E3000
     ImageSize.....: 8000
     CodeType......: EfiBootServicesCode
     DataType......: EfiBootServicesData
     Unload........: F85E4000
Unload - Handle [FC990598].  [y/n]?
y
remove-symbol-file /home/leif/work/git/edk2/Build/OptionRomPkg/DEBUG_GCC5/AARCH64/OpenPlatformPkg/Drivers/Usb/Misc/ChaosKeyDxe/ChaosKeyDxe/DEBUG/ChaosKeyDxe.dll 0xF85E4000
Unload - Handle [FC990598] Result Success.
FS2:\&gt;
&lt;/pre&gt;
You can also verify the unload was successful by running &lt;code&gt;drivers&lt;/code&gt; again, and seeing this driver no longer listed.</description>
  </item>
  <item>
    <title>Opening up UEFI platform support</title>
    <pubDate>Wed, 22 Jun 2016 16:54:00 +0100</pubDate>
    <link>http://longhouse.vikings.scot/2016/06/22#opening_uefi_platform_support</link>
    <category>/uefi</category>
    <guid isPermaLink="false">http://longhouse.vikings.scot/uefi/opening_uefi_platform_support</guid>
    <description>
&lt;p/&gt;As some of you may know, one of the main points I have been pushing for over the past couple of years has been the availability of reference code for real platforms. Given that historically, firmware source code has simply not been available for UEFI-based computers, resolving this has been no trivial exercise.

&lt;p/&gt;I gave &lt;a href=&quot;https://youtu.be/m7vkCQzf56w&quot;&gt;an outline presentation about this&lt;/a&gt; at the UEFI spring plugfest in Seattle last year, announcing that I was starting a work-in-progress tree called &lt;a href=&quot;https://git.linaro.org/uefi/OpenPlatformPkg.git&quot;&gt;OpenPlatformPkg&lt;/a&gt; (due to lack of imagination) where I was going to start staging support for multiple platforms/devices. I created this as a separate tree holding only the platform code. As a way to keep things clean, and if I am to be honest also because this enforces deeper consideration of changes to core code. (I&apos;m not suggesting this is the way it should be done when moving platform support into Tianocore, just that it removed several potential conflict points when interacting with organisations not used to working against a single source tree for multiple platforms.)

&lt;/p&gt;Since then, the most visible impact of this in the EDK2 source tree has been the &lt;i&gt;removal&lt;/i&gt; of platform code from EDK2, as I moved it into OpenPlatformPkg. I finally started to see contributions outside of the ARM ltd. platforms a couple of months ago, and have since struggled to keep up with reviewing the patches contributed:

&lt;/p&gt;Over the past few weeks, I have merged support for:
&lt;ul&gt;
&lt;li/&gt;Hisilicon D02 and D03 platforms
&lt;li/&gt;AMD Overdrive (Seattle development platform)
&lt;li/&gt;LeMaker Cello (Seattle-based 96boards EE)
&lt;/ul&gt;
I am also currently working with Semihalf to get support for Marvell Armada 7040 in.

&lt;p/&gt;A warning for the purists - I have not been mandating that the entirety of the platform support is provided in source form. But we do now have a tree which can be used to rebuild against newer versions of upstream EDK2, and I do mandate that each platform adds &lt;i&gt;some&lt;/i&gt; open source bits.


&lt;h3&gt;AMD&lt;/h3&gt;
&lt;p/&gt;We have been working with AMD over the past few months to provide a port based on the official Seattle Firmware Development Kit (FDK) - the same that is used for the commercial firmware shipped on AMD Overdrive and Softiron 3000 platforms. Since this was never originally designed to be used in an open source context, it has included the relicensing of header files and some restructuring to permit simple rebuilding of the binary modules for new FDK releases.

&lt;p/&gt;So this new port comes with some blobs - BUT it does bring source code for ACPI, SMBIOS, (non-PCIe) SATA controller, Hardware RNG and overall platform initialization. And of course it reuses some existing open source drivers available in EDK2. From a personal perspective, this means I can now with a quick turnaround test new EDK2 core changes on my Overdrive.

&lt;p/&gt;This being a platform with all of its RAM &gt; 4GB, it has also helped flush out some incorrect assumptions in core EDK2 code (and a Linux driver or two).


&lt;h3&gt;Hisilicon&lt;/h3&gt;
&lt;p/&gt;We actually got most of the way towards a port for the D02 platform back in December - enough for me to agree to post it as a public branch on the main OpenPlatformPkg repository. But I still had a fair amount of things I wanted improved style wise, and the Hisilicon engineers were under pressure to provide a port for the newer D03 platform as well, so spent a few months getting this up and running.

&lt;p/&gt;But contrary to the story we have seen many times (with many different vendors) in the mobile space, once they completed this they came back.  and put a big effort responding to review feedback to ensure both platforms could be merged simultaneously during our reference platform sprint in Cambridge (UK) last week.


&lt;h3&gt;Future&lt;/h3&gt;
&lt;p/&gt;Well, Tianocore has now obtained a more standardised (and public) change process, and there is currently a proposal underway for how to support platforms in official repositories:
http://thread.gmane.org/gmane.comp.bios.edk2.devel/11624
With a bit of luck and some hard work OpenPlatformPkg can become redundant the year after it was introduced!

&lt;p/&gt;I have also had a few more contacts from people looking to provide ports for upcoming (and existing) platforms, so there should be some more to show later in the year.</description>
  </item>
  <item>
    <title>QEMU 2.4 and virtio-pci</title>
    <pubDate>Sat, 25 Jul 2015 00:57:00 +0100</pubDate>
    <link>http://longhouse.vikings.scot/2015/07/25#qemu-virtio-pci</link>
    <category>/drafts</category>
    <guid isPermaLink="false">http://longhouse.vikings.scot/drafts/qemu-virtio-pci</guid>
    <description>
I wrote in &lt;a href=&quot;/uefi/.txt&quot;&gt;previous&lt;/a&gt; &lt;a href=&quot;/uefi/.txt&quot;&gt;posts&lt;/a&gt; about QEMU and how to run ARM UEFI on it.</description>
  </item>
  </channel>
</rss>
