projects
/
project
/
bcm63xx
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
205dd5a
)
sandbox: Try to start the RAM buffer at a particular address
author
Simon Glass
<
[email protected]
>
Sun, 17 Jun 2018 14:57:43 +0000
(08:57 -0600)
committer
Simon Glass
<
[email protected]
>
Wed, 14 Nov 2018 17:16:27 +0000
(09:16 -0800)
Use a starting address of 256MB which should be available. This helps to
make sandbox RAM buffers pointers more recognisable.
Signed-off-by: Simon Glass <
[email protected]
>
arch/sandbox/cpu/os.c
patch
|
blob
|
history
diff --git
a/arch/sandbox/cpu/os.c
b/arch/sandbox/cpu/os.c
index 07e46471fe5b67c374a343c7577e84527f9a182d..325ded51d8a34fbf1958c4fe5d237691af83b9e5 100644
(file)
--- a/
arch/sandbox/cpu/os.c
+++ b/
arch/sandbox/cpu/os.c
@@
-174,7
+174,12
@@
void *os_malloc(size_t length)
struct os_mem_hdr *hdr;
int page_size = getpagesize();
- hdr = mmap(NULL, length + page_size,
+ /*
+ * Use an address that is hopefully available to us so that pointers
+ * to this memory are fairly obvious. If we end up with a different
+ * address, that's fine too.
+ */
+ hdr = mmap((void *)0x10000000, length + page_size,
PROT_READ | PROT_WRITE | PROT_EXEC,
MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
if (hdr == MAP_FAILED)