summaryrefslogtreecommitdiffstats
path: root/qemu/roms/openbios/arch/x86/exception.c
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/openbios/arch/x86/exception.c
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/openbios/arch/x86/exception.c')
-rw-r--r--qemu/roms/openbios/arch/x86/exception.c92
1 files changed, 0 insertions, 92 deletions
diff --git a/qemu/roms/openbios/arch/x86/exception.c b/qemu/roms/openbios/arch/x86/exception.c
deleted file mode 100644
index fa07242c5..000000000
--- a/qemu/roms/openbios/arch/x86/exception.c
+++ /dev/null
@@ -1,92 +0,0 @@
-#include "config.h"
-#include "libopenbios/bindings.h"
-#include "asm/types.h"
-
-
-
-/* program counter */
-extern ucell PC;
-
-extern unsigned char *dict;
-extern cell dicthead;
-extern ucell *last;
-
-
-
-struct eregs {
- uint32_t eax, ecx, edx, ebx, esp, ebp, esi, edi;
- uint32_t vector;
- uint32_t error_code;
- uint32_t eip;
- uint32_t cs;
- uint32_t eflags;
-};
-
-static const char * const exception_names[]= {
- "division by zero",
- "single step",
- "NMI",
- "breakpoint",
- "interrupt overflow",
- "bound range exceeded",
- "invalid opcode",
- "device unavailable",
- "double fault",
- "FPU segment overrun",
- "invalid TSS",
- "segment not present",
- "stack exception",
- "general protection fault",
- "page fault",
- "reserved",
- "floating point exception",
- "alignment check",
- "machine check exception",
-};
-
-void do_nothing(void);
-void do_nothing(void)
-{
- printk("Doing nothing\n");
-}
-
-void x86_exception(struct eregs *info);
-void x86_exception(struct eregs *info)
-{
- if(info->vector <= 18) {
- printk("\nUnexpected Exception: %s",
- exception_names[info->vector]);
- } else {
- printk("\nUnexpected Exception: %d", info->vector);
- }
-
- printk(
- " @ %02x:%08lx - Halting\n"
- "Code: %d eflags: %08lx\n"
- "eax: %08lx ebx: %08lx ecx: %08lx edx: %08lx\n"
- "edi: %08lx esi: %08lx ebp: %08lx esp: %08lx\n",
- info->cs, (unsigned long)info->eip,
- info->error_code, (unsigned long)info->eflags,
- (unsigned long)info->eax, (unsigned long)info->ebx,
- (unsigned long)info->ecx, (unsigned long)info->edx,
- (unsigned long)info->edi, (unsigned long)info->esi,
- (unsigned long)info->ebp, (unsigned long)info->esp);
-
- printk("\ndict=0x%x here=0x%x(dict+0x%x) pc=0x%x(dict+0x%x)\n",
- (ucell)dict, (ucell)dict + dicthead, dicthead, PC, PC - (ucell) dict);
- printk("dstackcnt=%d rstackcnt=%d\n",
- dstackcnt, rstackcnt);
-
- rstackcnt=0;
- dstackcnt=0;
-
- PC=findword("outer-interpreter");
-
- info->eip=(uint32_t)&do_nothing;
-
-/*
- for (;;)
- asm("hlt;");
- ;
-*/
-}