发布网友
共2个回答
热心网友
bios.h 涉及输入输出的头文件,与软件和硬件都有关系,网上可以搜到bios.h,但你要判断是否是你需要的。例如 linux 的:
#ifndef _ASM_X86_UV_BIOS_H
#define _ASM_X86_UV_BIOS_H
#include <linux/rtc.h>
/*
* Values for the BIOS calls. It is passed as the first * argument in the
* BIOS call. Passing any other value in the first argument will result
* in a BIOS_STATUS_UNIMPLEMENTED return status.
*/
enum uv_bios_cmd {
UV_BIOS_COMMON,
UV_BIOS_GET_SN_INFO,
UV_BIOS_FREQ_BASE,
UV_BIOS_WATCHLIST_ALLOC,
UV_BIOS_WATCHLIST_FREE,
UV_BIOS_MEMPROTECT,
UV_BIOS_GET_PARTITION_ADDR
};
/*
* Status values returned from a BIOS call.
*/
enum {
BIOS_STATUS_MORE_PASSES= 1,
BIOS_STATUS_SUCCESS= 0,
BIOS_STATUS_UNIMPLEMENTED= -ENOSYS,
BIOS_STATUS_EINVAL= -EINVAL,
BIOS_STATUS_UNAVAIL= -EBUSY
};
/*
* The UV system table describes specific firmware
* capabilities available to the Linux kernel at runtime.
*/
struct uv_systab {
char signature[4];/* must be "UVST" */
u32 revision;/* distinguish different firmware revs */
u function;/* BIOS runtime callback function ptr */
};
enum {
BIOS_FREQ_BASE_PLATFORM = 0,
BIOS_FREQ_BASE_INTERVAL_TIMER = 1,
BIOS_FREQ_BASE_REALTIME_CLOCK = 2
};
union partition_info_u {
uval;
struct {
uhub_version: 8,
partition_id: 16,
coherence_id: 16,
region_size: 24;
};
};
union uv_watchlist_u {
uval;
struct {
ublade: 16,
size: 32,
filler: 16;
};
};
enum uv_memprotect {
UV_MEMPROT_RESTRICT_ACCESS,
UV_MEMPROT_ALLOW_AMO,
UV_MEMPROT_ALLOW_RW
};
/*
* bios calls have 6 parameters
*/
extern s uv_bios_call(enum uv_bios_cmd, u, u, u, u, u);
extern s uv_bios_call_irqsave(enum uv_bios_cmd, u, u, u, u, u);
extern s uv_bios_call_reentrant(enum uv_bios_cmd, u, u, u, u, u);
extern s uv_bios_get_sn_info(int, int *, long *, long *, long *);
extern s uv_bios_freq_base(u, u *);
extern int uv_bios_mq_watchlist_alloc(int, unsigned long, unsigned int,
unsigned long *);
extern int uv_bios_mq_watchlist_free(int, int);
extern s uv_bios_change_memprotect(u, u, enum uv_memprotect);
extern s uv_bios_reserved_page_pa(u, u *, u *, u *);
extern void uv_bios_init(void);
extern unsigned long sn_rtc_cycles_per_second;
extern int uv_type;
extern long sn_partition_id;
extern long sn_coherency_id;
extern long sn_region_size;
#define partition_coherence_id()(sn_coherency_id)
extern struct kobject *sgi_uv_kobj;/* /sys/firmware/sgi_uv */
#endif /* _ASM_X86_UV_BIOS_H */
热心网友
下载个openssl的源代码包,里面就有。www.openssl.org可以下载所有相关代码和参考资料。