Browse Source

The problem is that asm_emit_cell() was swapping its asm output when

it shouldn't be (because the assembler will do the necessary swapping).
The cell values (asm_emit_cell()) are different from the data values
(asm_emit_data()) because the cell values are generated within the
program and don't get swapped like the data values read from the dts file.
They should be left as they are so that the assembler will swap them,
if necessary.  For example, when the property length field was 4,
the asm output contained ".long 0x4000000" and sent the kernel prom.c
dt parsing code into the weeds.

Pointed out by Mark Greer.
main
Mark A. Greer 19 years ago committed by Jon Loeliger
parent
commit
7a9f663ac7
  1. 2
      flattree.c

2
flattree.c

@ -121,7 +121,7 @@ static void asm_emit_cell(void *e, cell_t val) @@ -121,7 +121,7 @@ static void asm_emit_cell(void *e, cell_t val)
{
FILE *f = e;

fprintf(f, "\t.long\t0x%x\n", be32_to_cpu(val));
fprintf(f, "\t.long\t0x%x\n", val);
}

static void asm_emit_string(void *e, char *str, int len)

Loading…
Cancel
Save