Remove the SMBIOS detection and definitions; this should be handled in a
loadable module (under development).
This commit is contained in:
parent
a7d1f49705
commit
dc055b0c58
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=49996
@ -24,7 +24,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: bios.c,v 1.14 1999/07/29 06:48:26 msmith Exp $
|
||||
* $Id: bios.c,v 1.16 1999/08/17 07:10:29 msmith Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -52,7 +52,6 @@
|
||||
|
||||
/* exported lookup results */
|
||||
struct bios32_SDentry PCIbios = {entry : 0};
|
||||
struct SMBIOS_table *SMBIOStable = 0;
|
||||
struct PnPBIOS_table *PnPBIOStable = 0;
|
||||
|
||||
static u_int bios32_SDCI = 0;
|
||||
@ -75,7 +74,6 @@ bios32_init(void *junk)
|
||||
{
|
||||
u_long sigaddr;
|
||||
struct bios32_SDheader *sdh;
|
||||
struct SMBIOS_table *sbt;
|
||||
struct PnPBIOS_table *pt;
|
||||
u_int8_t ck, *cv;
|
||||
int i;
|
||||
@ -110,33 +108,6 @@ bios32_init(void *junk)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* System Management BIOS
|
||||
*/
|
||||
/* look for the SMBIOS signature */
|
||||
if ((sigaddr = bios_sigsearch(0, "_SM_", 4, 16, 0)) != 0) {
|
||||
|
||||
/* get a virtual pointer to the structure */
|
||||
sbt = (struct SMBIOS_table *)(uintptr_t)BIOS_PADDRTOVADDR(sigaddr);
|
||||
for (cv = (u_int8_t *)sbt, ck = 0, i = 0; i < sbt->len; i++) {
|
||||
ck += cv[i];
|
||||
}
|
||||
/* if checksum is OK, we have action */
|
||||
if (ck == 0) {
|
||||
SMBIOStable = sbt; /* save reference */
|
||||
if (bootverbose) {
|
||||
printf("smbios: SMBIOS header at %p\n", sbt);
|
||||
printf("smbios: Version %d.%d\n", sbt->major, sbt->minor);
|
||||
printf("smbios: Table at 0x%x, %d entries, %d bytes, largest entry %d bytes\n",
|
||||
sbt->dmi.st_base, (int)sbt->dmi.st_entries, (int)sbt->dmi.st_size,
|
||||
(int)sbt->st_maxsize);
|
||||
}
|
||||
} else {
|
||||
printf("smbios: Bad SMBIOS table checksum\n");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* PnP BIOS
|
||||
*/
|
||||
|
@ -24,7 +24,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: bios.h,v 1.3 1999/07/29 01:49:19 msmith Exp $
|
||||
* $Id: bios.h,v 1.4 1999/08/17 07:10:34 msmith Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -64,33 +64,6 @@ extern u_int32_t bios_sigsearch(u_int32_t start, u_char *sig, int siglen,
|
||||
#define BIOS_VADDRTOPADDR(x) (((x) - atdevbase) + ISA_HOLE_START)
|
||||
|
||||
|
||||
/*
|
||||
* System Management BIOS / Desktop Management Interface tables
|
||||
*/
|
||||
|
||||
struct DMI_table
|
||||
{
|
||||
u_int8_t sig[5]; /* "_DMI_" */
|
||||
u_int8_t cksum; /* checksum */
|
||||
u_int16_t st_size; /* total length of SMBIOS table (bytes)*/
|
||||
u_int32_t st_base; /* base address of the SMBIOS table (physical) */
|
||||
u_int16_t st_entries; /* total number of structures present in the table */
|
||||
u_int8_t bcd_revision; /* interface revision number */
|
||||
};
|
||||
|
||||
struct SMBIOS_table
|
||||
{
|
||||
u_int8_t sig[4]; /* "_SM_" */
|
||||
u_int8_t cksum; /* checksum */
|
||||
u_int8_t len; /* structure length */
|
||||
u_int8_t major, minor; /* major/minor revision numbers */
|
||||
u_int16_t st_maxsize; /* largest structure size (bytes) */
|
||||
u_int8_t revision; /* entrypoint revision */
|
||||
u_int8_t pad[5];
|
||||
struct DMI_table dmi; /* follows immediately */
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* PnP BIOS presence structure
|
||||
*/
|
||||
@ -116,7 +89,6 @@ struct PnPBIOS_table
|
||||
* Exported lookup results
|
||||
*/
|
||||
extern struct bios32_SDentry PCIbios;
|
||||
extern struct SMBIOS_table *SMBIOStable;
|
||||
extern struct PnPBIOS_table *PnPBIOStable;
|
||||
|
||||
struct segment_info {
|
||||
|
@ -24,7 +24,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: bios.c,v 1.14 1999/07/29 06:48:26 msmith Exp $
|
||||
* $Id: bios.c,v 1.16 1999/08/17 07:10:29 msmith Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -52,7 +52,6 @@
|
||||
|
||||
/* exported lookup results */
|
||||
struct bios32_SDentry PCIbios = {entry : 0};
|
||||
struct SMBIOS_table *SMBIOStable = 0;
|
||||
struct PnPBIOS_table *PnPBIOStable = 0;
|
||||
|
||||
static u_int bios32_SDCI = 0;
|
||||
@ -75,7 +74,6 @@ bios32_init(void *junk)
|
||||
{
|
||||
u_long sigaddr;
|
||||
struct bios32_SDheader *sdh;
|
||||
struct SMBIOS_table *sbt;
|
||||
struct PnPBIOS_table *pt;
|
||||
u_int8_t ck, *cv;
|
||||
int i;
|
||||
@ -110,33 +108,6 @@ bios32_init(void *junk)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* System Management BIOS
|
||||
*/
|
||||
/* look for the SMBIOS signature */
|
||||
if ((sigaddr = bios_sigsearch(0, "_SM_", 4, 16, 0)) != 0) {
|
||||
|
||||
/* get a virtual pointer to the structure */
|
||||
sbt = (struct SMBIOS_table *)(uintptr_t)BIOS_PADDRTOVADDR(sigaddr);
|
||||
for (cv = (u_int8_t *)sbt, ck = 0, i = 0; i < sbt->len; i++) {
|
||||
ck += cv[i];
|
||||
}
|
||||
/* if checksum is OK, we have action */
|
||||
if (ck == 0) {
|
||||
SMBIOStable = sbt; /* save reference */
|
||||
if (bootverbose) {
|
||||
printf("smbios: SMBIOS header at %p\n", sbt);
|
||||
printf("smbios: Version %d.%d\n", sbt->major, sbt->minor);
|
||||
printf("smbios: Table at 0x%x, %d entries, %d bytes, largest entry %d bytes\n",
|
||||
sbt->dmi.st_base, (int)sbt->dmi.st_entries, (int)sbt->dmi.st_size,
|
||||
(int)sbt->st_maxsize);
|
||||
}
|
||||
} else {
|
||||
printf("smbios: Bad SMBIOS table checksum\n");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* PnP BIOS
|
||||
*/
|
||||
|
@ -24,7 +24,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: bios.h,v 1.3 1999/07/29 01:49:19 msmith Exp $
|
||||
* $Id: bios.h,v 1.4 1999/08/17 07:10:34 msmith Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -64,33 +64,6 @@ extern u_int32_t bios_sigsearch(u_int32_t start, u_char *sig, int siglen,
|
||||
#define BIOS_VADDRTOPADDR(x) (((x) - atdevbase) + ISA_HOLE_START)
|
||||
|
||||
|
||||
/*
|
||||
* System Management BIOS / Desktop Management Interface tables
|
||||
*/
|
||||
|
||||
struct DMI_table
|
||||
{
|
||||
u_int8_t sig[5]; /* "_DMI_" */
|
||||
u_int8_t cksum; /* checksum */
|
||||
u_int16_t st_size; /* total length of SMBIOS table (bytes)*/
|
||||
u_int32_t st_base; /* base address of the SMBIOS table (physical) */
|
||||
u_int16_t st_entries; /* total number of structures present in the table */
|
||||
u_int8_t bcd_revision; /* interface revision number */
|
||||
};
|
||||
|
||||
struct SMBIOS_table
|
||||
{
|
||||
u_int8_t sig[4]; /* "_SM_" */
|
||||
u_int8_t cksum; /* checksum */
|
||||
u_int8_t len; /* structure length */
|
||||
u_int8_t major, minor; /* major/minor revision numbers */
|
||||
u_int16_t st_maxsize; /* largest structure size (bytes) */
|
||||
u_int8_t revision; /* entrypoint revision */
|
||||
u_int8_t pad[5];
|
||||
struct DMI_table dmi; /* follows immediately */
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* PnP BIOS presence structure
|
||||
*/
|
||||
@ -116,7 +89,6 @@ struct PnPBIOS_table
|
||||
* Exported lookup results
|
||||
*/
|
||||
extern struct bios32_SDentry PCIbios;
|
||||
extern struct SMBIOS_table *SMBIOStable;
|
||||
extern struct PnPBIOS_table *PnPBIOStable;
|
||||
|
||||
struct segment_info {
|
||||
|
Loading…
Reference in New Issue
Block a user