Changeset 467bf40 in mainline


Ignore:
Timestamp:
2010-12-25T15:13:07Z (14 years ago)
Author:
Vojtech Horky <vojtechhorky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
a465a56, e84d65a
Parents:
ab49a0d (diff), 6eb794a (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

Conflicts: no problem resolving.

Files:
2 added
19 edited

Legend:

Unmodified
Added
Removed
  • .bzrignore

    rab49a0d r467bf40  
    5252./uspace/app/ping/ping
    5353./uspace/app/redir/redir
     54./uspace/app/sysinfo/sysinfo
    5455./uspace/app/sbi/sbi
    5556./uspace/app/stats/stats
  • boot/Makefile.common

    rab49a0d r467bf40  
    144144        $(USPACE_PATH)/app/ping/ping \
    145145        $(USPACE_PATH)/app/stats/stats \
     146        $(USPACE_PATH)/app/sysinfo/sysinfo \
    146147        $(USPACE_PATH)/app/tasks/tasks \
    147148        $(USPACE_PATH)/app/top/top \
  • kernel/arch/amd64/src/amd64.c

    rab49a0d r467bf40  
    199199void arch_post_smp_init(void)
    200200{
     201        /* Currently the only supported platform for amd64 is 'pc'. */
     202        static const char *platform = "pc";
     203
     204        sysinfo_set_item_data("platform", NULL, (void *) platform,
     205            str_size(platform));
     206
    201207#ifdef CONFIG_PC_KBD
    202208        /*
  • kernel/arch/arm32/include/mach/integratorcp/integratorcp.h

    rab49a0d r467bf40  
    106106extern void icp_frame_init(void);
    107107extern size_t icp_get_irq_count(void);
     108extern const char *icp_get_platform_name(void);
    108109
    109110extern struct arm_machine_ops icp_machine_ops;
  • kernel/arch/arm32/include/mach/testarm/testarm.h

    rab49a0d r467bf40  
    7474extern void gxemul_frame_init(void);
    7575extern size_t gxemul_get_irq_count(void);
     76extern const char *gxemul_get_platform_name(void);
    7677
    7778extern struct arm_machine_ops gxemul_machine_ops;
  • kernel/arch/arm32/include/machine_func.h

    rab49a0d r467bf40  
    5656        void (*machine_input_init)(void);
    5757        size_t (*machine_get_irq_count)(void);
     58        const char *(*machine_get_platform_name)(void);
    5859};
    5960
  • kernel/arch/arm32/src/mach/gta02/gta02.c

    rab49a0d r467bf40  
    7171static void gta02_input_init(void);
    7272static size_t gta02_get_irq_count(void);
     73static const char *gta02_get_platform_name(void);
    7374
    7475static void gta02_timer_irq_init(void);
     
    9293        gta02_output_init,
    9394        gta02_input_init,
    94         gta02_get_irq_count
     95        gta02_get_irq_count,
     96        gta02_get_platform_name
    9597};
    9698
     
    235237}
    236238
     239const char *gta02_get_platform_name(void)
     240{
     241        return "gta02";
     242}
     243
    237244static void gta02_timer_irq_init(void)
    238245{
  • kernel/arch/arm32/src/mach/integratorcp/integratorcp.c

    rab49a0d r467bf40  
    6565        icp_output_init,
    6666        icp_input_init,
    67         icp_get_irq_count
     67        icp_get_irq_count,
     68        icp_get_platform_name
    6869};
    6970
     
    342343}
    343344
     345const char *icp_get_platform_name(void)
     346{
     347        return "integratorcp";
     348}
     349
    344350/** @}
    345351 */
  • kernel/arch/arm32/src/mach/testarm/testarm.c

    rab49a0d r467bf40  
    6565        gxemul_output_init,
    6666        gxemul_input_init,
    67         gxemul_get_irq_count
     67        gxemul_get_irq_count,
     68        gxemul_get_platform_name
    6869};
    6970
     
    132133}
    133134
     135const char *gxemul_get_platform_name(void)
     136{
     137        return "gxemul";
     138}
     139
    134140/** Starts gxemul Real Time Clock device, which asserts regular interrupts.
    135141 *
  • kernel/arch/ia32/src/ia32.c

    rab49a0d r467bf40  
    157157void arch_post_smp_init(void)
    158158{
     159        /* Currently the only supported platform for ia32 is 'pc'. */
     160        static const char *platform = "pc";
     161
     162        sysinfo_set_item_data("platform", NULL, (void *) platform,
     163            str_size(platform));
     164
    159165#ifdef CONFIG_PC_KBD
    160166        /*
  • kernel/arch/ia64/src/ia64.c

    rab49a0d r467bf40  
    147147void arch_post_smp_init(void)
    148148{
     149        static const char *platform;
     150
     151        /* Set platform name. */
     152#ifdef MACHINE_ski
     153        platform = "pc";
     154#endif
     155#ifdef MACHINE_i460GX
     156        platform = "i460GX";
     157#endif
     158        sysinfo_set_item_data("platform", NULL, (void *) platform,
     159            str_size(platform));
     160
    149161#ifdef MACHINE_ski
    150162        ski_instance_t *ski_instance = skiin_init();
  • kernel/arch/mips32/src/mips32.c

    rab49a0d r467bf40  
    168168void arch_post_smp_init(void)
    169169{
     170        static const char *platform;
     171
     172        /* Set platform name. */
     173#ifdef MACHINE_msim
     174        platform = "msim";
     175#endif
     176#ifdef MACHINE_bgxemul
     177        platform = "gxemul";
     178#endif
     179#ifdef MACHINE_lgxemul
     180        platform = "gxemul";
     181#endif
     182        sysinfo_set_item_data("platform", NULL, (void *) platform,
     183            str_size(platform));
     184
    170185#ifdef CONFIG_MIPS_KBD
    171186        /*
  • kernel/arch/ppc32/src/ppc32.c

    rab49a0d r467bf40  
    249249void arch_post_smp_init(void)
    250250{
     251        /* Currently the only supported platform for ppc32 is 'mac'. */
     252        static const char *platform = "mac";
     253
     254        sysinfo_set_item_data("platform", NULL, (void *) platform,
     255            str_size(platform));
     256
    251257        ofw_tree_walk_by_device_type("mac-io", macio_register, NULL);
    252258}
  • kernel/arch/sparc64/src/sun4u/sparc64.c

    rab49a0d r467bf40  
    5050#include <ddi/irq.h>
    5151#include <str.h>
     52#include <sysinfo/sysinfo.h>
    5253
    5354memmap_t memmap;
     
    111112void arch_post_smp_init(void)
    112113{
     114        /* Currently the only supported platform for sparc64/sun4u is 'sun4u'. */
     115        static const char *platform = "sun4u";
     116
     117        sysinfo_set_item_data("platform", NULL, (void *) platform,
     118            str_size(platform));
     119
    113120        standalone_sparc64_console_init();
    114121}
  • kernel/arch/sparc64/src/sun4v/sparc64.c

    rab49a0d r467bf40  
    5252#include <str.h>
    5353#include <arch/drivers/niagara.h>
     54#include <sysinfo/sysinfo.h>
    5455
    5556memmap_t memmap;
     
    109110void arch_post_smp_init(void)
    110111{
     112        /* Currently the only supported platform for sparc64/sun4v is 'sun4v'. */
     113        static const char *platform = "sun4v";
     114
     115        sysinfo_set_item_data("platform", NULL, (void *) platform,
     116            str_size(platform));
     117
    111118        niagarain_init();
    112119}
  • uspace/Makefile

    rab49a0d r467bf40  
    5555        app/nettest2 \
    5656        app/ping \
     57        app/sysinfo \
    5758        srv/clip \
    5859        srv/devmap \
  • uspace/drv/root/root.c

    rab49a0d r467bf40  
    4747#include <macros.h>
    4848#include <inttypes.h>
     49#include <sysinfo.h>
    4950
    5051#include <driver.h>
     
    5556
    5657#define PLATFORM_DEVICE_NAME "hw"
    57 #define PLATFORM_DEVICE_MATCH_ID STRING(UARCH)
     58#define PLATFORM_DEVICE_MATCH_ID_FMT "platform/%s"
    5859#define PLATFORM_DEVICE_MATCH_SCORE 100
    5960
     
    100101static int add_platform_child(device_t *parent)
    101102{
     103        char *match_id;
     104        char *platform;
     105        size_t platform_size;
     106        int res;
     107
     108        /* Get platform name from sysinfo. */
     109
     110        platform = sysinfo_get_data("platform", &platform_size);
     111        if (platform == NULL) {
     112                printf(NAME ": Failed to obtain platform name.\n");
     113                return ENOENT;
     114        }
     115
     116        /* Null-terminate string. */
     117        platform = realloc(platform, platform_size + 1);
     118        if (platform == NULL) {
     119                printf(NAME ": Memory allocation failed.\n");
     120                return ENOMEM;
     121        }
     122
     123        platform[platform_size] = '\0';
     124
     125        /* Construct match ID. */
     126
     127        if (asprintf(&match_id, PLATFORM_DEVICE_MATCH_ID_FMT, platform) == -1) {
     128                printf(NAME ": Memory allocation failed.\n");
     129                return ENOMEM;
     130        }
     131
     132        /* Add child. */
     133
    102134        printf(NAME ": adding new child for platform device.\n");
    103135        printf(NAME ":   device node is `%s' (%d %s)\n", PLATFORM_DEVICE_NAME,
    104             PLATFORM_DEVICE_MATCH_SCORE, PLATFORM_DEVICE_MATCH_ID);
    105        
    106         int res = child_device_register_wrapper(parent, PLATFORM_DEVICE_NAME,
    107             PLATFORM_DEVICE_MATCH_ID, PLATFORM_DEVICE_MATCH_SCORE,
    108             NULL);
     136            PLATFORM_DEVICE_MATCH_SCORE, match_id);
     137
     138        res = child_device_register_wrapper(parent, PLATFORM_DEVICE_NAME,
     139            match_id, PLATFORM_DEVICE_MATCH_SCORE, NULL);
    109140
    110141        return res;
  • uspace/drv/rootpc/rootpc.c

    rab49a0d r467bf40  
    2828
    2929/**
    30  * @defgroup root_pc Root HW device driver for ia32 and amd64 platform.
    31  * @brief HelenOS root HW device driver for ia32 and amd64 platform.
     30 * @defgroup root_pc PC platform driver.
     31 * @brief HelenOS PC platform driver.
    3232 * @{
    3333 */
     
    182182        /* Register child devices. */
    183183        if (!rootpc_add_children(dev)) {
    184                 printf(NAME ": failed to add child devices for platform "
    185                     "ia32.\n");
     184                printf(NAME ": failed to add child devices for PC platform.\n");
    186185        }
    187186       
     
    196195int main(int argc, char *argv[])
    197196{
    198         printf(NAME ": HelenOS rootpc device driver\n");
     197        printf(NAME ": HelenOS PC platform driver\n");
    199198        root_pc_init();
    200199        return driver_main(&rootpc_driver);
  • uspace/drv/rootpc/rootpc.ma

    rab49a0d r467bf40  
    1 10 ia32
    2 10 amd64
     110 platform/pc
Note: See TracChangeset for help on using the changeset viewer.