VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/UefiCpuPkg/CpuDxe/Ia32/CpuAsm.nasm@ 109019

Last change on this file since 109019 was 99404, checked in by vboxsync, 2 years ago

Devices/EFI/FirmwareNew: Update to edk2-stable202302 and make it build, bugref:4643

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/x-asm
File size: 1.2 KB
Line 
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 SECTION .text
13
14;------------------------------------------------------------------------------
15; VOID
16; SetCodeSelector (
17; UINT16 Selector
18; );
19;------------------------------------------------------------------------------
20global ASM_PFX(SetCodeSelector)
21ASM_PFX(SetCodeSelector):
22 mov ecx, [esp+4]
23 sub esp, 0x10
24 lea eax, [setCodeSelectorLongJump]
25 mov [esp], eax
26 mov [esp+4], cx
27 jmp dword far [esp]
28setCodeSelectorLongJump:
29 add esp, 0x10
30 ret
31
32;------------------------------------------------------------------------------
33; VOID
34; SetDataSelectors (
35; UINT16 Selector
36; );
37;------------------------------------------------------------------------------
38global ASM_PFX(SetDataSelectors)
39ASM_PFX(SetDataSelectors):
40 mov ecx, [esp+4]
41o16 mov ss, cx
42o16 mov ds, cx
43o16 mov es, cx
44o16 mov fs, cx
45o16 mov gs, cx
46 ret
47
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette