Fix 32-bit overflow in parallels image support
[qemu-kvm/fedora.git] / kvm / bios / rombios.h
blobc8f64f3f562b0b8f5103a8621508d0bd4182a3be
1 /////////////////////////////////////////////////////////////////////////
2 // $Id: rombios.h,v 1.4 2007/02/20 09:36:55 vruppert Exp $
3 /////////////////////////////////////////////////////////////////////////
4 //
5 // Copyright (C) 2006 Volker Ruppert
6 //
7 // This library is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU Lesser General Public
9 // License as published by the Free Software Foundation; either
10 // version 2 of the License, or (at your option) any later version.
12 // This library is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 // Lesser General Public License for more details.
17 // You should have received a copy of the GNU Lesser General Public
18 // License along with this library; if not, write to the Free Software
19 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 /* define it to include QEMU specific code */
22 #define BX_QEMU
24 #ifndef LEGACY
25 # define BX_ROMBIOS32 1
26 #else
27 # define BX_ROMBIOS32 0
28 #endif
29 #define DEBUG_ROMBIOS 0
31 #define PANIC_PORT 0x400
32 #define PANIC_PORT2 0x401
33 #define INFO_PORT 0x402
34 #define DEBUG_PORT 0x403
36 #define BIOS_PRINTF_HALT 1
37 #define BIOS_PRINTF_SCREEN 2
38 #define BIOS_PRINTF_INFO 4
39 #define BIOS_PRINTF_DEBUG 8
40 #define BIOS_PRINTF_ALL (BIOS_PRINTF_SCREEN | BIOS_PRINTF_INFO)
41 #define BIOS_PRINTF_DEBHALT (BIOS_PRINTF_SCREEN | BIOS_PRINTF_INFO | BIOS_PRINTF_HALT)
43 #define printf(format, p...) bios_printf(BIOS_PRINTF_SCREEN, format, ##p)
45 // Defines the output macros.
46 // BX_DEBUG goes to INFO port until we can easily choose debug info on a
47 // per-device basis. Debug info are sent only in debug mode
48 #if DEBUG_ROMBIOS
49 # define BX_DEBUG(format, p...) bios_printf(BIOS_PRINTF_INFO, format, ##p)
50 #else
51 # define BX_DEBUG(format, p...)
52 #endif
53 #define BX_INFO(format, p...) bios_printf(BIOS_PRINTF_INFO, format, ##p)
54 #define BX_PANIC(format, p...) bios_printf(BIOS_PRINTF_DEBHALT, format, ##p)
56 #define ACPI_DATA_SIZE 0x00010000L
57 #define PM_IO_BASE 0xb000
58 #define SMB_IO_BASE 0xb100
59 #define SMP_MSR_ADDR 0x0510
60 #define APIC_MADT_PTR 0x0514
62 #define MAX_CPUS 16
64 #define QEMU_CFG_CTL_PORT 0x510
65 #define QEMU_CFG_DATA_PORT 0x511
66 #define QEMU_CFG_SIGNATURE 0x00
67 #define QEMU_CFG_ID 0x01
68 #define QEMU_CFG_UUID 0x02
69 #define QEMU_CFG_NUMA 0x0d
70 #define QEMU_CFG_BOOT_MENU 0x0e
71 #define QEMU_CFG_ARCH_LOCAL 0x8000
72 #define QEMU_CFG_ACPI_TABLES (QEMU_CFG_ARCH_LOCAL + 0)
73 #define QEMU_CFG_SMBIOS_ENTRIES (QEMU_CFG_ARCH_LOCAL + 1)
74 #define QEMU_CFG_IRQ0_OVERRIDE (QEMU_CFG_ARCH_LOCAL + 2)
76 // Define the application NAME
77 #if defined(BX_QEMU)
78 # define BX_APPNAME "QEMU"
79 #elif defined(PLEX86)
80 # define BX_APPNAME "Plex86"
81 #else
82 # define BX_APPNAME "Bochs"
83 #endif