| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use 64-bit math when finding a block of ram to hold the kernel. This fixes
a problem on 32-bit systems which have ram occupying the end of the physical
address space -- for example, a block of ram at 0x80000000 with a size of
0x80000000 was overflowing 32 bit math and ending up with a calculated size
of zero.
Use 64-bit math when processing the lists of physical and excluded memory
to generate the phys_avail and dump_avail arrays.
Work around problems that happen when there is ram at the end of the
physical address space.
Cast pointer through uintptr_t on the way to uint64_t to squelch a warning.
Reword the comment to better describe what I found while researching the
problem that led to this temporary workaround (and also so I can properly
cite the PR in the commit this time).
Cast using uintfptr_t and eliminate the cast to uint64_t which is uneeded
because rounding down cannot increase the number of bits needed to express
the result.
Go back to using uintptr_t, because code that actually compiles is
infinitely less buggy than code that is theoretically correct in some
alternate universe.
PR: 201614
|
|
|
|
|
|
|
|
|
|
|
| |
Do not set preload_addr_relocate for ARM.
Refactor net_getparams() to make it easier to get params from sources other
than bootp and rarp.
Add a routine to obtain netboot parameters from the U-Boot env vars
Enable the NETIF_OPEN_CLOSE_ONCE option for ubldr.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for booting relocatable kernels on PowerPC.
Add code to support loading relocatable kernels at offsets that are
not zero.
Move ubldr text section to the start of the output file, so that when you
create a stripped .bin file from it the entry point is the first byte of
the file. (Will allow "load $addr $file ; go $addr" in u-boot.)
Create a relocatable instance of ubldr for ARM (ubldr.bin).
Re-link ubldr when any of its libraries change.
An ARM kernel can be loaded at any 2MB boundary, make ubldr aware of that.
|
|
|
|
| |
Fix fdt_platform_fixups() mem region handling.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move the definitions of the fdt functions from a uboot header to a new fdt
header. There is nothing in the fdt spec that ties it to U-Boot.
While here sort and fix the signature of fdt_setup_fdtp.
MFC 273934:
Start to allow platforms other than U-Boot to use the FDT code in loader by
moving U-Boot specific code from libfdt.a to a new libuboot_fdt.a. This
needs to be a new library for linking to work correctly.
Differential Revision: https://reviews.freebsd.org/D1054
Reviewed by: ian, rpaulo (earlier version)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Enhance the mechanism that lets you configure the ubldr boot device by
setting the u-boot environment variable loaderdev=. It used to accept only
'disk' or 'net'. Now it allows specification of unit, slice, and partition
as well. In addition to the generic 'disk' it also accepts specific
storage device types such as 'mmc' or 'sata'.
If there isn't a loaderdev env var, the historical behavior is maintained.
It will use the first storage device it finds, or a network device if
no working storage device exists.
99% of the work on this was done by Patrick Kelsey, but I made some
changes, so if anything goes wrong, blame me.
(Indeed, the 3 followup commits fixed things I got wrong on the first.)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Prevent fdt data loaded from a file from overwriting the kernel environment,
by having uboot_autoload() do the fdt setup (which may load a file) rather
than waiting until we're actually in the process of launching the kernel.
As part of making this happen...
- Define LOADER_FDT_SUPPORT on the uboot/lib compile command line when
MK_FDT is set.
- Make fdt_setup_fdtb() public.
- Declare public fdt_whatever() functions in a header instead of using
scattered extern decls in .c files.
|
|
|
|
|
|
|
| |
Remove all the instances of '#undef DEBUG' from kernel.
Suggested by: rpaulo
Approved by: adrian (mentor)
|
| |
|
|
|
|
|
| |
really offsets within the primary mapped memory block
(which may not start at address zero).
|
| |
|
|
|
|
|
| |
flag, that disables the caching of partition tables metadata.
Use this flag for floppies in the libi386/biosdisk driver.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
disk_open(). Very often this is called several times for one file.
This leads to reading partition table metadata for each call. To
reduce the number of disk I/O we have a simple block cache, but it
is very dumb and more than half of I/O operations related to reading
metadata, misses this cache.
Introduce new cache layer to resolve this problem. It is independent
and doesn't need initialization like bcache, and will work by default
for all loaders which use the new DISK API. A successful disk_open()
call to each new disk or partition produces new entry in the cache.
Even more, when disk was already open, now opening of any nested
partitions does not require reading top level partition table.
So, if without this cache, partition table metadata was read around
20-50 times during boot, now it reads only once. This affects the booting
from GPT and MBR from the UFS.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
The generic ELF loading code maps the kernel into low memory
by subtracting KERN_BASE. So the copyin/copyout/readin functions
are always called with low addresses. This code finds the largest
DRAM block from the U-Boot memory map and adds that base to
the addresses.
In particular, this fixes ubldr on AM3358, which has DRAM
mapped to 0x80000000 at power-on.
|
|
|
|
|
| |
Obtained from: Semihalf
Supported by: FreeBSD Foundation, Juniper Networks
|
| |
|
|
|
|
| |
MFC after: 1 week
|
|
|
|
| |
(which simplifies some powerpc/powerpc64 ifs)
|
|
|
|
|
|
|
|
|
|
| |
o This is disabled by default for now, and can be enabled using WITH_FDT at
build time.
o Tested with ARM and PowerPC.
Reviewed by: imp
Sponsored by: The FreeBSD Foundation
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Obtained from: Semihalf
MFC after: 1 week
|
| |
|
|
|
|
|
|
|
| |
- Remove #if 0 section that was never needed/used
Reviewed by: raj@
MFC after: 1 month
|
|
|
|
|
| |
Submitted by: Piotr Ziecik
Obtained from: Semihalf
|
| |
|
|
|
|
|
|
| |
ARM).
Submitted by: Piotr Ziecik kosmo ! semihalf dot com
|
| |
|
|
|
|
|
|
|
|
| |
- Only non-sliced bsdlabel style partitioning is currently supported (but provisions
are made towards GPT support, which should follow soon)
- Enable storage support in loader on ARM
Obtained from: Semihalf
|
|
|
|
|
|
|
|
|
|
| |
This uses the common U-Boot support lib (sys/boot/uboot, already used on
FreeBSD/powerpc), and assumes the underlying firmware has the modern API for
stand-alone apps enabled in the config (CONFIG_API).
Only netbooting is supported at the moment.
Obtained from: Marvell, Semihalf
|
| |
|
|
|
|
|
|
|
|
| |
- extend ub_dev_read() and ub_dev_recv() so that the actual len and
all error codes can be passed and processed properly; unify behaviour of
these routines
- introduce syscall general error code (API_ESYSC)
|
|
|
|
|
|
|
|
|
| |
- add new diag commands: devinfo, sysinfo for U-Boot-style details about the system
configuration
- better memory info summary
- style corrections
Obtained from: Semihalf
|
| |
|
|
|
|
| |
Reviewed by: raj
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
net_open().
This was introduced as a workaround long time ago for some Alpha firmware
(which is now gone), and actually prevented net_close() to ever be
called.
Certain firmwares (U-Boot) need local shutdown operations to be performed on a
network controller upon transaction end: such platform-specific hooks are
supposed to be called via netif_close() (from within net_close()).
This change effectively reverts the following CVS commit:
sys/boot/common/dev_net.c
revision 1.7
date: 2000/05/13 15:40:46; author: dfr; state: Exp; lines: +2 -1
Only probe network settings on the first open of the network device.
The alpha firmware takes a seriously long time to open the network device
the first time.
Also suppress excessive output while netbooting via loader, unless debugging.
While there, make sys/boot/uboot more style(9) compliant.
Reviewed by: imp
Approved by: cognet (mentor)
|
|
|
|
|
|
|
| |
o Move the API prototypes to a separate header (glue.h)
o Allow the platform to hint libuboot about where to look
for the API signature. The uboot_address variable is
expected to be defined by the platform.
|
|
|
|
|
|
| |
licensed under GPL and BSD.
Thanks to: raj@
|
|
Add support for U-Boot. This uses the U-Boot API as developed by
Rafal and which is (will be) part of U-Boot 1.3.2 and later.
Credits to: raj@
|