summaryrefslogtreecommitdiffstats
path: root/lib/libc
diff options
context:
space:
mode:
authorsgalabov <sgalabov@FreeBSD.org>2016-03-09 11:45:48 +0000
committersgalabov <sgalabov@FreeBSD.org>2016-03-09 11:45:48 +0000
commit9a94f84b4105b35133c4ba9e48e931c1e0ea0b93 (patch)
tree83244963befc3db595ba429de2f26bf00aa92b46 /lib/libc
parent8e3791996d224a0e269c6ada441007e871b0a3b5 (diff)
downloadFreeBSD-src-9a94f84b4105b35133c4ba9e48e931c1e0ea0b93.zip
FreeBSD-src-9a94f84b4105b35133c4ba9e48e931c1e0ea0b93.tar.gz
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
Diffstat (limited to 'lib/libc')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud