## @file\r
# Simple CPU driver installs CPU Architecture Protocol.\r
#\r
-# Copyright (c) 2008 - 2015, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2008 - 2016, Intel Corporation. All rights reserved.<BR>\r
# This program and the accompanying materials\r
# are licensed and made available under the terms and conditions of the BSD License\r
# which accompanies this distribution. The full text of the license may be found at\r
CpuMp.h\r
\r
[Sources.IA32]\r
- Ia32/CpuAsm.asm | MSFT\r
- Ia32/CpuAsm.asm | INTEL\r
- Ia32/CpuAsm.S | GCC\r
- Ia32/MpAsm.asm | MSFT\r
- Ia32/MpAsm.asm | INTEL\r
- Ia32/MpAsm.nasm | GCC\r
+ Ia32/CpuAsm.asm\r
+ Ia32/CpuAsm.nasm\r
+ Ia32/CpuAsm.S\r
+ Ia32/MpAsm.asm\r
+ Ia32/MpAsm.nasm\r
\r
[Sources.X64]\r
- X64/CpuAsm.asm | MSFT\r
- X64/CpuAsm.asm | INTEL\r
- X64/CpuAsm.S | GCC\r
- X64/MpAsm.asm | MSFT\r
- X64/MpAsm.asm | INTEL\r
- X64/MpAsm.nasm | GCC\r
+ X64/CpuAsm.asm\r
+ X64/CpuAsm.nasm\r
+ X64/CpuAsm.S\r
+ X64/MpAsm.asm\r
+ X64/MpAsm.nasm\r
\r
[Protocols]\r
gEfiCpuArchProtocolGuid ## PRODUCES\r
--- /dev/null
+;------------------------------------------------------------------------------\r
+;*\r
+;* Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>\r
+;* This program and the accompanying materials\r
+;* are licensed and made available under the terms and conditions of the BSD License\r
+;* which accompanies this distribution. The full text of the license may be found at\r
+;* http://opensource.org/licenses/bsd-license.php\r
+;*\r
+;* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+;* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+;*\r
+;* CpuAsm.nasm\r
+;*\r
+;* Abstract:\r
+;*\r
+;------------------------------------------------------------------------------\r
+\r
+ DEFAULT REL\r
+ SECTION .text\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; SetCodeSelector (\r
+; UINT16 Selector\r
+; );\r
+;------------------------------------------------------------------------------\r
+global ASM_PFX(SetCodeSelector)\r
+ASM_PFX(SetCodeSelector):\r
+ sub rsp, 0x10\r
+ lea rax, [setCodeSelectorLongJump]\r
+ mov [rsp], rax\r
+ mov [rsp+4], cx\r
+ jmp dword far [rsp]\r
+setCodeSelectorLongJump:\r
+ add rsp, 0x10\r
+ ret\r
+\r
+;------------------------------------------------------------------------------\r
+; VOID\r
+; SetDataSelectors (\r
+; UINT16 Selector\r
+; );\r
+;------------------------------------------------------------------------------\r
+global ASM_PFX(SetDataSelectors)\r
+ASM_PFX(SetDataSelectors):\r
+o16 mov ss, cx\r
+o16 mov ds, cx\r
+o16 mov es, cx\r
+o16 mov fs, cx\r
+o16 mov gs, cx\r
+ ret\r
+\r