Add some fields to the already defined, but unused, bootinfo structure

for BIOS geometry. Define CPU_BIOS_GEOM sysctl value in cpu.h.
This commit is contained in:
fvdl 1999-03-08 00:10:42 +00:00
parent f8e221511b
commit 5db52a7a6b
2 changed files with 15 additions and 5 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: bootinfo.h,v 1.3 1999/01/28 20:10:55 christos Exp $ */
/* $NetBSD: bootinfo.h,v 1.4 1999/03/08 00:10:42 fvdl Exp $ */
/*
* Copyright (c) 1997
@ -91,7 +91,15 @@ struct btinfo_symtab {
#include <sys/disklabel_mbr.h>
struct bi_biosgeom_entry {
int spc, spt;
int sec, head, cyl;
u_int64_t totsec;
int flags, dev;
#define BI_GEOM_INVALID 0x01
#define BI_GEOM_EXTINT13 0x02
#define BI_GEOM_MATCHED 0x04
#define BI_GEOM_MULTIPLE 0x08
unsigned int cksum;
char devname[16];
struct mbr_partition dosparts[NMBRPART];
};
@ -107,5 +115,5 @@ void *lookup_bootinfo __P((int));
#endif /* _LOCORE */
#ifdef _KERNEL
#define BOOTINFO_MAXSIZE 1000
#define BOOTINFO_MAXSIZE 4096
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: cpu.h,v 1.49 1998/11/11 06:41:26 thorpej Exp $ */
/* $NetBSD: cpu.h,v 1.50 1999/03/08 00:10:42 fvdl Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@ -197,7 +197,8 @@ void child_return __P((void *));
#define CPU_BIOSEXTMEM 3 /* int: bios-reported ext. mem (K) */
#define CPU_NKPDE 4 /* int: number of kernel PDEs */
#define CPU_BOOTED_KERNEL 5 /* string: booted kernel name */
#define CPU_MAXID 6 /* number of valid machdep ids */
#define CPU_BIOS_GEOM 6 /* bios disk geometry information */
#define CPU_MAXID 7 /* number of valid machdep ids */
#define CTL_MACHDEP_NAMES { \
{ 0, 0 }, \
@ -206,6 +207,7 @@ void child_return __P((void *));
{ "biosextmem", CTLTYPE_INT }, \
{ "nkpde", CTLTYPE_INT }, \
{ "booted_kernel", CTLTYPE_STRING }, \
{ "biosdiskgeom", CTLTYPE_STRUCT }, \
}
#endif /* !_I386_CPU_H_ */