From: Andrey Panin <pazke@orbita1.ru>
To: linux-kernel@vger.kernel.org
Cc: Linus Torvalds <torvalds@transmeta.com>
Subject: [PATCH] visws: boot changes (5/13)
Date: Fri, 14 Feb 2003 15:58:10 +0300 [thread overview]
Message-ID: <20030214125810.GE8230@pazke> (raw)
[-- Attachment #1: Type: text/plain, Size: 359 bytes --]
Hi.
This simple patch adds some additional code into head.S.
On visws bootup cpu starts in protected mode (so we don't need
setup.S), but setting up pagetables and gdt is required before
running rest of head.S.
Please consider applying.
Best regards.
--
Andrey Panin | Embedded systems software developer
pazke@orbita1.ru | PGP key: wwwkeys.pgp.net
[-- Attachment #2: patch-visws-head --]
[-- Type: text/plain, Size: 1701 bytes --]
diff -urN -X /usr/share/dontdiff linux-2.5.60.vanilla/arch/i386/kernel/head.S linux-2.5.60/arch/i386/kernel/head.S
--- linux-2.5.60.vanilla/arch/i386/kernel/head.S Fri Feb 14 15:22:36 2003
+++ linux-2.5.60/arch/i386/kernel/head.S Fri Feb 14 15:27:47 2003
@@ -38,11 +38,37 @@
#define X86_VENDOR_ID CPU_PARAMS+28
/*
+ * Initialize page tables
+ */
+#define INIT_PAGE_TABLES \
+ movl $pg0 - __PAGE_OFFSET, %edi; \
+ /* "007" doesn't mean with license to kill, but PRESENT+RW+USER */ \
+ movl $007, %eax; \
+2: stosl; \
+ add $0x1000, %eax; \
+ cmp $empty_zero_page - __PAGE_OFFSET, %edi; \
+ jne 2b;
+
+/*
* swapper_pg_dir is the main page directory, address 0x00101000
*
* On entry, %esi points to the real-mode code as a 32-bit pointer.
*/
ENTRY(startup_32)
+
+#ifdef CONFIG_X86_VISWS
+/*
+ * On SGI Visual Workstations boot CPU starts in protected mode.
+ */
+ orw %bx, %bx
+ jnz 1f
+ INIT_PAGE_TABLES
+ movl $swapper_pg_dir - __PAGE_OFFSET, %eax
+ movl %eax, %cr3
+ lgdt boot_gdt
+1:
+#endif
+
/*
* Set segments to known values
*/
@@ -79,17 +105,7 @@
jmp 3f
1:
#endif
-/*
- * Initialize page tables
- */
- movl $pg0-__PAGE_OFFSET,%edi /* initialize page tables */
- movl $007,%eax /* "007" doesn't mean with license to kill, but
- PRESENT+RW+USER */
-2: stosl
- add $0x1000,%eax
- cmp $empty_zero_page-__PAGE_OFFSET,%edi
- jne 2b
-
+ INIT_PAGE_TABLES
/*
* Enable paging
*/
@@ -412,7 +428,7 @@
/*
* The Global Descriptor Table contains 28 quadwords, per-CPU.
*/
-#ifdef CONFIG_SMP
+#if defined(CONFIG_SMP) || defined(CONFIG_X86_VISWS)
/*
* The boot_gdt_table must mirror the equivalent in setup.S and is
* used only by the trampoline for booting other CPUs
reply other threads:[~2003-02-14 12:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030214125810.GE8230@pazke \
--to=pazke@orbita1.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.