mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
64bit fixes from blueswirl
git-svn-id: svn://coreboot.org/openbios/openbios-devel@83 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
@@ -33,18 +33,18 @@ push_str( const char *str )
|
||||
}
|
||||
|
||||
/* WARNING: sloooow - AVOID */
|
||||
int
|
||||
cell
|
||||
feval( const char *str )
|
||||
{
|
||||
push_str( str );
|
||||
return eword("evaluate", 2);
|
||||
}
|
||||
|
||||
int
|
||||
cell
|
||||
_eword( const char *word, xt_t *cache_xt, int nargs )
|
||||
{
|
||||
static xt_t catch_xt = 0;
|
||||
int ret = -1;
|
||||
cell ret = -1;
|
||||
|
||||
if( !catch_xt )
|
||||
catch_xt = findword("catch");
|
||||
@@ -285,10 +285,10 @@ set_property( phandle_t ph, const char *name, const char *buf, int len )
|
||||
}
|
||||
|
||||
void
|
||||
set_int_property( phandle_t ph, const char *name, int val )
|
||||
set_int_property( phandle_t ph, const char *name, cell val )
|
||||
{
|
||||
int swapped=__cpu_to_be32(val);
|
||||
set_property( ph, name, (char*)&swapped, 4 );
|
||||
cell swapped=__cpu_to_becell(val);
|
||||
set_property( ph, name, (char*)&swapped, sizeof(cell) );
|
||||
}
|
||||
|
||||
char *
|
||||
@@ -310,14 +310,14 @@ get_property( phandle_t ph, const char *name, int *retlen )
|
||||
return (char*)POP();
|
||||
}
|
||||
|
||||
int
|
||||
cell
|
||||
get_int_property( phandle_t ph, const char *name, int *retlen )
|
||||
{
|
||||
int *p;
|
||||
cell *p;
|
||||
|
||||
if( !(p=(int*)get_property(ph, name, retlen)) )
|
||||
if( !(p=(cell *)get_property(ph, name, retlen)) )
|
||||
return 0;
|
||||
return *p;
|
||||
return __becell_to_cpu(*p);
|
||||
}
|
||||
|
||||
|
||||
@@ -423,7 +423,7 @@ make_openable( int only_parents )
|
||||
static void
|
||||
call1_func( void )
|
||||
{
|
||||
void (*func)(int v);
|
||||
void (*func)(cell v);
|
||||
func = (void*)POP();
|
||||
|
||||
(*func)( POP() );
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#include "modules.h"
|
||||
|
||||
typedef struct {
|
||||
ullong mark;
|
||||
ducell mark;
|
||||
xt_t read_xt;
|
||||
xt_t write_xt;
|
||||
|
||||
@@ -70,14 +70,14 @@ deblk_close( deblk_info_t *di )
|
||||
static void
|
||||
deblk_seek( deblk_info_t *di )
|
||||
{
|
||||
uint pos_hi = POP();
|
||||
uint pos_lo = POP();
|
||||
ullong mark = ((ullong)pos_hi << 32) | pos_lo;
|
||||
ucell pos_hi = POP();
|
||||
ucell pos_lo = POP();
|
||||
ducell mark = ((ducell)pos_hi << BITS) | pos_lo;
|
||||
|
||||
/* printk("deblk_seek %x %08x\n", pos_hi, pos_lo ); */
|
||||
|
||||
/* -1 means seek to EOF (at least in our implementation) */
|
||||
if( (llong)mark == -1 )
|
||||
if( (dcell)mark == -1 )
|
||||
RET(-1);
|
||||
di->mark = mark;
|
||||
|
||||
@@ -102,7 +102,7 @@ typedef struct {
|
||||
int nblks;
|
||||
|
||||
/* byte operation */
|
||||
int offs;
|
||||
cell offs;
|
||||
int len;
|
||||
char *data; /* start of data */
|
||||
} work_t;
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
typedef struct {
|
||||
int fd;
|
||||
|
||||
ullong offs;
|
||||
ullong size;
|
||||
ducell offs;
|
||||
ducell size;
|
||||
int type; /* partition type or -1 */
|
||||
|
||||
ihandle_t part_ih;
|
||||
|
||||
@@ -203,7 +203,7 @@ static void
|
||||
files_seek( files_info_t *mi )
|
||||
{
|
||||
llong pos = DPOP();
|
||||
int ret;
|
||||
cell ret;
|
||||
|
||||
if( mi->file ) {
|
||||
int offs = (int)pos;
|
||||
|
||||
Reference in New Issue
Block a user