"Das U-Boot" Source Tree
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'efi-2025-04-rc5' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request efi-2025-04-rc5

CI:

* https://source.denx.de/u-boot/custodians/u-boot-efi/-/pipelines/25196

UEFI:

* Export _start symbol from crt0_*_efi stubs
* Move .dynamic out of .text in EFI
* scripts/Makefile.lib: Preserve the .dynstr section as well

Documentation:

* net: miiphybb: Convert documentation to rst

+84 -44
+1
arch/arm/lib/crt0_aarch64_efi.S
··· 144 144 IMAGE_SCN_CNT_INITIALIZED_DATA) 145 145 146 146 .align 12 147 + .globl _start 147 148 _start: 148 149 stp x29, x30, [sp, #-32]! 149 150 mov x29, sp
+1
arch/arm/lib/crt0_arm_efi.S
··· 143 143 IMAGE_SCN_CNT_INITIALIZED_DATA) 144 144 145 145 .align 12 146 + .globl _start 146 147 _start: 147 148 stmfd sp!, {r0-r2, lr} 148 149
+1
arch/riscv/lib/crt0_riscv_efi.S
··· 179 179 IMAGE_SCN_CNT_INITIALIZED_DATA) 180 180 181 181 .align 12 182 + .globl _start 182 183 _start: 183 184 addi sp, sp, -(SIZE_LONG * 3) 184 185 SAVE_LONG(a0, 0)
-39
doc/README.bitbangMII
··· 1 - This patch rewrites the miiphybb ( Bit-banged MII bus driver ) in order to 2 - support an arbitrary number of mii buses. This feature is useful when your 3 - board uses different mii buses for different phys and all (or a part) of these 4 - buses are implemented via bit-banging mode. 5 - 6 - The driver requires that the following macros should be defined into the board 7 - configuration file: 8 - 9 - CONFIG_BITBANGMII - Enable the miiphybb driver 10 - 11 - The board code needs to fill the bb_miiphy_buses[] array with a record for 12 - each required bus and declare the bb_miiphy_buses_num variable with the 13 - number of mii buses. The record (struct bb_miiphy_bus) has the following 14 - fields/callbacks (see miiphy.h for details): 15 - 16 - char name[] - The symbolic name that must be equal to the MII bus 17 - registered name 18 - int (*init)() - Initialization function called at startup time (just 19 - before the Ethernet initialization) 20 - int (*mdio_active)() - Activate the MDIO pin as output 21 - int (*mdio_tristate)() - Activate the MDIO pin as input/tristate pin 22 - int (*set_mdio)() - Write the MDIO pin 23 - int (*get_mdio)() - Read the MDIO pin 24 - int (*set_mdc)() - Write the MDC pin 25 - int (*delay)() - Delay function 26 - void *priv - Private data used by board specific code 27 - 28 - The board code will look like: 29 - 30 - struct bb_miiphy_bus bb_miiphy_buses[] = { 31 - { .name = "miibus#1", .init = b1_init, .mdio_active = b1_mdio_active, ... }, 32 - { .name = "miibus#2", .init = b2_init, .mdio_active = b2_mdio_active, ... }, 33 - ... 34 - }; 35 - int bb_miiphy_buses_num = sizeof(bb_miiphy_buses) / 36 - sizeof(bb_miiphy_buses[0]); 37 - 38 - 2009 Industrie Dial Face S.p.A. 39 - Luigi 'Comio' Mantellini <luigi.mantellini@idf-hit.com>
+75
doc/develop/bitbangmii.rst
··· 1 + .. SPDX-License-Identifier: GPL-2.0-or-later 2 + .. Luigi 'Comio' Mantellini <luigi.mantellini@idf-hit.com>, Industrie Dial Face S.p.A., 2009 3 + 4 + Bit-banged MII bus support 5 + ========================== 6 + 7 + The miiphybb ( Bit-banged MII bus driver ) supports an arbitrary number of 8 + MII buses. This feature is useful when a driver uses different MII buses for 9 + different PHYs and all (or a part) of these buses are implemented via 10 + bit-banging mode. 11 + 12 + The driver requires that the following macro is defined in the board 13 + configuration file: 14 + 15 + * CONFIG_BITBANGMII - Enable the miiphybb driver 16 + 17 + The driver code needs to allocate a regular MDIO device using mdio_alloc() 18 + and assign .read and .write accessors which wrap bb_miiphy_read() and 19 + bb_miiphy_write() functions respectively. The bb_miiphy_read() and 20 + bb_miiphy_write() functions take a pointer to a callback structure, 21 + struct bb_miiphy_bus_ops. The struct bb_miiphy_bus_ops has the following 22 + fields/callbacks (see miiphy.h for details): 23 + 24 + .. code-block:: c 25 + 26 + int (*mdio_active)() // Activate the MDIO pin as output 27 + int (*mdio_tristate)() // Activate the MDIO pin as input/tristate pin 28 + int (*set_mdio)() // Write the MDIO pin 29 + int (*get_mdio)() // Read the MDIO pin 30 + int (*set_mdc)() // Write the MDC pin 31 + int (*delay)() // Delay function 32 + 33 + The driver code will look like: 34 + 35 + .. code-block:: c 36 + 37 + static const struct bb_miiphy_bus_ops ravb_bb_miiphy_bus_ops = { 38 + .mdio_active = ravb_bb_mdio_active, 39 + .mdio_tristate = ravb_bb_mdio_tristate, 40 + .set_mdio = ravb_bb_set_mdio, 41 + .get_mdio = ravb_bb_get_mdio, 42 + .set_mdc = ravb_bb_set_mdc, 43 + .delay = ravb_bb_delay, 44 + }; 45 + 46 + static int ravb_bb_miiphy_read(struct mii_dev *miidev, int addr, 47 + int devad, int reg) 48 + { 49 + return bb_miiphy_read(miidev, &ravb_bb_miiphy_bus_ops, 50 + addr, devad, reg); 51 + } 52 + 53 + static int ravb_bb_miiphy_write(struct mii_dev *miidev, int addr, 54 + int devad, int reg, u16 value) 55 + { 56 + return bb_miiphy_write(miidev, &ravb_bb_miiphy_bus_ops, 57 + addr, devad, reg, value); 58 + } 59 + 60 + static int ravb_probe(struct udevice *dev) 61 + { 62 + struct mii_dev *mdiodev; 63 + ... 64 + mdiodev = mdio_alloc(); 65 + if (!mdiodev) 66 + return -ENOMEM; 67 + 68 + mdiodev->read = ravb_bb_miiphy_read; 69 + mdiodev->write = ravb_bb_miiphy_write; 70 + mdiodev->priv = eth; 71 + snprintf(mdiodev->name, sizeof(mdiodev->name), dev->name); 72 + 73 + ret = mdio_register(mdiodev); 74 + ... 75 + }
+1
doc/develop/index.rst
··· 9 9 .. toctree:: 10 10 :maxdepth: 1 11 11 12 + bitbangmii 12 13 board_best_practices 13 14 codingstyle 14 15 designprinciples
+3 -3
lib/efi_loader/elf_efi.ldsi
··· 21 21 *(.gnu.linkonce.t.*) 22 22 *(.srodata) 23 23 *(.rodata*) 24 - . = ALIGN(16); 25 - *(.dynamic); 26 - . = ALIGN(512); 27 24 } 25 + . = ALIGN(16); 26 + .dynamic : { *(.dynamic) } 27 + . = ALIGN(512); 28 28 .rela.dyn : { *(.rela.dyn) } 29 29 .rela.plt : { *(.rela.plt) } 30 30 .rela.got : { *(.rela.got) }
+2 -2
scripts/Makefile.lib
··· 513 513 $(call cmd,S_efi) 514 514 515 515 quiet_cmd_efi_objcopy = OBJCOPY $@ 516 - cmd_efi_objcopy = $(OBJCOPY) -j .header -j .text -j .sdata -j .data -j \ 517 - .dynamic -j .dynsym -j .rel* -j .rela* -j .reloc \ 516 + cmd_efi_objcopy = $(OBJCOPY) -j .header -j .text -j .sdata -j .data \ 517 + -j .dynamic -j .dynstr -j .dynsym -j .rel* -j .reloc \ 518 518 $(if $(EFI_TARGET),$(EFI_TARGET),-O binary) $^ $@ 519 519 520 520 $(obj)/%.efi: $(obj)/%_efi.so