kernel/src/drivers/chipset/chipset.c
void init_chipset() {
    HardwareInfo * info = get_hardwareinfo();

    memset(&chipset, 0, sizeof(ChipsetInterface));

    switch (info->boardType) {
        case RaspBerryPiTwo:
            bcm2836_init();
            break;
        default: {
            FATAL("Board type not supported for interrupts \n");
        }
    }

    for (size_t i = 0; i < sizeof(ChipsetInterface) / sizeof(uint32_t); i++) {
        if (((uint32_t **)&chipset)[i] == NULL) {
            FATAL("Chipset did not satisfy the required interface. Missing field %i\n", i);
        }
    }
}
// init_chipset requests hardware info, and based on it loads the right chipset. Currently only the
// pi two (with the bcm2836) is supported here.
init_chipset requests hardware info, and based on it loads the right chipset. Currently only the
pi two (with the bcm2836) is supported here.
init_chipset requests hardware info and based on it loads the right chipset . Currently only the pi two ( with the bcm2836 ) is supported here .
void init_chipset() {
    HardwareInfo * info = get_hardwareinfo();
    memset(&chipset, 0, sizeof(ChipsetInterface));
    switch (info->boardType) {
        case RaspBerryPiTwo:
            bcm2836_init();
            break;
        default: {
            FATAL("Board type not supported for interrupts \n");
        }
    }
    for (size_t i = 0; i < sizeof(ChipsetInterface) / sizeof(uint32_t); i++) {
        if (((uint32_t **)&chipset)[i] == NULL) {
            FATAL("Chipset did not satisfy the required interface. Missing field %i\n", i);
        }
    }
}
void init_chipset ( ) { HardwareInfo * info = get_hardwareinfo ( ) ; memset ( & chipset , 0 , sizeof ( ChipsetInterface ) ) ; switch ( info -> boardType ) { case RaspBerryPiTwo : bcm2836_init ( ) ; break ; default : { FATAL ( " \n " ) ; } } for ( size_t i = 0 ; i < sizeof ( ChipsetInterface ) / sizeof ( uint32_t ) ; i ++ ) { if ( ( ( uint32_t * * ) & chipset ) [ i ] == NULL ) { FATAL ( " \n " , i ) ; } } }
init_chipset requests hardware info, and based on it loads the right chipset.
init_chipset requests hardware info and based on it loads the right chipset .