From 35cf8aada4f9f04eb2c57f095d8c83688ee46f52 Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Mon, 7 Mar 2022 15:30:10 +0100 Subject: [PATCH] lx_emul(x86): fill zero page with zeroes Ref #4397 --- repos/dde_linux/src/lib/lx_emul/spec/x86/start.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/repos/dde_linux/src/lib/lx_emul/spec/x86/start.c b/repos/dde_linux/src/lib/lx_emul/spec/x86/start.c index 1566ae7878..4c6b26c2f3 100644 --- a/repos/dde_linux/src/lib/lx_emul/spec/x86/start.c +++ b/repos/dde_linux/src/lib/lx_emul/spec/x86/start.c @@ -30,4 +30,12 @@ void time_init(void) } -void lx_emul_setup_arch(void *dtb) { } +#include + +unsigned long empty_zero_page[PAGE_SIZE / sizeof(unsigned long)]; + +void lx_emul_setup_arch(void *dtb) +{ + /* fill zero page */ + memset(empty_zero_page, 0, PAGE_SIZE); +}