ArmPkg: only attempt buildin MmCommunicationDxe for AArch64
[mirror_edk2.git] / UefiCpuPkg / CpuDxe / X64 / CpuAsm.nasm
CommitLineData
b85a6ffb
LG
1;------------------------------------------------------------------------------\r
2;*\r
3;* Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>\r
0acd8697 4;* SPDX-License-Identifier: BSD-2-Clause-Patent\r
b85a6ffb
LG
5;*\r
6;* CpuAsm.nasm\r
7;*\r
8;* Abstract:\r
9;*\r
10;------------------------------------------------------------------------------\r
11\r
12 DEFAULT REL\r
13 SECTION .text\r
14\r
15;------------------------------------------------------------------------------\r
16; VOID\r
17; SetCodeSelector (\r
18; UINT16 Selector\r
19; );\r
20;------------------------------------------------------------------------------\r
21global ASM_PFX(SetCodeSelector)\r
22ASM_PFX(SetCodeSelector):\r
23 sub rsp, 0x10\r
24 lea rax, [setCodeSelectorLongJump]\r
25 mov [rsp], rax\r
26 mov [rsp+4], cx\r
27 jmp dword far [rsp]\r
28setCodeSelectorLongJump:\r
29 add rsp, 0x10\r
30 ret\r
31\r
32;------------------------------------------------------------------------------\r
33; VOID\r
34; SetDataSelectors (\r
35; UINT16 Selector\r
36; );\r
37;------------------------------------------------------------------------------\r
38global ASM_PFX(SetDataSelectors)\r
39ASM_PFX(SetDataSelectors):\r
40o16 mov ss, cx\r
41o16 mov ds, cx\r
42o16 mov es, cx\r
43o16 mov fs, cx\r
44o16 mov gs, cx\r
45 ret\r
46\r