VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/Firmware/UefiCpuPkg/CpuDxe/Ia32/CpuAsm.S@ 61497

Last change on this file since 61497 was 58466, checked in by vboxsync, 9 years ago

EFI/Firmware: Merged in the svn:eol-style, svn:mime-type and trailing whitespace cleanup that was done after the initial UDK2014.SP1 import: svn merge /vendor/edk2/UDK2014.SP1 /vendor/edk2/current .

  • Property svn:eol-style set to native
File size: 1.7 KB
Line 
1#------------------------------------------------------------------------------
2#*
3#* Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
4#* This program and the accompanying materials
5#* are licensed and made available under the terms and conditions of the BSD License
6#* which accompanies this distribution. The full text of the license may be found at
7#* http://opensource.org/licenses/bsd-license.php
8#*
9#* THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10#* WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11#*
12#* CpuAsm.S
13#*
14#* Abstract:
15#*
16#------------------------------------------------------------------------------
17
18
19#.MMX
20#.XMM
21
22#------------------------------------------------------------------------------
23# VOID
24# SetCodeSelector (
25# UINT16 Selector
26# );
27#------------------------------------------------------------------------------
28ASM_GLOBAL ASM_PFX(SetCodeSelector)
29ASM_PFX(SetCodeSelector):
30 movl 4(%esp), %ecx
31 subl $0x10, %esp
32 leal setCodeSelectorLongJump, %eax
33 movl %eax, (%esp)
34 movw %cx, 4(%esp)
35 .byte 0xFF, 0x2C, 0x24 # jmp *(%esp) note:(FWORD jmp)
36setCodeSelectorLongJump:
37 addl $0x10, %esp
38 ret
39
40#------------------------------------------------------------------------------
41# VOID
42# SetDataSelectors (
43# UINT16 Selector
44# );
45#------------------------------------------------------------------------------
46ASM_GLOBAL ASM_PFX(SetDataSelectors)
47ASM_PFX(SetDataSelectors):
48 movl 4(%esp), %ecx
49 movw %cx, %ss
50 movw %cx, %ds
51 movw %cx, %es
52 movw %cx, %fs
53 movw %cx, %gs
54 ret
55
56#END
57
Note: See TracBrowser for help on using the repository browser.

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