summaryrefslogtreecommitdiffstats
path: root/qemu/roms/ipxe/src/arch/i386/core/virtaddr.S
diff options
context:
space:
mode:
authorRajithaY <rajithax.yerrumsetty@intel.com>2017-04-25 03:31:15 -0700
committerRajitha Yerrumchetty <rajithax.yerrumsetty@intel.com>2017-05-22 06:48:08 +0000
commitbb756eebdac6fd24e8919e2c43f7d2c8c4091f59 (patch)
treeca11e03542edf2d8f631efeca5e1626d211107e3 /qemu/roms/ipxe/src/arch/i386/core/virtaddr.S
parenta14b48d18a9ed03ec191cf16b162206998a895ce (diff)
Adding qemu as a submodule of KVMFORNFV
This Patch includes the changes to add qemu as a submodule to kvmfornfv repo and make use of the updated latest qemu for the execution of all testcase Change-Id: I1280af507a857675c7f81d30c95255635667bdd7 Signed-off-by:RajithaY<rajithax.yerrumsetty@intel.com>
Diffstat (limited to 'qemu/roms/ipxe/src/arch/i386/core/virtaddr.S')
-rw-r--r--qemu/roms/ipxe/src/arch/i386/core/virtaddr.S145
1 files changed, 0 insertions, 145 deletions
diff --git a/qemu/roms/ipxe/src/arch/i386/core/virtaddr.S b/qemu/roms/ipxe/src/arch/i386/core/virtaddr.S
deleted file mode 100644
index 425591570..000000000
--- a/qemu/roms/ipxe/src/arch/i386/core/virtaddr.S
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
- * Functions to support the virtual addressing method of relocation
- * that Etherboot uses.
- *
- */
-
-FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL )
-
-#include "librm.h"
-
- .arch i386
- .text
- .code32
-
-/****************************************************************************
- * _virt_to_phys (virtual addressing)
- *
- * Switch from virtual to flat physical addresses. %esp is adjusted
- * to a physical value. Segment registers are set to flat physical
- * selectors. All other registers are preserved. Flags are
- * preserved.
- *
- * Parameters: none
- * Returns: none
- ****************************************************************************
- */
- .globl _virt_to_phys
-_virt_to_phys:
- /* Preserve registers and flags */
- pushfl
- pushl %eax
- pushl %ebp
-
- /* Change return address to a physical address */
- movl virt_offset, %ebp
- addl %ebp, 12(%esp)
-
- /* Switch to physical code segment */
- cli
- pushl $PHYSICAL_CS
- leal 1f(%ebp), %eax
- pushl %eax
- lret
-1:
- /* Reload other segment registers and adjust %esp */
- movl $PHYSICAL_DS, %eax
- movl %eax, %ds
- movl %eax, %es
- movl %eax, %fs
- movl %eax, %gs
- movl %eax, %ss
- addl %ebp, %esp
-
- /* Restore registers and flags, and return */
- popl %ebp
- popl %eax
- popfl
- ret
-
-/****************************************************************************
- * _phys_to_virt (flat physical addressing)
- *
- * Switch from flat physical to virtual addresses. %esp is adjusted
- * to a virtual value. Segment registers are set to virtual
- * selectors. All other registers are preserved. Flags are
- * preserved.
- *
- * Parameters: none
- * Returns: none
- ****************************************************************************
- */
- .globl _phys_to_virt
-_phys_to_virt:
- /* Preserve registers and flags */
- pushfl
- pushl %eax
- pushl %ebp
-
- /* Switch to virtual code segment */
- cli
- ljmp $VIRTUAL_CS, $1f
-1:
- /* Reload data segment registers */
- movl $VIRTUAL_DS, %eax
- movl %eax, %ds
- movl %eax, %es
- movl %eax, %fs
- movl %eax, %gs
-
- /* Reload stack segment and adjust %esp */
- movl virt_offset, %ebp
- movl %eax, %ss
- subl %ebp, %esp
-
- /* Change the return address to a virtual address */
- subl %ebp, 12(%esp)
-
- /* Restore registers and flags, and return */
- popl %ebp
- popl %eax
- popfl
- ret
-
-/****************************************************************************
- * _intr_to_virt (virtual code segment, virtual or physical stack segment)
- *
- * Switch from virtual code segment with either a virtual or physical
- * stack segment to using virtual addressing. %esp is adjusted if
- * necessary to a virtual value. Segment registers are set to virtual
- * selectors. All other registers are preserved. Flags are
- * preserved.
- *
- * Parameters: none
- * Returns: none
- ****************************************************************************
- */
- .globl _intr_to_virt
-_intr_to_virt:
- /* Preserve registers and flags */
- pushfl
- pushl %eax
- pushl %ebp
-
- /* Check whether stack segment is physical or virtual */
- movl %ss, %eax
- cmpw $VIRTUAL_DS, %ax
- movl $VIRTUAL_DS, %eax
-
- /* Reload data segment registers */
- movl %eax, %ds
- movl %eax, %es
- movl %eax, %fs
- movl %eax, %gs
-
- /* Reload stack segment and adjust %esp if necessary */
- je 1f
- movl virt_offset, %ebp
- movl %eax, %ss
- subl %ebp, %esp
-1:
- /* Restore registers and flags, and return */
- popl %ebp
- popl %eax
- popfl
- ret