iPXE discussion forum
Mac mini with Broadcom BCM57766/BCM57762 : link status down - Printable Version

+- iPXE discussion forum (https://forum.ipxe.org)
+-- Forum: iPXE user forums (/forumdisplay.php?fid=1)
+--- Forum: General (/forumdisplay.php?fid=2)
+--- Thread: Mac mini with Broadcom BCM57766/BCM57762 : link status down (/showthread.php?tid=22575)



Mac mini with Broadcom BCM57766/BCM57762 : link status down - siarsky - 2020-05-09 17:57

Dear forum,

A thread with the same problem exists already in this forum. A reason for this problem seems to be an BIOS Update from Apple, which somehow broke the iPXE on Mac (on the same identical hardware: iPXE works with older BIOS version, with newer BIOS it does not - information from a FOG forum).

My situation is similar to the situation described in the linked thread - with one substantial difference. iPXE works correctly if it is booted from an USB stick, BUT it does not work (link down) if it is used as an ipxe.efi (in the thread above neither the USB booting nor ipxe.efi work correctly).

I've tried
snp.efi : iPXE initialising devices... hangs
shimx64.efi calling ipxe.efi renamed to grubx64.efi (even Mac has no secure boot) : link down
ipxe.efi with 10 seconds wait in an embeded script : link down
a second ethernet adapter over Thunderbolt: link down
(it is pity that both ethernet devices are from Broadcom so I could not prove tg3 driver is a problem)

Question:
If the problem should be a Mac BIOS update, how is it possible, that the same BIOS makes no problems if iPXE is started from an USB stick but do make problems if iPXE is included as a bootable EFI ipxe.efi item?

Apple has changed something apparently, but could not be the problem fixed in the iPXE? Maybe it is a simple initialization / timing problem in ipxe.efi / tg3 drivers?

Any thoughts?
Brani

PS:
Quote:Mac Mini 7,1 (Late 2014)
Debian 10
Ethernet: Broadcom Limited NetXtreme BCM57766 Gigabit Ethernet PCIe (rev 01)
Thunderbolt Ethernet adapter: Broadcom Limited NetXtreme BCM57762 Gigabit Ethernet PCIe
BIOS Version: 246.0.0.0.0
BIOS Release Date: 12/16/2019

Building and burning of ipxe.iso to an USB stick
Quote:#Get syslinux
wget https://mirrors.edge.kernel.org/pub/linux/utils/boot/syslinux/syslinux-6.03.zip
mkdir syslinux
cd syslinux
unzip ../syslinux-6.03.zip
cd ..

#Get and compile ipxe
git clone git://git.ipxe.org/ipxe.git
cd ipxe/src/
export ISOLINUX_BIN=../../syslinux/bios/core/isolinux.bin
export LDLINUX_C32=../../syslinux/bios/com32/elflink/ldlinux/ldlinux.c32
make
#Burn iso on a USB stick
dd if=bin/ipxe.iso of=/dev/sdb

Building and using of ipxe.efi
Quote:make bin-x86_64-efi/ipxe.efi
cp bin-x86_64-efi/ipxe.efi /boot/efi/EFI/ipxe/
efibootmgr -c -b 0005 -p 1 -L ipxe -l '\EFI\ipxe\ipxe.efi' -d /dev/sda

As you can see mac mani has two ethernet adapters, built-in (net0) and a thunderbolt ethernet adapter (net1).

If a USB stick with ipxe.iso is plugged in and mac mini is booted with a pressed "Alt" key, the bootable stick with MBR appears as "Windows" bootable image, selection of this image starts ipxe and a rescue system boots correctly:

Quote:iPXE initialising devices...ok
net0: a8:60:xx:xx:xx:xx using 14e4-1686 on 0000:03:00.0 (open)
[Link:down, TX:0 TXE:0 RX:0 RXE:0]
[Link status: Down (http://ipxe.org/38086101)]
Waiting for link-up on net0..... ok
Configuring (net0 a8:60:xx:xx:xx:xx)...... ok
net0: 192.168.1.14/255.255.255.0 gw 192.168.1.1
Next server: 192.168.1.19
Filename: pxelinux.0
tftp://192.168.1.19/pxelinux.0... ok
pxelinux.0 : 46909 bytes [PXE-NBP]
...

The USB booting version works with both ethernet adapters (net0 and net1).

If ipxe.efi is used the "link is down" occurs:
Quote:iPXE initialising devices...ok
net0: a8:60:xx:xx:xx:xx using 14e4-1686 on 0000:03:00.0 (open)
[Link:down, TX:0 TXE:0 RX:0 RXE:0]
[Link status: Down (http://ipxe.org/38086101)]
Waiting for link-up on net0................ Down (http://ipxe.org/38086101)
net1: 80:4a:xx:xx:xx:xx using 14e4-1682 on 0000:0a:00.0 (open)
[Link:down, TX:0 TXE:0 RX:0 RXE:0]
[Link status: Down (http://ipxe.org/38086101)]
Waiting for link-up on net1................ Down (http://ipxe.org/38086101)
Could not open net2: Input/output error (http://ipxe.org/1d6a4698)
No more network devices

Press Ctrl-B for the iPXE command line...



RE: Mac mini with Broadcom BCM57766/BCM57762 : link status down - NiKiZe - 2020-05-14 05:46

To me this seems to be the same problem, so you should write in the existing thread.

What are you using when you boot from USB?
a, ipxe.iso - which is pure legacy code. not efi.

Reason for not working with the tg driver in efi mode:
During bootup something in the nic registers are set in a way that that the current iPXE driver don't handle.

When you boot the pcbios ipxe.iso (which is not efi) then something else completely happens.


RE: Mac mini with Broadcom BCM57766/BCM57762 : link status down - siarsky - 2020-05-16 23:01

I am a newbie on this bios/efi field... You are right:
a) a pure legacy BIOS boot from USB works
b) an EFI boot from USB does not work
c) an integrated efi boot does not work (efibootmgr)
So I was wondering how can the same NIC driver be so different, but you explained it EFI init is not BIOS init - thanks.

What I do not understand is the fact, that Debian10 has no problem to start over EFI integrated boot (shimx64.efi calling grubx64.efi) on Mac Mini Late 2014.

Does it mean, that Linux has TG3 drivers, which know how to handle the latest Apple EFI NIC registers? Meaning that if ipxe would integrate the TG3 Linux drivers iPXE would work on Apple machines again?