Changeset bfd7aac in mainline for uspace/srv


Ignore:
Timestamp:
2010-02-17T19:19:08Z (16 years ago)
Author:
Lukas Mejdrech <lukasmejdrech@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
1e2e0c1e
Parents:
01a9ef5 (diff), b8da2a3 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

Location:
uspace/srv
Files:
6 added
14 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/hid/fb/Makefile.build

    r01a9ef5 rbfd7aac  
    7272
    7373ifeq ($(UARCH),sparc64)
    74         SOURCES += sgcn.c \
    75                 serial_console.c
    76         CFLAGS += -DSGCN_ENABLED
     74        ifeq ($(PROCESSOR), sun4v)
     75                SOURCES += niagara.c \
     76                        serial_console.c
     77                CFLAGS += -DNIAGARA_ENABLED
     78        endif
     79
     80        ifeq ($(MACHINE), serengeti)
     81                SOURCES += sgcn.c \
     82                        serial_console.c
     83                CFLAGS += -DSGCN_ENABLED
     84        endif
    7785endif
    7886
  • uspace/srv/hid/fb/main.c

    r01a9ef5 rbfd7aac  
    4141#include "ski.h"
    4242#include "sgcn.h"
     43#include "niagara.h"
    4344#include "main.h"
    4445
     
    8889        }
    8990#endif
     91#ifdef NIAGARA_ENABLED
     92        if ((!initialized) && (sysinfo_value("fb.kind") == 5)) {
     93                if (niagara_init() == 0)
     94                        initialized = true;
     95        }
     96#endif
    9097#ifdef SKI_ENABLED
    9198        if ((!initialized) && (sysinfo_value("fb") != true)) {
  • uspace/srv/hid/kbd/Makefile.build

    r01a9ef5 rbfd7aac  
    130130
    131131ifeq ($(UARCH),sparc64)
    132         ifeq ($(MACHINE),serengeti)
     132        ifeq ($(PROCESSOR),sun4v)
    133133                SOURCES += \
    134                         port/sgcn.c \
     134                        port/niagara.c \
    135135                        ctl/stty.c
    136136        else
    137                 SOURCES += \
     137                ifeq ($(MACHINE),serengeti)
     138                        SOURCES += \
     139                                port/sgcn.c \
     140                                ctl/stty.c
     141                endif
     142                ifeq ($(MACHINE),generic)
     143                        SOURCES += \
    138144                        port/sun.c \
    139145                        port/z8530.c \
    140146                        port/ns16550.c \
    141147                        ctl/sun.c
     148                endif
    142149        endif
     150endif
     151
     152ifeq ($(UARCH),abs32le)
     153        SOURCES += \
     154                port/dummy.c \
     155                ctl/pc.c
    143156endif
    144157
  • uspace/srv/loader/include/arch.h

    r01a9ef5 rbfd7aac  
    3737#define LOADER_ARCH_H_
    3838
    39 void program_run(void *entry_point, void *pcb);
     39extern void program_run(void *entry_point, void *pcb);
    4040
    4141#endif
  • uspace/srv/net/Makefile.module

    r01a9ef5 rbfd7aac  
    3535
    3636CFLAGS += -Iinclude -I../libadt/include
     37CFLAGS += -Wno-strict-aliasing
    3738
    3839CHECK_CFLAGS = -fsyntax-only -Wextra -Wno-div-by-zero -Wsystem-headers -Wfloat-equal -Wdeclaration-after-statement -Wundef -Wno-endif-labels -Wshadow -Wlarger-than-1500 -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Wsign-compare -Waggregate-return -Wstrict-prototypes -Wold-style-definition -Wmissing-prototypes -Wmissing-declarations -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-format-attribute -Wno-multichar -Wno-deprecated-declarations -Wpacked -Wpadded -Wredundant-decls -Wnested-externs -Wunreachable-code -Winline -Winvalid-pch -Wlong-long -Wvariadic-macros -Wdisabled-optimization -Wno-pointer-sign
  • uspace/srv/net/include/byteorder.h

    r01a9ef5 rbfd7aac  
    3939
    4040#include <byteorder.h>
    41 
    4241#include <sys/types.h>
    4342
    44 #ifdef ARCH_IS_BIG_ENDIAN
    4543
    46 // Already in the network byte order.
     44/** Converts the given short number ( 16 bit ) from the host byte order to the network byte order ( big endian ).
     45 *  @param[in] number The number in the host byte order to be converted.
     46 *  @returns The number in the network byte order.
     47 */
     48#define htons( number )         host2uint16_t_be( number )
    4749
    48         /** Converts the given short number ( 16 bit ) from the host byte order to the network byte order ( big endian ).
    49         *  @param[in] number The number in the host byte order to be converted.
    50         *  @returns The number in the network byte order.
    51         */
    52         #define htons( number )         ( number )
     50/** Converts the given long number ( 32 bit ) from the host byte order to the network byte order ( big endian ).
     51 *  @param[in] number The number in the host byte order to be converted.
     52 *  @returns The number in the network byte order.
     53 */
     54#define htonl( number )         host2uint32_t_be( number )
    5355
    54         /** Converts the given long number ( 32 bit ) from the host byte order to the network byte order ( big endian ).
    55          *  @param[in] number The number in the host byte order to be converted.
    56          *  @returns The number in the network byte order.
    57         */
    58         #define htonl( number )         ( number )
     56/** Converts the given short number ( 16 bit ) from the network byte order ( big endian ) to the host byte order.
     57 *  @param[in] number The number in the network byte order to be converted.
     58 *  @returns The number in the host byte order.
     59 */
     60#define ntohs( number )         uint16_t_be2host( number )
    5961
    60         /** Converts the given short number ( 16 bit ) from the network byte order ( big endian ) to the host byte order.
    61          *  @param[in] number The number in the network byte order to be converted.
    62          *  @returns The number in the host byte order.
    63          */
    64         #define ntohs( number )         ( number )
    65 
    66         /** Converts the given long number ( 32 bit ) from the network byte order ( big endian ) to the host byte order.
    67          *  @param[in] number The number in the network byte order to be converted.
    68          *  @returns The number in the host byte order.
    69          */
    70         #define ntohl( number )         ( number )
    71 
    72 #else
    73 
    74 // Has to be swapped.
    75 
    76         /** Converts the given short number ( 16 bit ) from the host byte order to the network byte order ( big endian ).
    77          *  @param[in] number The number in the host byte order to be converted.
    78          *  @returns The number in the network byte order.
    79          */
    80         #define htons( number )         uint16_t_byteorder_swap(( uint16_t )( number ))
    81 
    82         /** Converts the given long number ( 32 bit ) from the host byte order to the network byte order ( big endian ).
    83          *  @param[in] number The number in the host byte order to be converted.
    84          *  @returns The number in the network byte order.
    85          */
    86         #define htonl( number )         uint32_t_byteorder_swap( number )
    87 
    88         /** Converts the given short number ( 16 bit ) from the network byte order ( big endian ) to the host byte order.
    89          *  @param[in] number The number in the network byte order to be converted.
    90          *  @returns The number in the host byte order.
    91          */
    92         #define ntohs( number )         uint16_t_byteorder_swap(( uint16_t )( number ))
    93 
    94         /** Converts the given long number ( 32 bit ) from the network byte order ( big endian ) to the host byte order.
    95          *  @param[in] number The number in the network byte order to be converted.
    96          *  @returns The number in the host byte order.
    97          */
    98         #define ntohl( number )         uint32_t_byteorder_swap( number )
    99 
    100 #endif
     62/** Converts the given long number ( 32 bit ) from the network byte order ( big endian ) to the host byte order.
     63 *  @param[in] number The number in the network byte order to be converted.
     64 *  @returns The number in the host byte order.
     65 */
     66#define ntohl( number )         uint32_t_be2host( number )
    10167
    10268#endif
  • uspace/srv/net/modules.c

    r01a9ef5 rbfd7aac  
    5555
    5656int connect_to_service_timeout( services_t need, suseconds_t timeout ){
    57         int     phone;
    58         int     res;
     57        ipcarg_t phone;
     58        int res;
    5959
    6060        while( true ){
    61                 res = async_req_3_5( PHONE_NS, IPC_M_CONNECT_ME_TO, need, 0, 0, NULL, NULL, NULL, NULL, ( ipcarg_t * ) & phone );
    62                 if(( res >= 0 ) && ( phone >= 0 )){
     61                res = async_req_3_5( PHONE_NS, IPC_M_CONNECT_ME_TO, need, 0, 0, NULL, NULL, NULL, NULL, & phone );
     62                if( res >= 0 ){
    6363                        return phone;
    6464                }
  • uspace/srv/net/netif/dp8390/dp8390.h

    r01a9ef5 rbfd7aac  
    353353        port_t de_data_port;
    354354        int de_16bit;
    355         int de_ramsize;
     355        long de_ramsize;
    356356        int de_offset_page;
    357357        int de_startpage;
  • uspace/srv/net/netif/dp8390/dp8390_module.c

    r01a9ef5 rbfd7aac  
    208208}
    209209
    210 int netif_probe_message( device_id_t device_id, int irq, int io ){
     210int netif_probe_message( device_id_t device_id, int irq, uintptr_t io ){
    211211        ERROR_DECLARE;
    212212
     
    280280        if( device->state != NETIF_ACTIVE ){
    281281                dep = ( dpeth_t * ) device->specific;
    282                 dp8390_cmds[ 0 ].addr = ( void * ) ( uint32_t ) ( dep->de_dp8390_port + DP_ISR );
     282                dp8390_cmds[ 0 ].addr = ( void * ) ( uintptr_t ) ( dep->de_dp8390_port + DP_ISR );
    283283                dp8390_cmds[ 2 ].addr = dp8390_cmds[ 0 ].addr;
    284284                ERROR_PROPAGATE( ipc_register_irq( dep->de_irq, device->device_id, device->device_id, & dp8390_code ));
  • uspace/srv/net/netif/dp8390/dp8390_port.h

    r01a9ef5 rbfd7aac  
    169169/** Type definition of a port.
    170170 */
    171 typedef int port_t;
     171typedef long port_t;
    172172
    173173/* dl_eth.h */
     
    256256/** Type definition of the virtual addresses and lengths in bytes.
    257257 */
    258 typedef unsigned int vir_bytes;
     258typedef unsigned long vir_bytes;
    259259
    260260/** Type definition of the input/output vector.
  • uspace/srv/net/netif/lo/lo.c

    r01a9ef5 rbfd7aac  
    165165}
    166166
    167 int netif_probe_message( device_id_t device_id, int irq, int io ){
     167int netif_probe_message( device_id_t device_id, int irq, uintptr_t io ){
    168168        ERROR_DECLARE;
    169169
  • uspace/srv/net/netif/netif_module.h

    r01a9ef5 rbfd7aac  
    6060 *  @returns Other error codes as defined for the specific module message implementation.
    6161 */
    62 int     netif_probe_message( device_id_t device_id, int irq, int io );
     62int     netif_probe_message( device_id_t device_id, int irq, uintptr_t io );
    6363
    6464/** Sends the packet queue.
  • uspace/srv/net/socket/socket_client.c

    r01a9ef5 rbfd7aac  
    541541        socket_ref              new_socket;
    542542        aid_t                   message_id;
    543         int                             result;
     543        ipcarg_t                ipc_result;
     544        int                     result;
    544545        ipc_call_t              answer;
    545546
     
    592593        ipc_data_read_start( socket->phone, cliaddr, * addrlen );
    593594        fibril_rwlock_write_unlock( & socket_globals.lock );
    594         async_wait_for( message_id, ( ipcarg_t * ) & result );
     595        async_wait_for( message_id, & ipc_result );
     596        result = (int) ipc_result;
    595597        if( result > 0 ){
    596598                if( result != socket_id ){
     
    734736        socket_ref              socket;
    735737        aid_t                   message_id;
    736         int                             result;
     738        ipcarg_t                ipc_result;
     739        int                     result;
    737740        size_t                  fragments;
    738741        size_t *                lengths;
     
    793796                }
    794797        }
    795         async_wait_for( message_id, ( ipcarg_t * ) & result );
     798        async_wait_for( message_id, & ipc_result );
     799        result = (int) ipc_result;
    796800        // if successful
    797801        if( result == EOK ){
  • uspace/srv/net/structures/packet/packet_remote.c

    r01a9ef5 rbfd7aac  
    6565        ERROR_DECLARE;
    6666
    67         unsigned int            size;
     67        ipcarg_t                        size;
    6868        packet_t                        next;
    6969
     
    101101        ERROR_DECLARE;
    102102
    103         packet_id_t     packet_id;
    104         unsigned int size;
     103        ipcarg_t packet_id;
     104        ipcarg_t size;
    105105        packet_t packet;
    106106
    107         if( ERROR_OCCURRED( async_req_4_2( phone, NET_PACKET_CREATE_4, max_content, addr_len, max_prefix, max_suffix, ( ipcarg_t * ) & packet_id, & size ))){
     107        if( ERROR_OCCURRED( async_req_4_2( phone, NET_PACKET_CREATE_4, max_content, addr_len, max_prefix, max_suffix, & packet_id, & size ))){
    108108                return NULL;
    109109        }
     
    120120        ERROR_DECLARE;
    121121
    122         packet_id_t     packet_id;
    123         unsigned int    size;
     122        ipcarg_t        packet_id;
     123        ipcarg_t        size;
    124124        packet_t        packet;
    125125
    126         if( ERROR_OCCURRED( async_req_1_2( phone, NET_PACKET_CREATE_1, content, ( ipcarg_t * ) & packet_id, & size ))){
     126        if( ERROR_OCCURRED( async_req_1_2( phone, NET_PACKET_CREATE_1, content, & packet_id, & size ))){
    127127                return NULL;
    128128        }
Note: See TracChangeset for help on using the changeset viewer.