Changeset db521b05 in mainline


Ignore:
Timestamp:
2016-12-26T20:14:35Z (7 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
33b57d4
Parents:
ba1ea40
Message:

Use the common kernel mechanism to set boot_args in sysinfo

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/sparc64/src/sparc64.c

    rba1ea40 rdb521b05  
    7474                uwb_cache = slab_cache_create("uwb_cache", UWB_SIZE,
    7575                    UWB_ALIGNMENT, NULL, NULL, SLAB_CACHE_MAGDEFERRED);
     76
     77                /* Copy boot arguments */
     78                ofw_tree_node_t *options = ofw_tree_lookup("/options");
     79                if (options) {
     80                        ofw_tree_property_t *prop;
     81               
     82                        prop = ofw_tree_getprop(options, "boot-args");
     83                        if (prop && prop->value) {
     84                                str_ncpy(bargs, CONFIG_BOOT_ARGUMENTS_BUFLEN,
     85                                    prop->value, prop->size);
     86                        }
     87                }
    7688        }
    7789}
     
    90102{
    91103        SPARC64_ARCH_OP(post_smp_init);
    92 
    93         ofw_tree_node_t *options = ofw_tree_lookup("/options");
    94         if (options) {
    95                 ofw_tree_property_t *prop;
    96                
    97                 prop = ofw_tree_getprop(options, "boot-args");
    98                 if (prop && prop->value) {
    99                         sysinfo_set_item_data("boot_args", NULL, prop->value,
    100                             prop->size);
    101                 }
    102         }
    103104}
    104105
Note: See TracChangeset for help on using the changeset viewer.