Back to home page

Quest Cross Reference

 
 

    


Warning, cross-references for /kernel/include/vm/vm86.h need to be fixed.

0001 /*                    The Quest Operating System
0002  *  Copyright (C) 2005-2010  Richard West, Boston University
0003  *
0004  *  This program is free software: you can redistribute it and/or modify
0005  *  it under the terms of the GNU General Public License as published by
0006  *  the Free Software Foundation, either version 3 of the License, or
0007  *  (at your option) any later version.
0008  *
0009  *  This program is distributed in the hope that it will be useful,
0010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
0011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0012  *  GNU General Public License for more details.
0013  *
0014  *  You should have received a copy of the GNU General Public License
0015  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
0016  */
0017 
0018 #ifndef _VM86_H_
0019 #define _VM86_H_
0020 
0021 #include "types.h"
0022 #include "vm/vm86-defs.h"
0023 #include "vm/vmx.h"
0024 
0025 #define REAL_TO_LIN32(s,o,type)                                         \
0026   ((type *) ((((uint32) (s) & 0xFFFF) << 4) + ((uint32) (o) & 0xFFFF)))
0027 
0028 struct _vm86_farptr
0029 {
0030   uint16 offs;
0031   uint16 segm;
0032 } PACKED;
0033 typedef struct _vm86_farptr vm86_farptr;
0034 #define FP_TO_LIN32(fp,type) (REAL_TO_LIN32 ((fp).segm, (fp).offs, type))
0035 #define LIN32_TO_FP(p)                                                  \
0036   ((vm86_farptr) { .segm = ((uint32) (p) & (~0xFFFF)) >> 4, .offs = (uint32) (p) & 0xFFFF })
0037 
0038 sint32 vmx_vm86_handle_GPF (virtual_machine *);
0039 void vmx_vm86_global_init (void);
0040 
0041 #endif
0042 
0043 /*
0044  * Local Variables:
0045  * indent-tabs-mode: nil
0046  * mode: C
0047  * c-file-style: "gnu"
0048  * c-basic-offset: 2
0049  * End:
0050  */
0051 
0052 /* vi: set et sw=2 sts=2: */