Due to the fact that I didn't managed in any way to get Xen booting in UEFI mode when asking for help at xen-users, I have been suggested to mail xen-devel to see if someone here can help me with this issue, as this could be bug-related and not a configuration mistake. Original Thread here: http://lists.xen.org/archives/html/xen-users/2013-12/msg00050.html
I also suggest to pick a cup of coffee, due to the fact that due to my over-detailing may bore most readers, plus that I have very low Linux and Xen experience, may complicate getting logs or more data, so if you need a log of something or whatever, try to explain it as simple as possible or give me a link with details to know exactly what to do - will help me to not get stuck if requested to do things like "Checking what flags are enabled in Kernel", "Recompile the Kernel with the following option/modules", etc.
SOFTWARE Arch Linux - archlinux-2013.12.01-dual.iso (There is a new one already available) Xen 4.3.1-5 builded as EFI file (Builded two versions, one with the Radeon patch applied/uncommented in PKGBUILD, and another without/commented)
I wrote the ISO to a Pendrive with dd following these instructions here to make it boot in UEFI mode: https://wiki.archlinux.org/index.php/USB_Flash_Installation_Media#Using_dd_.28Recommended_method.29
Installed Arch Linux following most reelevant parts of the guides, choosing Gummiboot as UEFI Boot Manager: https://wiki.archlinux.org/index.php/Installation_Guide https://wiki.archlinux.org/index.php/Beginners%27_Guide
Finally, I builded the two Xen.efi files with the x86_64-pep option enabled in binutils as this guide, and added them to Gummiboot: https://bbs.archlinux.org/viewtopic.php?pid=1359933
xen.efi's cfg:
[global] default=xen
[xen] options=console=vga vga=current loglvl=all noreboot kernel=vmlinuz-linux root=UUID=7af1797c-00af-4219-a141-27a718f39858 rw ignore_loglevel earlyprintk=vga,keep ramdisk=initramfs-linux.img
That pretty much sums the Software side of what I have installed and can't get working. I think there were barely a few misc packages installed besides those. So if anyone has a near-identical setup (Most important thing would be Motherboard), I think it could be reproducible.
HARDWARE Processor: Xeon E3-1245 V3 (Haswell) Motheroard Supermicro X10SAT (C226) Hard Disk: Seagate Desktop HDD.15 4 TB Video Cards: Intel HD Graphics 4600P / Haswell integrated GPU, Sapphire Radeon 5770 FLEX (Have another identical Radeon 5770, for when I get everything working) Monitors: Samsung SyncMaster P2370H (Connected to Haswell IGP via DVI), Samsung SyncMaster 932N+ (Connected to Radeon 5770 with a DVI-to-VGA adapter)
Any common sense options are Enabled in the BIOS (VT-x, VT-d, etc) Secure Boot isn't mentioned anywhere, not even the Motherboard Manual http://www.supermicro.com/products/motherboard/xeon/c220/x10sat.cfm
lscpi output:
00:00.0 Host bridge: Intel Corporation Xeon E3-1200 v3 Processor DRAM Controller (rev 06) 00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller (rev 06) 00:02.0 Display controller: Intel Corporation Xeon E3-1200 v3 Processor Integrated Graphics Controller (rev 06) 00:03.0 Audio device: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller (rev 06) 00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 05) 00:16.0 Communication controller: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1 (rev 04) 00:19.0 Ethernet controller: Intel Corporation Ethernet Connection I217-LM (rev 05) 00:1a.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 (rev 05) 00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 05) 00:1c.0 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #1 (rev d5) 00:1c.1 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #2 (rev d5) 00:1c.3 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #4 (rev d5) 00:1c.4 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #5 (rev d5) 00:1d.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1 (rev 05) 00:1f.0 ISA bridge: Intel Corporation C226 Series Chipset Family Server Advanced SKU LPC Controller (rev 05) 00:1f.2 SATA controller: Intel Corporation 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] (rev 05) 00:1f.3 SMBus: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller (rev 05) 00:1f.6 Signal processing controller: Intel Corporation 8 Series Chipset Family Thermal Management Controller (rev 05) 01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Juniper XT [Radeon HD 5770] 01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Juniper HDMI Audio [Radeon HD 5700 Series] 02:00.0 SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 01) 03:00.0 PCI bridge: PLX Technology, Inc. PEX 8606 6 Lane, 6 Port PCI Express Gen 2 (5.0 GT/s) Switch (rev ba) 04:01.0 PCI bridge: PLX Technology, Inc. PEX 8606 6 Lane, 6 Port PCI Express Gen 2 (5.0 GT/s) Switch (rev ba) 04:04.0 PCI bridge: PLX Technology, Inc. PEX 8606 6 Lane, 6 Port PCI Express Gen 2 (5.0 GT/s) Switch (rev ba) 04:05.0 PCI bridge: PLX Technology, Inc. PEX 8606 6 Lane, 6 Port PCI Express Gen 2 (5.0 GT/s) Switch (rev ba) 04:07.0 PCI bridge: PLX Technology, Inc. PEX 8606 6 Lane, 6 Port PCI Express Gen 2 (5.0 GT/s) Switch (rev ba) 04:09.0 PCI bridge: PLX Technology, Inc. PEX 8606 6 Lane, 6 Port PCI Express Gen 2 (5.0 GT/s) Switch (rev ba) 08:00.0 USB controller: Renesas Technology Corp. uPD720201 USB 3.0 Host Controller (rev 03) 09:00.0 PCI bridge: Texas Instruments XIO2213A/B/XIO2221 PCI Express to PCI Bridge [Cheetah Express] (rev 01) 0a:00.0 FireWire (IEEE 1394): Texas Instruments XIO2213A/B/XIO2221 IEEE-1394b OHCI Controller [Cheetah Express] (rev 01) 0b:00.0 Ethernet controller: Intel Corporation I210 Gigabit Network Connection (rev 03)
In this same machine, I can get Xen working with pretty much everything else being the same but using Syslinux as BIOS-GPT Boot Loader instead of following the UEFI instruction. I even managed to do VGA Passthrough of the Radeon 5770 to a WXP SP3 VM. There are a few differences in the booting process (More on this later).
Basically, I can get Arch Linux to boot in UEFI mode from the Gummiboot menu. However, when I launch the xen.efi executable instead (Either the Radeon patched or the vanilla one), it either black screens or hangs. After experimenting A LOT, I discovered the following different behaviators:
If in BIOS I set the Haswell GPU as main video output (POST and BIOS setup appears on first Monitor only), it reachs a point in the booting process where it simply black screens. One of the last lines was
Dom0 has maximum 8 VCPUs
Additionally, if the CFG file has an assigned RAM max size (dom0_mem=2048M,max=2048M), it does the Scrubbing Free RAM. I think it throws a few more lines if I recall correctly, but too fast to notice. I tried with a variety of options in that file and didn't get anywhere.
Later, I decided to try setting the Radeon 5770 as video output in the BIOS (POST and BIOS setup part appears on the second Monitor only). Surprisingly, it passed that point where it black screens with the IGP, it instead hangs on "unpacking initramfs". When I started to use earlyprintk=vga,keep on the Xen CFG file, I actually got a bit more info (I copied all these lines by hand, I skipped to write the [1.23456789] parts which I suppose are seconds, last line is around 5 seconds and half):
e820: reserve RAM buffer [mem 0x8826e000-0x8bffffff] e820: reserve RAM buffer [mem 0x88b4e000-0x8bffffff] e820: reserve RAM buffer [mem 0x992ed000-0x9bffffff] e820: reserve RAM buffer [mem 0x993eb000-0x9bffffff] e820: reserve RAM buffer [mem 0x993eb000-0x9bffffff] e820: reserve RAM buffer [mem 0x85ee00000-0x85fffffff] NetLabel: Initializing NetLabel: domain hash size = 128 NetLabel: protocols = UNLABELED CIPSOv4 NetLabel: unlabeled traffic allowed by default Switched to clocksource xen pnp: PnP ACPI: disabled pci 0000:00:1c.4: bridge window [io 0x1000-0x0fff] to [bus 0c-44] add_size 1000 pci 0000:00:1c.4: res[13]=[io 0x1000-0x0fff] get_res_add_size add_size 1000 pci 0000:00:1c.4: BAR 13: assigned [io 0x1000-0x1fff] pci 0000:00:01.0: PCI bridge to [bus 01] pci 0000:00:01.0: bridge window [io 0xe000-0xefff] pci 0000:00:01.0: bridge window [mem 0xeee00000-0xeeefffff] pci 0000:00:01.0: bridge window [mem 0xc40000000-0xc4fffffff 64bit pref] pci 0000:00:1c.0: PCI bridge to [bus 02] pci 0000:00:1c.0: bridge window [io 0xd000-0xdfff] pci 0000:00:1c.0: bridge window [mem 0xeed00000-0xeedfffff] pci 0000:04:01.0: PCI bridge to [bus 05] pci 0000:04:04.0: PCI bridge to [bus 06] pci 0000:04:05.0: PCI bridge to [bus 07] pci 0000:04:07.0: PCI bridge to [bus 08] pci 0000:04:07.0: bridge window [mem 0xeea00000-0xeeafffff] pci 0000:09:00.0: PCI bridge to [bus 0a] pci 0000:09:00.0: bridge window [mem 0xee800000-0xee8fffff] pci 0000:04:09.0: PCI bridge to [bus 09-0a] pci 0000:04:09.0: bridge window [mem 0xee800000-0xee9fffff] pci 0000:03:00.0: PCI bridge to [bus 04-0a] pci 0000:03:00.0: bridge window [mem 0xee800000-0xeeafffff] pci 0000:00:1c.1: PCI bridge to [bus 03-04] pci 0000:00:1c.1: bridge window [mem 0xee800000-0xeebfffff] pci 0000:00:1c.3: PCI bridge to [bus 0b] pci 0000:00:1c.3: bridge window [io 0xc000-0xcfff] pci 0000:00:1c.3: bridge window [mem 0xeec00000-0xeecfffff] pci 0000:00:1c.4: PCI bridge to [bus 0c-44] pci 0000:00:1c.4: bridge window [io 0x1000-0x1fff] pci 0000:00:1c.4: bridge window [mem 0xd8000000-0xee0fffff] pci 0000:00:1c.4: bridge window [mem 0xb0000000-0xd1ffffff 64bit pref] pci_bus 0000:00: resource 4 [io 0x0000-0xffff] pci_bus 0000:00: resource 5 [mem 0x00000000-0x7fffffffff]
Sometimes it doesn't reach the pci_bus lines, other times it throws 3 pci_bus instead of 2, so the hang part isn't very precise. What is also suspicious is that on my working Xen installation (Syslinux BIOS-GPT), it DOES detect ACPI and throws a few additional acpi-related lines before pci. I don't know why it doesn't on UEFI.
There is nothing else I was able to figure out as I got stuck here. Only thing I didn't tested was using KMS (Kernel Mode Settings) as I heared that there is a bug with Intel IGPs that may result in a black screen if I don't load a kernel module early, or something around these lines. That may be responsible for the black screen, but I'm not sure about the hang with the Radeon. But I don't have these issues with my working installation using BIOS.
I welcome anyone that knows what could be wrong, or any ideas about what I could test. I don't know if this is a Xen, Arch Linux, or maybe even BIOS issue, or how often people encounter hangs trying to boot Xen as an UEFI executable, as there doesn't seems to be a lot of people using Xen in UEFI by what I could get googling around.
|