-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fvp dram1 #1860
Fvp dram1 #1860
Conversation
}; | ||
|
||
#define __register_memory2(_name, _type, _addr, _size, _section, _id) \ | ||
static const struct core_mmu_phys_mem __phys_mem_ ## _id \ | ||
__used __section(_section) = \ | ||
{ .name = _name, .type = _type, .addr = _addr, .size = _size } | ||
|
||
#if __SIZEOF_LONG__ != __SIZEOF_PADDR__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks strange to have 2 macros register_phys_mem()
and register_phys_mem_ul()
.
Can't use something like:
#if __SIZEOF_LONG__ == __SIZEOF_PADDR__
#define __PHYSMEM_LOC(_addr, _size) \
.addr = (_addr), .size = (_size),
#else
#define __PHYSMEM_LOC(_addr, _size) \
.lo_addr = (_addr), .lo_size = (_size),
#endif
#define __register_memory2(_name, _type, _addr, _size, _section, _id) \
static const struct core_mmu_phys_mem __phys_mem_ ## _id \
__used __section(_section) = \
{ .name = _name, .type = _type, __PHYSMEM_LOC(_addr, _size) },
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need both the normal and the _ul version. The normal is needed when supplying 64-bit addresses from a proper constant, while the _ul version must be used when initializing from variables provided by the link script.
It's not beautiful and have some sharp corners, but I can't find a way around it.
@@ -58,15 +58,15 @@ extern const struct core_mmu_phys_mem __end_phys_mem_map_section; | |||
extern const struct core_mmu_phys_mem __start_phys_nsec_ddr_section; | |||
extern const struct core_mmu_phys_mem __end_phys_nsec_ddr_section; | |||
|
|||
#define VCORE_UNPG_RX_PA ((paddr_t)__vcore_unpg_rx_start) | |||
#define VCORE_UNPG_RX_PA ((unsigned long)__vcore_unpg_rx_start) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As these hold physical addresses/sizes, CFG_CORE_LARGE_PHYS_ADDR=y
requires 64bit fields here. Why doesn't paddr_t
fit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Static initialization based on addresses of variables seems to the a bit fragile. As soon as there's a 64-bit type on a 32-bit system involved the compiler tends to complain. unsigned long
should be a good enough compromise for all systems.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
Ping? |
sorry. |
The UL (which is short for |
Commit: "core: add register_phys_mem_ul()"
For all other commits:
|
907ca1f
to
38900ed
Compare
Tags applied. To summarize you can say that |
Maybe split the EMSG line to silence the checkpatch warning?
|
38900ed
to
b6b11cc
Compare
Split the |
Can you please rebase manually? (conflict) |
Takes nsec DDR ranges into account when setting TCR.PS field. Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Prior to this patch gic_init() incorrectly had paddr_t as type for the GIC base addresses while the implementation used vaddr_t. The correct type is vaddr_t which we're changing to here. Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Adds register_phys_mem_ul() which must be used (for compatibility with CFG_CORE_LARGE_PHYS_ADDR=y) when input address and size is based on symbols generated in the link script. Acked-by: Etienne Carriere <etienne.carriere@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Defines missing DRAM1 base 0x880000000 size 0xa00000000 for FVP. Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org> Tested-by: Jens Wiklander <jens.wiklander@linaro.org> (FVP) Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
b6b11cc
to
7980b88
Compare
Rebased |
No description provided.