#
332154 |
|
06-Apr-2018 |
kevans |
MFC r330806-r330815, r330837, r330864, r330883
pc98 changes associated with the named commits are also included in this commit, despite not having been made with the original commits due to its removal in head.
r330806: Minor cosmetic changes.
Make sure { on the same line as struct for all struct *devdesc. Move some type definitions to next to the dv_type define, since that's what sets the d_type.
r330807: We can't use d_opendata for blkio storage.
open_disk uses d_opendata for it's own purpse. We can't store blkio there. Fortunately, blkio is stored elsewhere and we never actually retrieve blkio from d_opendata. Eliminate it as a source of confusion. Eliminate all stores of d_opendata in efi since this layer doesn't own that field.
r330808: Make struct libi386_devdesc match the struct devdesc better
Move data to top and call it d_opendata.
r330809: Use the actual struct devdesc at the start of all *_devdesc structs
The current system is fragile and requires very careful layout of all *_devdesc structures. It also makes it hard to change the base devdesc. Take a page from CAM and put the 'header' in all the derived classes and adjust the code to match.
For OFW, move the iHandle h_handle out of a slot conflicting with d_opendata. Due to quirks in the alignment rules, this worked. However changing the code to use d_opendata storage now that it's a pointer is hard, so just have a separate field for it.
All other cleanups were to make the *_devdesc structures match where they'd taken some liberties that were none-the-less compatible enough to work.
r330810: Remove d_type from devdesc. It's not needed as we can fetch it from d_dev->dv_type when we need it.
r330811: GC unused routines.
Sponsored by: Netflix
r330812: Use the one-line-per-file pattern here, and sort the file names.
Sponsored by: Netflix
r330813: Move the env convenience routines out of boot1.c.
These routines are more generally useful. Even though boot1 is on its way out, it's better to make these common during the transition than copy them.
r330814: Star BootCurrent entry when booting.
Sponsored by: Netflix
r330815: Print the load and device path as well as BootCurrent and BootOrder
Sponsored by: Netflix
r330837: biosdisk.c should not set d_opendata.
Same as 330807, d_opendata is owned by open_disk and we should not set it.
M stand/i386/libi386/biosdisk.c
r330864: Prefer uintXX_t to u_intXX_t
A foolish consistency is the hobgoblin of little minds, adored by little statesmen and philosophers and divines. With consistency a great soul has simply nothing to do. -- Ralph Waldo Emerson
r330883: Fix typo that misteriously passes compilation.
|
#
332150 |
|
06-Apr-2018 |
kevans |
MFC r329190, r329315, r330131: metadata load file unification
r329190: Unify metadata load files for arm, mips, powerpc, sparc64
Summary: All metadata.c files are very similar, with only trivial changes. Unify them into a single common file, with minor special-casing where needed.
r329315: stand: Fix ubldr after r329190
metadata load files were consolidated in r329190, and these relocation fixup bits were inadvertently dropped in the process. Re-add them to fix boot with ubldr.
r330131: Fix module loading on arm after the metadata.c unification in r329190. Arm modules need an additional address fixup not needed by other platforms.
|
#
296182 |
|
29-Feb-2016 |
sgalabov |
These changes attempt to put things in order before the introduction of MIPS ubldr.
The changes are mostly dealing with removing unnecessary casts from the U-Boot API (we're passing only pointers, no obvious reason to cast them to uint32_t), cleaning up some compiler warnings and using the proper printf format specifiers in order to be able to compile cleanly for both 32-bit and 64-bit MIPS targets.
Reviewed by: imp Approved by: adrian (mentor) Sponsored by: Smartcom - Bulgaria AD Differential Revision: https://reviews.freebsd.org/D5312
|
#
283035 |
|
17-May-2015 |
ian |
An ARM kernel can be loaded at any 2MB boundary, make ubldr aware of that.
Previously, ubldr would use the virtual addresses in the elf headers by masking off the high bits and assuming the result was a physical address where the kernel should be loaded. That would sometimes discard significant bits of the physical address, but the effects of that were undone by archsw copy code that would find a large block of memory and apply an offset to the source/dest copy addresses. The result was that things were loaded at a different physical address than requested by the higher code layers, but that worked because other adjustments were applied later (such as when jumping to the entry point). Very confusing, and somewhat fragile.
Now the archsw copy routines are just simple copies, and instead archsw.arch_loadaddr is implemented to choose a load address. The new routine uses some of the code from the old offset-translation routine to find the largest block of ram, but it excludes ubldr itself from that range, and also excludes If ubldr splits the largest block of ram in two, the kernel is loaded into the bottom of whichever resulting block is larger.
As part of eliminating ubldr itself from the ram ranges, export the heap start/end addresses in a pair of new global variables.
This change means that the virtual addresses in the arm kernel elf headers now have no meaning at all, except for the entry point address. There is an implicit assumption that the entry point is in the first text page, and that the address in the the header can be turned into an offset by masking it with PAGE_MASK. In the future we can link all arm kernels at a virtual address of 0xC0000000 with no need to use any low-order part of the address to influence where in ram the kernel gets loaded.
|
#
235694 |
|
20-May-2012 |
kientzle |
Determine kernel load address dynamically from u-boot memory map.
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.
|