summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRushikesh S Kadam <rushikesh.s.kadam@intel.com>2018-11-03 01:48:18 +0530
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2018-12-11 09:24:26 +0000
commit2454467d04997802025102539e8f234e16f6a706 (patch)
treecdb7b90f345ac71772ea67f8d98298fd29668637
parent649511831794a787d034378a47aac09b54fd6806 (diff)
downloadchrome-ec-2454467d04997802025102539e8f234e16f6a706.tar.gz
core/minute-ia: Setup GDT
Setup GDT for main ISH FW BRANCH=none BUG=b:120051488 TEST=Verify that main ISH FW runs fine when loaded through host FW load flow. Change-Id: I8101de6c2482abb09ccc8fdc36321fa562e521d7 Signed-off-by: Rushikesh S Kadam <rushikesh.s.kadam@intel.com> Signed-off-by: Sadashiva Rao Pv <sadashiva.rao.pv@intel.com> Reviewed-on: https://chromium-review.googlesource.com/1316700 Commit-Ready: Caveh Jalali <caveh@google.com> Reviewed-by: Caveh Jalali <caveh@google.com> (cherry picked from commit f645b4591de099c245dd8e69bdc785134fdfdb7a) Reviewed-on: https://chromium-review.googlesource.com/c/1365151 Commit-Queue: Caveh Jalali <caveh@google.com> Tested-by: Caveh Jalali <caveh@google.com>
-rw-r--r--core/minute-ia/init.S29
1 files changed, 29 insertions, 0 deletions
diff --git a/core/minute-ia/init.S b/core/minute-ia/init.S
index 054de9c4e3..5ba0cbf581 100644
--- a/core/minute-ia/init.S
+++ b/core/minute-ia/init.S
@@ -286,12 +286,38 @@ interrupt_descriptor
interrupt_descriptor
interrupt_descriptor # 255
+__gdt:
+ # Entry 0: Null descriptor
+ .word 0x0000
+ .word 0x0000
+ .byte 0x00
+ .byte 0x00
+ .byte 0x00
+ .byte 0x00
+ # Entry 1: Code descriptor
+ .word 0xffff # Limit: xffff
+ .word 0x0000 # Base: xxxx0000
+ .byte 0x00 # Base: xx00xxxx
+ .byte 0x9b # Code E/R, Present, DPL0, Acesssed=1
+ .byte 0xcf # Limit fxxxx, Page Gra, 32 bit
+ .byte 0x00 # Base: 00xxxxxx
+ # Entry 0: Data descriptor
+ .word 0xffff # Limit: xffff
+ .word 0x0000 # Base: xxxx0000
+ .byte 0x00 # Base: xx00xxxx
+ .byte 0x93 # Data R/W, Present, DPL0, Acesssed=1
+ .byte 0xcf # Limit fxxxx, Page Gra, 32 bit
+ .byte 0x00 # Base: 00xxxxxx
+
#.section .data
__idt_ptr:
.word 2047 # Table size in bytes, count from 0
# (8N - 1). N = 256 - the number of vectors
.long __idt # Base address of IDT
+__gdt_ptr:
+ .word 24
+ .long __gdt
.section .init
.code32
@@ -316,6 +342,9 @@ reset:
# System stack is within .bss, already cleared
movl $stack_end, %esp
+ # Load GDT
+ lgdt __gdt_ptr
+
# Load IDT
lidt __idt_ptr