On 8/19/23 02:47, Karim Taha wrote:
From: Stacey Son <s...@freebsd.org>
Co-authored-by: Mikaël Urankar <mikael.uran...@gmail.com>
Signed-off-by: Mikaël Urankar <mikael.uran...@gmail.com>
Signed-off-by: Karim Taha <kariem.taha...@gmail.com>
---
bsd-user/bsd-mem.c | 38 +++++++++++++++++++++++++++++++++++
bsd-user/freebsd/os-syscall.c | 4 ----
2 files changed, 38 insertions(+), 4 deletions(-)
diff --git a/bsd-user/bsd-mem.c b/bsd-user/bsd-mem.c
index e69de29bb2..6c123abf04 100644
--- a/bsd-user/bsd-mem.c
+++ b/bsd-user/bsd-mem.c
@@ -0,0 +1,38 @@
+/*
+ * memory management system conversion routines
+ *
+ * Copyright (c) 2013 Stacey D. Son
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
+ */
+#include "qemu/osdep.h"
+
+#include <sys/ipc.h>
+#include <sys/shm.h>
+
+#include "qemu.h"
+#include "qemu-bsd.h"
+
+struct bsd_shm_regions bsd_shm_regions[N_BSD_SHM_REGIONS];
This and the ipc/shm includes don't belong with this patch.
+
+abi_ulong bsd_target_brk;
+abi_ulong bsd_target_original_brk;
+abi_ulong brk_page;
+
+void target_set_brk(abi_ulong new_brk)
+{
+
Blank line.
+ bsd_target_original_brk = bsd_target_brk = HOST_PAGE_ALIGN(new_brk);
+ brk_page = HOST_PAGE_ALIGN(bsd_target_brk);
I encourage you to use TARGET_PAGE_ALIGN instead.
This will match changes made in linux-user during the 8.1 cycle.
Otherwise,
Reviewed-by: Richard Henderson <richard.hender...@linaro.org>
r~