| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Fix EFI platform build failures on arm.armeb
Approved by: re (marius)
Sponsored by: Multiplay
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MFC r281169 (by andrew):
Make global variabled only used in this file static
MFC r294058:
Make common boot file_loadraw name parameter const
MFC r294041:
Remove unused reg param from fdt_fixup_memory
MFC r293724:
Enable warnings in EFI boot code
MFC r293796:
Fix typo in libefi.c
MFC r294029:
Only build EFI components on supported compilers
Sponsored by: Multiplay
|
|
|
|
|
|
|
|
|
| |
loader: implement multiboot support for Xen Dom0
Note that only the subset of the multiboot specification needed in order to
boot a Xen Dom0 is implemented.
Sponsored by: Citrix Systems R&D
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 incorrect reading of 32-bit modinfo by 64-bit loaders.
The various structures in the mod_metadata set of a FreeBSD kernel and
modules contain pointers. The FreeBSD loader correctly deals with a
mismatch in loader and kernel pointer size (e.g. 32-bit i386/ppc
loader, loading 64-bit amd64/ppc64 kernels), but wasn't dealing with
the inverse case where a 64-bit loader was loading a 32-bit kernel.
|
|
|
|
|
|
|
|
|
|
|
| |
they can easily be used by later post-processing. When searching for
a compiled-in fdt blob, use the section headers to get the size and
location of the .dynsym section to do a symbol search.
This fixes a problem where the search could overshoot the symbol
table and wander into the string table. Sometimes that was harmless
and sometimes it lead to spurious panic messages about an offset
bigger than the module size.
|
|
|
|
|
|
|
|
|
|
| |
elf headers, mask out the high nibble of that address. This effectly makes
the entry point the offset from the load address, and it gets adjusted for
the actual load address before jumping to it.
Masking the high nibble makes assumptions about memory layout that are true
for all the arm platforms we support right now, but it makes me uneasy.
This needs to be revisited.
|
|
|
|
| |
the elf headers.
|
|
|
|
|
| |
e_entry field holds a physical or a virtual address. Add a comment block
that explains the assumptions being made by the adjustment code.
|
|
|
|
|
| |
Reported by: Mathias Breuninger
MFC after: 1 week
|
|
|
|
|
|
|
| |
kld that only contained a sysctl). The kernel linker allows such
modules, so the boot loader should not reject them.
MFC after: 2 weeks
|
|
|
|
|
| |
as a shared library. This is intended to be used by BHyVe to load FreeBSD
kernels into new virtual machines.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. arch_loadaddr - used by platform code to adjust the address at which
the object gets loaded. Implement PC98 using this new interface instead
of using conditional compilation. For ELF objects the ELF header is
passed as the data pointer. For raw files it's the filename. Note that
ELF objects are first considered as raw files.
2. arch_loadseg - used by platform code to keep track of actual segments,
so that (instruction) caches can be flushed or translations can be
created. Both the ELF header as well as the program header are passed
to allow platform code to treat the kernel proper differently from any
additional modules and to have all the relevant details of the loaded
segment (e.g. protection).
|
|
|
|
|
|
| |
the error message needlessly more verbose.
Discussed with: attilio
|
|
|
|
|
|
| |
Sponsored by: Sandvine Incorporated
Submitted by: Sandvine Incorporated
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
(link) address and the physical (load) address. Ideally, the mapping
between link and load addresses should be abstracted by the copyin(),
copyout() and readin() functions, so that we don't have to add kluges
in __elfN(loadimage)(). Then, we could also have paged virtual memory
for the kernel. This can be important under EFI, where you need to
allocate physical memory form the firmware if you want to work in all
scenarios.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to get the physical address doesn't work for all values of KVA_PAGES,
while masking 8 MSBs works for all values of KVA_PAGES that are
multiple of 4 for non-PAE and 8 for PAE. (This leaves us limited
with 12MB for non-PAE kernels and 14MB for PAE kernels.)
To get things right, we'd need to subtract the KERNBASE from the
virtual address (but KERNBASE is not easy to figure out from here),
or have physical addresses set properly in the ELF headers.
Discussed with: jhb
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
are no longer limited to a virtual address space of 16 megabytes,
only mask high two bits of a virtual address. This allows to load
larger kernels (up to 1 gigabyte). Not masking addresses at all
was a bad idea on machines with less than >3G of memory -- kernels
are linked at 0xc0xxxxxx, and that would attempt to load a kernel
at above 3G. By masking only two highest bits we stay within the
safe limits while still allowing to boot larger kernels.
(This is a safer reimplmentation of sys/boot/i386/boot2/boot.2.c
rev. 1.71.)
Prodded by: jhb
Tested by: nyan (pc98)
|
|
|
|
| |
stale comments.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
means:
o Remove Elf64_Quarter,
o Redefine Elf64_Half to be 16-bit,
o Redefine Elf64_Word to be 32-bit,
o Add Elf64_Xword and Elf64_Sxword for 64-bit entities,
o Use Elf_Size in MI code to abstract the difference between
Elf32_Word and Elf64_Word.
o Add Elf_Ssize as the signed counterpart of Elf_Size.
MFC after: 2 weeks
|
|
|
|
|
|
|
|
|
| |
better relocation support for the amd64 and i386 platforms. This
should not result in any change in functionality, but moves a step
towards supporting the relocatable object file modules on amd64.
The same hack/trick as load_elf*.c uses is used here to simultaneously
support both elf32 and elf64 on amd64 and i386.
|
|
|
|
| |
from specified file offsets. Make use of these in load_elf.c.
|
| |
|
|
|
|
| |
Also some minor style cleanups.
|
|
|
|
|
|
|
|
| |
common code, the non-trivial part is #ifdef'ed and only executes when
loading amd64 kernels. The rest is trivial but needed for the the amd64
case. (Two variables changed from char ** to Elf_Addr).
Approved by: re (amd64 "low-risk" stuff)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
things over floppy size limits, I can exclude it for release builds or
something like that. Most of the changes are to get the load_elf.c file
into a seperate elf32_ or elf64_ namespace so that you can have two
ELF loaders present at once. Note that for 64 bit kernels, it actually
starts up the kernel already in 64 bit mode with paging enabled. This
is really easy because we have a known minimum feature set.
Of note is that for amd64, we have to pass in the bios int 15 0xe821
memory map because once in long mode, you absolutely cannot make VM86
calls. amd64 does not use 'struct bootinfo' at all. It is a pure loader
metadata startup, just like sparc64 and powerpc. Much of the
infrastructure to support this was adapted from sparc64.
|
|
|
|
|
|
|
|
|
| |
Move the remaining bits of <sys/diskslice.h> to <i386/include/bootinfo.h>
Move i386/pc98 specific bits from <sys/reboot.h> to
<i386/include/bootinfo.h> as well.
Adjust includes in sys/boot accordingly.
|
|
|
|
|
|
|
|
| |
read from the raw kld files.
Submitted by: Hartmut Brandt <brandt@fokus.gmd.de>
PR: 46870
Tested on: alpha (obrien), i386, sparc64
|
| |
|
|
|
|
| |
Elf_Hashelt.
|
|
|
|
|
| |
in the kernel side of things some time ago. The hash table entries are
always 32 bits wide, even on 64 bit machines.
|
|
|
|
|
|
|
| |
tool (kldxref(8)) keeps a cache of what modules and versions are inside
what .ko files. I have tested this on both Alpha and i386.
Submitted by: bp
|
| |
|
|
|
|
|
|
| |
This should make dependencies at load time work like before. Oops.
Noticed by: markm
|
| |
|
|
|
|
| |
some added const's.
|
|
|
|
| |
Prodded by: msmith
|
| |
|
|
|
|
|
|
|
| |
Add support for module metadata. The old way of dependancy
handling will be supported for a while.
Reviewed by: peter
|
|
|
|
|
|
|
| |
will be provided after modmetadata appears in the kernel.
Reviewed by: msmith
Approved by: jkh
|
| |
|
|
|
|
| |
0xe0100000u or 0xc0100000u instead of the usual 0xf0100000u).
|
|
|
|
|
| |
(This might make ELF_VERBOSE look funny, but I'm tempted to delete that
anyway)
|
|
|
|
|
| |
avoid the need to seek back to offset zero which is causing trouble on
the Alpha with a gzipped kernel.
|
|
|
|
|
|
|
| |
can seek back to the first PT_LOAD and doing a close/reopen if it cannot.
This is because the first PT_LOAD section includes the ELF headers.
This fixes gzipped kernels on the i386, it should solve mike's problem
for the Alpha.
|
| |
|
|
|
|
| |
is useful, and usually fits all on one line with the load sizes.
|
| |
|