[BACK]Return to uboot.c CVS log [TXT][DIR] Up to [local] / prex-old / boot / avr32 / ngw100

Annotation of prex-old/boot/avr32/ngw100/uboot.c, Revision 1.1

1.1     ! nbrk        1: #include <uboot.h>
        !             2: #include <platform.h>
        !             3:
        !             4: struct uboot_cframe *
        !             5: uboot_map(uint32_t cframeaddr)
        !             6: {
        !             7:        /*
        !             8:         * Try to treat UBOOT_CFRAMESIZE bytes at cframeaddr as an u-boot
        !             9:         * boot_params (configuration frame). U-Boot signs this region with crc32,
        !            10:         * so we can determine if our probe is correct.
        !            11:         * Return struct uboot_cframe * on success or NULL otherwise.
        !            12:         */
        !            13:
        !            14:        struct uboot_cframe *ucfp;
        !            15:
        !            16:        cframeaddr = BOOT_PARAMS;
        !            17:        ucfp = cframeaddr;
        !            18:
        !            19:        /* TODO: actually, check crc */
        !            20: #if 0
        !            21:        if (crc32((uint8_t *)ucfp, UBOOT_CFRAMESIZE - 4) != ucfp->ucf_crc32)
        !            22:                return (NULL);
        !            23: #endif
        !            24:        printk("uboot_map: map @0x%x; memstart=%x; memsize=%x\n", cframeaddr, ucfp->ucf_memstart, ucfp->ucf_memsize);
        !            25:
        !            26:        /* CRC ok, probe succeeded */
        !            27:        return (ucfp);
        !            28: }
        !            29:

CVSweb