Changeset View
Changeset View
Standalone View
Standalone View
stand/efi/include/efilib.h
Show First 20 Lines • Show All 53 Lines • ▼ Show 20 Lines | typedef struct pdinfo | ||||
pdinfo_list_t pd_part; /* list of partitions */ | pdinfo_list_t pd_part; /* list of partitions */ | ||||
EFI_HANDLE pd_handle; | EFI_HANDLE pd_handle; | ||||
EFI_HANDLE pd_alias; | EFI_HANDLE pd_alias; | ||||
EFI_DEVICE_PATH *pd_devpath; | EFI_DEVICE_PATH *pd_devpath; | ||||
EFI_BLOCK_IO *pd_blkio; | EFI_BLOCK_IO *pd_blkio; | ||||
uint32_t pd_unit; /* unit number */ | uint32_t pd_unit; /* unit number */ | ||||
uint32_t pd_open; /* reference counter */ | uint32_t pd_open; /* reference counter */ | ||||
void *pd_bcache; /* buffer cache data */ | void *pd_bcache; /* buffer cache data */ | ||||
struct pdinfo *pd_parent; /* Linked items (eg partitions) */ | |||||
struct devsw *pd_devsw; /* Back pointer to devsw */ | |||||
} pdinfo_t; | } pdinfo_t; | ||||
pdinfo_list_t *efiblk_get_pdinfo_list(struct devsw *dev); | pdinfo_list_t *efiblk_get_pdinfo_list(struct devsw *dev); | ||||
pdinfo_t *efiblk_get_pdinfo(struct devdesc *dev); | pdinfo_t *efiblk_get_pdinfo(struct devdesc *dev); | ||||
pdinfo_t *efiblk_get_pdinfo_by_handle(EFI_HANDLE h); | |||||
void *efi_get_table(EFI_GUID *tbl); | void *efi_get_table(EFI_GUID *tbl); | ||||
int efi_getdev(void **vdev, const char *devspec, const char **path); | int efi_getdev(void **vdev, const char *devspec, const char **path); | ||||
char *efi_fmtdev(void *vdev); | char *efi_fmtdev(void *vdev); | ||||
int efi_setcurrdev(struct env_var *ev, int flags, const void *value); | int efi_setcurrdev(struct env_var *ev, int flags, const void *value); | ||||
Show All 26 Lines | |||||
/* EFI environment initialization. */ | /* EFI environment initialization. */ | ||||
void efi_init_environment(void); | void efi_init_environment(void); | ||||
/* CHAR16 utility functions. */ | /* CHAR16 utility functions. */ | ||||
int wcscmp(CHAR16 *, CHAR16 *); | int wcscmp(CHAR16 *, CHAR16 *); | ||||
void cpy8to16(const char *, CHAR16 *, size_t); | void cpy8to16(const char *, CHAR16 *, size_t); | ||||
void cpy16to8(const CHAR16 *, char *, size_t); | void cpy16to8(const CHAR16 *, char *, size_t); | ||||
/* | |||||
* Routines for interacting with EFI's env vars in a more unix-like | |||||
* way than the standard APIs. In addition, convenience routines for | |||||
* the loader setting / getting FreeBSD specific variables. | |||||
*/ | |||||
EFI_STATUS efi_freebsd_getenv(const char *v, void *data, __size_t *len); | |||||
EFI_STATUS efi_getenv(EFI_GUID *g, const char *v, void *data, __size_t *len); | |||||
EFI_STATUS efi_global_getenv(const char *v, void *data, __size_t *len); | |||||
EFI_STATUS efi_setenv_freebsd_wcs(const char *varname, CHAR16 *valstr); | |||||
/* efipart.c */ | /* efipart.c */ | ||||
int efipart_inithandles(void); | int efipart_inithandles(void); | ||||
#endif /* _LOADER_EFILIB_H */ | #endif /* _LOADER_EFILIB_H */ |