summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2012-10-11 12:08:25 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2012-10-11 12:08:25 +0000
commit328872de66467d68364fb0d31c0d8404958bd0cb (patch)
treeb8e1b34749271f4782a5f17d110f0a59dbab5e57 /sys
parent428391c520def313b59658b40cdcf142045facc1 (diff)
Initialise the protected mode IDT after zeroing .bss - otherwise we wipe
the IDT that we have just finishing building.
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/amd64/stand/cdboot/srt0.S7
-rw-r--r--sys/arch/amd64/stand/pxeboot/srt0.S7
-rw-r--r--sys/arch/i386/stand/cdboot/srt0.S7
-rw-r--r--sys/arch/i386/stand/pxeboot/srt0.S7
4 files changed, 16 insertions, 12 deletions
diff --git a/sys/arch/amd64/stand/cdboot/srt0.S b/sys/arch/amd64/stand/cdboot/srt0.S
index 14366333637..9a3d241a263 100644
--- a/sys/arch/amd64/stand/cdboot/srt0.S
+++ b/sys/arch/amd64/stand/cdboot/srt0.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: srt0.S,v 1.1 2004/08/21 18:53:38 tom Exp $ */
+/* $OpenBSD: srt0.S,v 1.2 2012/10/11 12:08:24 jsing Exp $ */
/*
* Copyright (c) 1997 Michael Shalayeff
@@ -128,8 +128,6 @@ relocated:
orl $0x100, %eax /* Indicate that it's a cd device */
pushl %eax /* boot() takes this as a parameter */
- /* Set up an interrupt descriptor table for protected mode. */
- call _ASM_LABEL(pmm_init)
#ifdef DEBUG
movl $0xb80a4, %ebx
movl $0x07520752, (%ebx)
@@ -143,6 +141,9 @@ relocated:
cld
rep; stosb
+ /* Set up an interrupt descriptor table for protected mode. */
+ call _ASM_LABEL(pmm_init)
+
/* Set our program name ("CDBOOT", not "BOOT"). */
movl $cd_progname, %eax
movl %eax, progname
diff --git a/sys/arch/amd64/stand/pxeboot/srt0.S b/sys/arch/amd64/stand/pxeboot/srt0.S
index b7138558475..e0cc7ddb8f1 100644
--- a/sys/arch/amd64/stand/pxeboot/srt0.S
+++ b/sys/arch/amd64/stand/pxeboot/srt0.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: srt0.S,v 1.1 2004/03/21 21:37:41 tom Exp $ */
+/* $OpenBSD: srt0.S,v 1.2 2012/10/11 12:08:24 jsing Exp $ */
/*
* Copyright (c) 1997 Michael Shalayeff
@@ -129,8 +129,6 @@ relocated:
movl %edx, _C_LABEL(bios_bootdev)
pushl %edx /* boot() takes this as a parameter */
- /* Set up an interrupt descriptor table for protected mode. */
- call _ASM_LABEL(pmm_init)
#ifdef DEBUG
movl $0xb80a4, %ebx
movl $0x07520752, (%ebx)
@@ -144,6 +142,9 @@ relocated:
cld
rep; stosb
+ /* Set up an interrupt descriptor table for protected mode. */
+ call _ASM_LABEL(pmm_init)
+
/* Set our program name ("PXEBOOT", not "BOOT"). */
movl $pxe_progname, %eax
movl %eax, progname
diff --git a/sys/arch/i386/stand/cdboot/srt0.S b/sys/arch/i386/stand/cdboot/srt0.S
index 261191b1e9f..9a3d241a263 100644
--- a/sys/arch/i386/stand/cdboot/srt0.S
+++ b/sys/arch/i386/stand/cdboot/srt0.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: srt0.S,v 1.1 2004/06/23 00:21:49 tom Exp $ */
+/* $OpenBSD: srt0.S,v 1.2 2012/10/11 12:08:24 jsing Exp $ */
/*
* Copyright (c) 1997 Michael Shalayeff
@@ -128,8 +128,6 @@ relocated:
orl $0x100, %eax /* Indicate that it's a cd device */
pushl %eax /* boot() takes this as a parameter */
- /* Set up an interrupt descriptor table for protected mode. */
- call _ASM_LABEL(pmm_init)
#ifdef DEBUG
movl $0xb80a4, %ebx
movl $0x07520752, (%ebx)
@@ -143,6 +141,9 @@ relocated:
cld
rep; stosb
+ /* Set up an interrupt descriptor table for protected mode. */
+ call _ASM_LABEL(pmm_init)
+
/* Set our program name ("CDBOOT", not "BOOT"). */
movl $cd_progname, %eax
movl %eax, progname
diff --git a/sys/arch/i386/stand/pxeboot/srt0.S b/sys/arch/i386/stand/pxeboot/srt0.S
index be237cf8f6f..e0cc7ddb8f1 100644
--- a/sys/arch/i386/stand/pxeboot/srt0.S
+++ b/sys/arch/i386/stand/pxeboot/srt0.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: srt0.S,v 1.1 2004/03/19 13:48:19 tom Exp $ */
+/* $OpenBSD: srt0.S,v 1.2 2012/10/11 12:08:24 jsing Exp $ */
/*
* Copyright (c) 1997 Michael Shalayeff
@@ -129,8 +129,6 @@ relocated:
movl %edx, _C_LABEL(bios_bootdev)
pushl %edx /* boot() takes this as a parameter */
- /* Set up an interrupt descriptor table for protected mode. */
- call _ASM_LABEL(pmm_init)
#ifdef DEBUG
movl $0xb80a4, %ebx
movl $0x07520752, (%ebx)
@@ -144,6 +142,9 @@ relocated:
cld
rep; stosb
+ /* Set up an interrupt descriptor table for protected mode. */
+ call _ASM_LABEL(pmm_init)
+
/* Set our program name ("PXEBOOT", not "BOOT"). */
movl $pxe_progname, %eax
movl %eax, progname