Changes in / [37b1651d:4c7c251] in mainline


Ignore:
Files:
1 deleted
12 edited

Legend:

Unmodified
Added
Removed
  • Makefile

    r37b1651d r4c7c251  
    4242CONFIG_HEADER = config.h
    4343
    44 .PHONY: all precheck cscope autotool config_auto config_default config distclean clean check distfile dist
     44.PHONY: all precheck cscope autotool config_auto config_default config distclean clean check
    4545
    4646all: $(COMMON_MAKEFILE) $(COMMON_HEADER) $(CONFIG_MAKEFILE) $(CONFIG_HEADER)
     
    6464endif
    6565
    66 # Autotool (detects compiler features)
    67 
    6866$(COMMON_MAKEFILE): autotool
    6967$(COMMON_HEADER): autotool
     
    7270        $(AUTOTOOL)
    7371        -[ -f $(COMMON_HEADER_PREV) ] && diff -q $(COMMON_HEADER_PREV) $(COMMON_HEADER) && mv -f $(COMMON_HEADER_PREV) $(COMMON_HEADER)
    74 
    75 # Build-time configuration
    7672
    7773$(CONFIG_MAKEFILE): config_default
     
    8884        $(CONFIG) $<
    8985
    90 # Distribution files
    91 
    92 distfile: all
    93         $(MAKE) -C dist distfile
    94 
    95 dist:
    96         $(MAKE) -C dist dist
    97 
    98 # Cleaning
    99 
    10086distclean: clean
    101         rm -f $(CSCOPE).out $(COMMON_MAKEFILE) $(COMMON_HEADER) $(COMMON_HEADER_PREV) $(CONFIG_MAKEFILE) $(CONFIG_HEADER) tools/*.pyc tools/checkers/*.pyc dist/HelenOS-*
     87        rm -f $(CSCOPE).out $(COMMON_MAKEFILE) $(COMMON_HEADER) $(COMMON_HEADER_PREV) $(CONFIG_MAKEFILE) $(CONFIG_HEADER) tools/*.pyc tools/checkers/*.pyc
    10288
    10389clean:
  • boot/arch/sparc64/include/arch.h

    r37b1651d r4c7c251  
    4141#define STACK_BIAS                   2047
    4242#define STACK_WINDOW_SAVE_AREA_SIZE  (16 * 8)
    43 #define STACK_ARG_SAVE_AREA_SIZE     (6 * 8)
    4443
    4544#define NWINDOWS  8
  • boot/arch/sparc64/src/asm.S

    r37b1651d r4c7c251  
    152152.global ofw
    153153ofw:
    154         save %sp, -(STACK_WINDOW_SAVE_AREA_SIZE + STACK_ARG_SAVE_AREA_SIZE), %sp
     154        save %sp, -STACK_WINDOW_SAVE_AREA_SIZE, %sp
    155155        set ofw_cif, %l0
    156156        ldx [%l0], %l0
  • boot/arch/sparc64/src/main.c

    r37b1651d r4c7c251  
    190190        bootinfo.memmap.zones[0].start += OBP_BIAS;
    191191        bootinfo.memmap.zones[0].size -= OBP_BIAS;
    192         bootinfo.memmap.total -= OBP_BIAS;
    193192}
    194193
     
    205204        bootinfo.physmem_start = ofw_get_physmem_start();
    206205        ofw_memmap(&bootinfo.memmap);
    207 
    208         if (arch == ARCH_SUN4V)
    209                 sun4v_fixups();
    210206       
    211207        void *bootinfo_pa = ofw_translate(&bootinfo);
     
    257253               
    258254                /*
    259                  * At this point, we claim and map the physical memory that we
    260                  * are going to use. We should be safe in case of the virtual
     255                 * At this point, we claim the physical memory that we are
     256                 * going to use. We should be safe in case of the virtual
    261257                 * address space because the OpenFirmware, according to its
    262                  * SPARC binding, should restrict its use of virtual memory to
    263                  * addresses from [0xffd00000; 0xffefffff] and [0xfe000000;
    264                  * 0xfeffffff].
     258                 * SPARC binding, should restrict its use of virtual memory
     259                 * to addresses from [0xffd00000; 0xffefffff] and
     260                 * [0xfe000000; 0xfeffffff].
     261                 *
     262                 * We don't map this piece of memory. We simply rely on
     263                 * SILO to have it done for us already in this case.
     264                 *
     265                 * XXX SILO only maps 8 MB for us here. We should improve
     266                 *     this code to be totally independent on the behavior
     267                 *     of SILO.
     268                 *
    265269                 */
    266270                ofw_claim_phys(bootinfo.physmem_start + dest[i - 1],
    267271                    ALIGN_UP(components[i - 1].inflated, PAGE_SIZE));
    268                
    269                 ofw_map(bootinfo.physmem_start + dest[i - 1], dest[i - 1],
    270                     ALIGN_UP(components[i - 1].inflated, PAGE_SIZE), -1);
    271272               
    272273                int err = inflate(components[i - 1].start, components[i - 1].size,
     
    303304                sun4u_smp();
    304305       
     306        if (arch == ARCH_SUN4V)
     307                sun4v_fixups();
     308       
    305309        printf("Booting the kernel ...\n");
    306310        jump_to_kernel(bootinfo.physmem_start | BSP_PROCESSOR, &bootinfo, subarch,
  • boot/generic/src/balloc.c

    r37b1651d r4c7c251  
    6565void *balloc_rebase(void *ptr)
    6666{
    67         return (void *) (((uintptr_t) ptr - phys_base) + ballocs->base);
     67        return (void *) ((uintptr_t) ptr - phys_base + ballocs->base);
    6868}
  • kernel/arch/sparc64/src/sun4v/asm.S

    r37b1651d r4c7c251  
    4141.global switch_to_userspace
    4242switch_to_userspace:
    43         save %o1, -(STACK_WINDOW_SAVE_AREA_SIZE + STACK_ARG_SAVE_AREA_SIZE), %sp
     43        wrpr PSTATE_PRIV_BIT, %pstate
     44        save %o1, -STACK_WINDOW_SAVE_AREA_SIZE, %sp
    4445        flushw
    4546        wrpr %g0, 0, %cleanwin          ! avoid information leak
  • tools/toolchain.sh

    r37b1651d r4c7c251  
    2828# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2929#
    30 
    31 GMP_MAIN=<<EOF
    32 #define GCC_GMP_VERSION_NUM(a, b, c) \
    33         (((a) << 16L) | ((b) << 8) | (c))
    34 
    35 #define GCC_GMP_VERSION \
    36         GCC_GMP_VERSION_NUM(__GNU_MP_VERSION, __GNU_MP_VERSION_MINOR, __GNU_MP_VERSION_PATCHLEVEL)
    37 
    38 #if GCC_GMP_VERSION < GCC_GMP_VERSION_NUM(4,3,2)
    39         choke me
    40 #endif
    41 EOF
    42 
    43 MPFR_MAIN=<<EOF
    44 #if MPFR_VERSION < MPFR_VERSION_NUM(2, 4, 2)
    45 choke me
    46         #endif
    47 EOF
    48 
    49 MPC_MAIN=<<EOF
    50 #if MPC_VERSION < MPC_VERSION_NUM(0, 8, 1)
    51         choke me
    52 #endif
    53 EOF
    54 
    55 #
    56 # Check if the library described in the argument
    57 # exists and has acceptable version.
    58 #
    59 check_dependency() {
    60         DEPENDENCY="$1"
    61         HEADER="$2"
    62         BODY="$3"
    63        
    64         FNAME="/tmp/conftest-$$"
    65        
    66         echo "#include ${HEADER}" > "${FNAME}.c"
    67         echo >> "${FNAME}.c"
    68         echo "int main()" >> "${FNAME}.c"
    69         echo "{" >> "${FNAME}.c"
    70         echo "${BODY}" >> "${FNAME}.c"
    71         echo "  return 0;" >> "${FNAME}.c"
    72         echo "}" >> "${FNAME}.c"
    73        
    74         cc -c -o "${FNAME}.o" "${FNAME}.c" 2> "${FNAME}.log"
    75         RC="$?"
    76        
    77         if [ "$RC" -ne "0" ] ; then
    78                 echo " ${DEPENDENCY} not found, too old or compiler error."
    79                 echo " Please recheck manually the source file \"${FNAME}.c\"."
    80                 echo " The compilation of the toolchain is probably going to fail,"
    81                 echo " you have been warned."
    82                 echo
    83                 echo " ===== Compiler output ====="
    84                 cat "${FNAME}.log"
    85                 echo " ==========================="
    86                 echo
    87         else
    88                 echo " ${DEPENDENCY} found"
    89                 rm -f "${FNAME}.log" "${FNAME}.o" "${FNAME}.c"
    90         fi
    91 }
    92 
    93 check_dependecies() {
    94         echo ">>> Basic dependency check"
    95         check_dependency "GMP" "<gmp.h>" "${GMP_MAIN}"
    96         check_dependency "MPFR" "<mpfr.h>" "${MPFR_MAIN}"
    97         check_dependency "MPC" "<mpc.h>" "${MPC_MAIN}"
    98         echo
    99 }
    10030
    10131check_error() {
     
    13969        echo " sparc64    SPARC V9"
    14070        echo " all        build all targets"
    141         echo
    142         echo "The toolchain will be installed to the directory specified by"
    143         echo "the CROSS_PREFIX environment variable. If the variable is not"
    144         echo "defined, /usr/local will be used by default."
    14571        echo
    14672       
     
    192118        echo " - native C library with headers"
    193119        echo
     120       
     121        show_countdown 10
    194122}
    195123
     
    353281
    354282show_dependencies
    355 check_dependecies
    356 show_countdown 10
    357283
    358284case "$1" in
  • uspace/app/bdsh/cmds/modules/mount/mount.c

    r37b1651d r4c7c251  
    3131#include <vfs/vfs.h>
    3232#include <errno.h>
    33 #include <getopt.h>
    3433#include "config.h"
    3534#include "util.h"
     
    4140static const char *cmdname = "mount";
    4241
    43 static struct option const long_options[] = {
    44         { "help", no_argument, 0, 'h' },
    45         { 0, 0, 0, 0 }
    46 };
    47 
    48 
    49 /* Displays help for mount in various levels */
     42/* Dispays help for mount in various levels */
    5043void help_cmd_mount(unsigned int level)
    5144{
     
    6659        unsigned int argc;
    6760        const char *mopts = "";
    68         int rc, c, opt_ind;
     61        int rc;
    6962
    7063        argc = cli_count_args(argv);
    7164
    72         for (c = 0, optind = 0, opt_ind = 0; c != -1;) {
    73                 c = getopt_long(argc, argv, "h", long_options, &opt_ind);
    74                 switch (c) {
    75                 case 'h':
    76                         help_cmd_mount(HELP_LONG);
    77                         return CMD_SUCCESS;
    78                 }
    79         }
    80 
    8165        if ((argc < 4) || (argc > 5)) {
    82                 printf("%s: invalid number of arguments. Try `mount --help'\n",
     66                printf("%s: invalid number of arguments.\n",
    8367                    cmdname);
    8468                return CMD_FAILURE;
  • uspace/lib/c/generic/loader.c

    r37b1651d r4c7c251  
    160160        int rc = async_data_write_start(ldr->phone_id, (void *) pa, pa_len);
    161161        if (rc != EOK) {
    162                 free(pa);
    163162                async_wait_for(req, NULL);
    164163                return rc;
  • uspace/lib/c/generic/vfs/vfs.c

    r37b1651d r4c7c251  
    6969        char *ncwd_path;
    7070        char *ncwd_path_nc;
    71         size_t total_size;
    7271
    7372        fibril_mutex_lock(&cwd_mutex);
     
    7877                        return NULL;
    7978                }
    80                 total_size = cwd_size + 1 + size + 1;
    81                 ncwd_path_nc = malloc(total_size);
     79                ncwd_path_nc = malloc(cwd_size + 1 + size + 1);
    8280                if (!ncwd_path_nc) {
    8381                        fibril_mutex_unlock(&cwd_mutex);
    8482                        return NULL;
    8583                }
    86                 str_cpy(ncwd_path_nc, total_size, cwd_path);
     84                str_cpy(ncwd_path_nc, cwd_size + 1 + size + 1, cwd_path);
    8785                ncwd_path_nc[cwd_size] = '/';
    8886                ncwd_path_nc[cwd_size + 1] = '\0';
    8987        } else {
    90                 total_size = size + 1;
    91                 ncwd_path_nc = malloc(total_size);
     88                ncwd_path_nc = malloc(size + 1);
    9289                if (!ncwd_path_nc) {
    9390                        fibril_mutex_unlock(&cwd_mutex);
     
    9693                ncwd_path_nc[0] = '\0';
    9794        }
    98         str_append(ncwd_path_nc, total_size, path);
     95        str_append(ncwd_path_nc, cwd_size + 1 + size + 1, path);
    9996        ncwd_path = canonify(ncwd_path_nc, retlen);
    10097        if (!ncwd_path) {
  • uspace/srv/devmap/devmap.c

    r37b1651d r4c7c251  
    123123static devmap_handle_t last_handle = 0;
    124124static devmap_device_t *null_devices[NULL_DEVICES];
    125 
    126 /*
    127  * Dummy list for null devices. This is necessary so that null devices can
    128  * be used just as any other devices, e.g. in devmap_device_unregister_core().
    129  */
    130 static LIST_INITIALIZE(dummy_null_driver_devices);
    131125
    132126static devmap_handle_t devmap_create_handle(void)
     
    959953        device->name = dev_name;
    960954       
    961         /*
    962          * Insert device into list of all devices and into null devices array.
    963          * Insert device into a dummy list of null driver's devices so that it
    964          * can be safely removed later.
    965          */
     955        /* Insert device into list of all devices
     956           and into null devices array */
    966957        list_append(&device->devices, &devices_list);
    967         list_append(&device->driver_devices, &dummy_null_driver_devices);
    968958        null_devices[i] = device;
    969959       
  • uspace/srv/fs/fat/fat_ops.c

    r37b1651d r4c7c251  
    325325                    uint16_t_le2host(d->firstc));
    326326                if (rc != EOK) {
    327                         (void) block_put(b);
    328327                        (void) fat_node_put(FS_NODE(nodep));
    329328                        return rc;
     
    812811        fibril_mutex_unlock(&childp->idx->lock);
    813812        childp->lnkcnt = 0;
    814         childp->refcnt++;       /* keep the node in memory until destroyed */
    815813        childp->dirty = true;
    816814        fibril_mutex_unlock(&childp->lock);
     
    14901488        fs_index_t index = (fs_index_t)IPC_GET_ARG2(*request);
    14911489        fs_node_t *fn;
    1492         fat_node_t *nodep;
    14931490        int rc;
    14941491
     
    15021499                return;
    15031500        }
    1504 
    1505         nodep = FAT_NODE(fn);
    1506         /*
    1507          * We should have exactly two references. One for the above
    1508          * call to fat_node_get() and one from fat_unlink().
    1509          */
    1510         assert(nodep->refcnt == 2);
    15111501
    15121502        rc = fat_destroy_node(fn);
Note: See TracChangeset for help on using the changeset viewer.