]> git.proxmox.com Git - mirror_edk2.git/blame - UefiCpuPkg/CpuDxe/Ia32/CpuAsm.asm
SourceLevelDebugPkg: Remove X86 ASM and S files
[mirror_edk2.git] / UefiCpuPkg / CpuDxe / Ia32 / CpuAsm.asm
CommitLineData
a47463f2 1 TITLE CpuAsm.asm:\r
2;------------------------------------------------------------------------------\r
3;*\r
e41aad15 4;* Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>\r
01a1c0fc 5;* This program and the accompanying materials\r
a47463f2 6;* are licensed and made available under the terms and conditions of the BSD License\r
7;* which accompanies this distribution. The full text of the license may be found at\r
8;* http://opensource.org/licenses/bsd-license.php\r
9;*\r
10;* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11;* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12;*\r
13;* CpuAsm.asm\r
14;*\r
15;* Abstract:\r
16;*\r
17;------------------------------------------------------------------------------\r
18\r
19 .686\r
20 .model flat,C\r
21 .code\r
22\r
a47463f2 23;------------------------------------------------------------------------------\r
24; VOID\r
25; SetCodeSelector (\r
26; UINT16 Selector\r
27; );\r
28;------------------------------------------------------------------------------\r
29SetCodeSelector PROC PUBLIC\r
30 mov ecx, [esp+4]\r
31 sub esp, 0x10\r
32 lea eax, setCodeSelectorLongJump\r
33 mov [esp], eax\r
34 mov [esp+4], cx\r
35 jmp fword ptr [esp]\r
36setCodeSelectorLongJump:\r
37 add esp, 0x10\r
38 ret\r
39SetCodeSelector ENDP\r
40\r
41;------------------------------------------------------------------------------\r
42; VOID\r
43; SetDataSelectors (\r
44; UINT16 Selector\r
45; );\r
46;------------------------------------------------------------------------------\r
47SetDataSelectors PROC PUBLIC\r
48 mov ecx, [esp+4]\r
49 mov ss, cx\r
50 mov ds, cx\r
51 mov es, cx\r
52 mov fs, cx\r
53 mov gs, cx\r
54 ret\r
55SetDataSelectors ENDP\r
56\r
a47463f2 57\r
58END\r