mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
Fix x86 warnings, enable more warnings
git-svn-id: svn://coreboot.org/openbios/openbios-devel@359 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
@@ -9,8 +9,8 @@ struct sys_info {
|
||||
unsigned long boot_data;
|
||||
unsigned long boot_arg;
|
||||
|
||||
char *firmware; /* "PCBIOS", "LinuxBIOS", etc. */
|
||||
char *command_line; /* command line given to us */
|
||||
const char *firmware; /* "PCBIOS", "LinuxBIOS", etc. */
|
||||
const char *command_line; /* command line given to us */
|
||||
|
||||
/* memory map */
|
||||
int n_memranges;
|
||||
|
||||
@@ -8,6 +8,7 @@ extern unsigned long virt_offset;
|
||||
#define phys_to_virt(phys) ((void *) ((unsigned long) (phys) - virt_offset))
|
||||
#define virt_to_phys(virt) ((unsigned long) (virt) + virt_offset)
|
||||
|
||||
#ifndef BOOTSTRAP
|
||||
#define __SLOW_DOWN_IO "outb %%al,$0x80;"
|
||||
static inline void slow_down_io(void)
|
||||
{
|
||||
@@ -50,4 +51,23 @@ BUILDIO(w,w,short)
|
||||
BUILDIO(l,,int)
|
||||
#endif
|
||||
|
||||
#else /* BOOTSTRAP */
|
||||
#ifdef FCOMPILER
|
||||
#define inb(reg) ((u8)0xff)
|
||||
#define inw(reg) ((u16)0xffff)
|
||||
#define inl(reg) ((u32)0xffffffff)
|
||||
#define outb(reg, val) do{} while(0)
|
||||
#define outw(reg, val) do{} while(0)
|
||||
#define outl(reg, val) do{} while(0)
|
||||
#else
|
||||
extern u8 inb(u32 reg);
|
||||
extern u16 inw(u32 reg);
|
||||
extern u32 inl(u32 reg);
|
||||
extern void insw(u32 reg, void *addr, unsigned long count);
|
||||
extern void outb(u32 reg, u8 val);
|
||||
extern void outw(u32 reg, u16 val);
|
||||
extern void outl(u32 reg, u32 val);
|
||||
extern void outsw(u32 reg, const void *addr, unsigned long count);
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "asm/io.h"
|
||||
|
||||
#if !(PCI_CONFIG_1 || PCI_CONFIG_2)
|
||||
#if !(defined(PCI_CONFIG_1) || defined(PCI_CONFIG_2))
|
||||
#define PCI_CONFIG_1 1 /* default */
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user