Revision 082e5be8 hw/petalogix_s3adsp1800_mmu.c

b/hw/petalogix_s3adsp1800_mmu.c
167 167
    if (kernel_filename) {
168 168
        uint64_t entry, low, high;
169 169
        uint32_t base32;
170
        int big_endian = 0;
171

  
172
#ifdef TARGET_WORDS_BIGENDIAN
173
        big_endian = 1;
174
#endif
170 175

  
171 176
        /* Boots a kernel elf binary.  */
172 177
        kernel_size = load_elf(kernel_filename, NULL, NULL,
173 178
                               &entry, &low, &high,
174
                               1, ELF_MACHINE, 0);
179
                               big_endian, ELF_MACHINE, 0);
175 180
        base32 = entry;
176 181
        if (base32 == 0xc0000000) {
177 182
            kernel_size = load_elf(kernel_filename, translate_kernel_address,
178 183
                                   NULL, &entry, NULL, NULL,
179
                                   1, ELF_MACHINE, 0);
184
                                   big_endian, ELF_MACHINE, 0);
180 185
        }
181 186
        /* Always boot into physical ram.  */
182 187
        boot_info.bootstrap_pc = ddr_base + (entry & 0x0fffffff);

Also available in: Unified diff