From nobody Sun Dec 04 04:39:23 2022 X-Original-To: dev-commits-src-main@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 4NPv8q6wxkz4jDxB; Sun, 4 Dec 2022 04:39:23 +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 4NPv8q6H9wz4Hm2; Sun, 4 Dec 2022 04:39:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1670128763; 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=A84ntsqv6292T2E5dffMrdc9Ge69uncfXlmnzjRcGT8=; b=AFkia8/Dai5PjYXW6LziYpFErmufUmrjbiP3wQDayXE7EN2snDibAczxuSnx5Eh1/9pg3F 8YTXotZOjuTc1Sni56lJrZtDUwfp7KEGYjw69lmYUJgg2t681fbidWDeU1cwMZbCSbDaiy jcr2xnc/wegQghwyxgJ/c9U1xq1aHE93wfNRX2IibVRE2XE601g2xIMvPepORRy1VvwCCB y8SoWEyrju32/BfOHCoXnbsvEWf+kyq/zlwQoTpXLoZBWuHGibxIiUyqU91+T7Z4zcNvgT cboEV+SbN0B1bliBolcHiB9cIamkucZbKZwfTb84b6AYe0tjsczkvjmxmOw7nw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1670128763; 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=A84ntsqv6292T2E5dffMrdc9Ge69uncfXlmnzjRcGT8=; b=JuTdugHzJIcZ9MwtKF1jny5eVxICavbg3aaJXYdTpXjij2k4RDElbVBp08aE3Szif7r2Ju U3xEPL7/NbgbqEOU6aQ1hG1LJc++LJEoQyp1rKVxv0zh3fsmqfBgi2+R7yhkjGoewDnfIV GllwBe3O9xgBLYEuPUvGluY4pcV4TM1N2UgfviA03NCau+UvwUrCt2Rz0OXW2lcxSzrbia bQ+Oh/KgOURUatY1xvBMoZvgfvuwTGohdyGDAnEoyeFtIHdr2tZkLzZuLllWjsSf1JHfEy bmtjSjCJdq/T3bmXM97zMKFBF82oK94XATijn9XDSu+l+ce+PzhziXItK0Bxtw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1670128763; a=rsa-sha256; cv=none; b=hNCKTqo7S437EqFCC91jSfQHgSY9hNVrbzA+6dNWdyP0yAwduRNlF5tcBj/snEfq363Tem zv1NsL2K6F70rs6Zmd5zEHaxR9f6VPdiP94s+XaUzJ6+hkhuqog8c4pgmiw4X9vw9HFJEa SNasSsfvWt0Bv7BL/o1sXh96TBHmJuVrZyGbLCSXzBmJQku1QeGKdHcQxFlm3O0vmsgbLg fkniL++hDMP92e7p/ERMI7uc0Xreh8QYKq7OHv4twBSS4XKp5YBAIuSJEr8XfVc/f6JagH wZOGbAS2UHhDyW76SobwERS50SuBCb85WeqgoSIJ9AjyGtG0iCcxXzc8DjmbOg== 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 4NPv8q5LR6z1LM1; Sun, 4 Dec 2022 04:39:23 +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 2B44dNfe074094; Sun, 4 Dec 2022 04:39:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2B44dNs1074093; Sun, 4 Dec 2022 04:39:23 GMT (envelope-from git) Date: Sun, 4 Dec 2022 04:39:23 GMT Message-Id: <202212040439.2B44dNs1074093@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: 67e39a0d1bdb - main - stand/efi: Document the copy size trick List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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: 67e39a0d1bdb24967591721bf7c995d61e0e1c2d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=67e39a0d1bdb24967591721bf7c995d61e0e1c2d commit 67e39a0d1bdb24967591721bf7c995d61e0e1c2d Author: Warner Losh AuthorDate: 2022-12-04 00:23:16 +0000 Commit: Warner Losh CommitDate: 2022-12-04 00:23:16 +0000 stand/efi: Document the copy size trick We call bi_copymodules twice: once with 0 and once with the size of the arena. We do this to find the size, it turns out. Document this. Sponsored by: Netflix --- stand/efi/loader/bootinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stand/efi/loader/bootinfo.c b/stand/efi/loader/bootinfo.c index afa24c127276..a1081ec185ff 100644 --- a/stand/efi/loader/bootinfo.c +++ b/stand/efi/loader/bootinfo.c @@ -413,7 +413,7 @@ bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp, bool exit_bs) #endif bi_load_efi_data(kfp, exit_bs); - size = md_copymodules(0, is64); + size = md_copymodules(0, is64); /* Find the size of the modules */ kernend = roundup(addr + size, PAGE_SIZE); *kernendp = kernend;