jaredmcneill / quartz64_uefi

EDK2 UEFI for Rockchip RK3566 and RK3568 based SBCs.
153 stars 61 forks source link

BoardInitGmac: Fix byte-swapped MAC address #68

Closed rokuyama closed 11 months ago

rokuyama commented 11 months ago

GMAC[01]_MACADDRESS0{LOW,HIGH} were written in MSB, but they should be in LSB.

See also the fix for NetBSD eqos(4) driver: https://github.com/NetBSD/src/commit/8c816b8cdf3a6a6a880c3b5ad5564fa7bfdd1d1a

Tested for Quartz64. For other boards, compile-test only.

jaredmcneill commented 11 months ago

Thanks for the patch! When generating a random address, we could set the locally administered bit and clear the multicast bit for both bytes 0 and 3, to maintain compatibility with kernels that expected the byte-swapped address. What do you think?

rokuyama commented 11 months ago

On 2023/10/24 8:07, Jared McNeill wrote:

Thanks for the patch! When generating a random address, we could set the locally administered bit and clear the multicast bit for both bytes 0 and 3, to maintain compatibility with kernels that expected the byte-swapped address. What do you think?

Sounds nice! No objection from me (and msaitoh @ netbsd).