Changeset 1e48aca1 in mainline


Ignore:
Timestamp:
2009-05-28T09:34:27Z (15 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0c0b800
Parents:
81b430a
Message:

Allow arbitrarily large boot images on arm32.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • boot/arch/arm32/loader/main.c

    r81b430a r1e48aca1  
    8888        printf(" %L: boot info structure\n", &bootinfo);
    8989
     90        unsigned int top = 0;
     91        bootinfo.cnt = 0;
    9092        unsigned int i, j;
    9193        for (i = 0; i < COMPONENTS; i++) {
    9294                printf(" %L: %s image (size %d bytes)\n",
    93                         components[i].start, components[i].name, components[i].size);
    94         }
    95 
    96         printf("\nCopying components\n");
    97 
    98         unsigned int top = 0;
    99         bootinfo.cnt = 0;
    100         for (i = 0; i < COMPONENTS; i++) {
    101                 printf(" %s...", components[i].name);
     95                    components[i].start, components[i].name, components[i].size);
    10296                top = ALIGN_UP(top, KERNEL_PAGE_SIZE);
    103                 memcpy(((void *) KERNEL_VIRTUAL_ADDRESS) + top, components[i].start, components[i].size);
    10497                if (i > 0) {
    10598                        bootinfo.tasks[bootinfo.cnt].addr = ((void *) KERNEL_VIRTUAL_ADDRESS) + top;
     
    110103                }
    111104                top += components[i].size;
     105        }
     106        j = bootinfo.cnt - 1;
     107
     108        printf("\nCopying components\n");
     109
     110        for (i = COMPONENTS - 1; i > 0; i--, j--) {
     111                printf(" %s...", components[i].name);
     112                memcpy((void *)bootinfo.tasks[j].addr, components[i].start,
     113                    components[i].size);
    112114                printf("done.\n");
    113115        }
    114116       
     117        printf("\nCopying kernel...");
     118        memcpy((void *)KERNEL_VIRTUAL_ADDRESS, components[0].start,
     119            components[0].size);
     120        printf("done.\n");
     121
    115122        printf("\nBooting the kernel...\n");
    116123        jump_to_kernel((void *) KERNEL_VIRTUAL_ADDRESS, &bootinfo);
Note: See TracChangeset for help on using the changeset viewer.