Lines Matching refs:bflow

48 static bool bootmeth_uses_network(struct bootflow *bflow)  in bootmeth_uses_network()  argument
50 const struct udevice *media = dev_get_parent(bflow->dev); in bootmeth_uses_network()
56 static int efiload_read_file(struct bootflow *bflow, ulong addr) in efiload_read_file() argument
62 if (bflow->blk) in efiload_read_file()
63 desc = dev_get_uclass_plat(bflow->blk); in efiload_read_file()
66 ret = bootmeth_common_read_file(bflow->method, bflow, bflow->fname, in efiload_read_file()
70 bflow->buf = map_sysmem(addr, bflow->size); in efiload_read_file()
100 struct bootflow *bflow) in distro_efi_try_bootflow_files() argument
108 if (!bflow->part) { in distro_efi_try_bootflow_files()
116 if (bflow->blk) in distro_efi_try_bootflow_files()
117 desc = dev_get_uclass_plat(bflow->blk); in distro_efi_try_bootflow_files()
118 ret = bootmeth_try_file(bflow, desc, NULL, fname); in distro_efi_try_bootflow_files()
125 bflow->state = BOOTFLOWST_READY; in distro_efi_try_bootflow_files()
135 bflow->flags = BOOTFLOWF_USE_PRIOR_FDT; in distro_efi_try_bootflow_files()
139 ret = bootmeth_common_read_file(dev, bflow, fname, in distro_efi_try_bootflow_files()
146 bflow->fdt_fname = strdup(fname); in distro_efi_try_bootflow_files()
147 if (!bflow->fdt_fname) in distro_efi_try_bootflow_files()
152 bflow->fdt_size = size; in distro_efi_try_bootflow_files()
153 bflow->fdt_addr = fdt_addr; in distro_efi_try_bootflow_files()
167 bflow->flags |= BOOTFLOWF_USE_BUILTIN_FDT; in distro_efi_try_bootflow_files()
173 static int distro_efi_read_bootflow_net(struct bootflow *bflow) in distro_efi_read_bootflow_net() argument
213 bflow->size = size; in distro_efi_read_bootflow_net()
214 bflow->buf = map_sysmem(addr, size); in distro_efi_read_bootflow_net()
220 bflow->fname = strdup(bootfile_name); in distro_efi_read_bootflow_net()
221 if (!bflow->fname) in distro_efi_read_bootflow_net()
236 bflow->fdt_fname = strdup(fname); in distro_efi_read_bootflow_net()
237 if (!bflow->fdt_fname) in distro_efi_read_bootflow_net()
241 bflow->fdt_size = env_get_hex("filesize", 0); in distro_efi_read_bootflow_net()
242 bflow->fdt_addr = fdt_addr; in distro_efi_read_bootflow_net()
245 bflow->flags |= BOOTFLOWF_USE_BUILTIN_FDT; in distro_efi_read_bootflow_net()
248 bflow->state = BOOTFLOWST_READY; in distro_efi_read_bootflow_net()
253 static int distro_efi_read_bootflow(struct udevice *dev, struct bootflow *bflow) in distro_efi_read_bootflow() argument
257 log_debug("dev='%s', part=%d\n", bflow->dev->name, bflow->part); in distro_efi_read_bootflow()
263 bflow->flags |= BOOTFLOWF_STATIC_BUF; in distro_efi_read_bootflow()
265 if (bootmeth_uses_network(bflow)) { in distro_efi_read_bootflow()
267 ret = distro_efi_read_bootflow_net(bflow); in distro_efi_read_bootflow()
271 ret = distro_efi_try_bootflow_files(dev, bflow); in distro_efi_read_bootflow()
279 static int distro_efi_boot(struct udevice *dev, struct bootflow *bflow) in distro_efi_boot() argument
286 if (!bootmeth_uses_network(bflow)) { in distro_efi_boot()
287 ret = efiload_read_file(bflow, kernel); in distro_efi_boot()
294 if (bflow->flags & ~BOOTFLOWF_USE_BUILTIN_FDT) in distro_efi_boot()
295 fdt = bflow->fdt_addr; in distro_efi_boot()
299 if (efi_bootflow_run(bflow)) in distro_efi_boot()