From nobody Thu Feb 02 21:11:53 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4P7BLL1TT2z3kb18; Thu, 2 Feb 2023 21:11:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4P7BLL0Thnz3DGQ; Thu, 2 Feb 2023 21:11:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675372314; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rRhezI3ZelGzc2rvP2zf0cVCFBreZDczEvF+I3rQ17c=; b=coIOIi3QhI/mW+w1zy5p7XsSM8OU9VIV8qrrftcmBgPJI6pkhdk5yZbp6sNtZczWKgNny5 Iwts0WdEUv8nfrttwH0OwN6K+nzO6c5IRIDbwu2A6aaGoA7M8/Jff4ptQ80H/0GZ75oHyH 5TwFRbmcrRCUk+dyKETOJg3g3ABV7fHFb6xXRZUGCqniusRtKuhmblmO/f20j/25MoXbvO kKI9ujFsu2Us6Zh4kOOQXArY29+waTxlpkQC1yk88dMTytO5MwTLC1WnxuNM7DrcOF5qHH 9g6TlzxcKzOi9EsmmjRYPgwiJUffcLvAo0BHX8Bmlo2LG3RoksC2u0JSun4ubQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1675372314; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rRhezI3ZelGzc2rvP2zf0cVCFBreZDczEvF+I3rQ17c=; b=Y4H/0q7noySeCn4D3P7GGZRw/NpnHXsx4gj73lk7P9wvixEs5kmUO/KF2sn0Iu62X0Cy6n zVGGhQkTn6Dp5frIU6gcO37E6YU5luyWyQqT3dvn4iJowE0EMpvUXf22G/b6JLFH+g30Bp p+WSeipSi79QQJSAb/pFgNF76dDTfFCUa3oB/lSSYEJnyswsRmwJCX9wNcDQ0gYw35FIwG paTrp8r9HursLanSHb+Iozu3yup+Vj/aq/JMq+X23JybEUOQK1b9tI/IOheThMmMo+9kY5 WAB4jHuRos5PgvCd9IHvQGyM54IDMNEzSyIELE+LS+mnl496iZfKR/+SgLnG2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1675372314; a=rsa-sha256; cv=none; b=lskTgVK7jCWKZtZzH2xXIPmOVdj/UFRfkAMcwW0gV083/WIOHKEpBZYMWwIDVYysCmoR3g KfGRDshJ94WltJnYz9SFd8WdinFcMcP48ja+qscOr2ZT5SWR/K0UkV85GxONI2pxmTuMPh tuKLs/KrtGZUvqGv6qcmSOscDzLyfylIAqfIfiDcls10ee1GYflEHxLvBNyFIfXty83Ij1 WVr51wwht9nhKdZk6sbMSJoW2CPP33n6pINW+mOL6fgOpS53l+LmjeOWv+biNZlJixGhT/ WJfY2eOt53MSU+vOVHda13F9k8ePqza60KOxymomgGdaT7MHNAwMCwHEdPY4Ag== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4P7BLK6cyBz18JM; Thu, 2 Feb 2023 21:11:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 312LBrv8033968; Thu, 2 Feb 2023 21:11:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 312LBrbH033967; Thu, 2 Feb 2023 21:11:53 GMT (envelope-from git) Date: Thu, 2 Feb 2023 21:11:53 GMT Message-Id: <202302022111.312LBrbH033967@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: ab926ba4c3a5 - main - kboot: Remove kboot_loadaddr List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ab926ba4c3a59f1f43a9266046cb1e0903171aa6 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=ab926ba4c3a59f1f43a9266046cb1e0903171aa6 commit ab926ba4c3a59f1f43a9266046cb1e0903171aa6 Author: Warner Losh AuthorDate: 2023-02-02 21:08:15 +0000 Commit: Warner Losh 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) {