Changeset View
Changeset View
Standalone View
Standalone View
stand/common/bootstrap.h
Show All 26 Lines | |||||
*/ | */ | ||||
#ifndef _BOOTSTRAP_H_ | #ifndef _BOOTSTRAP_H_ | ||||
#define _BOOTSTRAP_H_ | #define _BOOTSTRAP_H_ | ||||
#include <sys/types.h> | #include <sys/types.h> | ||||
#include <sys/queue.h> | #include <sys/queue.h> | ||||
#include <sys/linker_set.h> | #include <sys/linker_set.h> | ||||
#include <stdbool.h> | |||||
#include "readin.h" | #include "readin.h" | ||||
/* Commands and return values; nonzero return sets command_errmsg != NULL */ | /* Commands and return values; nonzero return sets command_errmsg != NULL */ | ||||
typedef int (bootblk_cmd_t)(int argc, char *argv[]); | typedef int (bootblk_cmd_t)(int argc, char *argv[]); | ||||
#define COMMAND_ERRBUFSZ (256) | #define COMMAND_ERRBUFSZ (256) | ||||
extern const char *command_errmsg; | extern const char *command_errmsg; | ||||
extern char command_errbuf[COMMAND_ERRBUFSZ]; | extern char command_errbuf[COMMAND_ERRBUFSZ]; | ||||
▲ Show 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | #define C_WIDEOUT (1<<4) /* c_out routine groks wide chars */ | ||||
void (* c_out)(int c); | void (* c_out)(int c); | ||||
/* wait for and return input */ | /* wait for and return input */ | ||||
int (* c_in)(void); | int (* c_in)(void); | ||||
/* return nonzero if input waiting */ | /* return nonzero if input waiting */ | ||||
int (* c_ready)(void); | int (* c_ready)(void); | ||||
}; | }; | ||||
extern struct console *consoles[]; | extern struct console *consoles[]; | ||||
void cons_probe(void); | void cons_probe(void); | ||||
bool cons_update_mode(bool); | |||||
void autoload_font(bool); | |||||
/* | /* | ||||
* Plug-and-play enumerator/configurator interface. | * Plug-and-play enumerator/configurator interface. | ||||
*/ | */ | ||||
struct pnphandler | struct pnphandler | ||||
{ | { | ||||
const char *pp_name; /* handler/bus name */ | const char *pp_name; /* handler/bus name */ | ||||
void (*pp_enumerate)(void); /* enumerate PnP devices, add to chain */ | void (*pp_enumerate)(void); /* enumerate PnP devices, add to chain */ | ||||
▲ Show 20 Lines • Show All 122 Lines • ▼ Show 20 Lines | |||||
struct preloaded_file *file_findfile(const char *name, const char *type); | struct preloaded_file *file_findfile(const char *name, const char *type); | ||||
struct file_metadata *file_findmetadata(struct preloaded_file *fp, int type); | struct file_metadata *file_findmetadata(struct preloaded_file *fp, int type); | ||||
struct preloaded_file *file_loadraw(const char *name, char *type, int insert); | struct preloaded_file *file_loadraw(const char *name, char *type, int insert); | ||||
void file_discard(struct preloaded_file *fp); | void file_discard(struct preloaded_file *fp); | ||||
void file_addmetadata(struct preloaded_file *, int, size_t, void *); | void file_addmetadata(struct preloaded_file *, int, size_t, void *); | ||||
int file_addmodule(struct preloaded_file *, char *, int, | int file_addmodule(struct preloaded_file *, char *, int, | ||||
struct kernel_module **); | struct kernel_module **); | ||||
void file_removemetadata(struct preloaded_file *fp); | void file_removemetadata(struct preloaded_file *fp); | ||||
vm_offset_t build_font_module(vm_offset_t); | |||||
/* MI module loaders */ | /* MI module loaders */ | ||||
#ifdef __elfN | #ifdef __elfN | ||||
/* Relocation types. */ | /* Relocation types. */ | ||||
#define ELF_RELOC_REL 1 | #define ELF_RELOC_REL 1 | ||||
#define ELF_RELOC_RELA 2 | #define ELF_RELOC_RELA 2 | ||||
/* Relocation offset for some architectures */ | /* Relocation offset for some architectures */ | ||||
▲ Show 20 Lines • Show All 129 Lines • Show Last 20 Lines |