mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
Use standard types
Replace uchar, uint, ulong, u_char, u_int, u_long, u_int* with their standard equivalents. Fixes warnings like these on OpenBSD: CC target/arch/unix/unix.o In file included from ../arch/unix/unix.c:29: ../include/config.h:26: warning: redefinition of `ulong' /usr/include/sys/types.h:56: warning: `ulong' previously declared here ../include/config.h:26: warning: redundant redeclaration of `ulong' in same scope Signed-off-by: Blue Swirl <blauwirbel@gmail.com> git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@830 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
@@ -102,8 +102,8 @@ arch_of_init( void )
|
||||
if( !(ph=find_dev("/rtas")) )
|
||||
printk("Warning: No /rtas node\n");
|
||||
else {
|
||||
ulong size = 0x1000;
|
||||
while( size < (ulong)of_rtas_end - (ulong)of_rtas_start )
|
||||
unsigned long size = 0x1000;
|
||||
while( size < (unsigned long)of_rtas_end - (unsigned long)of_rtas_start )
|
||||
size *= 2;
|
||||
set_property( ph, "rtas-size", (char*)&size, sizeof(size) );
|
||||
}
|
||||
|
||||
@@ -26,9 +26,9 @@
|
||||
#include "libopenbios/ofmem.h"
|
||||
|
||||
static void
|
||||
transfer_control_to_elf( ulong entry )
|
||||
transfer_control_to_elf( unsigned long entry )
|
||||
{
|
||||
extern void call_elf( ulong entry );
|
||||
extern void call_elf( unsigned long entry );
|
||||
printk("Starting ELF image at 0x%08lX\n", entry);
|
||||
call_elf( 0x400000 );
|
||||
//call_elf( entry );
|
||||
@@ -37,7 +37,7 @@ transfer_control_to_elf( ulong entry )
|
||||
}
|
||||
|
||||
static int
|
||||
load_elf_rom( ulong *entry, int fd )
|
||||
load_elf_rom( unsigned long *entry, int fd )
|
||||
{
|
||||
int i, lszz_offs, elf_offs;
|
||||
char buf[128], *addr;
|
||||
@@ -91,7 +91,7 @@ load_elf_rom( ulong *entry, int fd )
|
||||
flush_icache_range( addr, addr+s );
|
||||
|
||||
/*printk("ELF ROM-section loaded at %08lX (size %08lX)\n",
|
||||
(ulong)phdr[i].p_vaddr, (ulong)phdr[i].p_memsz );*/
|
||||
(unsigned long)phdr[i].p_vaddr, (unsigned long)phdr[i].p_memsz );*/
|
||||
}
|
||||
free( phdr );
|
||||
return lszz_offs;
|
||||
@@ -115,7 +115,7 @@ briq_startup( void )
|
||||
{
|
||||
const char *paths[] = { "hd:0,\\zImage.chrp", NULL };
|
||||
const char *args[] = { "root=/dev/hda2 console=ttyS0,115200", NULL };
|
||||
ulong entry;
|
||||
unsigned long entry;
|
||||
int i, fd;
|
||||
|
||||
for( i=0; paths[i]; i++ ) {
|
||||
|
||||
@@ -37,7 +37,7 @@ rtas_instantiate( void )
|
||||
{
|
||||
int physbase = POP();
|
||||
int s=0x1000, size = (int)of_rtas_end - (int)of_rtas_start;
|
||||
ulong virt;
|
||||
unsigned long virt;
|
||||
|
||||
while( s < size )
|
||||
s += 0x1000;
|
||||
@@ -137,10 +137,10 @@ DECLARE_NODE( ciface, 0, 0, "/packages/client-iface" );
|
||||
|
||||
/* ( -- ) */
|
||||
static void
|
||||
ciface_quiesce( ulong args[], ulong ret[] )
|
||||
ciface_quiesce( unsigned long args[], unsigned long ret[] )
|
||||
{
|
||||
#if 0
|
||||
ulong msr;
|
||||
unsigned long msr;
|
||||
/* This seems to be the correct thing to do - but I'm not sure */
|
||||
asm volatile("mfmsr %0" : "=r" (msr) : );
|
||||
msr &= ~(MSR_IR | MSR_DR);
|
||||
@@ -151,11 +151,11 @@ ciface_quiesce( ulong args[], ulong ret[] )
|
||||
|
||||
/* ( -- ms ) */
|
||||
static void
|
||||
ciface_milliseconds( ulong args[], ulong ret[] )
|
||||
ciface_milliseconds( unsigned long args[], unsigned long ret[] )
|
||||
{
|
||||
extern unsigned long get_timer_freq();
|
||||
static ulong mticks=0, usecs=0;
|
||||
ulong t;
|
||||
static unsigned long mticks=0, usecs=0;
|
||||
unsigned long t;
|
||||
|
||||
asm volatile("mftb %0" : "=r" (t) : );
|
||||
if( mticks )
|
||||
|
||||
Reference in New Issue
Block a user