Changeset 99589a9 in mainline


Ignore:
Timestamp:
2021-08-22T16:59:16Z (3 years ago)
Author:
Martin Decky <martin@…>
Branches:
master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
95b7d4df
Parents:
bc52b5b
Message:

Improve compatibility with 3rd-party boot loaders (e.g. U-Boot)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • boot/arch/arm64/src/asm.S

    rbc52b5b r99589a9  
    3333.section BOOTSTRAP
    3434
     35#define DIRECTORY_ENTRIES 16
     36
    3537/* MS-DOS stub */
    3638msdos_stub:
     
    5153        .long 0                         /* Number of symbols */
    5254        .short sec_table - opt_header   /* Size of optional header */
    53         /* Characteristics = IMAGE_FILE_EXECUTABLE_IMAGE |
    54          *   IMAGE_FILE_LARGE_ADDRESS_AWARE */
     55        /*
     56         * Characteristics = IMAGE_FILE_EXECUTABLE_IMAGE |
     57         *   IMAGE_FILE_LARGE_ADDRESS_AWARE
     58         */
    5559        .short 0x22
    5660
     
    8791        .quad 0                         /* Size of heap commit */
    8892        .long 0                         /* Loader flags */
    89         .long 0                         /* Number of RVA and sizes */
     93        .long DIRECTORY_ENTRIES         /* Number of RVA and sizes */
     94        .space DIRECTORY_ENTRIES * 8    /* Directory entries */
    9095
    9196sec_table:
    92         .ascii ".text\x0\x0\x0"         /* Name */
     97        .ascii ".text\x0\x0\x0"         /* Name */
    9398        .long payload_end - start       /* Virtual size */
    9499        .long start - msdos_stub        /* Virtual address */
     
    99104        .short 0                        /* Number of relocations */
    100105        .short 0                        /* Number of line numbers */
    101         /* Characteristics = IMAGE_SCN_CNT_CODE | IMAGE_SCN_MEM_EXECUTE |
    102          *   IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_WRITE */
     106        /*
     107         * Characteristics = IMAGE_SCN_CNT_CODE | IMAGE_SCN_MEM_EXECUTE |
     108         *   IMAGE_SCN_MEM_READ | IMAGE_SCN_MEM_WRITE
     109         */
    103110        .long 0xe0000020
    104111
     112/** Boot loader entry point
     113 *
     114 * @param x0 UEFI image handle.
     115 * @param x1 Pointer to the UEFI system table.
     116 *
     117 */
    105118SYMBOL(start)
    106119        .hidden start
    107120
    108121        /*
    109          * Parameters:
    110          * x0 is the image handle.
    111          * x1 is a pointer to the UEFI system table.
    112          */
    113 
    114         /*
    115          * Stay on the UEFI stack. Its size is at least 128 kB, plenty for this
     122         * Stay on the UEFI stack. Its size is at least 128 KiB, plenty for this
    116123         * boot loader.
    117124         */
Note: See TracChangeset for help on using the changeset viewer.