summaryrefslogtreecommitdiffstats
path: root/sys/amd64
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2005-07-21 09:48:37 +0000
committerphk <phk@FreeBSD.org>2005-07-21 09:48:37 +0000
commit0b265b33d3c21e04484bcef08529ae73e99e8073 (patch)
treea94154d475539403bc055351b9fa713d258e8a5b /sys/amd64
parenta2c6f4658e7cf879dba4bc06a47655bc064938ca (diff)
downloadFreeBSD-src-0b265b33d3c21e04484bcef08529ae73e99e8073.zip
FreeBSD-src-0b265b33d3c21e04484bcef08529ae73e99e8073.tar.gz
Make the facility for recognizing BIOS-signatures more general
and return a printable representation. This fixes recognition of the PC Engines WRAP and improves the recognition of the Soekris boards (Bios version can now be seen in the dmesg output for instance). Also, add watchdog support for PCM-582x platforms. Submitted by: Adrian Steinmann <ast@marabu.ch> Slightly changed by: phk PR: 81360
Diffstat (limited to 'sys/amd64')
-rw-r--r--sys/amd64/amd64/bios.c15
-rw-r--r--sys/amd64/include/pc/bios.h17
2 files changed, 16 insertions, 16 deletions
diff --git a/sys/amd64/amd64/bios.c b/sys/amd64/amd64/bios.c
index d08f5cc..c8985c1 100644
--- a/sys/amd64/amd64/bios.c
+++ b/sys/amd64/amd64/bios.c
@@ -93,18 +93,3 @@ bios_sigsearch(u_int32_t start, u_char *sig, int siglen, int paralen, int sigofs
}
return(0);
}
-
-const u_char *
-bios_string(u_int from, u_int to, const u_char *string, int len)
-{
- const char *t, *te;
-
- if (len == 0)
- len = strlen(string);
- t = (const char *)(KERNBASE + from);
- te = (const char *)(KERNBASE + to);
- for (; t <= te; t++)
- if (!memcmp(string, t, len))
- return (t);
- return (NULL);
-}
diff --git a/sys/amd64/include/pc/bios.h b/sys/amd64/include/pc/bios.h
index 8727972..ffad369 100644
--- a/sys/amd64/include/pc/bios.h
+++ b/sys/amd64/include/pc/bios.h
@@ -48,7 +48,22 @@ struct bios_smap {
u_int32_t type;
} __packed;
-const u_char *bios_string(u_int from, u_int to, const u_char *string, int len);
+struct bios_oem_signature {
+ char * anchor; /* search anchor string in BIOS memory */
+ size_t offset; /* offset from anchor (may be negative) */
+ size_t totlen; /* total length of BIOS string to copy */
+} __packed;
+struct bios_oem_range {
+ u_int from; /* shouldn't be below 0xe0000 */
+ u_int to; /* shouldn't be above 0xfffff */
+} __packed;
+struct bios_oem {
+ struct bios_oem_range range;
+ struct bios_oem_signature signature[];
+} __packed;
+
+extern int
+bios_oem_strings(struct bios_oem *oem, u_char *buffer, size_t maxlen);
#endif /* _MACHINE_PC_BIOS_H_ */
OpenPOWER on IntegriCloud