[coreboot] AppleTV development

Scott D. Davilla davilla at 4pi.com
Wed Jun 18 19:53:59 CEST 2008

Hello all,

	I'm the author of atv-bootloader which enabled booting of 
standard un-patched Linux kernels on AppleTV hardware.

For background, the AppleTV uses a pure EFI bios which uses boot.efi 
to boot a OSX darwin kernel. The EFI firmware does cert checking 
which prevents the use of rEFIt as a bootloader so a fake darwin 
kernel (mach_kernel) was created to act as a secondary bootloader.

I've extended this secondary bootloader (my work is atv-bootloader) 
to remove the nasty kernel patches by translating the EFI memory map 
into an E820 memory map and relocating ACPI and SMBIOS table pointers 
to where Linux can find them. In addition, since video is presented 
as a linear console frame buffer, I setup Linux boot params for a 

A custom Linux kernel/initramfs is embedded into the secondary 
bootloader. This kernel/initramsfs then finds and loads the real 
kernel using kexec. The reason for the initial kernel is USB 2.0 
support. It was easier to do it this way than add all the required 
bits to support USB 2.0.

This all works pretty well and the nvidia binary driver see and 
correctly uses the nvidia 7300 chipset for 720p/1080i XvMC hardware 
decode. So for about $230, the AppleTV is about the least expensive 
hardware platform for handling 720p/1080i mpeg2 video content.

One of the current issues is that since the AppleTV is pure EFI, that 
means no PC-bios and vbios is not in the typical locations so video 
resolution changes can only be handled by the nvidia binary driver 
under X11.

I've recently found where vbios is located and have been able to copy 
it to 0xC0000 and run the standard "nv" X11 driver. When running "nv" 
I can even POST it using testbios.

The plan is to have the secondary bootloader relocate vbios and POST 
it in prep for Linux. This involves patching in software/hardware 
interrupt handlers (remember no PC-bios). Since I'm not a 
pc-bios/vbios expert this is where the fun starts.

The other thought is to go all the way and do a PC-bios layer 
complete with vbios handling.

ADLO seems interesting. The secondary bootloader is running in 
protected mode so it could load the ADLO payload and launch it.

Coreboot and it's associated projects is the closest development 
effort that involved pc-bios/vbios work so I'd like to get some 
comments or suggestions.


More information about the coreboot mailing list