mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-13 22:23:45 +00:00
lx_emul & arm: define ZERO_PAGE
The implementation was copied from the already existing LX-emul implementation for x86 but the commit additionally page-aligns the array that serves as backing store for the zero page as we assume this to be expected by the contrib code. However, this commit doesn't apply the alignment also to the x86 implementation as we agreed, that this should be done in a separate commit. Ref #4397
This commit is contained in:
parent
bd501404db
commit
cded594346
@ -22,6 +22,9 @@
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
extern unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)];
|
||||
#define ZERO_PAGE(vaddr) ((void)(vaddr),virt_to_page(empty_zero_page))
|
||||
|
||||
pte_t pte_mkwrite(pte_t pte);
|
||||
|
||||
int pte_none(pte_t pte);
|
||||
|
@ -25,6 +25,9 @@
|
||||
|
||||
#include <lx_emul/debug.h>
|
||||
|
||||
extern unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)];
|
||||
#define ZERO_PAGE(vaddr) ((void)(vaddr),virt_to_page(empty_zero_page))
|
||||
|
||||
pte_t pte_mkwrite(pte_t pte);
|
||||
|
||||
pte_t pte_get(pte_t pte);
|
||||
|
@ -30,6 +30,15 @@ void time_init(void)
|
||||
}
|
||||
|
||||
|
||||
#include <asm/pgtable.h>
|
||||
|
||||
/*
|
||||
* Note that empty_zero_page lands in the BSS section and is therefore
|
||||
* automatically zeroed at program startup.
|
||||
*/
|
||||
unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)]
|
||||
__attribute__((aligned(PAGE_SIZE)));
|
||||
|
||||
void lx_emul_setup_arch(void *dtb)
|
||||
{
|
||||
/* calls from setup_arch of arch/arm64/kernel/setup.c */
|
||||
|
Loading…
x
Reference in New Issue
Block a user