Changeset 1b43a04 in mainline


Ignore:
Timestamp:
2006-11-05T13:49:23Z (18 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b63a7cc
Parents:
14de0dd8
Message:

Modify selected function to consume less stack space.

Avoid flushw instruction in the sparc64 loader.

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • boot/arch/sparc64/loader/boot.S

    r14de0dd8 r1b43a04  
    3131#include <register.h>
    3232
    33 #define INITIAL_STACK_SIZE      1024
     33#define INITIAL_STACK_SIZE      8192
     34
     35#define NWINDOWS                8
    3436
    3537.register %g2, #scratch
     
    5557.align 8
    56581:     
    57         flushw
    58 
    5959        /*
    6060         * Disable interrupts and disable address masking.
    6161         */
    6262        wrpr %g0, PSTATE_PRIV_BIT, %pstate
     63       
     64        wrpr %g0, NWINDOWS - 2, %cansave        ! set maximum saveable windows
     65        wrpr %g0, 0, %canrestore                ! get rid of windows we will never need again
     66        wrpr %g0, 0, %otherwin                  ! make sure the window state is consistent
     67        wrpr %g0, NWINDOWS - 1, %cleanwin       ! prevent needless clean_window traps for kernel
    6368
    6469        set initial_stack_top, %sp
  • boot/arch/sparc64/loader/main.c

    r14de0dd8 r1b43a04  
    3838
    3939bootinfo_t bootinfo;
     40component_t components[COMPONENTS];
    4041
    4142void bootstrap(void)
    4243{
    4344        printf("HelenOS SPARC64 Bootloader\n");
    44 
    45         component_t components[COMPONENTS];
     45       
    4646        init_components(components);
    4747
  • kernel/genarch/src/ofw/ofw_tree.c

    r14de0dd8 r1b43a04  
    3838#include <genarch/ofw/ofw_tree.h>
    3939#include <arch/memstr.h>
     40#include <mm/slab.h>
    4041#include <func.h>
    4142#include <print.h>
     
    237238static void ofw_tree_node_print(const ofw_tree_node_t *node, const char *path)
    238239{
    239         char p[PATH_MAX_LEN];
    240        
     240        char *p;
     241
     242        p = (char *) malloc(PATH_MAX_LEN, 0);
     243
    241244        if (node->parent) {
    242245                snprintf(p, PATH_MAX_LEN, "%s/%s", path, node->da_name);
     
    249252        if (node->child)
    250253                ofw_tree_node_print(node->child, p);
    251        
     254
    252255        if (node->peer)
    253256                ofw_tree_node_print(node->peer, path);
     257
     258        free(p);
    254259}
    255260
  • kernel/generic/src/console/kconsole.c

    r14de0dd8 r1b43a04  
    205205static int cmdtab_compl(char *name)
    206206{
    207         char output[MAX_SYMBOL_NAME+1];
     207        static char output[MAX_SYMBOL_NAME+1];
    208208        link_t *startpos = NULL;
    209209        const char *foundtxt;
     
    245245        static int histposition = 0;
    246246
    247         char tmp[MAX_CMDLINE+1];
     247        static char tmp[MAX_CMDLINE+1];
    248248        int curlen = 0, position = 0;
    249249        char *current = history[histposition];
     
    434434static int parse_int_arg(char *text, size_t len, unative_t *result)
    435435{
    436         char symname[MAX_SYMBOL_NAME];
     436        static char symname[MAX_SYMBOL_NAME];
    437437        uintptr_t symaddr;
    438438        bool isaddr = false;
Note: See TracChangeset for help on using the changeset viewer.