forked from Minki/linux
xtensa: fix boot parameters parsing
Boot parameter tags with handlers are ignored like this: [ 0.000000] Ignoring tag 0x00001003 [ 0.000000] Ignoring tag 0x00001001 [ 0.000000] Ignoring tag 0x00001004 because neither tagtable entries nor tag handlers appear in the vmlinux. Fix tagtable definition attributes so that tag entries are not dropped. Fix end of memory bank calculation in parse_tag_mem: it is intended to round down to page size, but instead did something strange leading to hang right after boot. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> Signed-off-by: Chris Zankel <chris@zankel.net>
This commit is contained in:
parent
1bbedc3a7b
commit
f4349b6e01
@ -100,7 +100,7 @@ typedef struct tagtable {
|
||||
} tagtable_t;
|
||||
|
||||
#define __tagtable(tag, fn) static tagtable_t __tagtable_##fn \
|
||||
__attribute__((unused, __section__(".taglist"))) = { tag, fn }
|
||||
__attribute__((used, section(".taglist"))) = { tag, fn }
|
||||
|
||||
/* parse current tag */
|
||||
|
||||
@ -120,7 +120,7 @@ static int __init parse_tag_mem(const bp_tag_t *tag)
|
||||
}
|
||||
sysmem.bank[sysmem.nr_banks].type = mi->type;
|
||||
sysmem.bank[sysmem.nr_banks].start = PAGE_ALIGN(mi->start);
|
||||
sysmem.bank[sysmem.nr_banks].end = mi->end & PAGE_SIZE;
|
||||
sysmem.bank[sysmem.nr_banks].end = mi->end & PAGE_MASK;
|
||||
sysmem.nr_banks++;
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user