| Commit message (Collapse) | Author | Age | Files | Lines |
| ... | |
| |
|
|
|
|
|
|
|
|
|
| |
Move the retrieval of the image information into loader's main instead
of doing it in efizfs.c
Differential Revision: https://reviews.freebsd.org/D12564
Submitted by: Eric McCorkle
Notes:
svn path=/head/; revision=324360
|
| |
|
|
|
|
|
|
|
|
| |
efi_devpath_is_prefix determines if a path matches a passed-in prefix.
Differential Revision: https://reviews.freebsd.org/D12564
Submitted by: Eric McCorkle
Notes:
svn path=/head/; revision=324359
|
| |
|
|
|
|
|
|
|
|
|
| |
information in this file is now somewhat dated, or is present mostly
correct in the man pages. Retire this file rather than fix it.
Noticed by: cognet@
Sponsored by: Netflix
Notes:
svn path=/head/; revision=324321
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Added more compatibility strings to drivers not yet converted
- Added new RPI platform code compatibility string to match the ones used
upstream
- Adapted RPI and RPI2 DTS to match the new platform code compatibility
string
The goal is to use the upstream DTBs as a replacement for our custom one.
This is now possible with these changes.
Additionally, as the RPI firmware automatically chooses the right DTB for
us, this would allow to have one common armv6 kernel for RPI0 and RPI1
(BCM2835-based), and one common armv7 kernel for RPI2 v1.1 (BCM2836-based),
and RPI2 v1.2 / RPI3 (BCM2837-based).
Submitted by: Sylvain Garrigues <sylgar@gmail.com>
Differential Revision: https://reviews.freebsd.org/D12360
Notes:
svn path=/head/; revision=324184
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add flag to the makefile to allow loader compilation as
Little-Endian 32-bit executable.
Usage:
make WITH_LOADER_FORCE_LE=yes -C sys/boot all
Submitted by: Wojciech Macek <wma@freebsd.org>
Reviewed by: imp, nwhitehorn
Obtained from: Semihalf
Sponsored by: QCM Technologies
Differential revision: https://reviews.freebsd.org/D12421
Notes:
svn path=/head/; revision=324099
|
| |
|
|
|
|
|
| |
The current efipart_floppy() implementation is leaking the acpi pointer.
Notes:
svn path=/head/; revision=323991
|
| |
|
|
|
|
|
|
|
|
| |
The cleanup of this distinction was done in the r318988, but this Makefile
was omitted.
Submitted by: kczekirda@
Notes:
svn path=/head/; revision=323952
|
| |
|
|
|
|
|
| |
Define EISA PNP constants and use them, also fix ID for 0x701
Notes:
svn path=/head/; revision=323909
|
| |
|
|
|
|
|
| |
Use errno for error checking.
Notes:
svn path=/head/; revision=323908
|
| |
|
|
|
|
|
| |
The else statement should have { }
Notes:
svn path=/head/; revision=323907
|
| |
|
|
|
|
|
|
| |
We should return ENXIO to indicate the situation with device present,
but no media.
Notes:
svn path=/head/; revision=323906
|
| |
|
|
|
|
|
|
|
|
| |
The device index, partition index and reference counter are all positive
numbers. However, since our internal partition number may be negative
to indicate GPT table, the compare expression need to take care when comparing
pdinfo_t and partition data.
Notes:
svn path=/head/; revision=323905
|
| |
|
|
|
|
|
| |
The link should be replaced by list.
Notes:
svn path=/head/; revision=323897
|
| |
|
|
|
|
|
| |
The efilib.h update was left out from r323885 by mistake.
Notes:
svn path=/head/; revision=323896
|
| |
|
|
|
|
|
| |
DevicePathNodeLength() will always return unsigned value.
Notes:
svn path=/head/; revision=323895
|
| |
|
|
|
|
|
|
| |
The device specific *_add functions are using malloc() + memset,
should use calloc instead.
Notes:
svn path=/head/; revision=323886
|
| |
|
|
|
|
|
|
| |
The current implementation of efi_devpath_match() is returning values 0 or 1,
so it should be updated to return bool.
Notes:
svn path=/head/; revision=323885
|
| |
|
|
|
|
|
|
| |
Remove duplicated free()+return statements, default unit to 0
and improve strtol error processing.
Notes:
svn path=/head/; revision=323867
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The current biosmem code is walking bios smap entries and looking for smap
entry just below 4GB line, if there is such entry, its base and size is set
for heap base and size. Instead of entry base, we should use last HEAP_MIN
(currently 64MB) bytes just below 4GB, to make maximum space for kernel and
modules.
The problem was revealed on ASUS B350M-A system board, an AMD Ryzen 3 1200 CPU
memory map:
SMAP type=01 base=0000000000000000 len=000000000009d400 attr=01
SMAP type=02 base=000000000009d400 len=0000000000002c00 attr=01
SMAP type=02 base=00000000000e0000 len=0000000000020000 attr=01
SMAP type=01 base=0000000000100000 len=0000000009c00000 attr=01
SMAP type=02 base=0000000009d00000 len=0000000000300000 attr=01
SMAP type=01 base=000000000a000000 len=00000000be69b000 attr=01
SMAP type=03 base=00000000c869b000 len=0000000000016000 attr=01
SMAP type=01 base=00000000c86b1000 len=00000000124e7000 attr=01
SMAP type=02 base=00000000dab98000 len=0000000000138000 attr=01
SMAP type=03 base=00000000dacd0000 len=0000000000008000 attr=01
SMAP type=01 base=00000000dacd8000 len=0000000000100000 attr=01
SMAP type=04 base=00000000dadd8000 len=00000000003b3000 attr=01
SMAP type=02 base=00000000db18b000 len=0000000000d42000 attr=01
SMAP type=01 base=00000000dbecd000 len=0000000002133000 attr=01
SMAP type=01 base=0000000100000000 len=000000011f380000 attr=01
SMAP type=02 base=00000000de000000 len=0000000002000000 attr=01
SMAP type=02 base=00000000f8000000 len=0000000004000000 attr=01
SMAP type=02 base=00000000fdf00000 len=0000000000100000 attr=01
SMAP type=02 base=00000000fea00000 len=0000000000010000 attr=01
SMAP type=02 base=00000000feb80000 len=0000000000082000 attr=01
SMAP type=02 base=00000000fec10000 len=0000000000001000 attr=01
SMAP type=02 base=00000000fec30000 len=0000000000001000 attr=01
SMAP type=02 base=00000000fed00000 len=0000000000001000 attr=01
SMAP type=02 base=00000000fed40000 len=0000000000005000 attr=01
SMAP type=02 base=00000000fed80000 len=0000000000010000 attr=01
SMAP type=02 base=00000000fedc2000 len=000000000000e000 attr=01
SMAP type=02 base=00000000fedd4000 len=0000000000002000 attr=01
SMAP type=02 base=00000000fee00000 len=0000000000100000 attr=01
SMAP type=02 base=00000000ff000000 len=0000000001000000 attr=01
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D12368
Notes:
svn path=/head/; revision=323707
|
| |
|
|
|
|
|
|
|
|
| |
No functional changes, just cleanup.
Reviewed by: allanjude, imp
Differential Revision: https://reviews.freebsd.org/D12370
Notes:
svn path=/head/; revision=323589
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
generate_fat.sh does the following:
- create an 800kb zero-filled file
- create an md device backed by this file
- format the device fat12
- mount the filesystem
- create the EFI ESP directory structure
- create the EFI boot file (BOOTx64 for amd64, BOOTaa64 for aarch64, etc)
- Adds a marker to the beginning of the file, and pad it to 384kb
- 384kb was chosen as it is less than half of 800kb, thus allowing
users to keep a backup of their older boot file in the small partition
- Unmount the filesystem
- Scan the image and find the offset where the marker was inserted
- The process requires root, to make image generation easier, images for
each architecture are pregenerated, compressed with xz, and checked
into svn.
The Makefile that generates boot1.efifat does the following:
- Ensure the compiled boot1.efi file is no larger than the generated image
- Decompress the template created by generate-fat.sh
- dd the contents of boot1.efi into boot1.efifat starting at the offset
where the marker is found. This allows any file less than the maximum
size to be written into the fat filesystem without having to mount it,
so no root privileges are required.
Later work by imp and myself makes bsdinstall create a 200mb fat16 instead
of using this process, but it is retained to make image generation easier.
Submitted by: Eric McCorkle (original version)
Reviewed by: emaste, tsoome, Eric McCorkle
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D9680
Notes:
svn path=/head/; revision=323554
|
| |
|
|
|
|
|
| |
Need to check rsize before dereferencing it.
Notes:
svn path=/head/; revision=323541
|
| |
|
|
|
|
|
|
|
|
| |
In case of error from disk_open(), we should clean up properly.
Reviewed by: allanjude, imp
Differential Revision: https://reviews.freebsd.org/D12340
Notes:
svn path=/head/; revision=323497
|
| |
|
|
|
|
|
|
|
|
| |
The zfsonlinux feature large_dnode is not yet supported by the loader.
Reviewed by: avg, allanjude
Differential Revision: https://reviews.freebsd.org/D12288
Notes:
svn path=/head/; revision=323494
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This Makefile relies on Makefile.fat providing the correct value for
BOOT1_MAXSIZE and BOOT1_OFFSET. Since BOOT1_OFFSET had no default value
here the build would already fail if Makefile.fat did not provide
correct values.
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/head/; revision=323436
|
| |
|
|
|
|
|
|
|
|
| |
Need to add #ifdef EFI_ZFS_BOOT guard into efi/loader/main.c
PR: 222215
Reported by: Sylvain Garrigues
Notes:
svn path=/head/; revision=323428
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In advance of other changes to the fat template generation process, have
generate-fat.sh create all template files at the same time so that they
cannot get out of sync.
Also correct a longstanding but where BOOT1_OFFSET was overwritten on
each invocation. A previous version of this patch stored a per-arch
offset (e.g. BOOT1_arm64_OFFSET) but that was deemed unnecessary.
Instead just hardcode the known offset that applies to all archs (0x2d)
and fail if the offset happens to be different.
Ongiong work (using newfs_msdos in bsdinstall and adding msdosfs support
to makefs) will eventually allow us to do away with this fat template
hack altogether, but in the near term we have a few improvements that
will build on this.
Reviewed by: allanjude, imp, Eric McCorkle
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D10931
Notes:
svn path=/head/; revision=323407
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Since the efipart rewrite, the chain command was looking for device
handle using interface applicable only for net devices. Disk
partitions and zfs pools need their own approach to find the proper handle.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D12287
Notes:
svn path=/head/; revision=323389
|
| |
|
|
|
|
|
|
| |
re-rooting. Remove deprecation notice for it. init_chroot likely is
still better served with reroot.
Notes:
svn path=/head/; revision=323379
|
| |
|
|
| |
Notes:
svn path=/head/; revision=323367
|
| |
|
|
|
|
|
|
| |
Noticed by: tsoome@
Sponsored by: Netflix
Notes:
svn path=/head/; revision=323272
|
| |
|
|
|
|
|
|
|
|
|
| |
We need to extend the -Wno-format hack to yet another Makefile to cope
with %S meaning (CHAR16 *) not (wchar_t *) in the context of the EFI
boot loaders.
Sponsored by: Netflix
Notes:
svn path=/head/; revision=323261
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Rename boot1's wcslen to ucs2len, which we can't use in userland
because wchar in userland is unsigned, not short. Move it into
efichar.c. Also spell '* 2' as '* sizeof(efi_char)' and add 1 for the
trailing NUL to transition the FreeBSD boot env vars to being NUL
terminated on the same line...
Sponsored by: Netflix
Notes:
svn path=/head/; revision=323258
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
AMD Family 17h CPUs have an internal network used to communicate between
the host CPU and the PSP and SMU coprocessors. It exposes a simple
32-bit register space.
Reviewed by: avg (no +1), mjoras, truckman
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D12217
Notes:
svn path=/head/; revision=323184
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
FreeBSD loader expects to have mmsz variable set by bootloader.
U-Boot behaviour is that if buffer size is not big enough to keep
whole memory map, assign the smallest correct buffer size to sz
and return error.
In other words U-Boot assumes that nobody will need mmsz value when buffer
is not filled with memory map, which is not true, so calculated pages value
was too big to allocate.
Solution: Simply assign default value to mmsz.
Submitted by: Patryk Duda <pdk@semihalf.com>
Obtained from: Semihalf
Sponsored by: Semihalf
Differential Revision: https://reviews.freebsd.org/D12194
Notes:
svn path=/head/; revision=323174
|
| |
|
|
|
|
|
|
|
|
|
| |
Turns out, they are subtly different. I'll refactor anew in the future
if it's worth it then.
Sponsored by: Netflix
Reported by: Tomoaki AOKI-san
Notes:
svn path=/head/; revision=323131
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Record the file path for boot1.efi as the UEFI environemnt variable
FreeBSDBootVarGUID:Boot1Path. Record the device this came from as
FreeBSDBootVarGUID:Boot1Dev. While later stages of the boot may be
able to guess these values by retrieving UEFIGlobal:BootCurrent and
groveling through the correct UEFIGlobal:BootXXXX, this provides
certanty in the face of behavior from any part of the boot loader
chain that might "guess" what to do next. These env variables are
volatile and will disappear on reboot.
Sponsored by: Netflix
Notes:
svn path=/head/; revision=323065
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the FreeBSD UEFI boot protocol, boot1.efi exits back to UEFI if it
can't boot the image for most reasons (so that further items in the
EFI boot manger list can be tried). Rename panic to efi_panic, make it
static and give it an extra status argument. Exit back to UEFI with
that status argument so the next loader can be tried.
Use malloc/free exclusively instead of mixing malloc/free and
AllocatePool/FreePool. The code is smaller.
Sponsored by: Netflix
Notes:
svn path=/head/; revision=323064
|
| |
|
|
|
|
|
|
|
|
|
| |
Print the device that boot1.efi was loaded from. Print the path as
well (since it isn't included in DeviceHandle). Move block where we do
this earlier so all the block handle code is now together.
Sponsored by: Netflix
Notes:
svn path=/head/; revision=323063
|
| |
|
|
|
|
|
|
|
| |
Make efichar.c routines available to libefi as well as
libefivar. Define LIBEFI when building so we can conditionally include
stand.h vs the normal userland stuff.
Notes:
svn path=/head/; revision=323062
|
| |
|
|
|
|
|
|
|
|
|
| |
Use efi_devpath_match instead of device_paths_match. They are
functionally the same. Remove device_paths_match from boot1.c and call
efi_devpath_match instead.
Sponsored by: Netflix
Notes:
svn path=/head/; revision=322941
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Kill our own hand-rolled (and somewhat flawed) devpath_str in favor of
the recently added efi_devpath_str in libefi. This gives us much
better names at the expense of not being able to debug on EFI 1.2
machines (since the UEFI protocol efi_devpath_str depends on was added
in UEFI 2.0). However, this isn't the first thing that requires newer
than EFI 1.2, so it's quite possible that this doesn't change the
universe of machines we can EFI boot from. This will now give us the
full UEFI path, even for devices we don't yet know about. More
importantly, it gives us the full HD(...) part of the path, which is
sufficient by itself to locate disks that follow the rules (dd one
disk (but not partition) to another still needs the rest of the path
to disambiguate, but that isn't following the rules that require every
GPT table to have globally unique GUIDs for every partion).
This also has the side effect of shrinking boot1.efi by ~3k.
Sponsored by: Netflix
Notes:
svn path=/head/; revision=322939
|
| |
|
|
|
|
|
|
|
|
|
| |
Add libefi to the list of libraries we'll link in. Move EFI table
definitions back to libefi so we don't have drift between the two
efi_main routines.
Sponsored by: Netflix
Notes:
svn path=/head/; revision=322938
|
| |
|
|
|
|
|
| |
Sponsored by: Netflix
Notes:
svn path=/head/; revision=322937
|
| |
|
|
|
|
|
| |
Sponsored by: Netflix
Notes:
svn path=/head/; revision=322936
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Cast ctxp to caddr_t to pass data as expected. While void * is a
universal type, char * isn't (and that's what caddr_t is defined as).
One could argue these prototypes should take void * rather than
caddr_t, but changing that is much more invasive.
Sponsored by: Netflix
Notes:
svn path=/head/; revision=322935
|
| |
|
|
|
|
|
| |
Sponsored by: Netflix
Notes:
svn path=/head/; revision=322934
|
| |
|
|
|
|
|
|
|
| |
when MK_ZFS is true.
Sponsored by: Netflix
Notes:
svn path=/head/; revision=322933
|
| |
|
|
|
|
|
| |
Sponsored by: Netflix
Notes:
svn path=/head/; revision=322932
|
| |
|
|
|
|
|
|
|
|
| |
Make the return type of efi_main uniform. Declare the Exit() function
as not returning. Move efi_main's declaration to the proper header.
Sponsored by: Netflix
Notes:
svn path=/head/; revision=322931
|