Esempio n. 1
0
void romStart
    (
    FAST int startType      /* start type */
    )
    {
#if (CPU_FAMILY == PPC) || (CPU_FAMILY == MIPS)

    /*
     * For PPC and MIPS, the call to vxSdaInit() must be the first operation
     * in sysStart(). This is because vxSdaInit() sets the SDA registers
     * (r2 and r13 on PPC, gp on MIPS) to the SDA base values. No C code
     * must be placed before this call.
     */

    _WRS_ASM ("");   /* code barrier to prevent compiler moving vxSdaInit() */
    vxSdaInit ();    /* this MUST be the first operation in usrInit() for PPC */
    _WRS_ASM ("");   /* code barrier to prevent compiler moving vxSdaInit() */

#endif	/* (CPU_FAMILY == PPC) || (CPU_FAMILY == MIPS) */

    /* relocate the data segment into RAM */

    copyLongs ((UINT *)ROM_DATA_ADRS, (UINT *)UNCACHED(RAM_DATA_ADRS),
        ((UINT)wrs_kernel_data_end - (UINT)RAM_DATA_ADRS) / sizeof (long));

#ifdef BSP_BOOT_CACHE_SYNC

    /* Text has been copied from flash, call BSP provided cacheTextUpdate */

    BSP_BOOT_CACHE_SYNC;
#endif /* BSP_BOOT_CACHE_SYNC */

    /* If cold booting, clear memory to avoid parity errors */

#ifdef ROMSTART_BOOT_CLEAR
    if (startType & BOOT_CLEAR)
        bootClear();
#endif

#ifdef BSP_BOOT_CACHE_SYNC_POST
    BSP_BOOT_CACHE_SYNC_POST;
#endif /* BSP_BOOT_CACHE_SYNC_POST */

    /* and jump to the entry */

#ifdef INCLUDE_UEFI_BOOT_SUPPORT
    /* For UEFI we must pass the UEFI memory map and ACPI pointer */
    usrInit (startType, pRomUefiMemAddr, pRomUefiAcpiAddr);
#else
    usrInit (startType);
#endif

    }
Esempio n. 2
0
void usrEntry (int startType)
    {
#if     (CPU_FAMILY==I960)
    sysInitAlt (startType);             /* jump to the i960 entry point */
#endif

#if (CPU_FAMILY==MIPS)
    WRS_ASM (".extern _gp; la $gp,_gp");
#endif

    usrInit (startType);                /* all others procede below */
    }