drop io from bootstrap and exception stuff from non-bootstrap compiles.

git-svn-id: svn://coreboot.org/openbios/openbios-devel@28 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
Stefan Reinauer
2006-05-22 22:36:01 +00:00
parent 9283d9ebc8
commit 2eaec36c50
10 changed files with 39 additions and 85 deletions

View File

@@ -34,14 +34,6 @@ static void init_memory(void)
PUSH(0x9FFFF);
}
void exception(cell no)
{
/* The exception mechanism is used during bootstrap to catch
* build errors. In a running system this is a noop since we
* can't break out to the unix host os anyways.
*/
}
static void
arch_init( void )
{

View File

@@ -39,14 +39,6 @@ static void init_memory(void)
PUSH((unsigned int)&_eheap);
}
void exception(__attribute__((unused))cell no)
{
/* The exception mechanism is used during bootstrap to catch
* build errors. In a running system this is a noop since we
* can't break out to the unix host os anyways.
*/
}
static void
arch_init( void )
{

View File

@@ -34,14 +34,6 @@ static void init_memory(void)
PUSH(0x9FFFF);
}
void exception(cell no)
{
/* The exception mechanism is used during bootstrap to catch
* build errors. In a running system this is a noop since we
* can't break out to the unix host os anyways.
*/
}
static void
arch_init( void )
{

View File

@@ -42,27 +42,8 @@ static inline void ins##bwl(int port, void *addr, unsigned long count) { \
__asm__ __volatile__("rep; ins" #bwl : "+D"(addr), "+c"(count) : "d"(port)); \
}
#ifndef BOOTSTRAP
BUILDIO(b,b,char)
BUILDIO(w,w,short)
BUILDIO(l,,int)
#else
#ifdef FCOMPILER
#define inb(reg) ((u8)0xff)
#define inw(reg) ((u16)0xffff)
#define inl(reg) ((u32)0xffffffff)
#define outb(reg, val) /* nothing */
#define outw(reg, val) /* nothing */
#define outl(reg, val) /* nothing */
#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

View File

@@ -26,7 +26,6 @@
/* initialization */
extern int initialize_forth( void );
extern void exception( cell errcode );
/* panic */
extern int forth_segv_handler( char *segv_addr );

View File

@@ -21,7 +21,7 @@ int ob_sbus_init(void);
int ob_ide_init(void);
#endif
#ifdef CONFIG_DRIVER_ESP
int ob_esp_init(void);
int ob_esp_init(unsigned long base);
#endif
#ifdef CONFIG_DRIVER_OBIO
int ob_obio_init(unsigned long slavio_base);

View File

@@ -143,23 +143,6 @@ static inline void _outsw(volatile uint16_t * port, const void *buf,
ns--;
}
}
#else /* BOOTSTRAP */
#ifdef FCOMPILER
#define inb(reg) ((u8)0xff)
#define inw(reg) ((u16)0xffff)
#define inl(reg) ((u32)0xffffffff)
#define outb(reg, val) // nothing
#define outw(reg, val) // nothing
#define outl(reg, val) // nothing
#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 /* _ASM_IO_H */

View File

@@ -46,25 +46,6 @@ static inline void ins##bwl(int port, void *addr, unsigned long count) { \
BUILDIO(b,b,char)
BUILDIO(w,w,short)
BUILDIO(l,,int)
#else
#ifdef FCOMPILER
#define inb(reg) ((u8)0xff)
#define inw(reg) ((u16)0xffff)
#define inl(reg) ((u32)0xffffffff)
// #define insw( u32 reg, void *addr, unsigned long count );
#define outb(reg, val) // nothing
#define outw(reg, val) // nothing
#define outl(reg, val) // nothing
// #define outsw( u32 reg, const void *addr, unsigned long count);
#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

View File

@@ -796,9 +796,11 @@ static void herewrite(void)
static void emit(void)
{
cell tmp = POP();
#ifndef FCOMPILER
cell tmp = POP();
putchar(tmp);
#else
(void) POP();
#endif
}
@@ -834,8 +836,13 @@ static void key(void)
static void iocfetch(void)
{
#ifndef FCOMPILER
cell reg = POP();
PUSH(inb(reg));
#else
(void)POP();
PUSH(0);
#endif
}
@@ -845,8 +852,13 @@ static void iocfetch(void)
static void iowfetch(void)
{
#ifndef FCOMPILER
cell reg = POP();
PUSH(inw(reg));
#else
(void)POP();
PUSH(0);
#endif
}
/*
@@ -855,8 +867,13 @@ static void iowfetch(void)
static void iolfetch(void)
{
#ifndef FCOMPILER
cell reg = POP();
PUSH(inl(reg));
#else
(void)POP();
PUSH(0);
#endif
}
@@ -866,10 +883,15 @@ static void iolfetch(void)
static void iocstore(void)
{
#ifndef FCOMPILER
cell reg = POP();
cell val = POP();
outb(reg, val);
#else
(void)POP();
(void)POP();
#endif
}
@@ -879,10 +901,15 @@ static void iocstore(void)
static void iowstore(void)
{
#ifndef FCOMPILER
cell reg = POP();
cell val = POP();
outw(reg, val);
#else
(void)POP();
(void)POP();
#endif
}
@@ -892,10 +919,15 @@ static void iowstore(void)
static void iolstore(void)
{
#ifndef FCOMPILER
ucell reg = POP();
ucell val = POP();
outl(reg, val);
#else
(void)POP();
(void)POP();
#endif
}
/*

View File

@@ -179,7 +179,9 @@ static void call(void)
static void sysdebug(void)
{
cell errorno=POP();
#ifdef FCOMPILER
exception(errorno);
#endif
}
static void dodoes(void)