mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-05 15:15:44 +00:00
2004-03-31 Ralf Corsepius <ralf_corsepius@rtems.org>
* bootloader/misc.c, bootloader/pci.c, console/inch.c, include/bsp.h, pci/pci.c, startup/bspstart.c, startup/sbrk.c: Convert to using c99 fixed size types.
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
2004-03-31 Ralf Corsepius <ralf_corsepius@rtems.org>
|
||||
|
||||
* bootloader/misc.c, bootloader/pci.c, console/inch.c,
|
||||
include/bsp.h, pci/pci.c, startup/bspstart.c, startup/sbrk.c:
|
||||
Convert to using c99 fixed size types.
|
||||
|
||||
2004-03-05 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* bootloader/pci.c: Remove warnings by adding include <string.h>.
|
||||
|
||||
@@ -237,9 +237,9 @@ static int ticks_per_ms=0;
|
||||
|
||||
/* this is from rtems_bsp_delay from libcpu */
|
||||
void
|
||||
boot_udelay(unsigned32 _microseconds)
|
||||
boot_udelay(uint32_t _microseconds)
|
||||
{
|
||||
unsigned32 start, ticks, now;
|
||||
uint32_t start, ticks, now;
|
||||
|
||||
ticks = _microseconds * ticks_per_ms / 1000;
|
||||
CPU_Get_timebase_low( start );
|
||||
|
||||
@@ -1115,9 +1115,9 @@ static void print_pci_info()
|
||||
|
||||
static struct _addr_start
|
||||
{
|
||||
unsigned32 start_pcimem;
|
||||
unsigned32 start_pciio;
|
||||
unsigned32 start_prefetch;
|
||||
uint32_t start_pcimem;
|
||||
uint32_t start_pciio;
|
||||
uint32_t start_prefetch;
|
||||
} astart;
|
||||
|
||||
|
||||
@@ -1180,8 +1180,8 @@ static void recursive_bus_reconfigure( struct pci_bus *pbus )
|
||||
|
||||
{
|
||||
struct _addr_start addrhold;
|
||||
unsigned8 base8, limit8;
|
||||
unsigned16 base16, limit16, ubase16, ulimit16;
|
||||
uint8_t base8, limit8;
|
||||
uint16_t base16, limit16, ubase16, ulimit16;
|
||||
|
||||
/* save the base address values */
|
||||
memcpy( &addrhold, &astart, sizeof(struct _addr_start));
|
||||
@@ -1212,10 +1212,10 @@ static void recursive_bus_reconfigure( struct pci_bus *pbus )
|
||||
}
|
||||
else
|
||||
{
|
||||
base8 = (unsigned8) ((addrhold.start_pciio >> 8) & 0xf0);
|
||||
ubase16 = (unsigned16)(addrhold.start_pciio >> 16);
|
||||
limit8 = (unsigned8) ((astart.start_pciio >> 8 ) & 0xf0);
|
||||
ulimit16 = (unsigned16)(astart.start_pciio >> 16);
|
||||
base8 = (uint8_t) ((addrhold.start_pciio >> 8) & 0xf0);
|
||||
ubase16 = (uint16_t)(addrhold.start_pciio >> 16);
|
||||
limit8 = (uint8_t) ((astart.start_pciio >> 8 ) & 0xf0);
|
||||
ulimit16 = (uint16_t)(astart.start_pciio >> 16);
|
||||
astart.start_pciio += 0x1000;
|
||||
}
|
||||
|
||||
@@ -1240,8 +1240,8 @@ static void recursive_bus_reconfigure( struct pci_bus *pbus )
|
||||
}
|
||||
else
|
||||
{
|
||||
limit16= (unsigned16)((astart.start_pcimem >> 16) & 0xfff0);
|
||||
base16 = (unsigned16)((addrhold.start_pcimem >> 16) & 0xfff0);
|
||||
limit16= (uint16_t)((astart.start_pcimem >> 16) & 0xfff0);
|
||||
base16 = (uint16_t)((addrhold.start_pcimem >> 16) & 0xfff0);
|
||||
astart.start_pcimem += 0x100000;
|
||||
}
|
||||
#ifdef PCI_DEBUG
|
||||
@@ -1261,8 +1261,8 @@ static void recursive_bus_reconfigure( struct pci_bus *pbus )
|
||||
}
|
||||
else
|
||||
{
|
||||
limit16= (unsigned16)((addrhold.start_prefetch >> 16) & 0xfff0);
|
||||
base16 = (unsigned16)((astart.start_prefetch >> 16) & 0xfff0);
|
||||
limit16= (uint16_t)((addrhold.start_prefetch >> 16) & 0xfff0);
|
||||
base16 = (uint16_t)((astart.start_prefetch >> 16) & 0xfff0);
|
||||
astart.start_prefetch -= 0x100000;
|
||||
}
|
||||
#ifdef PCI_DEBUG
|
||||
@@ -1277,10 +1277,10 @@ static void recursive_bus_reconfigure( struct pci_bus *pbus )
|
||||
#endif
|
||||
|
||||
#ifdef WRITE_BRIDGE_ENABLE
|
||||
pcibios_write_config_word(pdev->bus->number, pdev->devfn, PCI_BRIDGE_CONTROL, (unsigned16)( PCI_BRIDGE_CTL_PARITY |
|
||||
pcibios_write_config_word(pdev->bus->number, pdev->devfn, PCI_BRIDGE_CONTROL, (uint16_t)( PCI_BRIDGE_CTL_PARITY |
|
||||
PCI_BRIDGE_CTL_SERR ));
|
||||
|
||||
pcibios_write_config_word(pdev->bus->number, pdev->devfn, PCI_COMMAND, (unsigned16)( PCI_COMMAND_IO |
|
||||
pcibios_write_config_word(pdev->bus->number, pdev->devfn, PCI_COMMAND, (uint16_t)( PCI_COMMAND_IO |
|
||||
PCI_COMMAND_MEMORY |
|
||||
PCI_COMMAND_MASTER |
|
||||
PCI_COMMAND_PARITY |
|
||||
|
||||
@@ -59,9 +59,9 @@ static char shift_map[] =
|
||||
}; /* Keyboard scancode -> character map with SHIFT key modifier. */
|
||||
|
||||
static char kbd_buffer[KBD_BUF_SIZE];
|
||||
static rtems_unsigned16 kbd_first = 0;
|
||||
static rtems_unsigned16 kbd_last = 0;
|
||||
static rtems_unsigned16 kbd_end = KBD_BUF_SIZE - 1;
|
||||
static uint16_t kbd_first = 0;
|
||||
static uint16_t kbd_last = 0;
|
||||
static uint16_t kbd_end = KBD_BUF_SIZE - 1;
|
||||
|
||||
/*-------------------------------------------------------------------------+
|
||||
| Function: _IBMPC_scankey
|
||||
|
||||
@@ -133,20 +133,20 @@ void Install_tm27_vector(void (*_handler)())
|
||||
|
||||
#define Cause_tm27_intr() \
|
||||
do { \
|
||||
unsigned32 _clicks = 8; \
|
||||
uint32_t _clicks = 8; \
|
||||
asm volatile( "mtdec %0" : "=r" ((_clicks)) : "r" ((_clicks)) ); \
|
||||
} while (0)
|
||||
|
||||
|
||||
#define Clear_tm27_intr() \
|
||||
do { \
|
||||
unsigned32 _clicks = 0xffffffff; \
|
||||
uint32_t _clicks = 0xffffffff; \
|
||||
asm volatile( "mtdec %0" : "=r" ((_clicks)) : "r" ((_clicks)) ); \
|
||||
} while (0)
|
||||
|
||||
#define Lower_tm27_intr() \
|
||||
do { \
|
||||
unsigned32 _msr = 0; \
|
||||
uint32_t _msr = 0; \
|
||||
_ISR_Set_level( 0 ); \
|
||||
asm volatile( "mfmsr %0 ;" : "=r" (_msr) : "r" (_msr) ); \
|
||||
_msr |= 0x8002; \
|
||||
|
||||
@@ -282,8 +282,8 @@ struct pcibridge
|
||||
static int FindPCIbridge( int mybus, struct pcibridge *pb )
|
||||
{
|
||||
int pbus, pslot;
|
||||
unsigned8 bussec, buspri;
|
||||
unsigned16 devid, vendorid, dclass;
|
||||
uint8_t bussec, buspri;
|
||||
uint16_t devid, vendorid, dclass;
|
||||
|
||||
for(pbus=0; pbus< BusCountPCI(); pbus++)
|
||||
{
|
||||
@@ -337,7 +337,7 @@ static int FindPCIbridge( int mybus, struct pcibridge *pb )
|
||||
void FixupPCI( const struct _int_map *bspmap, int (*swizzler)(int,int) )
|
||||
{
|
||||
unsigned char cvalue;
|
||||
unsigned16 devid;
|
||||
uint16_t devid;
|
||||
int ismatch, i, j, pbus, pslot, int_pin, int_name;
|
||||
|
||||
/*
|
||||
|
||||
@@ -112,7 +112,7 @@ char *rtems_progname;
|
||||
*/
|
||||
|
||||
void bsp_postdriver_hook(void);
|
||||
void bsp_libc_init( void *, unsigned32, int );
|
||||
void bsp_libc_init( void *, uint32_t, int );
|
||||
|
||||
/*
|
||||
* Function: bsp_pretasking_hook
|
||||
@@ -130,12 +130,12 @@ void bsp_libc_init( void *, unsigned32, int );
|
||||
|
||||
void bsp_pretasking_hook(void)
|
||||
{
|
||||
rtems_unsigned32 heap_start;
|
||||
rtems_unsigned32 heap_size;
|
||||
rtems_unsigned32 heap_sbrk_spared;
|
||||
extern rtems_unsigned32 _bsp_sbrk_init(rtems_unsigned32, rtems_unsigned32*);
|
||||
uint32_t heap_start;
|
||||
uint32_t heap_size;
|
||||
uint32_t heap_sbrk_spared;
|
||||
extern uint32_t _bsp_sbrk_init(uint32_t, uint32_t*);
|
||||
|
||||
heap_start = ((rtems_unsigned32) __rtems_end) +INIT_STACK_SIZE + INTR_STACK_SIZE;
|
||||
heap_start = ((uint32_t) __rtems_end) +INIT_STACK_SIZE + INTR_STACK_SIZE;
|
||||
if (heap_start & (CPU_ALIGNMENT-1))
|
||||
heap_start = (heap_start + CPU_ALIGNMENT) & ~(CPU_ALIGNMENT-1);
|
||||
|
||||
@@ -220,7 +220,7 @@ void bsp_start( void )
|
||||
stack = ((unsigned char*) __rtems_end) + INIT_STACK_SIZE - CPU_MINIMUM_STACK_FRAME_SIZE;
|
||||
|
||||
/* tag the bottom (T. Straumann 6/36/2001 <strauman@slac.stanford.edu>) */
|
||||
*((unsigned32 *)stack) = 0;
|
||||
*((uint32_t*)stack) = 0;
|
||||
|
||||
/*
|
||||
* Initialize the interrupt related settings
|
||||
@@ -232,10 +232,10 @@ void bsp_start( void )
|
||||
intrStack = ((unsigned char*) __rtems_end) + INIT_STACK_SIZE + INTR_STACK_SIZE - CPU_MINIMUM_STACK_FRAME_SIZE;
|
||||
|
||||
/* make sure it's properly aligned */
|
||||
(unsigned32)intrStack &= ~(CPU_STACK_ALIGNMENT-1);
|
||||
(uint32_t)intrStack &= ~(CPU_STACK_ALIGNMENT-1);
|
||||
|
||||
/* tag the bottom (T. Straumann 6/36/2001 <strauman@slac.stanford.edu>) */
|
||||
*((unsigned32 *)intrStack) = 0;
|
||||
*((uint32_t*)intrStack) = 0;
|
||||
|
||||
_write_SPRG1((unsigned int)intrStack);
|
||||
|
||||
|
||||
@@ -27,15 +27,15 @@
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
static rtems_unsigned32 remaining_start=0;
|
||||
static rtems_unsigned32 remaining_size=0;
|
||||
static uint32_t remaining_start=0;
|
||||
static uint32_t remaining_size=0;
|
||||
|
||||
#define LIMIT_32M 0x02000000
|
||||
|
||||
rtems_unsigned32
|
||||
_bsp_sbrk_init(rtems_unsigned32 heap_start, rtems_unsigned32 *heap_size_p)
|
||||
uint32_t
|
||||
_bsp_sbrk_init(uint32_t heap_start, uint32_t *heap_size_p)
|
||||
{
|
||||
rtems_unsigned32 rval=0;
|
||||
uint32_t rval=0;
|
||||
|
||||
remaining_start = heap_start;
|
||||
remaining_size =* heap_size_p;
|
||||
|
||||
Reference in New Issue
Block a user