Remove guarding #includes by CONFIG_FOO combinations
First of many to remove guarding the inclusion of headers based on CONFIG_ options. This *potentially* could hide issues such as functions being swapped from under our feet, since different runtime behaviour could be declared with the function same name and type-signature. Hence, depending on the header we happen to get may change runtime behaviour. Change-Id: Ife56801c783c44e1882abef711e09b85b7f295a4 Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-on: http://review.coreboot.org/6055 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
This commit is contained in:
parent
9107e53756
commit
a173a6255b
|
@ -24,10 +24,8 @@
|
||||||
#include <x86emu/x86emu.h>
|
#include <x86emu/x86emu.h>
|
||||||
#include "../x86emu/prim_ops.h"
|
#include "../x86emu/prim_ops.h"
|
||||||
|
|
||||||
#if CONFIG_PCI_OPTION_ROM_RUN_YABEL
|
|
||||||
#include <device/pci.h>
|
#include <device/pci.h>
|
||||||
#include <device/pci_ops.h>
|
#include <device/pci_ops.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
//setup to run the code at the address, that the Interrupt Vector points to...
|
//setup to run the code at the address, that the Interrupt Vector points to...
|
||||||
|
|
|
@ -20,15 +20,12 @@
|
||||||
#include <device/oprom/include/io.h>
|
#include <device/oprom/include/io.h>
|
||||||
#include "io.h"
|
#include "io.h"
|
||||||
|
|
||||||
#if CONFIG_PCI_OPTION_ROM_RUN_YABEL
|
|
||||||
#include <device/pci.h>
|
#include <device/pci.h>
|
||||||
#include <device/pci_ops.h>
|
#include <device/pci_ops.h>
|
||||||
#include <device/resource.h>
|
#include <device/resource.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#if CONFIG_ARCH_X86
|
|
||||||
#include <arch/io.h>
|
#include <arch/io.h>
|
||||||
#else
|
|
||||||
// these are not used, only needed for linking, must be overridden using X86emu_setupPioFuncs
|
// these are not used, only needed for linking, must be overridden using X86emu_setupPioFuncs
|
||||||
// with the functions and struct below
|
// with the functions and struct below
|
||||||
void
|
void
|
||||||
|
@ -76,10 +73,6 @@ inl(u16 port)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef CONFIG_PCI
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if CONFIG_YABEL_DIRECTHW
|
#if CONFIG_YABEL_DIRECTHW
|
||||||
u8 my_inb(X86EMU_pioAddr addr)
|
u8 my_inb(X86EMU_pioAddr addr)
|
||||||
{
|
{
|
||||||
|
|
|
@ -18,13 +18,10 @@
|
||||||
#include "biosemu.h"
|
#include "biosemu.h"
|
||||||
#include "mem.h"
|
#include "mem.h"
|
||||||
#include "compat/time.h"
|
#include "compat/time.h"
|
||||||
|
#include <device/resource.h>
|
||||||
|
|
||||||
#if !CONFIG_YABEL_DIRECTHW || !CONFIG_YABEL_DIRECTHW
|
#if !CONFIG_YABEL_DIRECTHW || !CONFIG_YABEL_DIRECTHW
|
||||||
|
|
||||||
#if CONFIG_PCI_OPTION_ROM_RUN_YABEL
|
|
||||||
#include <device/resource.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// define a check for access to certain (virtual) memory regions (interrupt handlers, BIOS Data Area, ...)
|
// define a check for access to certain (virtual) memory regions (interrupt handlers, BIOS Data Area, ...)
|
||||||
#if CONFIG_X86EMU_DEBUG
|
#if CONFIG_X86EMU_DEBUG
|
||||||
static u8 in_check = 0; // to avoid recursion...
|
static u8 in_check = 0; // to avoid recursion...
|
||||||
|
|
|
@ -6,9 +6,7 @@
|
||||||
#include <device/pci_ops.h>
|
#include <device/pci_ops.h>
|
||||||
#include <console/console.h>
|
#include <console/console.h>
|
||||||
#include <delay.h>
|
#include <delay.h>
|
||||||
#if defined(CONFIG_PCI_OPTION_ROM_RUN_YABEL)&&CONFIG_PCI_OPTION_ROM_RUN_YABEL
|
|
||||||
#include <x86emu/x86emu.h>
|
#include <x86emu/x86emu.h>
|
||||||
#endif
|
|
||||||
#include <pc80/mc146818rtc.h>
|
#include <pc80/mc146818rtc.h>
|
||||||
#include <arch/acpi.h>
|
#include <arch/acpi.h>
|
||||||
#include <arch/io.h>
|
#include <arch/io.h>
|
||||||
|
|
|
@ -25,9 +25,7 @@
|
||||||
#include <device/pci_def.h>
|
#include <device/pci_def.h>
|
||||||
#include <device/pci_ops.h>
|
#include <device/pci_ops.h>
|
||||||
#include <console/console.h>
|
#include <console/console.h>
|
||||||
#if CONFIG_VGA_ROM_RUN
|
|
||||||
#include <x86emu/x86emu.h>
|
#include <x86emu/x86emu.h>
|
||||||
#endif
|
|
||||||
#include <pc80/mc146818rtc.h>
|
#include <pc80/mc146818rtc.h>
|
||||||
#include <arch/acpi.h>
|
#include <arch/acpi.h>
|
||||||
#include <arch/io.h>
|
#include <arch/io.h>
|
||||||
|
|
|
@ -40,10 +40,8 @@
|
||||||
#include "dock.h"
|
#include "dock.h"
|
||||||
#include "hda_verb.h"
|
#include "hda_verb.h"
|
||||||
#include <arch/x86/include/arch/acpigen.h>
|
#include <arch/x86/include/arch/acpigen.h>
|
||||||
#if CONFIG_PCI_OPTION_ROM_RUN_YABEL || CONFIG_PCI_OPTION_ROM_RUN_REALMODE
|
|
||||||
#include <x86emu/regs.h>
|
#include <x86emu/regs.h>
|
||||||
#include <arch/interrupt.h>
|
#include <arch/interrupt.h>
|
||||||
#endif
|
|
||||||
#include <pc80/keyboard.h>
|
#include <pc80/keyboard.h>
|
||||||
#include <cpu/x86/lapic.h>
|
#include <cpu/x86/lapic.h>
|
||||||
#include <device/pci.h>
|
#include <device/pci.h>
|
||||||
|
|
|
@ -25,9 +25,7 @@
|
||||||
#include <device/pci.h>
|
#include <device/pci.h>
|
||||||
#include <device/pci_ids.h>
|
#include <device/pci_ids.h>
|
||||||
#include <cbfs.h>
|
#include <cbfs.h>
|
||||||
#if CONFIG_PCI_OPTION_ROM_RUN_YABEL
|
|
||||||
#include <x86emu/x86emu.h>
|
#include <x86emu/x86emu.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
static void vga_init(device_t dev)
|
static void vga_init(device_t dev)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue