[OpenBIOS] [commit] r830 - in trunk/openbios-devel: arch/ppc arch/ppc/briq arch/ppc/mol arch/ppc/pearpc arch/ppc/qemu arch/sparc32 arch/sparc64 arch/unix arch/x86 fs fs/ext2 fs/grubfs fs/hfs fs/hfs/include fs...
repository service
svn at openbios.org
Sun Aug 1 23:25:09 CEST 2010
Author: blueswirl
Date: Sun Aug 1 23:25:08 2010
New Revision: 830
URL: http://tracker.coreboot.org/trac/openbios/changeset/830
Log:
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 at gmail.com>
Modified:
trunk/openbios-devel/arch/ppc/briq/init.c
trunk/openbios-devel/arch/ppc/briq/main.c
trunk/openbios-devel/arch/ppc/briq/methods.c
trunk/openbios-devel/arch/ppc/mol/init.c
trunk/openbios-devel/arch/ppc/mol/main.c
trunk/openbios-devel/arch/ppc/mol/methods.c
trunk/openbios-devel/arch/ppc/mol/mol.h
trunk/openbios-devel/arch/ppc/mol/osi-scsi.c
trunk/openbios-devel/arch/ppc/ofmem.c
trunk/openbios-devel/arch/ppc/osi_calls.h
trunk/openbios-devel/arch/ppc/pearpc/init.c
trunk/openbios-devel/arch/ppc/pearpc/main.c
trunk/openbios-devel/arch/ppc/pearpc/methods.c
trunk/openbios-devel/arch/ppc/qemu/init.c
trunk/openbios-devel/arch/ppc/qemu/kernel.h
trunk/openbios-devel/arch/ppc/qemu/methods.c
trunk/openbios-devel/arch/ppc/qemu/ofmem.c
trunk/openbios-devel/arch/ppc/qemu/start.S
trunk/openbios-devel/arch/ppc/start.S
trunk/openbios-devel/arch/sparc32/linux_load.c
trunk/openbios-devel/arch/sparc64/linux_load.c
trunk/openbios-devel/arch/unix/boot.c
trunk/openbios-devel/arch/x86/linux_load.c
trunk/openbios-devel/fs/ext2/ext2_fs.c
trunk/openbios-devel/fs/ext2/ext2_utils.c
trunk/openbios-devel/fs/ext2/ext2_utils.h
trunk/openbios-devel/fs/grubfs/defs.h
trunk/openbios-devel/fs/grubfs/dir.h
trunk/openbios-devel/fs/grubfs/disk_inode.h
trunk/openbios-devel/fs/grubfs/fs.h
trunk/openbios-devel/fs/grubfs/grubfs_fs.c
trunk/openbios-devel/fs/grubfs/iso9660.h
trunk/openbios-devel/fs/hfs/hfs.c
trunk/openbios-devel/fs/hfs/hfs_fs.c
trunk/openbios-devel/fs/hfs/include/hfs.h
trunk/openbios-devel/fs/hfs/include/volume.h
trunk/openbios-devel/fs/hfs/volume.c
trunk/openbios-devel/fs/hfs_mdb.h
trunk/openbios-devel/fs/hfsplus/hfsp_fs.c
trunk/openbios-devel/fs/hfsplus/include/volume.h
trunk/openbios-devel/fs/hfsplus/volume.c
trunk/openbios-devel/fs/ioglue.c
trunk/openbios-devel/fs/iso9660/iso9660_fs.c
trunk/openbios-devel/fs/iso9660/iso9660_mount.c
trunk/openbios-devel/fs/iso9660/libiso9660.h
trunk/openbios-devel/fs/os.h
trunk/openbios-devel/include/arch/ppc/processor.h
trunk/openbios-devel/include/config.h
trunk/openbios-devel/include/fs/fs.h
trunk/openbios-devel/include/libc/diskio.h
trunk/openbios-devel/include/libopenbios/ofmem.h
trunk/openbios-devel/libc/diskio.c
trunk/openbios-devel/libopenbios/client.c
trunk/openbios-devel/libopenbios/console_common.c
trunk/openbios-devel/libopenbios/elf_load.c
trunk/openbios-devel/packages/cmdline.c
trunk/openbios-devel/packages/mac-parts.c
trunk/openbios-devel/packages/nvram.c
trunk/openbios-devel/packages/pc-parts.c
trunk/openbios-devel/packages/sun-parts.c
trunk/openbios-devel/packages/video.c
Modified: trunk/openbios-devel/arch/ppc/briq/init.c
==============================================================================
--- trunk/openbios-devel/arch/ppc/briq/init.c Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/arch/ppc/briq/init.c Sun Aug 1 23:25:08 2010 (r830)
@@ -102,8 +102,8 @@
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) );
}
Modified: trunk/openbios-devel/arch/ppc/briq/main.c
==============================================================================
--- trunk/openbios-devel/arch/ppc/briq/main.c Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/arch/ppc/briq/main.c Sun Aug 1 23:25:08 2010 (r830)
@@ -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 @@
}
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 @@
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 @@
{
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++ ) {
Modified: trunk/openbios-devel/arch/ppc/briq/methods.c
==============================================================================
--- trunk/openbios-devel/arch/ppc/briq/methods.c Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/arch/ppc/briq/methods.c Sun Aug 1 23:25:08 2010 (r830)
@@ -37,7 +37,7 @@
{
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 @@
/* ( -- ) */
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 @@
/* ( -- 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 )
Modified: trunk/openbios-devel/arch/ppc/mol/init.c
==============================================================================
--- trunk/openbios-devel/arch/ppc/mol/init.c Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/arch/ppc/mol/init.c Sun Aug 1 23:25:08 2010 (r830)
@@ -97,8 +97,8 @@
if( (ph=prom_find_device("/rtas")) == -1 )
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;
prom_set_prop( ph, "rtas-size", (char*)&size, sizeof(size) );
}
Modified: trunk/openbios-devel/arch/ppc/mol/main.c
==============================================================================
--- trunk/openbios-devel/arch/ppc/mol/main.c Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/arch/ppc/mol/main.c Sun Aug 1 23:25:08 2010 (r830)
@@ -32,9 +32,9 @@
static void newworld_timer_hack( char *start, size_t size );
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 boot loader\n");
call_elf( entry );
@@ -42,7 +42,7 @@
}
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;
@@ -95,7 +95,7 @@
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;
@@ -113,18 +113,18 @@
patch_newworld_rom( char *start, size_t size )
{
int s;
- ulong mark[] = { 0x7c7d1b78, /* mr r29,r3 */
- 0x7c9c2378, /* mr r28,r4 */
- 0x7cc33378, /* mr r3,r6 */
- 0x7c864214, /* add r4,r6,r8 <------ BUG -- */
- 0x80b10000, /* lwz r5,0(r17) */
- 0x38a500e8 }; /* addi r5,r5,232 */
+ unsigned long mark[] = { 0x7c7d1b78, /* mr r29,r3 */
+ 0x7c9c2378, /* mr r28,r4 */
+ 0x7cc33378, /* mr r3,r6 */
+ 0x7c864214, /* add r4,r6,r8 <------ BUG -- */
+ 0x80b10000, /* lwz r5,0(r17) */
+ 0x38a500e8 }; /* addi r5,r5,232 */
/* Correcting add r4,r6,r8 ----> addi r4,r6,8 */
for( s=0; s<size-sizeof(mark); s+=4 )
if( memcmp( start+s, mark, sizeof(mark)) == 0 ) {
printk("FIXING ROM BUG @ %X!\n", s+12);
- ((ulong*)(start+s))[3] = 0x38860008; /* addi r4,r6,8 */
+ ((unsigned long*)(start+s))[3] = 0x38860008; /* addi r4,r6,8 */
}
}
@@ -137,22 +137,22 @@
newworld_timer_hack( char *start, size_t size )
{
int s;
- ulong mark[] = { 0x7d0000a6, 0x5507045e, 0x7ce00124, 0x4c00012c,
- 0x38e00000, 0x3c80000f, 0x6084ffff, 0x98830c00,
- 0x7c0006ac, 0x98830a00, 0x7c0006ac, 0x7c9603a6,
- 0x4c00012c, 0x7cb602a6, 0x2c050000, 0x4181fff8,
- 0x7c0004ac, 0x88830a00, 0x7c0006ac, 0x88a30800,
- 0x7c0006ac, 0x88c30a00, 0x7c0006ac, 0x7c043040,
- 0x40a2ffe4, 0x5085442e, 0x7ca500d0, 0x54a5043e,
- 0x7c053840, 0x7ca72b78, 0x4082ff9c, 0x7ca32b78,
- 0x7d000124, 0x4c00012c, 0x4e800020
+ unsigned long mark[] = { 0x7d0000a6, 0x5507045e, 0x7ce00124, 0x4c00012c,
+ 0x38e00000, 0x3c80000f, 0x6084ffff, 0x98830c00,
+ 0x7c0006ac, 0x98830a00, 0x7c0006ac, 0x7c9603a6,
+ 0x4c00012c, 0x7cb602a6, 0x2c050000, 0x4181fff8,
+ 0x7c0004ac, 0x88830a00, 0x7c0006ac, 0x88a30800,
+ 0x7c0006ac, 0x88c30a00, 0x7c0006ac, 0x7c043040,
+ 0x40a2ffe4, 0x5085442e, 0x7ca500d0, 0x54a5043e,
+ 0x7c053840, 0x7ca72b78, 0x4082ff9c, 0x7ca32b78,
+ 0x7d000124, 0x4c00012c, 0x4e800020
};
/* return #via ticks corresponding to 0xfffff DEC ticks (VIA frequency == 47/60 MHz) */
for( s=0; s < size-sizeof(mark); s+=4 ) {
if( !memcmp( start+s, mark, sizeof(mark)) ) {
extern char timer_calib_start[], timer_calib_end[];
- extern ulong nw_dec_calibration;
+ extern unsigned long nw_dec_calibration;
int hz = OSI_UsecsToMticks(1000);
nw_dec_calibration = OSI_MticksToUsecs(0xfffff*47)/60;
memcpy( start + s, timer_calib_start, timer_calib_end - timer_calib_start );
@@ -164,11 +164,11 @@
}
}
-static ulong
+static unsigned long
load_newworld_rom( int fd )
{
int lszz_offs, lszz_size;
- ulong entry, data[2];
+ unsigned long entry, data[2];
phandle_t ph;
lszz_offs = load_elf_rom( &entry, fd );
@@ -315,7 +315,7 @@
OSI_ABlkBlessDisk( 0 /*channel*/, bootunit );
update_nvram();
- transfer_control_to_elf( (ulong)entry );
+ transfer_control_to_elf( (unsigned long)entry );
/* won't come here */
return;
}
@@ -336,7 +336,7 @@
yaboot_startup( void )
{
const char *paths[] = { "pseudo:,ofclient", "pseudo:,yaboot", NULL };
- ulong entry;
+ unsigned long entry;
int i, fd;
for( i=0; paths[i]; i++ ) {
Modified: trunk/openbios-devel/arch/ppc/mol/methods.c
==============================================================================
--- trunk/openbios-devel/arch/ppc/mol/methods.c Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/arch/ppc/mol/methods.c Sun Aug 1 23:25:08 2010 (r830)
@@ -52,7 +52,7 @@
{
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;
@@ -159,7 +159,7 @@
char keytable[32];
} kbd_state_t;
-static const uchar adb_ascii_table[128] =
+static const unsigned char adb_ascii_table[128] =
/* 0x00 */ "asdfhgzxcv`bqwer"
/* 0x10 */ "yt123465=97-80]o"
/* 0x20 */ "u[ip\nlj'k;\\,/nm."
@@ -169,7 +169,7 @@
/* 0x60 */ " "
/* 0x70 */ " ";
-static const uchar adb_shift_table[128] =
+static const unsigned char adb_shift_table[128] =
/* 0x00 */ "ASDFHGZXCV~BQWER"
/* 0x10 */ "YT!@#$^%+(&_*)}O"
/* 0x20 */ "U{IP\nLJ\"K:|<?NM>"
@@ -273,10 +273,10 @@
/* ( -- ) */
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);
@@ -290,10 +290,10 @@
/* ( -- ms ) */
static void
-ciface_milliseconds( ulong args[], ulong ret[] )
+ciface_milliseconds( unsigned long args[], unsigned long ret[] )
{
- 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 )
Modified: trunk/openbios-devel/arch/ppc/mol/mol.h
==============================================================================
--- trunk/openbios-devel/arch/ppc/mol/mol.h Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/arch/ppc/mol/mol.h Sun Aug 1 23:25:08 2010 (r830)
@@ -21,7 +21,7 @@
extern void init_video( void );
extern int video_get_res( int *w, int *h );
extern void draw_pixel( int x, int y, int colind );
-extern void set_color( int index, ulong color );
+extern void set_color( int index, unsigned long color );
/* console.c */
extern int console_draw_str( const char *str );
Modified: trunk/openbios-devel/arch/ppc/mol/osi-scsi.c
==============================================================================
--- trunk/openbios-devel/arch/ppc/mol/osi-scsi.c Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/arch/ppc/mol/osi-scsi.c Sun Aug 1 23:25:08 2010 (r830)
@@ -52,7 +52,7 @@
/* memset( dest, 0, len ); */
- if( (uint)prelen > sizeof(prebuf) || (uint)postlen > sizeof(postbuf) ) {
+ if( (unsigned int)prelen > sizeof(prebuf) || (unsigned int)postlen > sizeof(postbuf) ) {
printk("bad pre/post len %d %d\n", prelen, postlen );
return 1;
}
Modified: trunk/openbios-devel/arch/ppc/ofmem.c
==============================================================================
--- trunk/openbios-devel/arch/ppc/ofmem.c Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/arch/ppc/ofmem.c Sun Aug 1 23:25:08 2010 (r830)
@@ -37,7 +37,7 @@
/* called from assembly */
extern void dsi_exception( void );
extern void isi_exception( void );
-extern void setup_mmu( ulong code_base, ulong code_size, ulong ramsize );
+extern void setup_mmu( unsigned long code_base, unsigned long code_size, unsigned long ramsize );
/****************************************************************
* Memory usage (before of_quiesce is called)
@@ -74,13 +74,13 @@
#define IO_BASE 0x80000000
#define OFMEM (&s_ofmem)
-static inline ulong
+static inline unsigned long
get_hash_base( void )
{
return HASH_BASE;
}
-static inline ulong
+static inline unsigned long
get_hash_size( void )
{
return HASH_SIZE;
@@ -201,7 +201,7 @@
hash_page( ucell ea, ucell phys, ucell mode )
{
static int next_grab_slot=0;
- ulong *upte, cmp, hash1;
+ unsigned long *upte, cmp, hash1;
int i, vsid, found;
mPTE_t *pp;
@@ -213,7 +213,7 @@
hash1 &= (get_hash_size() - 1) >> 6;
pp = (mPTE_t*)(get_hash_base() + (hash1 << 6));
- upte = (ulong*)pp;
+ upte = (unsigned long*)pp;
/* replace old translation */
for( found=0, i=0; !found && i<8; i++ )
@@ -240,7 +240,7 @@
void
dsi_exception( void )
{
- ulong dar, dsisr;
+ unsigned long dar, dsisr;
ucell mode;
ucell phys;
@@ -256,7 +256,7 @@
void
isi_exception( void )
{
- ulong nip, srr1;
+ unsigned long nip, srr1;
ucell mode;
ucell phys;
@@ -275,11 +275,11 @@
/************************************************************************/
void
-setup_mmu( ulong code_base, ulong code_size, ulong ramsize )
+setup_mmu( unsigned long code_base, unsigned long code_size, unsigned long ramsize )
{
- ulong sdr1 = HASH_BASE | ((HASH_SIZE-1) >> 16);
- ulong sr_base = (0x20 << 24) | SEGR_BASE;
- ulong msr;
+ unsigned long sdr1 = HASH_BASE | ((HASH_SIZE-1) >> 16);
+ unsigned long sr_base = (0x20 << 24) | SEGR_BASE;
+ unsigned long msr;
int i;
asm volatile("mtsdr1 %0" :: "r" (sdr1) );
Modified: trunk/openbios-devel/arch/ppc/osi_calls.h
==============================================================================
--- trunk/openbios-devel/arch/ppc/osi_calls.h Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/arch/ppc/osi_calls.h Sun Aug 1 23:25:08 2010 (r830)
@@ -107,7 +107,7 @@
#define _osi_call1( type, name, number, type1, arg1 ) \
type name( type1 arg1 ) \
_oc_head( dreg(r6) ) \
- __oc_r6 = (ulong)arg1; \
+ __oc_r6 = (unsigned long)arg1; \
_oc_syscall( number ) \
_oc_input( ir(r6) ) \
_oc_tail
@@ -115,8 +115,8 @@
#define _osi_call2( type, name, number, t1, a1, t2, a2 ) \
type name( t1 a1, t2 a2 ) \
_oc_head( dreg(r6), dreg(r7) ) \
- __oc_r6 = (ulong)a1; \
- __oc_r7 = (ulong)a2; \
+ __oc_r6 = (unsigned long)a1; \
+ __oc_r7 = (unsigned long)a2; \
_oc_syscall( number ) \
_oc_input( ir(r6), ir(r7) ) \
_oc_tail
@@ -124,9 +124,9 @@
#define _osi_call3( type, name, number, t1, a1, t2, a2, t3, a3 ) \
type name( t1 a1, t2 a2, t3 a3 ) \
_oc_head( dreg(r6), dreg(r7), dreg(r8) ) \
- __oc_r6 = (ulong)a1; \
- __oc_r7 = (ulong)a2; \
- __oc_r8 = (ulong)a3; \
+ __oc_r6 = (unsigned long)a1; \
+ __oc_r7 = (unsigned long)a2; \
+ __oc_r8 = (unsigned long)a3; \
_oc_syscall( number ) \
_oc_input( ir(r6), ir(r7), ir(r8) ) \
_oc_tail
@@ -134,10 +134,10 @@
#define _osi_call4( type, name, number, t1, a1, t2, a2, t3, a3, t4, a4 ) \
type name( t1 a1, t2 a2, t3 a3, t4 a4 ) \
_oc_head( dreg(r6), dreg(r7), dreg(r8), dreg(r9) ) \
- __oc_r6 = (ulong)a1; \
- __oc_r7 = (ulong)a2; \
- __oc_r8 = (ulong)a3; \
- __oc_r9 = (ulong)a4; \
+ __oc_r6 = (unsigned long)a1; \
+ __oc_r7 = (unsigned long)a2; \
+ __oc_r8 = (unsigned long)a3; \
+ __oc_r9 = (unsigned long)a4; \
_oc_syscall( number ) \
_oc_input( ir(r6), ir(r7), ir(r8), ir(r9) ) \
_oc_tail
@@ -145,11 +145,11 @@
#define _osi_call5( type, name, number, t1, a1, t2, a2, t3, a3, t4, a4, t5, a5 ) \
type name( t1 a1, t2 a2, t3 a3, t4 a4, t5 a5 ) \
_oc_head( dreg(r6), dreg(r7), dreg(r8), dreg(r9), dreg(r10) ) \
- __oc_r6 = (ulong)a1; \
- __oc_r7 = (ulong)a2; \
- __oc_r8 = (ulong)a3; \
- __oc_r9 = (ulong)a4; \
- __oc_r10 = (ulong)a5; \
+ __oc_r6 = (unsigned long)a1; \
+ __oc_r7 = (unsigned long)a2; \
+ __oc_r8 = (unsigned long)a3; \
+ __oc_r9 = (unsigned long)a4; \
+ __oc_r10 = (unsigned long)a5; \
_oc_syscall( number ) \
_oc_input( ir(r6), ir(r7), ir(r8), ir(r9), ir(r10) ) \
_oc_tail
@@ -157,12 +157,12 @@
#define _osi_call6( type, name, number, t1, a1, t2, a2, t3, a3, t4, a4, t5, a5, t6, a6 ) \
type name( t1 a1, t2 a2, t3 a3, t4 a4, t5 a5, t6 a6 ) \
_oc_head( dreg(r6), dreg(r7), dreg(r8), dreg(r9), dreg(r10), dreg(r11) )\
- __oc_r6 = (ulong)a1; \
- __oc_r7 = (ulong)a2; \
- __oc_r8 = (ulong)a3; \
- __oc_r9 = (ulong)a4; \
- __oc_r10 = (ulong)a5; \
- __oc_r11 = (ulong)a6; \
+ __oc_r6 = (unsigned long)a1; \
+ __oc_r7 = (unsigned long)a2; \
+ __oc_r8 = (unsigned long)a3; \
+ __oc_r9 = (unsigned long)a4; \
+ __oc_r10 = (unsigned long)a5; \
+ __oc_r11 = (unsigned long)a6; \
_oc_syscall( number ) \
_oc_input( ir(r6), ir(r7), ir(r8), ir(r9), ir(r10), ir(r11) ) \
_oc_tail
@@ -186,8 +186,8 @@
_oc_head() \
_oc_syscall( number, rr(r4), rr(r5) ) \
_oc_input() \
- ((ulong*)retarg1)[0] = __oc_r4; \
- ((ulong*)retarg1)[1] = __oc_r5; \
+ ((unsigned long*)retarg1)[0] = __oc_r4; \
+ ((unsigned long*)retarg1)[1] = __oc_r5; \
_oc_tail
/* r4-r8 returned in retarg1 pointer */
@@ -197,68 +197,68 @@
_oc_syscall( number, \
rr(r4), rr(r5), rr(r6), rr(r7), rr(r8) ) \
_oc_input() \
- ((ulong*)retarg1)[0] = __oc_r4; \
- ((ulong*)retarg1)[1] = __oc_r5; \
- ((ulong*)retarg1)[2] = __oc_r6; \
- ((ulong*)retarg1)[3] = __oc_r7; \
- ((ulong*)retarg1)[4] = __oc_r8; \
+ ((unsigned long*)retarg1)[0] = __oc_r4; \
+ ((unsigned long*)retarg1)[1] = __oc_r5; \
+ ((unsigned long*)retarg1)[2] = __oc_r6; \
+ ((unsigned long*)retarg1)[3] = __oc_r7; \
+ ((unsigned long*)retarg1)[4] = __oc_r8; \
_oc_tail
/* r4 returned in retarg pointer */
#define _osi_call1_w1( type, name, number, t1, a1, t2, retarg ) \
type name( t1 a1, t2 retarg ) \
_oc_head( dreg(r6) ) \
- __oc_r6 = (ulong)a1; \
+ __oc_r6 = (unsigned long)a1; \
_oc_syscall( number, rr(r4) ) \
_oc_input( ir(r6) ) \
- ((ulong*)retarg)[0] = __oc_r4; \
+ ((unsigned long*)retarg)[0] = __oc_r4; \
_oc_tail
/* r4,r5 returned in retarg1, retarg2 */
#define _osi_call1_w1w1( type, name, number, t1, a1, t2, retarg1, t3, retarg2 ) \
type name( t1 a1, t2 retarg1, t3 retarg2 ) \
_oc_head( dreg(r6) ) \
- __oc_r6 = (ulong)a1; \
+ __oc_r6 = (unsigned long)a1; \
_oc_syscall( number, rr(r4), rr(r5) ) \
_oc_input( ir(r6) ) \
- ((ulong*)retarg1)[0] = __oc_r4; \
- ((ulong*)retarg2)[0] = __oc_r5; \
+ ((unsigned long*)retarg1)[0] = __oc_r4; \
+ ((unsigned long*)retarg2)[0] = __oc_r5; \
_oc_tail
/* r4,r5 returned in retarg1, retarg2, retarg3 */
#define _osi_call1_w1w1w1( type, name, number, t1, a1, t2, retarg1, t3, retarg2, t4, retarg3 ) \
type name( t1 a1, t2 retarg1, t3 retarg2, t4 retarg3 ) \
_oc_head( dreg(r6) ) \
- __oc_r6 = (ulong)a1; \
+ __oc_r6 = (unsigned long)a1; \
_oc_syscall( number, rr(r4), rr(r5), rr(r6) ) \
_oc_input( ir(r6) ) \
- ((ulong*)retarg1)[0] = __oc_r4; \
- ((ulong*)retarg2)[0] = __oc_r5; \
- ((ulong*)retarg3)[0] = __oc_r6; \
+ ((unsigned long*)retarg1)[0] = __oc_r4; \
+ ((unsigned long*)retarg2)[0] = __oc_r5; \
+ ((unsigned long*)retarg3)[0] = __oc_r6; \
_oc_tail
/* r4,r5 returned in retarg pointer */
#define _osi_call1_w2( type, name, number, t1, a1, t2, retarg ) \
type name( t1 a1, t2 retarg ) \
_oc_head( dreg(r6) ) \
- __oc_r6 = (ulong)a1; \
+ __oc_r6 = (unsigned long)a1; \
_oc_syscall( number, rr(r4), rr(r5) ) \
_oc_input( ir(r6) ) \
- ((ulong*)retarg)[0] = __oc_r4; \
- ((ulong*)retarg)[1] = __oc_r5; \
+ ((unsigned long*)retarg)[0] = __oc_r4; \
+ ((unsigned long*)retarg)[1] = __oc_r5; \
_oc_tail
/* r4-r7 returned in retarg pointer */
#define _osi_call1_w4( type, name, number, t1, a1, t2, retarg ) \
type name( t1 a1, t2 retarg ) \
_oc_head( dreg(r6), dreg(r7) ) \
- __oc_r6 = (ulong)a1; \
+ __oc_r6 = (unsigned long)a1; \
_oc_syscall( number, rr(r4), rr(r5), rr(r6), rr(r7) ) \
_oc_input( ir(r6) ) \
- ((ulong*)retarg)[0] = __oc_r4; \
- ((ulong*)retarg)[1] = __oc_r5; \
- ((ulong*)retarg)[2] = __oc_r6; \
- ((ulong*)retarg)[3] = __oc_r7; \
+ ((unsigned long*)retarg)[0] = __oc_r4; \
+ ((unsigned long*)retarg)[1] = __oc_r5; \
+ ((unsigned long*)retarg)[2] = __oc_r6; \
+ ((unsigned long*)retarg)[3] = __oc_r7; \
_oc_tail
@@ -266,26 +266,26 @@
#define _osi_call2_w2( type, name, number, t1, a1, t2, a2, t3, retarg ) \
type name( t1 a1, t2 a2, t3 retarg ) \
_oc_head( dreg(r6), dreg(r7) ) \
- __oc_r6 = (ulong)a1; \
- __oc_r7 = (ulong)a2; \
+ __oc_r6 = (unsigned long)a1; \
+ __oc_r7 = (unsigned long)a2; \
_oc_syscall( number, rr(r4), rr(r5) ) \
_oc_input( ir(r6), ir(r7) ) \
- ((ulong*)retarg)[0] = __oc_r4; \
- ((ulong*)retarg)[1] = __oc_r5; \
+ ((unsigned long*)retarg)[0] = __oc_r4; \
+ ((unsigned long*)retarg)[1] = __oc_r5; \
_oc_tail
/* r4-r7 returned in retarg pointer */
#define _osi_call2_w4( type, name, number, t1, a1, t2, a2, t3, retarg ) \
type name( t1 a1, t2 a2, t3 retarg ) \
_oc_head( dreg(r6), dreg(r7) ) \
- __oc_r6 = (ulong)a1; \
- __oc_r7 = (ulong)a2; \
+ __oc_r6 = (unsigned long)a1; \
+ __oc_r7 = (unsigned long)a2; \
_oc_syscall( number, rr(r4), rr(r5), rr(r6), rr(r7) ) \
_oc_input( ir(r6), ir(r7) ) \
- ((ulong*)retarg)[0] = __oc_r4; \
- ((ulong*)retarg)[1] = __oc_r5; \
- ((ulong*)retarg)[2] = __oc_r6; \
- ((ulong*)retarg)[3] = __oc_r7; \
+ ((unsigned long*)retarg)[0] = __oc_r4; \
+ ((unsigned long*)retarg)[1] = __oc_r5; \
+ ((unsigned long*)retarg)[2] = __oc_r6; \
+ ((unsigned long*)retarg)[3] = __oc_r7; \
_oc_tail
#ifdef SHORT_REGLIST
@@ -293,9 +293,9 @@
#define _osi_call2_w6( type, name, number, t1, a1, t2, a2, t3, retarg ) \
type name( t1 a1, t2 a2, t3 retarg ) \
_oc_head( dreg(r6), dreg(r7), dreg(r10) ) \
- __oc_r6 = (ulong)a1; \
- __oc_r7 = (ulong)a2; \
- __oc_r10 = (ulong)retarg; \
+ __oc_r6 = (unsigned long)a1; \
+ __oc_r7 = (unsigned long)a2; \
+ __oc_r10 = (unsigned long)retarg; \
_oc_syscall_r10w6( number, ir(r6), ir(r7) ) \
_oc_tail
@@ -305,16 +305,16 @@
#define _osi_call2_w6( type, name, number, t1, a1, t2, a2, t3, retarg ) \
type name( t1 a1, t2 a2, t3 retarg ) \
_oc_head( dreg(r6), dreg(r7), dreg(r8), dreg(r9) ) \
- __oc_r6 = (ulong)a1; \
- __oc_r7 = (ulong)a2; \
+ __oc_r6 = (unsigned long)a1; \
+ __oc_r7 = (unsigned long)a2; \
_oc_syscall( number, rr(r4), rr(r5), rr(r6), rr(r7), rr(r8), rr(r9) ) \
_oc_input( ir(r6), ir(r7) ) \
- ((ulong*)retarg)[0] = __oc_r4; \
- ((ulong*)retarg)[1] = __oc_r5; \
- ((ulong*)retarg)[2] = __oc_r6; \
- ((ulong*)retarg)[3] = __oc_r7; \
- ((ulong*)retarg)[4] = __oc_r8; \
- ((ulong*)retarg)[5] = __oc_r9; \
+ ((unsigned long*)retarg)[0] = __oc_r4; \
+ ((unsigned long*)retarg)[1] = __oc_r5; \
+ ((unsigned long*)retarg)[2] = __oc_r6; \
+ ((unsigned long*)retarg)[3] = __oc_r7; \
+ ((unsigned long*)retarg)[4] = __oc_r8; \
+ ((unsigned long*)retarg)[5] = __oc_r9; \
_oc_tail
#endif /* SHORT_REGLIST */
@@ -332,8 +332,8 @@
static inline _osi_call0( int, OSI_Exit, OSI_EXIT );
/* misc */
-static inline _osi_call0( ulong, OSI_GetLocalTime, OSI_GET_LOCALTIME );
-static inline _osi_call0( ulong, OSI_GetGMTTime, OSI_GET_GMT_TIME );
+static inline _osi_call0( unsigned long, OSI_GetLocalTime, OSI_GET_LOCALTIME );
+static inline _osi_call0( unsigned long, OSI_GetGMTTime, OSI_GET_GMT_TIME );
static inline _osi_call1( int, OSI_USleep, OSI_USLEEP, int, usecs );
/* NVRAM */
@@ -378,7 +378,7 @@
static inline _osi_call1( int, OSI_SoundCntl, OSI_SOUND_CNTL, int, cmd );
static inline _osi_call2( int, OSI_SoundCntl1, OSI_SOUND_CNTL, int, cmd, int, p1 );
static inline _osi_call3( int, OSI_SoundCntl2, OSI_SOUND_CNTL, int, cmd, int, p1, int, p2 );
-static inline _osi_call0_w2( int, OSI_SoundIRQAck, OSI_SOUND_IRQ_ACK, ulong *, timestamp );
+static inline _osi_call0_w2( int, OSI_SoundIRQAck, OSI_SOUND_IRQ_ACK, unsigned long *, timestamp );
static inline _osi_call3( int, OSI_SoundWrite, OSI_SOUND_WRITE, int, physbuf, int, len, int, restart );
static inline _osi_call3( int, OSI_SoundSetVolume, OSI_SOUND_SET_VOLUME, int, hwvol, int, speakervol, int, mute );
@@ -393,9 +393,9 @@
static inline _osi_call2( int, OSI_ABlkCntrl, OSI_ABLK_CNTRL, int, channel, int, cmd );
static inline _osi_call3( int, OSI_ABlkCntrl1, OSI_ABLK_CNTRL, int, channel, int, cmd, int, param );
static inline _osi_call5( int, OSI_ABlkSyncRead, OSI_ABLK_SYNC_READ, int, channel, int, unit,
- int, blk, ulong, mphys, int, size );
+ int, blk, unsigned long, mphys, int, size );
static inline _osi_call5( int, OSI_ABlkSyncWrite, OSI_ABLK_SYNC_WRITE, int, channel, int, unit,
- int, blk, ulong, mphys, int, size );
+ int, blk, unsigned long, mphys, int, size );
static inline _osi_call2( int, OSI_ABlkBlessDisk, OSI_ABLK_BLESS_DISK, int, channel, int, unit );
static inline _osi_call0( int, OSI_CMountDrvVol, OSI_CMOUNT_DRV_VOL );
@@ -409,15 +409,15 @@
static inline _osi_call1( int, OSI_Enet2Cntrl, OSI_ENET2_CNTRL, int, cmd );
static inline _osi_call0( int, OSI_Enet2Kick, OSI_ENET2_KICK );
-static inline _osi_call0_w2( int, OSI_Enet2GetHWAddr__, OSI_ENET2_GET_HWADDR, ulong *, retbuf );
+static inline _osi_call0_w2( int, OSI_Enet2GetHWAddr__, OSI_ENET2_GET_HWADDR, unsigned long *, retbuf );
static inline int OSI_Enet2GetHWAddr( unsigned char *addr ) {
int ret;
- ulong buf[2];
+ unsigned long buf[2];
ret = OSI_Enet2GetHWAddr__( buf );
- ((ulong*)addr)[0] = buf[0];
- ((ushort*)addr)[2] = (buf[1] >> 16);
+ ((unsigned long*)addr)[0] = buf[0];
+ ((unsigned short*)addr)[2] = (buf[1] >> 16);
return ret;
}
static inline _osi_call2( int, OSI_Enet2IRQAck, OSI_ENET2_IRQ_ACK, int, irq_enable, int, rx_head );
@@ -430,12 +430,12 @@
static inline _osi_call2( int, OSI_PromPathIface, OSI_PROM_PATH_IFACE, int, what, const char *, p );
/* emulation acceleration */
-static inline _osi_call1( int, OSI_MapinMregs, OSI_MAPIN_MREGS, ulong, mphys );
+static inline _osi_call1( int, OSI_MapinMregs, OSI_MAPIN_MREGS, unsigned long, mphys );
static inline _osi_call3( int, OSI_EmuAccel, OSI_EMUACCEL, int, emuaccel_flags, int, param, int, inst_addr );
/* timer frequency */
-static inline _osi_call1( int, OSI_MticksToUsecs, OSI_MTICKS_TO_USECS, ulong, mticks );
-static inline _osi_call1( int, OSI_UsecsToMticks, OSI_USECS_TO_MTICKS, ulong, usecs );
+static inline _osi_call1( int, OSI_MticksToUsecs, OSI_MTICKS_TO_USECS, unsigned long, mticks );
+static inline _osi_call1( int, OSI_UsecsToMticks, OSI_USECS_TO_MTICKS, unsigned long, usecs );
/* fb info */
struct osi_fb_info;
Modified: trunk/openbios-devel/arch/ppc/pearpc/init.c
==============================================================================
--- trunk/openbios-devel/arch/ppc/pearpc/init.c Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/arch/ppc/pearpc/init.c Sun Aug 1 23:25:08 2010 (r830)
@@ -108,8 +108,8 @@
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) );
}
Modified: trunk/openbios-devel/arch/ppc/pearpc/main.c
==============================================================================
--- trunk/openbios-devel/arch/ppc/pearpc/main.c Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/arch/ppc/pearpc/main.c Sun Aug 1 23:25:08 2010 (r830)
@@ -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 @@
}
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 @@
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 @@
{
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++ ) {
Modified: trunk/openbios-devel/arch/ppc/pearpc/methods.c
==============================================================================
--- trunk/openbios-devel/arch/ppc/pearpc/methods.c Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/arch/ppc/pearpc/methods.c Sun Aug 1 23:25:08 2010 (r830)
@@ -37,7 +37,7 @@
{
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;
@@ -139,10 +139,10 @@
/* ( -- ) */
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);
@@ -153,11 +153,11 @@
/* ( -- 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 )
Modified: trunk/openbios-devel/arch/ppc/qemu/init.c
==============================================================================
--- trunk/openbios-devel/arch/ppc/qemu/init.c Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/arch/ppc/qemu/init.c Sun Aug 1 23:25:08 2010 (r830)
@@ -683,8 +683,8 @@
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) );
}
Modified: trunk/openbios-devel/arch/ppc/qemu/kernel.h
==============================================================================
--- trunk/openbios-devel/arch/ppc/qemu/kernel.h Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/arch/ppc/qemu/kernel.h Sun Aug 1 23:25:08 2010 (r830)
@@ -22,7 +22,7 @@
/* start.S */
extern void flush_icache_range( char *start, char *stop );
extern char of_rtas_start[], of_rtas_end[];
-extern void call_elf( ulong arg1, ulong arg2, ulong elf_entry );
+extern void call_elf( unsigned long arg1, unsigned long arg2, unsigned long elf_entry );
/* methods.c */
extern void node_methods_init( const char *cpuname );
Modified: trunk/openbios-devel/arch/ppc/qemu/methods.c
==============================================================================
--- trunk/openbios-devel/arch/ppc/qemu/methods.c Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/arch/ppc/qemu/methods.c Sun Aug 1 23:25:08 2010 (r830)
@@ -39,7 +39,7 @@
{
ucell physbase = POP();
ucell s=0x1000, size = (ucell)of_rtas_end - (ucell)of_rtas_start;
- ulong virt;
+ unsigned long virt;
while( s < size )
s += 0x1000;
@@ -110,10 +110,10 @@
/* ( -- ) */
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);
@@ -125,10 +125,10 @@
#define TIMER_FREQUENCY 16600000ULL
static void
-ciface_milliseconds( ulong args[], ulong ret[] )
+ciface_milliseconds( unsigned long args[], unsigned long ret[] )
{
- ulong tbu, tbl, temp;
- ullong ticks, msecs;
+ unsigned long tbu, tbl, temp;
+ unsigned long long ticks, msecs;
asm volatile(
"1:\n"
@@ -141,7 +141,7 @@
:
: "cc");
- ticks = (((ullong)tbu) << 32) | (ullong)tbl;
+ ticks = (((unsigned long long)tbu) << 32) | (unsigned long long)tbl;
msecs = (1000 * ticks) / TIMER_FREQUENCY;
PUSH( msecs );
}
Modified: trunk/openbios-devel/arch/ppc/qemu/ofmem.c
==============================================================================
--- trunk/openbios-devel/arch/ppc/qemu/ofmem.c Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/arch/ppc/qemu/ofmem.c Sun Aug 1 23:25:08 2010 (r830)
@@ -28,7 +28,7 @@
/* called from assembly */
extern void dsi_exception( void );
extern void isi_exception( void );
-extern void setup_mmu( ulong code_base );
+extern void setup_mmu( unsigned long code_base );
/*
* From Apple's BootX source comments:
@@ -56,43 +56,43 @@
#define SEGR_USER BIT(2)
#define SEGR_BASE 0x0400
-static inline ulong
+static inline unsigned long
get_hash_base( void )
{
- ulong sdr1;
+ unsigned long sdr1;
asm volatile("mfsdr1 %0" : "=r" (sdr1) );
return (sdr1 & 0xffff0000);
}
-static inline ulong
+static inline unsigned long
get_hash_size( void )
{
- ulong sdr1;
+ unsigned long sdr1;
asm volatile("mfsdr1 %0" : "=r" (sdr1) );
return ((sdr1 << 16) | 0x0000ffff) + 1;
}
-static inline ulong
+static inline unsigned long
get_rom_base( void )
{
ofmem_t *ofmem = ofmem_arch_get_private();
return ofmem->ramsize - 0x00100000;
}
-ulong
+unsigned long
get_ram_top( void )
{
return get_rom_base() - HASH_SIZE - (32 + 32 + 64) * 1024;
}
-ulong
+unsigned long
get_ram_bottom( void )
{
- return (ulong)FREE_BASE;
+ return (unsigned long)FREE_BASE;
}
static ucell get_heap_top( void )
@@ -236,7 +236,7 @@
static int next_grab_slot=0;
uint64_t vsid_mask, page_mask, pgidx, hash;
uint64_t htab_mask, mask, avpn;
- ulong pgaddr;
+ unsigned long pgaddr;
int i, found;
unsigned int vsid, vsid_sh, sdr, sdr_sh, sdr_mask;
mPTE_64_t *pp;
@@ -300,7 +300,7 @@
hash_page_32( ucell ea, ucell phys, ucell mode )
{
static int next_grab_slot=0;
- ulong *upte, cmp, hash1;
+ unsigned long *upte, cmp, hash1;
int i, vsid, found;
mPTE_t *pp;
@@ -312,7 +312,7 @@
hash1 &= (get_hash_size() - 1) >> 6;
pp = (mPTE_t*)(get_hash_base() + (hash1 << 6));
- upte = (ulong*)pp;
+ upte = (unsigned long*)pp;
/* replace old translation */
for( found=0, i=0; !found && i<8; i++ )
@@ -344,7 +344,7 @@
return ((pvr >= 0x330000) && (pvr < 0x70330000));
}
-static void hash_page( ulong ea, ulong phys, ucell mode )
+static void hash_page( unsigned long ea, unsigned long phys, ucell mode )
{
if ( is_ppc64() )
hash_page_64(ea, phys, mode);
@@ -355,7 +355,7 @@
void
dsi_exception( void )
{
- ulong dar, dsisr;
+ unsigned long dar, dsisr;
ucell mode;
ucell phys;
@@ -369,7 +369,7 @@
void
isi_exception( void )
{
- ulong nip, srr1;
+ unsigned long nip, srr1;
ucell mode;
ucell phys;
@@ -386,12 +386,12 @@
/************************************************************************/
void
-setup_mmu( ulong ramsize )
+setup_mmu( unsigned long ramsize )
{
ofmem_t *ofmem = OFMEM;
- ulong sdr1, sr_base, msr;
- ulong hash_base;
- ulong hash_mask = 0xffff0000;
+ unsigned long sdr1, sr_base, msr;
+ unsigned long hash_base;
+ unsigned long hash_mask = 0xffff0000;
int i;
memset(ofmem, 0, sizeof(ofmem_t));
Modified: trunk/openbios-devel/arch/ppc/qemu/start.S
==============================================================================
--- trunk/openbios-devel/arch/ppc/qemu/start.S Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/arch/ppc/qemu/start.S Sun Aug 1 23:25:08 2010 (r830)
@@ -524,7 +524,7 @@
#define CACHE_LINE_SIZE 32
#define LG_CACHE_LINE_SIZE 5
-/* flush_icache_range( ulong start, ulong stop) */
+/* flush_icache_range( unsigned long start, unsigned long stop) */
GLOBL(flush_icache_range):
li r5,CACHE_LINE_SIZE-1
andc r3,r3,r5
Modified: trunk/openbios-devel/arch/ppc/start.S
==============================================================================
--- trunk/openbios-devel/arch/ppc/start.S Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/arch/ppc/start.S Sun Aug 1 23:25:08 2010 (r830)
@@ -312,7 +312,7 @@
#define CACHE_LINE_SIZE 32
#define LG_CACHE_LINE_SIZE 5
-/* flush_icache_range( ulong start, ulong stop) */
+/* flush_icache_range( unsigned long start, unsigned long stop) */
GLOBL(flush_icache_range):
li r5,CACHE_LINE_SIZE-1
andc r3,r3,r5
Modified: trunk/openbios-devel/arch/sparc32/linux_load.c
==============================================================================
--- trunk/openbios-devel/arch/sparc32/linux_load.c Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/arch/sparc32/linux_load.c Sun Aug 1 23:25:08 2010 (r830)
@@ -161,7 +161,7 @@
static unsigned long file_size(void)
{
- llong fpos, fsize;
+ long long fpos, fsize;
/* Save current position */
fpos = tell(fd);
Modified: trunk/openbios-devel/arch/sparc64/linux_load.c
==============================================================================
--- trunk/openbios-devel/arch/sparc64/linux_load.c Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/arch/sparc64/linux_load.c Sun Aug 1 23:25:08 2010 (r830)
@@ -161,7 +161,7 @@
static unsigned long file_size(void)
{
- llong fpos, fsize;
+ long long fpos, fsize;
/* Save current position */
fpos = tell(fd);
Modified: trunk/openbios-devel/arch/unix/boot.c
==============================================================================
--- trunk/openbios-devel/arch/unix/boot.c Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/arch/unix/boot.c Sun Aug 1 23:25:08 2010 (r830)
@@ -36,7 +36,7 @@
return NULL;
}
- (ullong *)entry = ehdr.e_entry;
+ (unsigned long long *)entry = ehdr.e_entry;
lszz_offs = elf_offs;
for( i=0; i<ehdr.e_phnum; i++ ) {
@@ -52,7 +52,7 @@
continue;
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 entry;
Modified: trunk/openbios-devel/arch/x86/linux_load.c
==============================================================================
--- trunk/openbios-devel/arch/x86/linux_load.c Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/arch/x86/linux_load.c Sun Aug 1 23:25:08 2010 (r830)
@@ -162,7 +162,7 @@
static unsigned long file_size(void)
{
- llong fpos, fsize;
+ long long fpos, fsize;
/* Save current position */
fpos = tell(fd);
Modified: trunk/openbios-devel/fs/ext2/ext2_fs.c
==============================================================================
--- trunk/openbios-devel/fs/ext2/ext2_fs.c Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/fs/ext2/ext2_fs.c Sun Aug 1 23:25:08 2010 (r830)
@@ -157,7 +157,7 @@
static void
ext2_files_seek( ext2_info_t *mi )
{
- llong pos = DPOP();
+ long long pos = DPOP();
int offs = (int)pos;
int whence = SEEK_SET;
int ret;
@@ -263,7 +263,7 @@
ext2_files_probe( ext2_info_t *dummy )
{
ihandle_t ih = POP_ih();
- llong offs = DPOP();
+ long long offs = DPOP();
int fd, ret = 0;
fd = open_ih(ih);
Modified: trunk/openbios-devel/fs/ext2/ext2_utils.c
==============================================================================
--- trunk/openbios-devel/fs/ext2/ext2_utils.c Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/fs/ext2/ext2_utils.c Sun Aug 1 23:25:08 2010 (r830)
@@ -12,7 +12,7 @@
#include "libc/diskio.h"
#include "libc/byteorder.h"
-int ext2_probe(int fd, llong offset)
+int ext2_probe(int fd, long long offset)
{
struct ext2_super_block *super;
@@ -81,7 +81,7 @@
void ext2_read_block(ext2_VOLUME* volume, unsigned int fsblock)
{
- llong offset;
+ long long offset;
if (fsblock == volume->current)
return;
Modified: trunk/openbios-devel/fs/ext2/ext2_utils.h
==============================================================================
--- trunk/openbios-devel/fs/ext2/ext2_utils.h Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/fs/ext2/ext2_utils.h Sun Aug 1 23:25:08 2010 (r830)
@@ -36,7 +36,7 @@
/* utilities */
-extern int ext2_probe(int fd, llong offset);
+extern int ext2_probe(int fd, long long offset);
extern void ext2_get_super(int fd, struct ext2_super_block *super);
extern void ext2_read_block(ext2_VOLUME* volume, unsigned int fsblock);
extern void ext2_get_group_desc(ext2_VOLUME* volume,
Modified: trunk/openbios-devel/fs/grubfs/defs.h
==============================================================================
--- trunk/openbios-devel/fs/grubfs/defs.h Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/fs/grubfs/defs.h Sun Aug 1 23:25:08 2010 (r830)
@@ -42,14 +42,6 @@
#define btodb(byte_offset) ((byte_offset) >> 9)
#define dbtob(block_number) ((block_number) << 9)
-/*
- * Compatibility definitions for old type names.
- */
-
-typedef unsigned char u_char; /* unsigned char */
-typedef unsigned short u_short; /* unsigned short */
-typedef unsigned int u_int; /* unsigned int */
-
typedef struct _quad_
{
unsigned int val[2]; /* 2 int values make... */
Modified: trunk/openbios-devel/fs/grubfs/dir.h
==============================================================================
--- trunk/openbios-devel/fs/grubfs/dir.h Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/fs/grubfs/dir.h Sun Aug 1 23:25:08 2010 (r830)
@@ -76,9 +76,9 @@
struct direct
{
- u_int d_ino; /* inode number of entry */
- u_short d_reclen; /* length of this record */
- u_short d_namlen; /* length of string in d_name */
+ unsigned int d_ino; /* inode number of entry */
+ unsigned short d_reclen; /* length of this record */
+ unsigned short d_namlen; /* length of string in d_name */
char d_name[MAXNAMLEN + 1]; /* name with length <= MAXNAMLEN */
};
@@ -100,11 +100,11 @@
*/
struct dirtemplate
{
- u_int dot_ino;
+ unsigned int dot_ino;
short dot_reclen;
short dot_namlen;
char dot_name[4]; /* must be multiple of 4 */
- u_int dotdot_ino;
+ unsigned int dotdot_ino;
short dotdot_reclen;
short dotdot_namlen;
char dotdot_name[4]; /* ditto */
Modified: trunk/openbios-devel/fs/grubfs/disk_inode.h
==============================================================================
--- trunk/openbios-devel/fs/grubfs/disk_inode.h Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/fs/grubfs/disk_inode.h Sun Aug 1 23:25:08 2010 (r830)
@@ -61,7 +61,7 @@
struct icommon
{
- u_short ic_mode; /* 0: mode and type of file */
+ unsigned short ic_mode; /* 0: mode and type of file */
short ic_nlink; /* 2: number of links to file */
mach_uid_t ic_uid; /* 4: owner's user id */
mach_gid_t ic_gid; /* 6: owner's group id */
Modified: trunk/openbios-devel/fs/grubfs/fs.h
==============================================================================
--- trunk/openbios-devel/fs/grubfs/fs.h Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/fs/grubfs/fs.h Sun Aug 1 23:25:08 2010 (r830)
@@ -231,9 +231,9 @@
int fs_postblformat; /* format of positional layout tables */
int fs_nrpos; /* number of rotaional positions */
int fs_postbloff; /* (short) rotation block list head */
- int fs_rotbloff; /* (u_char) blocks for each rotation */
+ int fs_rotbloff; /* (char) blocks for each rotation */
int fs_magic; /* magic number */
- u_char fs_space[1]; /* list of blocks for each rotation */
+ unsigned char fs_space[1]; /* list of blocks for each rotation */
/* actually longer */
};
/*
@@ -257,7 +257,7 @@
#define fs_rotbl(fs) \
(((fs)->fs_postblformat == FS_42POSTBLFMT) \
? ((fs)->fs_space) \
- : ((u_char *)((char *)(fs) + (fs)->fs_rotbloff)))
+ : ((unsigned char *)((char *)(fs) + (fs)->fs_rotbloff)))
/*
* Convert cylinder group to base address of its global summary info.
@@ -288,10 +288,10 @@
int cg_btotoff; /* (long) block totals per cylinder */
int cg_boff; /* (short) free block positions */
int cg_iusedoff; /* (char) used inode map */
- int cg_freeoff; /* (u_char) free block map */
- int cg_nextfreeoff; /* (u_char) next available space */
+ int cg_freeoff; /* (char) free block map */
+ int cg_nextfreeoff; /* (char) next available space */
int cg_sparecon[16]; /* reserved for future use */
- u_char cg_space[1]; /* space for cylinder group maps */
+ unsigned char cg_space[1]; /* space for cylinder group maps */
/* actually longer */
};
/*
@@ -312,7 +312,7 @@
#define cg_blksfree(cgp) \
(((cgp)->cg_magic != CG_MAGIC) \
? (((struct ocg *)(cgp))->cg_free) \
- : ((u_char *)((char *)(cgp) + (cgp)->cg_freeoff)))
+ : ((unsigned char *)((char *)(cgp) + (cgp)->cg_freeoff)))
#define cg_chkmagic(cgp) \
((cgp)->cg_magic == CG_MAGIC || ((struct ocg *)(cgp))->cg_magic == CG_MAGIC)
@@ -338,7 +338,7 @@
short cg_b[32][8]; /* positions of free blocks */
char cg_iused[256]; /* used inode map */
int cg_magic; /* magic number */
- u_char cg_free[1]; /* free block map */
+ unsigned char cg_free[1]; /* free block map */
/* actually longer */
};
Modified: trunk/openbios-devel/fs/grubfs/grubfs_fs.c
==============================================================================
--- trunk/openbios-devel/fs/grubfs/grubfs_fs.c Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/fs/grubfs/grubfs_fs.c Sun Aug 1 23:25:08 2010 (r830)
@@ -100,7 +100,7 @@
const struct fsys_entry *fsys;
grubfile_t *fd;
int dev_fd;
- llong offset; /* Offset added onto each device read; should only ever be non-zero
+ long long offset; /* Offset added onto each device read; should only ever be non-zero
when probing a partition for a filesystem */
} grubfs_t;
@@ -123,7 +123,7 @@
devread( unsigned long sector, unsigned long byte_offset,
unsigned long byte_len, void *buf )
{
- llong offs = (llong)sector * 512 + byte_offset;
+ long long offs = (long long)sector * 512 + byte_offset;
#ifdef CONFIG_DEBUG_FS
//printk("devread s=%x buf=%x, fd=%x\n",sector, buf, curfs->dev_fd);
@@ -260,7 +260,7 @@
static void
grubfs_files_seek( grubfs_info_t *mi )
{
- llong pos = DPOP();
+ long long pos = DPOP();
int offs = (int)pos;
int whence = SEEK_SET;
@@ -332,7 +332,7 @@
grubfs_files_probe( grubfs_info_t *dummy )
{
ihandle_t ih = POP_ih();
- llong offs = DPOP();
+ long long offs = DPOP();
int i;
curfs->dev_fd = open_ih(ih);
Modified: trunk/openbios-devel/fs/grubfs/iso9660.h
==============================================================================
--- trunk/openbios-devel/fs/grubfs/iso9660.h Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/fs/grubfs/iso9660.h Sun Aug 1 23:25:08 2010 (r830)
@@ -57,23 +57,19 @@
#ifndef ASM_FILE
-typedef uint8_t u_int8_t;
-typedef uint16_t u_int16_t;
-typedef uint32_t u_int32_t;
-
typedef union {
- u_int8_t l,b;
+ uint8_t l,b;
} iso_8bit_t;
typedef struct __iso_16bit {
- u_int16_t l, b;
+ uint16_t l, b;
} iso_16bit_t;
typedef struct __iso_32bit {
- u_int32_t l, b;
+ uint32_t l, b;
} iso_32bit_t;
-typedef u_int8_t iso_date_t[7];
+typedef uint8_t iso_date_t[7];
struct iso_directory_record {
iso_8bit_t length;
@@ -86,49 +82,49 @@
iso_8bit_t interleave;
iso_16bit_t volume_seq_number;
iso_8bit_t name_len;
- u_int8_t name[1];
+ uint8_t name[1];
} __attribute__ ((packed));
struct iso_primary_descriptor {
iso_8bit_t type;
- u_int8_t id[5];
+ uint8_t id[5];
iso_8bit_t version;
- u_int8_t _unused1[1];
- u_int8_t system_id[32];
- u_int8_t volume_id[32];
- u_int8_t _unused2[8];
+ uint8_t _unused1[1];
+ uint8_t system_id[32];
+ uint8_t volume_id[32];
+ uint8_t _unused2[8];
iso_32bit_t volume_space_size;
- u_int8_t _unused3[32];
+ uint8_t _unused3[32];
iso_16bit_t volume_set_size;
iso_16bit_t volume_seq_number;
iso_16bit_t logical_block_size;
iso_32bit_t path_table_size;
- u_int8_t type_l_path_table[4];
- u_int8_t opt_type_l_path_table[4];
- u_int8_t type_m_path_table[4];
- u_int8_t opt_type_m_path_table[4];
+ uint8_t type_l_path_table[4];
+ uint8_t opt_type_l_path_table[4];
+ uint8_t type_m_path_table[4];
+ uint8_t opt_type_m_path_table[4];
struct iso_directory_record root_directory_record;
- u_int8_t volume_set_id[128];
- u_int8_t publisher_id[128];
- u_int8_t preparer_id[128];
- u_int8_t application_id[128];
- u_int8_t copyright_file_id[37];
- u_int8_t abstract_file_id[37];
- u_int8_t bibliographic_file_id[37];
- u_int8_t creation_date[17];
- u_int8_t modification_date[17];
- u_int8_t expiration_date[17];
- u_int8_t effective_date[17];
+ uint8_t volume_set_id[128];
+ uint8_t publisher_id[128];
+ uint8_t preparer_id[128];
+ uint8_t application_id[128];
+ uint8_t copyright_file_id[37];
+ uint8_t abstract_file_id[37];
+ uint8_t bibliographic_file_id[37];
+ uint8_t creation_date[17];
+ uint8_t modification_date[17];
+ uint8_t expiration_date[17];
+ uint8_t effective_date[17];
iso_8bit_t file_structure_version;
- u_int8_t _unused4[1];
- u_int8_t application_data[512];
- u_int8_t _unused5[653];
+ uint8_t _unused4[1];
+ uint8_t application_data[512];
+ uint8_t _unused5[653];
} __attribute__ ((packed));
struct rock_ridge {
- u_int16_t signature;
- u_int8_t len;
- u_int8_t version;
+ uint16_t signature;
+ uint8_t len;
+ uint8_t version;
union {
struct CE {
iso_32bit_t extent;
@@ -137,7 +133,7 @@
} ce;
struct NM {
iso_8bit_t flags;
- u_int8_t name[0];
+ uint8_t name[0];
} nm;
struct PX {
iso_32bit_t mode;
Modified: trunk/openbios-devel/fs/hfs/hfs.c
==============================================================================
--- trunk/openbios-devel/fs/hfs/hfs.c Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/fs/hfs/hfs.c Sun Aug 1 23:25:08 2010 (r830)
@@ -741,7 +741,7 @@
* NAME: hfs->probe()
* DESCRIPTION: return whether a HFS filesystem is present at the given offset
*/
-int hfs_probe(int fd, llong offset)
+int hfs_probe(int fd, long long offset)
{
return v_probe(fd, offset);
}
Modified: trunk/openbios-devel/fs/hfs/hfs_fs.c
==============================================================================
--- trunk/openbios-devel/fs/hfs/hfs_fs.c Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/fs/hfs/hfs_fs.c Sun Aug 1 23:25:08 2010 (r830)
@@ -55,7 +55,7 @@
/************************************************************************/
static int
-_find_file( hfsvol *vol, const char *path, ulong type, ulong creator )
+_find_file( hfsvol *vol, const char *path, unsigned long type, unsigned long creator )
{
hfsdirent ent;
hfsdir *dir;
@@ -67,7 +67,7 @@
while( ret && !hfs_readdir(dir, &ent) ) {
if( ent.flags & HFS_ISDIR )
continue;
- ret = !(*(ulong*)ent.u.file.type == type && *(ulong*)ent.u.file.creator == creator );
+ ret = !(*(unsigned long*)ent.u.file.type == type && *(unsigned long*)ent.u.file.creator == creator );
}
hfs_closedir( dir );
@@ -96,7 +96,7 @@
/* printk("DIRECTORY: %s\n", path ); */
while( status && !hfs_readdir(dir, &ent) ) {
- ulong type, creator;
+ unsigned long type, creator;
*p = 0;
topdir = 0;
@@ -112,8 +112,8 @@
continue;
}
- type = *(ulong*)ent.u.file.type;
- creator = *(ulong*)ent.u.file.creator;
+ type = *(unsigned long*)ent.u.file.type;
+ creator = *(unsigned long*)ent.u.file.creator;
/* look for Mac OS ROM, System and Finder in the same directory */
if( type == MAC_OS_ROM_TYPE && creator == MAC_OS_ROM_CREATOR ) {
@@ -372,7 +372,7 @@
static void
hfs_files_seek( hfs_info_t *mi )
{
- llong pos = DPOP();
+ long long pos = DPOP();
int offs = (int)pos;
int whence = SEEK_SET;
int ret;
@@ -437,7 +437,7 @@
hfsvol *vol = hfs_getvol( NULL );
hfsdirent ent;
int start, ns;
- ulong id;
+ unsigned long id;
if (common->type != FILE)
RET( 0 );
@@ -542,7 +542,7 @@
hfs_files_probe( hfs_info_t *dummy )
{
ihandle_t ih = POP_ih();
- llong offs = DPOP();
+ long long offs = DPOP();
int fd, ret = 0;
fd = open_ih(ih);
Modified: trunk/openbios-devel/fs/hfs/include/hfs.h
==============================================================================
--- trunk/openbios-devel/fs/hfs/include/hfs.h Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/fs/hfs/include/hfs.h Sun Aug 1 23:25:08 2010 (r830)
@@ -177,4 +177,4 @@
int hfs_format(const char *, int, int,
const char *, unsigned int, const unsigned long []);
-int hfs_probe(int fd, llong offset);
+int hfs_probe(int fd, long long offset);
Modified: trunk/openbios-devel/fs/hfs/include/volume.h
==============================================================================
--- trunk/openbios-devel/fs/hfs/include/volume.h Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/fs/hfs/include/volume.h Sun Aug 1 23:25:08 2010 (r830)
@@ -66,6 +66,6 @@
int v_scavenge(hfsvol *);
-int v_probe(int fd, llong offset);
+int v_probe(int fd, long long offset);
#endif /* _H_VOLUME */
Modified: trunk/openbios-devel/fs/hfs/volume.c
==============================================================================
--- trunk/openbios-devel/fs/hfs/volume.c Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/fs/hfs/volume.c Sun Aug 1 23:25:08 2010 (r830)
@@ -594,7 +594,7 @@
/* Determine whether the volume is a HFS volume */
int
-v_probe(int fd, llong offset)
+v_probe(int fd, long long offset)
{
MDB *mdb;
Modified: trunk/openbios-devel/fs/hfs_mdb.h
==============================================================================
--- trunk/openbios-devel/fs/hfs_mdb.h Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/fs/hfs_mdb.h Sun Aug 1 23:25:08 2010 (r830)
@@ -89,27 +89,27 @@
typedef struct hfs_plus_mdb
{
- ushort signature;
- ushort version;
- uint attributes;
- uint lastMountedVersion;
- uint reserved;
-
- uint createDate;
- uint modifyDate;
- uint backupDate;
- uint checkedDate;
-
- uint fileCount;
- uint folderCount;
-
- uint blockSize;
- uint totalBlocks;
- uint freeBlocks;
-
- uint nextAllocation;
- uint rsrcClumpSize;
- uint dataClumpSize;
+ unsigned short signature;
+ unsigned short version;
+ unsigned int attributes;
+ unsigned int lastMountedVersion;
+ unsigned int reserved;
+
+ unsigned int createDate;
+ unsigned int modifyDate;
+ unsigned int backupDate;
+ unsigned int checkedDate;
+
+ unsigned int fileCount;
+ unsigned int folderCount;
+
+ unsigned int blockSize;
+ unsigned int totalBlocks;
+ unsigned int freeBlocks;
+
+ unsigned int nextAllocation;
+ unsigned int rsrcClumpSize;
+ unsigned int dataClumpSize;
/* ... there are more fields here ... */
} hfs_plus_mdb_t;
Modified: trunk/openbios-devel/fs/hfsplus/hfsp_fs.c
==============================================================================
--- trunk/openbios-devel/fs/hfsplus/hfsp_fs.c Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/fs/hfsplus/hfsp_fs.c Sun Aug 1 23:25:08 2010 (r830)
@@ -314,7 +314,7 @@
static void
hfsp_files_seek( hfsp_info_t *mi )
{
- llong pos = DPOP();
+ long long pos = DPOP();
int offs = (int)pos;
int whence = SEEK_SET;
@@ -448,7 +448,7 @@
hfsp_files_probe( hfsp_info_t *dummy )
{
ihandle_t ih = POP_ih();
- llong offs = DPOP();
+ long long offs = DPOP();
int fd, ret = 0;
fd = open_ih(ih);
Modified: trunk/openbios-devel/fs/hfsplus/include/volume.h
==============================================================================
--- trunk/openbios-devel/fs/hfsplus/include/volume.h Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/fs/hfsplus/include/volume.h Sun Aug 1 23:25:08 2010 (r830)
@@ -73,7 +73,7 @@
}
/* Determine whether the volume is a HFS-plus volume */
-int volume_probe(int fd, llong offset);
+int volume_probe(int fd, long long offset);
#ifdef DEBUG
/* Print raw fork information to stdout */
Modified: trunk/openbios-devel/fs/hfsplus/volume.c
==============================================================================
--- trunk/openbios-devel/fs/hfsplus/volume.c Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/fs/hfsplus/volume.c Sun Aug 1 23:25:08 2010 (r830)
@@ -292,7 +292,7 @@
/* Determine whether the volume is a HFS-plus volume */
int
-volume_probe(int fd, llong offset)
+volume_probe(int fd, long long offset)
{
UInt16 *vol;
int ret = 0;
Modified: trunk/openbios-devel/fs/ioglue.c
==============================================================================
--- trunk/openbios-devel/fs/ioglue.c Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/fs/ioglue.c Sun Aug 1 23:25:08 2010 (r830)
@@ -47,8 +47,8 @@
return buf;
}
-ulong
-os_read( int fd, void *buf, ulong len, int blksize_bits )
+unsigned long
+os_read( int fd, void *buf, unsigned long len, int blksize_bits )
{
/* printk("os_read %d\n", (int)len); */
@@ -56,11 +56,11 @@
return (cnt > 0)? (cnt >> blksize_bits) : cnt;
}
-ulong
-os_seek( int fd, ulong blknum, int blksize_bits )
+unsigned long
+os_seek( int fd, unsigned long blknum, int blksize_bits )
{
/* printk("os_seek %d\n", blknum ); */
- llong offs = (llong)blknum << blksize_bits;
+ long long offs = (long long)blknum << blksize_bits;
/* offset == -1 means seek to EOF */
if( (int)blknum == -1 )
@@ -68,7 +68,7 @@
if( seek_io(fd, offs) ) {
/* printk("os_seek failure\n"); */
- return (ulong)-1;
+ return (unsigned long)-1;
}
if( (int)blknum == -1 ) {
@@ -80,7 +80,7 @@
}
void
-os_seek_offset( int fd, llong offset )
+os_seek_offset( int fd, long long offset )
{
seek_io(fd, offset);
}
Modified: trunk/openbios-devel/fs/iso9660/iso9660_fs.c
==============================================================================
--- trunk/openbios-devel/fs/iso9660/iso9660_fs.c Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/fs/iso9660/iso9660_fs.c Sun Aug 1 23:25:08 2010 (r830)
@@ -105,7 +105,7 @@
static void
iso9660_files_seek( iso9660_info_t *mi )
{
- llong pos = DPOP();
+ long long pos = DPOP();
cell ret;
int offs = (int)pos;
int whence = SEEK_SET;
@@ -215,7 +215,7 @@
iso9660_files_probe( iso9660_info_t *dummy )
{
ihandle_t ih = POP_ih();
- llong offs = DPOP();
+ long long offs = DPOP();
int fd, ret = 0;
fd = open_ih(ih);
Modified: trunk/openbios-devel/fs/iso9660/iso9660_mount.c
==============================================================================
--- trunk/openbios-devel/fs/iso9660/iso9660_mount.c Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/fs/iso9660/iso9660_mount.c Sun Aug 1 23:25:08 2010 (r830)
@@ -189,7 +189,7 @@
return 0;
}
-int iso9660_probe(int fd, llong offset)
+int iso9660_probe(int fd, long long offset)
{
struct iso_primary_descriptor ipd;
Modified: trunk/openbios-devel/fs/iso9660/libiso9660.h
==============================================================================
--- trunk/openbios-devel/fs/iso9660/libiso9660.h Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/fs/iso9660/libiso9660.h Sun Aug 1 23:25:08 2010 (r830)
@@ -14,7 +14,7 @@
extern iso9660_VOLUME* iso9660_mount(int fd);
extern int iso9660_umount(iso9660_VOLUME *volume);
-extern int iso9660_probe(int fd, llong offs);
+extern int iso9660_probe(int fd, long long offs);
extern iso9660_DIR* iso9660_opendir(iso9660_VOLUME *, const char *name);
extern iso9660_FILE* iso9660_open(iso9660_VOLUME *, const char *pathname);
extern int iso9660_closedir(iso9660_DIR *dir);
Modified: trunk/openbios-devel/fs/os.h
==============================================================================
--- trunk/openbios-devel/fs/os.h Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/fs/os.h Sun Aug 1 23:25:08 2010 (r830)
@@ -51,7 +51,7 @@
* NAME: os->seek_offset()
* DESCRIPTION: set a descriptor's seek pointer (offset in bytes)
*/
-void os_seek_offset( int fd, llong offset );
+void os_seek_offset( int fd, long long offset );
#endif /* _H_OS */
Modified: trunk/openbios-devel/include/arch/ppc/processor.h
==============================================================================
--- trunk/openbios-devel/include/arch/ppc/processor.h Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/include/arch/ppc/processor.h Sun Aug 1 23:25:08 2010 (r830)
@@ -389,15 +389,15 @@
/* opcode macros */
-#define OPCODE_PRIM(n) ( ((ulong)(n)) >> 26 )
-#define OPCODE_EXT(n) ( (((ulong)(n)) >> 1) & 0x3ff )
+#define OPCODE_PRIM(n) ( ((unsigned long)(n)) >> 26 )
+#define OPCODE_EXT(n) ( (((unsigned long)(n)) >> 1) & 0x3ff )
#define OPCODE(op,op_ext) ( ((op)<<10) + op_ext )
-#define B1(n) ( (((ulong)(n)) >> 21) & 0x1f )
-#define B2(n) ( (((ulong)(n)) >> 16) & 0x1f )
-#define B3(n) ( (((ulong)(n)) >> 11) & 0x1f )
+#define B1(n) ( (((unsigned long)(n)) >> 21) & 0x1f )
+#define B2(n) ( (((unsigned long)(n)) >> 16) & 0x1f )
+#define B3(n) ( (((unsigned long)(n)) >> 11) & 0x1f )
-#define BD(n) ((ulong)((n) & 0x7fff) + (((n) & 0x8000) ? (ulong)0xffff8000 : 0))
+#define BD(n) ((unsigned long)((n) & 0x7fff) + (((n) & 0x8000) ? (unsigned long)0xffff8000 : 0))
#define SPRNUM_FLIP( v ) ( (((v)>>5) & 0x1f) | (((v)<<5) & 0x3e0) )
Modified: trunk/openbios-devel/include/config.h
==============================================================================
--- trunk/openbios-devel/include/config.h Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/include/config.h Sun Aug 1 23:25:08 2010 (r830)
@@ -23,14 +23,6 @@
#define PROGRAM_NAME "OpenBIOS"
-typedef unsigned long ulong;
-typedef unsigned int uint;
-typedef unsigned short ushort;
-typedef unsigned char uchar;
-
-typedef unsigned long long ullong;
-typedef long long llong;
-
#ifndef BOOTSTRAP
#ifndef NULL
@@ -44,7 +36,7 @@
typedef unsigned int time_t;
-#define UINT_MAX ((uint)-1)
+#define UINT_MAX ((unsigned int)-1)
#define ENOMEM 1
#define EIO 2
Modified: trunk/openbios-devel/include/fs/fs.h
==============================================================================
--- trunk/openbios-devel/include/fs/fs.h Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/include/fs/fs.h Sun Aug 1 23:25:08 2010 (r830)
@@ -53,42 +53,42 @@
#ifdef CONFIG_HFSP
extern int fs_hfsp_open( int fd, fs_ops_t *fs );
-extern int fs_hfsp_probe( int fd, llong offs );
+extern int fs_hfsp_probe( int fd, long long offs );
#else
static inline int fs_hfsp_open( int fd, fs_ops_t *fs ) { return -1; }
-static inline int fs_hfsp_probe( int fd, llong offs ) { return -1; }
+static inline int fs_hfsp_probe( int fd, long long offs ) { return -1; }
#endif
#ifdef CONFIG_HFS
extern int fs_hfs_open( int fd, fs_ops_t *fs );
-extern int fs_hfs_probe( int fd, llong offs );
+extern int fs_hfs_probe( int fd, long long offs );
#else
static inline int fs_hfs_open( int fd, fs_ops_t *fs ) { return -1; }
-static inline int fs_hfs_probe( int fd, llong offs ) { return -1; }
+static inline int fs_hfs_probe( int fd, long long offs ) { return -1; }
#endif
#ifdef CONFIG_ISO9660
extern int fs_iso9660_open( int fd, fs_ops_t *fs );
-extern int fs_iso9660_probe( int fd, llong offs );
+extern int fs_iso9660_probe( int fd, long long offs );
#else
static inline int fs_iso9660_open( int fd, fs_ops_t *fs ) { return -1; }
-static inline int fs_iso9660_probe( int fd, llong offs ) { return -1; }
+static inline int fs_iso9660_probe( int fd, long long offs ) { return -1; }
#endif
#ifdef CONFIG_EXT2
extern int fs_ext2_open( int fd, fs_ops_t *fs );
-extern int fs_ext2_probe( int fd, llong offs );
+extern int fs_ext2_probe( int fd, long long offs );
#else
static inline int fs_ext2_open( int fd, fs_ops_t *fs ) { return -1; }
-static inline int fs_ext2_probe( int fd, llong offs ) { return -1; }
+static inline int fs_ext2_probe( int fd, long long offs ) { return -1; }
#endif
#ifdef CONFIG_GRUBFS
extern int fs_grubfs_open( int fd, fs_ops_t *fs );
-extern int fs_grubfs_probe( int fd, llong offs );
+extern int fs_grubfs_probe( int fd, long long offs );
#else
static inline int fs_grubfs_open( int fd, fs_ops_t *fs ) { return -1; }
-static inline int fs_grubfs_probe( int fd, llong offs ) { return -1; }
+static inline int fs_grubfs_probe( int fd, long long offs ) { return -1; }
#endif
Modified: trunk/openbios-devel/include/libc/diskio.h
==============================================================================
--- trunk/openbios-devel/include/libc/diskio.h Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/include/libc/diskio.h Sun Aug 1 23:25:08 2010 (r830)
@@ -21,8 +21,8 @@
extern int open_io( const char *spec );
extern int close_io( int fd );
extern int read_io( int fd, void *buf, size_t cnt );
-extern int seek_io( int fd, llong offs );
-extern llong tell( int fd );
+extern int seek_io( int fd, long long offs );
+extern long long tell( int fd );
extern int reopen( int fd, const char *filename );
extern int reopen_nwrom( int fd );
extern ihandle_t get_ih_from_fd( int fd );
Modified: trunk/openbios-devel/include/libopenbios/ofmem.h
==============================================================================
--- trunk/openbios-devel/include/libopenbios/ofmem.h Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/include/libopenbios/ofmem.h Sun Aug 1 23:25:08 2010 (r830)
@@ -108,8 +108,8 @@
#ifdef CONFIG_PPC
#define PAGE_SHIFT 12
-ulong get_ram_top( void );
-ulong get_ram_bottom( void );
+unsigned long get_ram_top( void );
+unsigned long get_ram_bottom( void );
#elif defined(CONFIG_SPARC32)
#define PAGE_SHIFT 12
Modified: trunk/openbios-devel/libc/diskio.c
==============================================================================
--- trunk/openbios-devel/libc/diskio.c Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/libc/diskio.c Sun Aug 1 23:25:08 2010 (r830)
@@ -185,7 +185,7 @@
}
int
-seek_io( int fd, llong offs )
+seek_io( int fd, long long offs )
{
priv_fd_t *fdp;
@@ -200,11 +200,11 @@
}
}
-llong
+long long
tell( int fd )
{
priv_fd_t *fdp = file_descriptors[fd];
- llong offs;
+ long long offs;
if( lookup_xt(fdp->ih, "tell", &fdp->tell_xt) )
return -1;
Modified: trunk/openbios-devel/libopenbios/client.c
==============================================================================
--- trunk/openbios-devel/libopenbios/client.c Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/libopenbios/client.c Sun Aug 1 23:25:08 2010 (r830)
@@ -35,7 +35,7 @@
const char *service;
long nargs;
long nret;
- ulong args[PROM_MAX_ARGS];
+ unsigned long args[PROM_MAX_ARGS];
} prom_args_t;
#ifdef DEBUG_CIF
Modified: trunk/openbios-devel/libopenbios/console_common.c
==============================================================================
--- trunk/openbios-devel/libopenbios/console_common.c Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/libopenbios/console_common.c Sun Aug 1 23:25:08 2010 (r830)
@@ -56,13 +56,13 @@
static int
get_conschar( int x, int y )
{
- if( (uint)x < cons.w && (uint)y < cons.h )
+ if( (unsigned int)x < cons.w && (unsigned int)y < cons.h )
return cons.buf[y*cons.w + x];
return ' ';
}
static void
-draw_char( uint h, uint v )
+draw_char( unsigned int h, unsigned int v )
{
const unsigned char *c = fontdata;
int x, y, xx, rskip, m;
@@ -152,7 +152,7 @@
static void
rec_char( int ch, int x, int y )
{
- if( (uint)x < cons.w && (uint)y < cons.h ) {
+ if( (unsigned int)x < cons.w && (unsigned int)y < cons.h ) {
cons.buf[y*cons.w + x] = ch;
draw_char( x, y );
}
@@ -318,8 +318,8 @@
cons.y = cons.vc_par[0];
return;
case 'J':
- if (cons.vc_par[0] == 0 && (uint)cons.y < (uint)cons.h &&
- (uint)cons.x < (uint)cons.w) {
+ if (cons.vc_par[0] == 0 && (unsigned int)cons.y < (unsigned int)cons.h &&
+ (unsigned int)cons.x < (unsigned int)cons.w) {
// erase from cursor to end of display
for (i = cons.x; i < cons.w; i++)
cons.buf[cons.y * cons.w + i] = ' ';
Modified: trunk/openbios-devel/libopenbios/elf_load.c
==============================================================================
--- trunk/openbios-devel/libopenbios/elf_load.c Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/libopenbios/elf_load.c Sun Aug 1 23:25:08 2010 (r830)
@@ -497,8 +497,8 @@
#if DEBUG
debug("filesz: %08lX memsz: %08lX p_offset: %08lX "
"p_vaddr %08lX\n",
- (ulong)phdr[i].p_filesz, (ulong)phdr[i].p_memsz,
- (ulong)phdr[i].p_offset, (ulong)phdr[i].p_vaddr );
+ (unsigned long)phdr[i].p_filesz, (unsigned long)phdr[i].p_memsz,
+ (unsigned long)phdr[i].p_offset, (unsigned long)phdr[i].p_vaddr );
#endif
size = MIN(phdr[i].p_filesz, phdr[i].p_memsz);
Modified: trunk/openbios-devel/packages/cmdline.c
==============================================================================
--- trunk/openbios-devel/packages/cmdline.c Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/packages/cmdline.c Sun Aug 1 23:25:08 2010 (r830)
@@ -382,7 +382,7 @@
pos = n = strlen( buf );
break;
}
- if( (uint)ch < 32 )
+ if( (unsigned int)ch < 32 )
drop = 1;
if( !drop && n < ci->ncol ) {
Modified: trunk/openbios-devel/packages/mac-parts.c
==============================================================================
--- trunk/openbios-devel/packages/mac-parts.c Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/packages/mac-parts.c Sun Aug 1 23:25:08 2010 (r830)
@@ -35,7 +35,7 @@
xt_t seek_xt, read_xt;
ucell offs_hi, offs_lo;
ucell size_hi, size_lo;
- uint blocksize;
+ unsigned int blocksize;
phandle_t filesystem_ph;
} macparts_info_t;
@@ -144,10 +144,10 @@
if (str == NULL || parnum == 0) {
/* According to the spec, partition 0 as well as no arguments means the whole disk */
- offs = (llong)0;
- size = (llong)__be32_to_cpu(dmap.sbBlkCount) * bs;
+ offs = (long long)0;
+ size = (long long)__be32_to_cpu(dmap.sbBlkCount) * bs;
- di->blocksize = (uint)bs;
+ di->blocksize = (unsigned int)bs;
di->offs_hi = offs >> BITS;
di->offs_lo = offs & (ucell) -1;
@@ -177,8 +177,8 @@
if( (__be32_to_cpu(par.pmPartStatus) & kPartitionAUXIsValid) &&
(__be32_to_cpu(par.pmPartStatus) & kPartitionAUXIsAllocated) &&
(__be32_to_cpu(par.pmPartStatus) & kPartitionAUXIsReadable) ) {
- offs = (llong)__be32_to_cpu(par.pmPyPartStart) * bs;
- size = (llong)__be32_to_cpu(par.pmPartBlkCnt) * bs;
+ offs = (long long)__be32_to_cpu(par.pmPyPartStart) * bs;
+ size = (long long)__be32_to_cpu(par.pmPartBlkCnt) * bs;
goto found;
}
@@ -194,8 +194,8 @@
(__be32_to_cpu(par.pmPartStatus) & kPartitionAUXIsAllocated) &&
(__be32_to_cpu(par.pmPartStatus) & kPartitionAUXIsReadable) ) {
- offs = (llong)__be32_to_cpu(par.pmPyPartStart) * bs;
- size = (llong)__be32_to_cpu(par.pmPartBlkCnt) * bs;
+ offs = (long long)__be32_to_cpu(par.pmPyPartStart) * bs;
+ size = (long long)__be32_to_cpu(par.pmPartBlkCnt) * bs;
}
}
@@ -209,12 +209,12 @@
/* If the filename was set to %BOOT, we actually want the bootcode instead */
if (want_bootcode) {
- offs += (llong)__be32_to_cpu(par.pmLgBootStart) * bs;
- size = (llong)__be32_to_cpu(par.pmBootSize);
+ offs += (long long)__be32_to_cpu(par.pmLgBootStart) * bs;
+ size = (long long)__be32_to_cpu(par.pmBootSize);
}
ret = -1;
- di->blocksize = (uint)bs;
+ di->blocksize = (unsigned int)bs;
di->offs_hi = offs >> BITS;
di->offs_lo = offs & (ucell) -1;
@@ -293,8 +293,8 @@
static void
macparts_seek(macparts_info_t *di )
{
- llong pos = DPOP();
- llong offs, size;
+ long long pos = DPOP();
+ long long offs, size;
DPRINTF("macparts_seek %llx:\n", pos);
Modified: trunk/openbios-devel/packages/nvram.c
==============================================================================
--- trunk/openbios-devel/packages/nvram.c Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/packages/nvram.c Sun Aug 1 23:25:08 2010 (r830)
@@ -35,10 +35,10 @@
typedef struct {
- uchar signature;
- uchar checksum;
- uchar len_hi;
- uchar len_lo;
+ unsigned char signature;
+ unsigned char checksum;
+ unsigned char len_hi;
+ unsigned char len_lo;
char name[12];
char data[0];
} nvpart_t;
@@ -225,8 +225,8 @@
/************************************************************************/
typedef struct {
- uint mark_hi;
- uint mark_lo;
+ unsigned int mark_hi;
+ unsigned int mark_lo;
} nvram_ibuf_t;
DECLARE_UNNAMED_NODE( nvram, INSTALL_OPEN, sizeof(nvram_ibuf_t ));
Modified: trunk/openbios-devel/packages/pc-parts.c
==============================================================================
--- trunk/openbios-devel/packages/pc-parts.c Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/packages/pc-parts.c Sun Aug 1 23:25:08 2010 (r830)
@@ -168,11 +168,11 @@
RET( 0 );
}
- offs = (llong)(__le32_to_cpu(p->start_sect)) * bs;
+ offs = (long long)(__le32_to_cpu(p->start_sect)) * bs;
di->offs_hi = offs >> BITS;
di->offs_lo = offs & (ucell) -1;
- size = (llong)(__le32_to_cpu(p->nr_sects)) * bs;
+ size = (long long)(__le32_to_cpu(p->nr_sects)) * bs;
di->size_hi = size >> BITS;
di->size_lo = size & (ucell) -1;
@@ -226,11 +226,11 @@
RET( 0 );
}
- offs = (llong)(cur_table+__le32_to_cpu(p->start_sect)) * bs;
+ offs = (long long)(cur_table+__le32_to_cpu(p->start_sect)) * bs;
di->offs_hi = offs >> BITS;
di->offs_lo = offs & (ucell) -1;
- size = (llong)__le32_to_cpu(p->nr_sects) * bs;
+ size = (long long)__le32_to_cpu(p->nr_sects) * bs;
di->size_hi = size >> BITS;
di->size_lo = size & (ucell) -1;
@@ -332,8 +332,8 @@
static void
pcparts_seek(pcparts_info_t *di )
{
- llong pos = DPOP();
- llong offs, size;
+ long long pos = DPOP();
+ long long offs, size;
DPRINTF("pcparts_seek %llx:\n", pos);
Modified: trunk/openbios-devel/packages/sun-parts.c
==============================================================================
--- trunk/openbios-devel/packages/sun-parts.c Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/packages/sun-parts.c Sun Aug 1 23:25:08 2010 (r830)
@@ -185,18 +185,18 @@
DPRINTF("Selected partition %d\n", parnum);
- offs = (llong)__be32_to_cpu(p->partitions[parnum].start_cylinder) *
+ offs = (long long)__be32_to_cpu(p->partitions[parnum].start_cylinder) *
__be16_to_cpu(p->ntrks) * __be16_to_cpu(p->nsect) * bs;
di->offs_hi = offs >> BITS;
di->offs_lo = offs & (ucell) -1;
- size = (llong)__be32_to_cpu(p->partitions[parnum].num_sectors) * bs;
+ size = (long long)__be32_to_cpu(p->partitions[parnum].num_sectors) * bs;
di->size_hi = size >> BITS;
di->size_lo = size & (ucell) -1;
di->type = __be32_to_cpu(p->infos[parnum].id);
DPRINTF("Found Sun partition, offs %lld size %lld\n",
- (llong)offs, (llong)size);
+ (long long)offs, (long long)size);
/* Probe for filesystem at current offset */
DPRINTF("sun-parts: about to probe for fs\n");
@@ -264,8 +264,8 @@
static void
sunparts_seek(sunparts_info_t *di )
{
- llong pos = DPOP();
- llong offs, size;;
+ long long pos = DPOP();
+ long long offs, size;;
DPRINTF("sunparts_seek %llx:\n", pos);
Modified: trunk/openbios-devel/packages/video.c
==============================================================================
--- trunk/openbios-devel/packages/video.c Sun Aug 1 23:15:14 2010 (r829)
+++ trunk/openbios-devel/packages/video.c Sun Aug 1 23:25:08 2010 (r830)
@@ -31,7 +31,7 @@
static struct {
int has_video;
osi_fb_info_t fb;
- ulong *pal; /* 256 elements */
+ unsigned long *pal; /* 256 elements */
} video;
@@ -83,11 +83,11 @@
for( y=0 ; y<height; y++, pp += video.fb.rb ) {
if( video.fb.depth >= 24 ) {
- ulong *d = (ulong*)pp;
+ unsigned long *d = (unsigned long*)pp;
for( x=0; x<width; x++, p+=3, d++ )
*d = ((int)p[0] << 16) | ((int)p[1] << 8) | p[2];
} else if( video.fb.depth == 15 ) {
- ushort *d = (ushort*)pp;
+ unsigned short *d = (unsigned short*)pp;
for( x=0; x<width; x++, p+=3, d++ ) {
int col = ((int)p[0] << 16) | ((int)p[1] << 8) | p[2];
*d = ((col>>9) & 0x7c00) | ((col>>6) & 0x03e0) | ((col>>3) & 0x1f);
@@ -102,10 +102,10 @@
#endif
}
-static ulong
+static unsigned long
get_color( int col_ind )
{
- ulong col;
+ unsigned long col;
if( !video.has_video || col_ind < 0 || col_ind > 255 )
return 0;
if( video.fb.depth == 8 )
@@ -129,7 +129,7 @@
color = get_color( colind );
if( d >= 24 )
- *((ulong*)p + x) = color;
+ *((unsigned long*)p + x) = color;
else if( d >= 15 )
*((short*)p + x) = color;
else
@@ -140,7 +140,7 @@
fill_rect( int col_ind, int x, int y, int w, int h )
{
char *pp;
- ulong col = get_color(col_ind);
+ unsigned long col = get_color(col_ind);
if( !video.has_video || x < 0 || y < 0 || x+w > video.fb.w || y+h > video.fb.h )
return;
@@ -149,15 +149,15 @@
for( ; h--; pp += video.fb.rb ) {
int ww = w;
if( video.fb.depth == 24 || video.fb.depth == 32 ) {
- ulong *p = (ulong*)pp + x;
+ unsigned long *p = (unsigned long*)pp + x;
while( ww-- )
*p++ = col;
} else if( video.fb.depth == 16 || video.fb.depth == 15 ) {
- ushort *p = (ushort*)pp + x;
+ unsigned short *p = (unsigned short*)pp + x;
while( ww-- )
*p++ = col;
} else {
- char *p = (char *)((ushort*)pp + x);
+ char *p = (char *)((unsigned short*)pp + x);
while( ww-- )
*p++ = col;
@@ -175,7 +175,7 @@
}
void
-set_color( int ind, ulong color )
+set_color( int ind, unsigned long color )
{
if( !video.has_video || ind < 0 || ind > 255 )
return;
@@ -240,11 +240,11 @@
{
int count = POP();
int start = POP();
- uchar *p = (uchar*)POP();
+ unsigned char *p = (unsigned char*)POP();
int i;
for( i=0; i<count; i++, p+=3 ) {
- ulong col = (p[0] << 16) | (p[1] << 8) | p[2];
+ unsigned long col = (p[0] << 16) | (p[1] << 8) | p[2];
set_color( i + start, col );
}
refresh_palette();
@@ -258,7 +258,7 @@
int b = POP();
int g = POP();
int r = POP();
- ulong col = ((r << 16) & 0xff0000) | ((g << 8) & 0x00ff00) | (b & 0xff);
+ unsigned long col = ((r << 16) & 0xff0000) | ((g << 8) & 0x00ff00) | (b & 0xff);
/* printk("color!: %08lx %08lx %08lx %08lx\n", r, g, b, index ); */
set_color( index, col );
refresh_palette();
@@ -327,7 +327,7 @@
set_int_property( ph, "address", video.fb.mphys );
}
video.has_video = 1;
- video.pal = malloc( 256 * sizeof(ulong) );
+ video.pal = malloc( 256 * sizeof(unsigned long) );
#ifdef CONFIG_PPC
s = (video.fb.mphys & 0xfff);
More information about the OpenBIOS
mailing list