freebsd-dev/sys
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
..
amd64 Bump VM_MAX_MEMSEGS from 2 to 3 to match the number of VM segment 2016-02-26 16:18:47 +00:00
arm Add SMP support for the Allwinner A31 and A31s. This updated the existing 2016-03-06 11:41:08 +00:00
arm64 Force re-routing PCI interrupts (this is for legacy INTx not MSI). 2016-03-02 15:20:42 +00:00
boot Improve U-Boot API detection 2016-03-09 11:45:48 +00:00
bsm
cam Set bhsdi_target_transfer_tag to reserved value, which is 0xffffffff. 2016-03-04 19:57:11 +00:00
cddl Add new IOCTL compat shims for ABI breakage caused by r296510: 2016-03-09 11:16:15 +00:00
compat Add support for IPPROTO_IPV6 socket layer for getsockopt/setsockopt calls. 2016-03-09 09:12:40 +00:00
conf Add MIPS_INTRNG to sys/conf/options.mips 2016-03-08 08:57:53 +00:00
contrib Remove redundant NULL pointer comparison. 2016-03-02 03:28:57 +00:00
crypto
ddb
dev cxgbe(4): Rename regwin_lock to reg_lock. It is used to protect access 2016-03-08 22:23:30 +00:00
fs Pass MNTK_NO_IOPF and MNTK_UNMAPPED_BUFS flags from the lower 2016-03-04 17:24:28 +00:00
gdb
geom Fixes to make it compile under gcc-4.2. 2016-02-24 02:52:49 +00:00
gnu
i386 Migrate many bus_alloc_resource() calls to bus_alloc_resource_anywhere(). 2016-02-27 03:38:01 +00:00
isa Replace all resource occurrences of '0UL/~0UL' with '0/~0'. 2016-03-03 05:07:35 +00:00
kern Convert all panics from the link_elf_obj kernel linker for object 2016-03-07 18:44:06 +00:00
kgssapi
libkern
mips Let rman_init() initialize the default rman range. 2016-03-03 01:12:13 +00:00
modules drm/i915: Update to match Linux 3.8.13 2016-03-08 20:33:02 +00:00
net buf_ring/drbr: Add buf_ring_peek_clear_sc and use it in drbr_peek 2016-02-29 03:54:51 +00:00
net80211 net80211: fix possible overflow in IEEE80211_TU_TO_TICKS() 2016-03-04 21:22:11 +00:00
netgraph Migrate many bus_alloc_resource() calls to bus_alloc_resource_anywhere(). 2016-02-27 03:38:01 +00:00
netinet Fix a sneaky bug where we were missing an extern 2016-03-08 00:16:34 +00:00
netinet6 New way to manage reference counting of mbuf external storage. 2016-03-01 00:17:14 +00:00
netipsec Set tres to NULL to avoid a double free if the m_pullup() below fails. 2016-03-02 05:04:04 +00:00
netnatm
netpfil Use correct size for malloc. 2016-03-03 13:07:59 +00:00
netsmb
nfs
nfsclient
nfsserver
nlm
ofed Whitespace fixes. 2016-03-04 09:07:30 +00:00
opencrypto
pc98 Another convert to bus_alloc_resource_anywhere(). 2016-03-03 01:09:00 +00:00
powerpc Let rman_init() initialize the default rman range. 2016-03-03 01:12:13 +00:00
riscv Make the fdt_get_mem_regions memsize argument optional. It's only used in 2016-03-01 09:45:27 +00:00
rpc
security
sparc64 Correct the memory rman ranges to be to BUS_SPACE_MAXADDR 2016-03-01 02:59:06 +00:00
sys Upgrade our copies of clang, llvm, lldb and compiler-rt to 3.8.0 2016-03-05 20:24:31 +00:00
teken
tests
tools
ufs The UFS filesystem requires that the last block of a file always be 2016-02-24 01:58:40 +00:00
vm Remove UMA_ZONE_REFCNT feature, now unused. 2016-03-01 00:33:32 +00:00
x86 Replace all resource occurrences of '0UL/~0UL' with '0/~0'. 2016-03-03 05:07:35 +00:00
xdr
xen
Makefile Add riscv to the list of architectures for cscope. 2016-02-29 16:39:27 +00:00