History log of /haiku/src/system/boot/platform/openfirmware/arch/sparc/mmu.cpp
Revision Date Author Comments
# 6711cd9e 30-Dec-2020 PulkoMandy <pulkomandy@pulkomandy.tk>

bootloader: reduce stack usage

On Sparc Openboot, we get allocated a stack of only 8 kilobytes, and
each called function costs at least 176 bytes for the stack frame.

This means we need to be more careful than usual about stack usage. Move
some large-ish allocations off the stack by either making them static,
or allocated dynamically.

Add a compiler flag to error on functions which use too much stack. The
threshold is at 1023 bytes, because that's what allowed me to find the
two functions that were causing a stack overflow (open_from and
_ParseActivatedPackagesFile)

Change-Id: Ia0d13a9247e1a3fff4ce654bdffd6edb16e7cbc7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2371
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 75c2a94a 30-Dec-2020 PulkoMandy <pulkomandy@pulkomandy.tk>

sparc mmu: fix free physical range search

The code was ignoring most of the memory and eventually didn't find
enough of it to load all kernel modules.

Change-Id: I8abcb6cd20eb2a37147d720eb63af1c2820628f3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3576
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# a207d7b3 16-Mar-2020 PulkoMandy <pulkomandy@pulkomandy.tk>

bootloader: reduce verbosity

- Disable tracing where it's not needed by default
- Convert some drpintf to TRACE statements
- Comment some dprintf out completely in files that don't have a TRACE
macro.

Change-Id: I1f6062bce74bcf1dbf77bf7bccadeeb12a4df46c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2370
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 5424c3a2 14-Mar-2020 PulkoMandy <pulkomandy@pulkomandy.tk>

sparc: workaround for Netra T1 105

The address-size property is missing, but we don't really need it.

Change-Id: Iff3de89c811d16a263eadf796a0e6eb157dbe18b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2356
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 6d929a00 14-Mar-2020 PulkoMandy <pulkomandy@pulkomandy.tk>

sparc: fix boot MMU code

Apparently it worked by luck only on the Ultra60. Physical addresses for
openfirmware are on two cells (128 bits!) and we were passing only one
cell, of course this wouldn't go well. On the Ultra5 it ended up having
the heap point to unused space besides the RAM, so it was mostly reading
random data from there.

Change-Id: I4f9010013fe91a582e5daa83e6bf458703adba2b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2350
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 56f9c760 24-May-2019 PulkoMandy <pulkomandy@pulkomandy.tk>

sparc: boot mmu support

Get enough of the mmu working to be able to allocate memory.

Unlike on PowerPC, we get both address and size as 64bit values. So
adjust of_region to allow this.

Also unlike the PPC port, we do not drive the hardware directly, instead we
rely on the openboot primitives to manage the translation table. This
allows staying independant of the hardware, which is a good idea at
least for the bootloader (we can do actual hardware things in the
kernel)

Change-Id: Ifa57619d3a09b8f707e1f8640d8b4f71bb717e2a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1482
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>


# e8f58ba4 28-Mar-2019 PulkoMandy <pulkomandy@pulkomandy.tk>

sparc: fix bootloader build

- Add various missing jamfiles
- Add required implementation stubs
- Update openfirmware jamfiles for multiboot support
- Update linker rules for sparc loader

Change-Id: I2d06c7a4d33827f58d82946687003f9a0dcb1b7d
Reviewed-on: https://review.haiku-os.org/c/1329
Reviewed-by: waddlesplash <waddlesplash@gmail.com>