summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakanori Watanabe <takawata@FreeBSD.org>2002-03-23 06:44:04 +0000
committerTakanori Watanabe <takawata@FreeBSD.org>2002-03-23 06:44:04 +0000
commit391b5c4a912a5ffccd2cb09a930b0df05677cf98 (patch)
treebef75178482c06f16e509b2428b46c3586c6f9f5
parent8c157f604107297a6fbe3652945468f899d6e037 (diff)
Notes
-rw-r--r--sys/amd64/amd64/bios.c3
-rw-r--r--sys/i386/i386/bios.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/sys/amd64/amd64/bios.c b/sys/amd64/amd64/bios.c
index bf4b8a3bb5c4..3d4c7e5c4622 100644
--- a/sys/amd64/amd64/bios.c
+++ b/sys/amd64/amd64/bios.c
@@ -93,7 +93,8 @@ bios32_init(void *junk)
ck += cv[i];
}
/* If checksum is OK, enable use of the entrypoint */
- if ((ck == 0) && (sdh->entry < (BIOS_START + BIOS_SIZE))) {
+ if ((ck == 0) && (BIOS_START <= sdh->entry ) &&
+ (sdh->entry < (BIOS_START + BIOS_SIZE))) {
bios32_SDCI = BIOS_PADDRTOVADDR(sdh->entry);
if (bootverbose) {
printf("bios32: Found BIOS32 Service Directory header at %p\n", sdh);
diff --git a/sys/i386/i386/bios.c b/sys/i386/i386/bios.c
index bf4b8a3bb5c4..3d4c7e5c4622 100644
--- a/sys/i386/i386/bios.c
+++ b/sys/i386/i386/bios.c
@@ -93,7 +93,8 @@ bios32_init(void *junk)
ck += cv[i];
}
/* If checksum is OK, enable use of the entrypoint */
- if ((ck == 0) && (sdh->entry < (BIOS_START + BIOS_SIZE))) {
+ if ((ck == 0) && (BIOS_START <= sdh->entry ) &&
+ (sdh->entry < (BIOS_START + BIOS_SIZE))) {
bios32_SDCI = BIOS_PADDRTOVADDR(sdh->entry);
if (bootverbose) {
printf("bios32: Found BIOS32 Service Directory header at %p\n", sdh);