]> git.proxmox.com Git - mirror_edk2.git/blame - UefiCpuPkg/CpuDxe/X64/CpuAsm.asm
SourceLevelDebugPkg: Remove X86 ASM and S files
[mirror_edk2.git] / UefiCpuPkg / CpuDxe / X64 / CpuAsm.asm
CommitLineData
a47463f2 1 TITLE CpuAsm.asm: \r
2;------------------------------------------------------------------------------\r
3;*\r
e41aad15 4;* Copyright (c) 2008 - 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 .code\r
20\r
a47463f2 21;------------------------------------------------------------------------------\r
22; VOID\r
23; SetCodeSelector (\r
24; UINT16 Selector\r
25; );\r
26;------------------------------------------------------------------------------\r
27SetCodeSelector PROC PUBLIC\r
28 sub rsp, 0x10\r
29 lea rax, setCodeSelectorLongJump\r
30 mov [rsp], rax\r
31 mov [rsp+4], cx\r
32 jmp fword ptr [rsp]\r
33setCodeSelectorLongJump:\r
34 add rsp, 0x10\r
35 ret\r
36SetCodeSelector ENDP\r
37\r
38;------------------------------------------------------------------------------\r
39; VOID\r
40; SetDataSelectors (\r
41; UINT16 Selector\r
42; );\r
43;------------------------------------------------------------------------------\r
44SetDataSelectors PROC PUBLIC\r
45 mov ss, cx\r
46 mov ds, cx\r
47 mov es, cx\r
48 mov fs, cx\r
49 mov gs, cx\r
50 ret\r
51SetDataSelectors ENDP\r
52\r
a47463f2 53END\r
54\r