On 2/11/23 14:40, Warner Losh wrote:
I was going to do something like:
+ if (host_page_size != TARGET_PAGE_SIZE) {
+ if (host_page_size > TARGET_PAGE_SIZE) {
+ /* Scale up */
+ pages *= host_page_size / TARGET_PAGE_SIZE;
+ } else {
+ /* Scale dow
On Sat, Feb 11, 2023 at 4:59 PM Richard Henderson <
richard.hender...@linaro.org> wrote:
> On 2/11/23 13:40, Warner Losh wrote:
> > maxmem is defined earlier in this patch:
> >
> > +#if TARGET_ABI_BITS != HOST_LONG_BITS
> > +const abi_ulong maxmem = -0x100c000;
> >
> > but I'm not at all sure
On 2/11/23 13:40, Warner Losh wrote:
maxmem is defined earlier in this patch:
+#if TARGET_ABI_BITS != HOST_LONG_BITS
+ const abi_ulong maxmem = -0x100c000;
but I'm not at all sure how that number was arrived at...
It's a little less than ULONG_MAX is all I can say for
sure.
As to why it's a
On Sat, Feb 11, 2023 at 3:56 PM Richard Henderson <
richard.hender...@linaro.org> wrote:
> On 2/10/23 13:18, Warner Losh wrote:
> > +/* Handle some arch/emulator dependent sysctl()'s here. */
> > +switch (snamep[0]) {
> > +#if defined(TARGET_PPC) || defined(TARGET_PPC64)
> > +case CTL_
On 2/10/23 13:18, Warner Losh wrote:
+/* Handle some arch/emulator dependent sysctl()'s here. */
+switch (snamep[0]) {
+#if defined(TARGET_PPC) || defined(TARGET_PPC64)
+case CTL_MACHDEP:
+switch (snamep[1]) {
+case 1:/* CPU_CACHELINE */
+holdlen = size
From: Juergen Lock
do_freebsd_sysctl_oid filters out some of the binary and special sysctls
where host != target. This commit focuses on the simple sysctls that can
be done in a few lines.
Signed-off-by: Juergen Lock
Co-Authored-by: Stacey Son
Signed-off-by: Stacey Son
Signed-off-by: Warner L