freebsd-nq/sys/boot/uboot/lib
Stanislav Galabov 08190ef7de Improve U-Boot API detection
Until now, ubldr has been trying to locate the U-Boot API using a hint
address (U-Boot's current stack pointer), aligning it to 1MiB and going
over a 3MiB (or 1MiB in case of MIPS) memory region searching for a
valid API signature.

This change introduces an alternative way of doing this, namely the
following:
- both U-Boot's bootelf and go commands actually pass argc and argv to
  the entry point (e.g., ubldr's start function, but they should also
  be passed over to main() transparently)
- so, instead of trying to go and look for a valid API signature, we
  look at the parameters passed to main()
- if there's an option '-a' with argument, which is a valid hexadecimal
  unsigned  long number (x), we try to verify whether we have a valid
  API signature at address x. If so - we use it. If not - we fallback
  to the original way of locating the API signature.

The U-Boot change, which causes the API structure address to be
exported as an environment variable, was committed to mainline U-Boot
as commit 22aa61f707574dd569296f521fcfc46a05f51c48

Reviewed by:	andrew, adrian
Approved by:	adrian (mentor)
Sponsored by:	Smartcom - Bulgaria AD
Differential Revision:	https://reviews.freebsd.org/D5492
2016-03-09 11:45:48 +00:00
..
api_public.h Enhance the mechanism that lets you configure the ubldr boot device by 2014-03-11 22:02:49 +00:00
console.c
copy.c Go back to using uintptr_t, because code that actually compiles is 2016-01-13 00:22:12 +00:00
devicename.c
disk.c These changes attempt to put things in order before the introduction of MIPS 2016-02-29 07:27:49 +00:00
elf_freebsd.c These changes attempt to put things in order before the introduction of MIPS 2016-02-29 07:27:49 +00:00
glue.c Improve U-Boot API detection 2016-03-09 11:45:48 +00:00
glue.h Improve U-Boot API detection 2016-03-09 11:45:48 +00:00
libuboot.h An ARM kernel can be loaded at any 2MB boundary, make ubldr aware of that. 2015-05-17 19:59:05 +00:00
Makefile So far bsd.stand.mk wasn't included in the following files: 2016-02-26 08:16:44 +00:00
module.c Print error message if autoload fails due to missing DTB blob, otherwise 2015-05-26 20:32:14 +00:00
net.c If the user has set a u-boot env var named rootpath, automatically 2016-02-22 18:53:55 +00:00
reboot.c
time.c