stand: update prototypes for md_load and md_load64

These are declared as extern in a number of files (some with the wrong
return type). Centralize this in modinfo.h and remove a few extra stray
declarations as well that are no longer used. No functional change.

Note: I've not tried to cope with the bi_load() functions which are the
same logical thing. These will be handled separately.

Sponsored by:		Netflix
This commit is contained in:
Warner Losh 2022-12-05 10:40:15 -07:00
parent 08e5f519b2
commit 335615c4ca
8 changed files with 8 additions and 13 deletions

View File

@ -6,6 +6,9 @@
#ifndef COMMON_MODINFO_H
#define COMMON_MODINFO_H
int md_load(char *args, vm_offset_t *modulep, vm_offset_t *dtb);
int md_load64(char *args, vm_offset_t *modulep, vm_offset_t *dtb);
vm_offset_t md_copymodules(vm_offset_t addr, bool kern64);
vm_offset_t md_copyenv(vm_offset_t addr);

View File

@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$");
#include "bootstrap.h"
#include "loader_efi.h"
extern vm_offset_t md_load(char *, vm_offset_t *);
extern int bi_load(char *, vm_offset_t *, vm_offset_t *, bool);
static int

View File

@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$");
#include "bootstrap.h"
#include "syscall_nr.h"
#include "host_syscall.h"
#include "modinfo.h"
extern char end[];
extern void *kerneltramp;
@ -55,8 +56,6 @@ struct trampoline_data {
uint32_t mdp_size;
};
vm_offset_t md_load64(char *args, vm_offset_t *modulep, vm_offset_t *dtb);
int
ppc64_elf_loadfile(char *filename, uint64_t dest,
struct preloaded_file **result)

View File

@ -69,10 +69,6 @@ int ofw_common_parsedev(struct devdesc **dev, const char *devspec, const char **
struct preloaded_file;
struct file_format;
/* MD code implementing MI interfaces */
vm_offset_t md_load(char *args, vm_offset_t *modulep, vm_offset_t *dtb);
vm_offset_t md_load64(char *args, vm_offset_t *modulep, vm_offset_t *dtb);
extern void reboot(void);
struct ofw_reg

View File

@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$");
#include "bootstrap.h"
#include "libofw.h"
#include "openfirm.h"
#include "modinfo.h"
extern char end[];
extern vm_offset_t reloc; /* From <arch>/conf.c */

View File

@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$");
#include "bootstrap.h"
#include "libofw.h"
#include "openfirm.h"
#include "modinfo.h"
extern char end[];
extern vm_offset_t reloc; /* From <arch>/conf.c */

View File

@ -40,10 +40,7 @@ __FBSDID("$FreeBSD$");
#include "bootstrap.h"
#include "libuboot.h"
vm_offset_t md_load64(char *args, vm_offset_t *modulep, vm_offset_t *dtb);
extern char end[];
extern vm_offset_t reloc; /* From <arch>/conf.c */
#include "modinfo.h"
int
ppc64_uboot_elf_loadfile(char *filename, uint64_t dest,

View File

@ -39,8 +39,7 @@ __FBSDID("$FreeBSD$");
#include "bootstrap.h"
#include "libuboot.h"
extern vm_offset_t md_load(char *, vm_offset_t *, vm_offset_t *);
#include "modinfo.h"
int
__elfN(uboot_load)(char *filename, uint64_t dest,