From nobody Thu Dec 05 00:18:53 2024 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 4Y3ZkQ3Mrvz5gR5S; Thu, 05 Dec 2024 00:18: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y3ZkQ1ddtz4Zjj; Thu, 5 Dec 2024 00:18:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733357934; 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=rdos7aEbZxsXs0lUGrmjK3EPp5sUvZ2KizDNm9/kdio=; b=yY97/mSzWKp8UMDU2fV8bnpxJEWoajiBgqpVrve86HQHDlHoOjwL58BmebwFTCPO/8GVU2 Ls7tiRmsOam4EcWLUoMByujJ1SvomJYsicdq6S/gJ9Qak4wtb0QcOPerNvID5OofNAN3Xj KkWH55Gu1Auoj6ehDsDGD7EE7NRjt3fCFtyZno68Wq/u3G0qXlmKBV78kuXFB/BBTnftCF KigMD2BKSZ5282dF8yZlWzFADfAT9Uzvu9q+lr6ikuI8dK9KkgxwLWHYjxlElbMnfmXahx Agcv5iqMxvVuV+nIU3S30HQXMDQJc8Oho2rsrmZsfUU+f3UJk9TDVFPIiy6I2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733357934; 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=rdos7aEbZxsXs0lUGrmjK3EPp5sUvZ2KizDNm9/kdio=; b=LnlaERJUruIWE6niROktdSmkT73w92QGymMyBdmE/cjT1Q4XZjGW0U164x5UuK9XtTCxOY NIVnlKQn8FbDvVoYbPovyikaEUCbwDXxwGI3xoCB0nfXf2tl+VcUvUc31aLlzlOcenQdZq RoFoaeQJ67KwACnAb3yp5bQY9yvBCfM4Tf4KRc2vWN+Y5rHiFdwOdfjqxAbppH7V7t7/om JEkU029JkYBle5J9vtdb6EF3vwov8dJHphHSK1gYE65YbrMjAzTPEZB1NwMEw/G55bX13X XF3RAOBjUMXtYMPtbi3C60NY/EdXt2JJXBecCUrKd/J3EQHKlK+H0uQriOtVzg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733357934; a=rsa-sha256; cv=none; b=eMLYHEacESvep+vTfchUSs1f8GeCnmNUTPUNe12JG/QdL/cZ1+SJnafBz+QO8CWBeknylu WOnC5X+AiJsQ3tzJnFJf43LPfloyTkDT1WMwKuWIkTtFO3djlYbwdCVVQcfuf6XaKxCJaR y/oVvUYG80gbyvsqHVu408JHKvERbG2tTWlDir738j9EVVVz/vIFz6qFe79o8vzGtwZPMq +Usc3YbmsI7PkxH4xAiHzvNsrqyN5RFPD2qIdBV4zYPwS8f9bSwKrt57IXEToKKjCNjWMh Om6JYxSMedNJFqSixgmU69ZrBCcsp9qJUrEHypRVMzRHT24WKztTuxUBKC9MmA== 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 4Y3ZkQ0hd9zTg2; Thu, 5 Dec 2024 00:18:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4B50IrVs013365; Thu, 5 Dec 2024 00:18:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B50IrRg013362; Thu, 5 Dec 2024 00:18:53 GMT (envelope-from git) Date: Thu, 5 Dec 2024 00:18:53 GMT Message-Id: <202412050018.4B50IrRg013362@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: a2c48b865e97 - main - stand: move 'staging' to loader_efi.h 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: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-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: a2c48b865e979a393fce88341ecc153ec286c8de Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a2c48b865e979a393fce88341ecc153ec286c8de commit a2c48b865e979a393fce88341ecc153ec286c8de Author: Ahmad Khalifa AuthorDate: 2024-09-27 15:44:14 +0000 Commit: Warner Losh CommitDate: 2024-12-05 00:19:17 +0000 stand: move 'staging' to loader_efi.h On amd64, we need this to setup the page tables. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1446 --- stand/efi/loader/arch/amd64/elf64_freebsd.c | 2 -- stand/efi/loader/arch/i386/elf64_freebsd.c | 2 -- stand/efi/loader/loader_efi.h | 5 +++++ stand/kboot/kboot/arch/amd64/elf64_freebsd.c | 2 -- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/stand/efi/loader/arch/amd64/elf64_freebsd.c b/stand/efi/loader/arch/amd64/elf64_freebsd.c index 7413d18aab2a..3883c309e724 100644 --- a/stand/efi/loader/arch/amd64/elf64_freebsd.c +++ b/stand/efi/loader/arch/amd64/elf64_freebsd.c @@ -71,8 +71,6 @@ static pdp_entry_t *PT3_l, *PT3_u; static pd_entry_t *PT2; static pd_entry_t *PT2_l0, *PT2_l1, *PT2_l2, *PT2_l3, *PT2_u0, *PT2_u1; -extern EFI_PHYSICAL_ADDRESS staging; - static void (*trampoline)(uint64_t stack, void *copy_finish, uint64_t kernend, uint64_t modulep, pml4_entry_t *pagetable, uint64_t entry); diff --git a/stand/efi/loader/arch/i386/elf64_freebsd.c b/stand/efi/loader/arch/i386/elf64_freebsd.c index b8bc925576e7..2c6be607dc4d 100644 --- a/stand/efi/loader/arch/i386/elf64_freebsd.c +++ b/stand/efi/loader/arch/i386/elf64_freebsd.c @@ -86,8 +86,6 @@ static p2_entry_t *PT2; static p2_entry_t *PT2_l0, *PT2_l1, *PT2_l2, *PT2_l3, *PT2_u0, *PT2_u1; static gdt_t *GDT; -extern EFI_PHYSICAL_ADDRESS staging; - static void (*trampoline)(uint32_t stack, void *copy_finish, uint32_t kernend, uint32_t modulep, uint64_t *pagetable, struct gdtr *gdtr, uint64_t entry); diff --git a/stand/efi/loader/loader_efi.h b/stand/efi/loader/loader_efi.h index 8d4e352eec79..b2d7817b87dd 100644 --- a/stand/efi/loader/loader_efi.h +++ b/stand/efi/loader/loader_efi.h @@ -55,6 +55,11 @@ void * efi_translate(vm_offset_t ptr); void efi_copy_finish(void); void efi_copy_finish_nop(void); +#if defined(__amd64__) || defined(__i386__) +/* Need this to setup page tables */ +extern EFI_PHYSICAL_ADDRESS staging; +#endif + int bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp, bool exit_bs); diff --git a/stand/kboot/kboot/arch/amd64/elf64_freebsd.c b/stand/kboot/kboot/arch/amd64/elf64_freebsd.c index 8618f132126b..b0efbfe09629 100644 --- a/stand/kboot/kboot/arch/amd64/elf64_freebsd.c +++ b/stand/kboot/kboot/arch/amd64/elf64_freebsd.c @@ -122,8 +122,6 @@ static pd_entry_t *PT2_l0, *PT2_l1, *PT2_l2, *PT2_l3, *PT2_u0, *PT2_u1; static pdp_entry_t *PT3; static pd_entry_t *PT2; -extern EFI_PHYSICAL_ADDRESS staging; - static void (*trampoline)(uint64_t stack, void *copy_finish, uint64_t kernend, uint64_t modulep, pml4_entry_t *pagetable, uint64_t entry); #endif