From nobody Thu Dec 05 00:18:51 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 4Y3ZkM6m62z5gR9m; Thu, 05 Dec 2024 00:18:51 +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 4Y3ZkM6GCPz4ZxB; Thu, 5 Dec 2024 00:18:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733357931; 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=P+kUI07D7UpiQPmEbQN8rmlhYx+VCVCkSzdbj6mfU9w=; b=i5wiN2IB4kRi7d1K6msD+yxJ3eXCyL0yvcFNY1iM5EqeEeetfw3Cs/RyuZRGOKsqkqfXhl LYdKRtXN4U/Ls7XJ5E1hLggZsoQIkTf0IN0u1ccH5xKeI7AEnlgo7bBN/de5gzqth3PrHP BDmlqu9jGVf+buPKlP3lvedGKAbj3IOkCJ0p6rvLEMAdjC5WTSzaCOblVC/TPmrv6KMSI/ Lb3c7Axu6TrZ7Nowxk0J3qcyUY0wyqinaYXAKRDIvJBjSkdC5wbairKtfE+OTaTdDX5DrU qQst7y34dcFGfEWxE9CN9IdIzYKmwjxMSZbXDrJZtD6NnYRQrvotSXYnJr034w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733357931; 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=P+kUI07D7UpiQPmEbQN8rmlhYx+VCVCkSzdbj6mfU9w=; b=vyiIN9cjx09jANlQlPbMJMJW6upqq2kAiCZvECiY/qVuPNFXtYSAyyzEp0Y/CROFlVA7li 4jSt9LCv/DuCwDLYgOzOqok2ljKG0ycdU3yeCIMgqEu5AZHdJ0k7sEbuTfmcXai3xHqmXp AhOW3q2RhnTSuYz03VG+aAwBQIkYEdM/JPJrVg4jY+PgVt6ixAP4ZikhUX/x8xWDcgOyLC CNhHf/JFwoeUfq6KeU3TsnGbxEYe1RBJXvL0TfJm+JmSVGPGK1akiyCwfItAbyo73D6ncw yuG3UCAAjaksM6nX938TUKwRlyzJtosBz2ldJhbX7sChndX8o7QR/ry1QKVgYA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733357931; a=rsa-sha256; cv=none; b=f8hnig9J5eUPRcCBWMjodLUJJgyFQtV3fkUsDF94bHhqAXKlzpVod9k/GQDv6EcGnUul8y ZjPxza9EZ90OyLW07fZpMnw67wplcXZMty2zBqwPM9A1yqNNAPvviakl2/5iL3f2j7/rb9 lW2qKhOnFZofkC/uAwkQFJYcqHMhhoEnTc5X4Ek30gQNuKyem6wkaXsbMgkH2QrtvL+50M w10wOsbIV8FQeHVgq/Fdtt5xMiJCw4UNmZIWIVidbCtLrWcLkk1k9OYIAd4cXDnDcdJ0G1 zyGmIgQP93KCoQdrDyw9o+0o+v7ypC4g1WTTLmYYxYg51rKN5winN7BTfkr7qg== 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 4Y3ZkM5s1PzTlt; Thu, 5 Dec 2024 00:18:51 +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 4B50Ipxs013277; Thu, 5 Dec 2024 00:18:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B50Iplf013274; Thu, 5 Dec 2024 00:18:51 GMT (envelope-from git) Date: Thu, 5 Dec 2024 00:18:51 GMT Message-Id: <202412050018.4B50Iplf013274@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: 66b9db032ba9 - main - stand: move efi's bi_load into 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: 66b9db032ba9bc0fe6f79083c7eb2891a2aac60f Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=66b9db032ba9bc0fe6f79083c7eb2891a2aac60f commit 66b9db032ba9bc0fe6f79083c7eb2891a2aac60f Author: Ahmad Khalifa AuthorDate: 2024-09-27 15:38:01 +0000 Commit: Warner Losh CommitDate: 2024-12-05 00:19:17 +0000 stand: move efi's bi_load into loader_efi.h For kboot, we still have to declare it manually since we don't always include loader_efi.h Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1446 --- stand/efi/loader/arch/amd64/elf64_freebsd.c | 3 --- stand/efi/loader/arch/amd64/multiboot2.c | 2 -- stand/efi/loader/arch/arm/exec.c | 2 -- stand/efi/loader/arch/arm64/exec.c | 3 --- stand/efi/loader/arch/i386/elf64_freebsd.c | 3 --- stand/efi/loader/arch/riscv/exec.c | 2 -- stand/efi/loader/bootinfo.c | 3 --- stand/efi/loader/loader_efi.h | 3 +++ stand/kboot/kboot/arch/aarch64/exec.c | 3 +++ stand/kboot/kboot/arch/amd64/elf64_freebsd.c | 7 ++++--- 10 files changed, 10 insertions(+), 21 deletions(-) diff --git a/stand/efi/loader/arch/amd64/elf64_freebsd.c b/stand/efi/loader/arch/amd64/elf64_freebsd.c index 91dd979a677e..7413d18aab2a 100644 --- a/stand/efi/loader/arch/amd64/elf64_freebsd.c +++ b/stand/efi/loader/arch/amd64/elf64_freebsd.c @@ -42,9 +42,6 @@ #include "loader_efi.h" -extern int bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp, - bool exit_bs); - static int elf64_exec(struct preloaded_file *amp); static int elf64_obj_exec(struct preloaded_file *amp); diff --git a/stand/efi/loader/arch/amd64/multiboot2.c b/stand/efi/loader/arch/amd64/multiboot2.c index 130caa82aa49..d09b01fce1fc 100644 --- a/stand/efi/loader/arch/amd64/multiboot2.c +++ b/stand/efi/loader/arch/amd64/multiboot2.c @@ -57,8 +57,6 @@ extern int elf32_loadfile_raw(char *filename, uint64_t dest, extern int elf64_load_modmetadata(struct preloaded_file *fp, uint64_t dest); extern int elf64_obj_loadfile(char *filename, uint64_t dest, struct preloaded_file **result); -extern int bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp, - bool exit_bs); extern void multiboot2_exec(void *entry, uint64_t multiboot_info, uint64_t stack); diff --git a/stand/efi/loader/arch/arm/exec.c b/stand/efi/loader/arch/arm/exec.c index 85a8c26ade30..c2a79523c02a 100644 --- a/stand/efi/loader/arch/arm/exec.c +++ b/stand/efi/loader/arch/arm/exec.c @@ -40,8 +40,6 @@ #include "bootstrap.h" #include "loader_efi.h" -extern int bi_load(char *, vm_offset_t *, vm_offset_t *, bool); - static int __elfN(arm_load)(char *filename, uint64_t dest, struct preloaded_file **result) diff --git a/stand/efi/loader/arch/arm64/exec.c b/stand/efi/loader/arch/arm64/exec.c index 877cff658d1e..91a0503a976f 100644 --- a/stand/efi/loader/arch/arm64/exec.c +++ b/stand/efi/loader/arch/arm64/exec.c @@ -42,9 +42,6 @@ static int elf64_exec(struct preloaded_file *amp); static int elf64_obj_exec(struct preloaded_file *amp); -int bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp, - bool exit_bs); - static struct file_format arm64_elf = { elf64_loadfile, elf64_exec diff --git a/stand/efi/loader/arch/i386/elf64_freebsd.c b/stand/efi/loader/arch/i386/elf64_freebsd.c index ba5117b37016..b8bc925576e7 100644 --- a/stand/efi/loader/arch/i386/elf64_freebsd.c +++ b/stand/efi/loader/arch/i386/elf64_freebsd.c @@ -37,9 +37,6 @@ #include "loader_efi.h" -extern int bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp, - bool exit_bs); - static int elf64_exec(struct preloaded_file *amp); static int elf64_obj_exec(struct preloaded_file *amp); diff --git a/stand/efi/loader/arch/riscv/exec.c b/stand/efi/loader/arch/riscv/exec.c index 3c40517ea968..0fc28cba78c1 100644 --- a/stand/efi/loader/arch/riscv/exec.c +++ b/stand/efi/loader/arch/riscv/exec.c @@ -40,8 +40,6 @@ #include "bootstrap.h" #include "loader_efi.h" -extern int bi_load(char *, vm_offset_t *, vm_offset_t *, bool); - static int __elfN(exec)(struct preloaded_file *fp) { diff --git a/stand/efi/loader/bootinfo.c b/stand/efi/loader/bootinfo.c index 2961b8b97fb7..99a7b1444aca 100644 --- a/stand/efi/loader/bootinfo.c +++ b/stand/efi/loader/bootinfo.c @@ -64,9 +64,6 @@ #include "geliboot.h" #endif -int bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp, - bool exit_bs); - static int bi_getboothowto(char *kargs) { diff --git a/stand/efi/loader/loader_efi.h b/stand/efi/loader/loader_efi.h index c9dfefcd4c74..8d4e352eec79 100644 --- a/stand/efi/loader/loader_efi.h +++ b/stand/efi/loader/loader_efi.h @@ -55,4 +55,7 @@ void * efi_translate(vm_offset_t ptr); void efi_copy_finish(void); void efi_copy_finish_nop(void); +int bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp, + bool exit_bs); + #endif /* _LOADER_EFI_COPY_H_ */ diff --git a/stand/kboot/kboot/arch/aarch64/exec.c b/stand/kboot/kboot/arch/aarch64/exec.c index 0aa0e7b8408f..585ccffbd42c 100644 --- a/stand/kboot/kboot/arch/aarch64/exec.c +++ b/stand/kboot/kboot/arch/aarch64/exec.c @@ -70,8 +70,11 @@ extern uint32_t efi_map_size; extern vm_paddr_t efi_map_phys_src; /* From DTB */ extern vm_paddr_t efi_map_phys_dst; /* From our memory map metadata module */ +/* Usually provided by loader_efi.h */ +#ifndef EFI int bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp, bool exit_bs); +#endif static struct file_format arm64_elf = { elf64_loadfile, diff --git a/stand/kboot/kboot/arch/amd64/elf64_freebsd.c b/stand/kboot/kboot/arch/amd64/elf64_freebsd.c index f6574b4cbd0d..8618f132126b 100644 --- a/stand/kboot/kboot/arch/amd64/elf64_freebsd.c +++ b/stand/kboot/kboot/arch/amd64/elf64_freebsd.c @@ -56,6 +56,10 @@ static EFI_GUID acpi_guid = ACPI_TABLE_GUID; static EFI_GUID acpi20_guid = ACPI_20_TABLE_GUID; +#else +/* Usually provided by loader_efi.h */ +extern int bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp, + bool exit_bs); #endif #ifdef EFI @@ -64,9 +68,6 @@ static EFI_GUID acpi20_guid = ACPI_20_TABLE_GUID; #define LOADER_PAGE_SIZE PAGE_SIZE #endif -extern int bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp, - bool exit_bs); - static int elf64_exec(struct preloaded_file *amp); static int elf64_obj_exec(struct preloaded_file *amp);