Changeset 557 for trunk/boot/tsar_mips32


Ignore:
Timestamp:
Sep 21, 2018, 10:26:00 PM (6 years ago)
Author:
nicolas.van.phan@…
Message:

Add cluster_info[][] array in cluster descriptor

Location:
trunk/boot/tsar_mips32
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/boot/tsar_mips32/Makefile

    r547 r557  
    3939                -I$(HAL_ARCH)/core   \
    4040                -I../.. \
    41                 -I$(KERNEL)
     41                -I$(KERNEL) \
     42                -I$(KERNEL)/kern
    4243
    4344# Rule to generate boot.elf, kernel.elf, ksh.elf, sort.elf and update virtual disk.
  • trunk/boot/tsar_mips32/boot.c

    r556 r557  
    7878#include <boot_info.h>
    7979
     80#include <cluster_info.h>
     81
    8082#include <boot_utils.h>
    8183#include <boot_fat32.h>
     
    140142        case DEV_TYPE_TIM_SCL: return "TIM_SCL";
    141143        case DEV_TYPE_TXT_TTY: return "TXT_TTY";
     144        case DEV_TYPE_TXT_MTY: return "TXT_MTY";
    142145        case DEV_TYPE_ICU_XCU: return "ICU_XCU";
    143146        case DEV_TYPE_PIC_TSR: return "PIC_TSR";
     
    415418    boot_info->kentry_size = seg_kentry_size;
    416419
     420    /* Initialize all clusters as empty for now */
     421    int x, y;
     422    for ( x = 0; x < CONFIG_MAX_CLUSTERS_X; x++)
     423    {
     424        for ( x = 0; x < CONFIG_MAX_CLUSTERS_X; x++)
     425        {
     426            boot_info->cluster_info[x][y] = 0x0;
     427        }
     428    }
     429
    417430    // loop on arch_info clusters to get relevant pointers
    418431    for (cluster =  cluster_base;
     
    420433         cluster++)
    421434    {
     435        int x = cluster->cxy >> Y_WIDTH;
     436        int y = cluster->cxy & ((1 << Y_WIDTH) - 1);
     437
    422438        if( cluster->cxy  == cxy )            my_cluster = cluster;
    423         if( cluster->cxy  == header->io_cxy ) io_cluster = cluster;
     439        if( cluster->cxy  == header->io_cxy ) {
     440            io_cluster = cluster;
     441            boot_info->cluster_info[x][y] |= CINFO_IS_IO;
     442        }
     443        if ( cluster->cores > 0 ) {
     444            boot_info->cluster_info[x][y] |= CINFO_ACTIVE;
     445        }
    424446    }
    425447
Note: See TracChangeset for help on using the changeset viewer.