Skip to content

Commit

Permalink
lm32: Remove ELF_MACHINE from cpu.h
Browse files Browse the repository at this point in the history
The bootloaders can just pass EM_LATTICEMICO32 directly, as that is
architecture specific code.

This removes another architecture specific definition from the global
namespace.

Cc: Michael Walle <michael@walle.cc>
Acked-By: Michael Walle <michael@walle.cc>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Acked-By: Riku Voipio <riku.voipio@linaro.org>
Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
pcrost authored and bonzini committed Sep 25, 2015
1 parent 663c40a commit 22d2fb4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions hw/lm32/lm32_boards.c
Expand Up @@ -142,7 +142,7 @@ static void lm32_evr_init(MachineState *machine)
int kernel_size;

kernel_size = load_elf(kernel_filename, NULL, NULL, &entry, NULL, NULL,
1, ELF_MACHINE, 0);
1, EM_LATTICEMICO32, 0);
reset_info->bootstrap_pc = entry;

if (kernel_size < 0) {
Expand Down Expand Up @@ -244,7 +244,7 @@ static void lm32_uclinux_init(MachineState *machine)
int kernel_size;

kernel_size = load_elf(kernel_filename, NULL, NULL, &entry, NULL, NULL,
1, ELF_MACHINE, 0);
1, EM_LATTICEMICO32, 0);
reset_info->bootstrap_pc = entry;

if (kernel_size < 0) {
Expand Down
2 changes: 1 addition & 1 deletion hw/lm32/milkymist.c
Expand Up @@ -176,7 +176,7 @@ milkymist_init(MachineState *machine)

/* Boots a kernel elf binary. */
kernel_size = load_elf(kernel_filename, NULL, NULL, &entry, NULL, NULL,
1, ELF_MACHINE, 0);
1, EM_LATTICEMICO32, 0);
reset_info->bootstrap_pc = entry;

if (kernel_size < 0) {
Expand Down
2 changes: 0 additions & 2 deletions target-lm32/cpu.h
Expand Up @@ -30,8 +30,6 @@
struct CPULM32State;
typedef struct CPULM32State CPULM32State;

#define ELF_MACHINE EM_LATTICEMICO32

#define NB_MMU_MODES 1
#define TARGET_PAGE_BITS 12
static inline int cpu_mmu_index(CPULM32State *env, bool ifetch)
Expand Down

0 comments on commit 22d2fb4

Please sign in to comment.