public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Bin Meng <bmeng.cn@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 03/13] x86: Initialize GDT entry 1 to be the 32-bit CS as well
Date: Mon, 28 Sep 2015 02:12:00 -0700	[thread overview]
Message-ID: <1443431530-472-4-git-send-email-bmeng.cn@gmail.com> (raw)
In-Reply-To: <1443431530-472-1-git-send-email-bmeng.cn@gmail.com>

Some OS (like VxWorks) requires GDT entry 1 to be the 32-bit CS.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Jian Luo <jian.luo4@boschrexroth.de>
---

Changes in v2: None

 arch/x86/cpu/cpu.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c
index 1b76ca1..812c5e4 100644
--- a/arch/x86/cpu/cpu.c
+++ b/arch/x86/cpu/cpu.c
@@ -142,7 +142,12 @@ void arch_setup_gd(gd_t *new_gd)
 
 	gdt_addr = new_gd->arch.gdt;
 
-	/* CS: code, read/execute, 4 GB, base 0 */
+	/*
+	 * CS: code, read/execute, 4 GB, base 0
+	 *
+	 * Some OS (like VxWorks) requires GDT entry 1 to be the 32-bit CS
+	 */
+	gdt_addr[X86_GDT_ENTRY_UNUSED] = GDT_ENTRY(0xc09b, 0, 0xfffff);
 	gdt_addr[X86_GDT_ENTRY_32BIT_CS] = GDT_ENTRY(0xc09b, 0, 0xfffff);
 
 	/* DS: data, read/write, 4 GB, base 0 */
-- 
1.8.2.1

  parent reply	other threads:[~2015-09-28  9:12 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-28  9:11 [U-Boot] [PATCH v2 00/13] Better support of booting VxWorks via 'bootvx' Bin Meng
2015-09-28  9:11 ` [U-Boot] [PATCH v2 01/13] Reorder defconfigs with 'savedefconfig' Bin Meng
2015-09-28  9:11 ` [U-Boot] [PATCH v2 02/13] x86: fsp: Report correct number of E820 table entries Bin Meng
2015-09-29  4:52   ` Simon Glass
2015-10-18 12:58     ` Simon Glass
2015-10-18 15:55       ` Tom Rini
2015-10-18 20:25         ` Simon Glass
2015-10-19  0:09       ` Tom Rini
2015-10-19  2:28         ` Simon Glass
2015-09-28  9:12 ` Bin Meng [this message]
2015-10-01 23:00   ` [U-Boot] [PATCH v2 03/13] x86: Initialize GDT entry 1 to be the 32-bit CS as well Simon Glass
2015-09-28  9:12 ` [U-Boot] [PATCH v2 04/13] x86: Move install_e820_map() out of zimage.c Bin Meng
2015-10-02  7:06   ` Simon Glass
2015-09-28  9:12 ` [U-Boot] [PATCH v2 05/13] x86: Remove quotation mark in CONFIG_HOSTNAME Bin Meng
2015-10-02  7:06   ` Simon Glass
2015-09-28  9:12 ` [U-Boot] [PATCH v2 06/13] cmd: Convert CONFIG_CMD_ELF to Kconfig Bin Meng
2015-09-29  6:47   ` Hannes Schmelzer
2015-09-28  9:12 ` [U-Boot] [PATCH v2 07/13] cmd: Clean up cmd_elf a little bit Bin Meng
2015-09-29  6:54   ` Hannes Schmelzer
2015-09-28  9:12 ` [U-Boot] [PATCH v2 08/13] cmd: elf: Reorder load_elf_image_phdr() and load_elf_image_shdr() Bin Meng
2015-09-28  9:12 ` [U-Boot] [PATCH v2 09/13] cmd: bootvx: Pass netmask and gatewayip to VxWorks bootline Bin Meng
2015-10-01 23:01   ` Simon Glass
2015-09-28  9:12 ` [U-Boot] [PATCH v2 10/13] cmd: bootvx: Always get VxWorks bootline from env Bin Meng
2015-09-29  6:54   ` Hannes Schmelzer
2015-09-28  9:12 ` [U-Boot] [PATCH v2 11/13] cmd: bootvx: Pass E820 information to an x86 VxWorks kernel Bin Meng
2015-10-02  7:06   ` Simon Glass
2015-09-28  9:12 ` [U-Boot] [PATCH v2 12/13] cmd: bootvx: Add asmlinkage to the VxWorks x86 entry Bin Meng
2015-10-02  7:06   ` Simon Glass
2015-09-28  9:12 ` [U-Boot] [PATCH v2 13/13] doc: Complement document about booting VxWorks Bin Meng

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=1443431530-472-4-git-send-email-bmeng.cn@gmail.com \
    --to=bmeng.cn@gmail.com \
    --cc=u-boot@lists.denx.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox