git: ab926ba4c3a5 - main - kboot: Remove kboot_loadaddr
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 02 Feb 2023 21:11:53 UTC
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=ab926ba4c3a59f1f43a9266046cb1e0903171aa6 commit ab926ba4c3a59f1f43a9266046cb1e0903171aa6 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2023-02-02 21:08:15 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2023-02-02 21:09:55 +0000 kboot: Remove kboot_loadaddr Turns out that the loadaddr interface is not sufficiently expressive to do the loading we need to do. Instead, we'll emulate some of its features with inline math in copyin/copyout. Sponsored by: Netflix Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D38260 --- stand/kboot/main.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/stand/kboot/main.c b/stand/kboot/main.c index 0076db13b589..e8320503647f 100644 --- a/stand/kboot/main.c +++ b/stand/kboot/main.c @@ -44,7 +44,6 @@ ssize_t kboot_copyin(const void *src, vm_offset_t dest, const size_t len); ssize_t kboot_copyout(vm_offset_t src, void *dest, const size_t len); ssize_t kboot_readin(readin_handle_t fd, vm_offset_t dest, const size_t len); int kboot_autoload(void); -uint64_t kboot_loadaddr(u_int type, void *data, uint64_t addr); static void kboot_kseg_get(int *nseg, void **ptr); static void kboot_zfs_probe(void); @@ -198,7 +197,6 @@ main(int argc, const char **argv) archsw.arch_copyout = kboot_copyout; archsw.arch_readin = kboot_readin; archsw.arch_autoload = kboot_autoload; - archsw.arch_loadaddr = kboot_loadaddr; archsw.arch_kexec_kseg_get = kboot_kseg_get; archsw.arch_zfs_probe = kboot_zfs_probe; @@ -417,18 +415,6 @@ kboot_autoload(void) return (0); } -uint64_t -kboot_loadaddr(u_int type, void *data, uint64_t addr) -{ - - if (type == LOAD_ELF) - addr = roundup(addr, PAGE_SIZE); - else - addr += kboot_get_phys_load_segment(); - - return (addr); -} - static void kboot_kseg_get(int *nseg, void **ptr) {