Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • boot/arch/arm64/src/main.c

    rb169619 r28a5ebd  
    4646#include <kernel.h>
    4747#include <macros.h>
    48 #include <mem.h>
     48#include <memstr.h>
    4949#include <payload.h>
    5050#include <printf.h>
     
    116116{
    117117        efi_status_t status;
     118        uint64_t current_el;
    118119        uint64_t memmap = 0;
    119120        sysarg_t memmap_size;
     
    142143        printf(" %p|%p: UEFI system table\n", efi_system_table_in,
    143144            efi_system_table_in);
     145
     146        /* Validate the exception level. */
     147        current_el = CurrentEL_read();
     148        if (current_el != CURRENT_EL_EL1) {
     149                printf("Error: Unexpected CurrentEL value %0#18" PRIx64 ".\n",
     150                    current_el);
     151                status = EFI_UNSUPPORTED;
     152                goto fail;
     153        }
    144154
    145155        /* Obtain memory map. */
     
    177187
    178188        /*
    179          * Check that everything is aligned on a 4 KiB boundary and the kernel can
     189         * Check that everything is aligned on a 4kB boundary and the kernel can
    180190         * be placed by the decompression code at a correct address.
    181191         */
     
    189199         * Dynamically check the memory base. The condition should be always
    190200         * true because UEFI guarantees each physical/virtual address in the
    191          * memory map is aligned on a 4 KiB boundary.
     201         * memory map is aligned on a 4kB boundary.
    192202         */
    193203        if (!IS_ALIGNED(memory_base, PAGE_SIZE)) {
    194204                printf("Error: Start of usable RAM (%p) is not aligned on a "
    195                     "4 KiB boundary.\n", (void *) memory_base);
     205                    "4kB boundary.\n", (void *) memory_base);
    196206                status = EFI_UNSUPPORTED;
    197207                goto fail;
     
    233243
    234244        extract_payload(&bootinfo->taskmap, kernel_dest, ram_end,
    235             (uintptr_t) kernel_dest, smc_coherence);
     245            (uintptr_t) kernel_dest, ensure_visibility);
    236246
    237247        /* Get final memory map. */
     
    291301        bootinfo->memmap.cnt = cnt;
    292302
    293         /* Flush the data cache containing bootinfo. */
    294         dcache_flush(bootinfo, sizeof(*bootinfo));
    295 
    296303        uintptr_t entry = check_kernel_translated((void *) decompress_base,
    297304            BOOT_OFFSET);
Note: See TracChangeset for help on using the changeset viewer.