Annotation of qemu/roms/SLOF/board-qemu/veth/module_entry.c, revision 1.1.1.2

1.1       root        1: /******************************************************************************
                      2:  * Copyright (c) 2004, 2011 IBM Corporation
                      3:  * All rights reserved.
                      4:  * This program and the accompanying materials
                      5:  * are made available under the terms of the BSD License
                      6:  * which accompanies this distribution, and is available at
                      7:  * http://www.opensource.org/licenses/bsd-license.php
                      8:  *
                      9:  * Contributors:
                     10:  *     IBM Corporation - initial implementation
                     11:  *****************************************************************************/
                     12: 
                     13: #include "netdriver_int.h"
                     14: 
                     15: static void* memset( void *dest, int c, size_t n )
                     16: {
                     17:        while( n-- ) {
                     18:                *( char * ) dest++ = ( char ) c;
                     19:        }
                     20:        return dest;
                     21: }
                     22: 
1.1.1.2 ! root       23: extern char __module_start[];
        !            24: extern char __module_end[];
        !            25: extern char __bss_start[];
        !            26: extern char __bss_end[];
1.1       root       27: 
                     28: extern snk_module_t* veth_module_init(snk_kernel_t *snk_kernel_int,
                     29:                                      vio_config_t *conf);
                     30: 
                     31: snk_module_t* module_init(snk_kernel_t *snk_kernel_int, pci_config_t *pciconf)
                     32: {
1.1.1.2 ! root       33:        long module_size;
1.1       root       34:        vio_config_t      *vioconf  = (vio_config_t *)pciconf;
                     35: 
1.1.1.2 ! root       36:        module_size = __module_end - __module_start;
        !            37:        if (module_size >= 0x800000) {
        !            38:                snk_kernel_int->print("Module size (%llu bytes) is too big!\n",
        !            39:                                      module_size);
1.1       root       40:                return 0;
                     41:        }
1.1.1.2 ! root       42: 
        !            43:        memset(__bss_start, 0, __bss_end - __bss_start);
1.1       root       44: 
                     45:        return veth_module_init(snk_kernel_int, vioconf);
                     46: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.