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