Changeset 1eb154f in mainline for boot/arch/sparc64/loader/ofwarch.c


Ignore:
Timestamp:
2008-06-15T11:07:37Z (17 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3527a93
Parents:
c711efe
Message:

Don't make any assumptions about the contents of the I-cache in sparc64
loader and before passing control to the kernel, invalidate the I-cache.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • boot/arch/sparc64/loader/ofwarch.c

    rc711efe r1eb154f  
    7070        uint64_t current_mid;
    7171       
    72         asm volatile ("ldxa [%1] %2, %0\n" : "=r" (current_mid) : "r" (0), "i" (ASI_UPA_CONFIG));
     72        asm volatile ("ldxa [%1] %2, %0\n"
     73            : "=r" (current_mid)
     74            : "r" (0), "i" (ASI_UPA_CONFIG));
    7375        current_mid >>= UPA_CONFIG_MID_SHIFT;
    7476        current_mid &= UPA_CONFIG_MID_MASK;
     
    7678        int cpus;
    7779       
    78         for (cpus = 0; node != 0 && node != -1; node = ofw_get_peer_node(node), cpus++) {
    79                 if (ofw_get_property(node, "device_type", type_name, sizeof(type_name)) > 0) {
     80        for (cpus = 0; node != 0 && node != -1; node = ofw_get_peer_node(node),
     81            cpus++) {
     82                if (ofw_get_property(node, "device_type", type_name,
     83                    sizeof(type_name)) > 0) {
    8084                        if (strcmp(type_name, "cpu") == 0) {
    8185                                uint32_t mid;
    8286                               
    83                                 if (ofw_get_property(node, "upa-portid", &mid, sizeof(mid)) <= 0)
     87                                if (ofw_get_property(node, "upa-portid", &mid,
     88                                    sizeof(mid)) <= 0)
    8489                                        continue;
    8590                                       
     
    8893                                         * Start secondary processor.
    8994                                         */
    90                                         (void) ofw_call("SUNW,start-cpu", 3, 1, NULL, node,
    91                                                  KERNEL_VIRTUAL_ADDRESS,
    92                                                  bootinfo.physmem_start | AP_PROCESSOR);
     95                                        (void) ofw_call("SUNW,start-cpu", 3, 1,
     96                                            NULL, node, KERNEL_VIRTUAL_ADDRESS,
     97                                            bootinfo.physmem_start |
     98                                            AP_PROCESSOR);
    9399                                }
    94100                        }
Note: See TracChangeset for help on using the changeset viewer.