Enable SSE as a part of the "preparation of the environment to run any
C or C++ code" in the entry points of stage2 bootloader.
SSE2 is going to be used by memset() and memcpy().
Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
Just following the path of least resistance and adding andq $~15, %rsp
where appropriate. That should also make things harder to break
when changing the amount of stuff placed on stack before calling the
actual syscall routine.
Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
There is absolutely no reason for these functions to be in commpage,
they don't do anything that involves the kernel in any way.
Additionaly, this patch rewrites memset and memcpy to C++, current
implementation is quite simple (though it may perform surprisingly
well when dealing with large buffers on cpus with ermsb). Better
versions are coming soon.
Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
The possibility to specify custom memcpy and memset implementations
in cpu modules is currently unused and there is generally no point
in such feature.
There are only 2 x86 vendors that really matter and there isn't
very big difference in performance of the generic optmized versions
of these funcions across different models. Even if we wanted different
versions of memset and memcpy depending on the processor model or
features much better solution would be to use STT_GNU_IFUNC and save
one indirect call.
Long story short, we don't really benefit in any way from
get_optimized_functions and the feature it implements and it only adds
unnecessary complexity to the code.
Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
* With HAIKU_NO_DOWNLOADS=1, the check against existing package files
in the download folder should only be done in the phase that is
adding packages to be put onto the resulting target image, not in the
phase that is adding the bootstrap packages (as here those packages
will be *built*, not downloaded).
* Instead of removing "system" in the target completely, only
replace all of its subfolders.
* The downside of the current solution is that extra files, and
directories in "system" will not be removed. Improvements
welcome.
* Before, it would just overwrite the previous name, leaving extra
bytes from the previous name (they wouldn't become part of the
host name, but it just didn't look that nice).
Fix the following errors:
PackageInfo.cpp:85:23: error: comparison between signed and unsigned integer expressions
PackageInfo.cpp:93:21: error: comparison between signed and unsigned integer expressions
Signed-off-by: Alex Smith <alex@alex-smith.me.uk>
* Increase the RAM limit to 128K per screenshot
* Reduce retrieved size to 320 pixel wide
* Don't expect to be able to read the stream in one call,
read it in 4K chunks.
* Print some errors in this code-path to stderr.
* The categories and other filter options are orthogonal. Don't
force the user to choose between real categories and for example
"installed" or "available" in the same drop-down. I've removed
(for now) the Options main menu. There are now four small check-marks
below the filtering drop-downs: Available, Installed, Development and
Source Code. These enable showing the respective packages in the list
view. Only "Available" is checked by default. This changes the default
behavior to show only not-yet-installed packages. This change puts
the filtering options in one place, the showing of development or
source code packages is not "hidden somewhere else" anymore. I am not
so happy with the additional row, however, I am also thinking about
using icons instead of the checkmarks.
* Fixed finding the suitable package translation for summary and
description. For example, WonderBrush now has a German translation.
long_mmu_init() prepares initial paging structures for 64 bit kernel.
Once that function completes bootloader cannot allocate any memory
that needs to be passed to the kernel.
Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
Both data array and its size should be constant so that GCC can do
as much as possible at compile time and it is safe to use them in
static assertions.
This patch also changes the type of size constant to size_t which
more appropriate and uses sizeof() to determine the size of the
array.
Fixes build breakage introduced in e547662664.
Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
Change the way DNS are entered: now the user can enter multiple
DNS servers addresses separated by a comma. Actually we handle
also spaces or semicolon.
Network Preflet: Fix GetDNSListFromString
* VT100 is much more common than VT52 which the u-boot port was
previously using (a legacy of the Atari m68k port)
* Implement serial_getc (again, code is identical to raspberry port...)
so the boot menu can be used over the serial port. The enter key is
recognized, arrows currently aren't.
* Cursor coordinates are 1-based, not 0-based
* Color change was disabled and broken
This implementation of our console over VT100 is generic and should be
moved out of the raspberry-pi specific folder. However, leaving it there
for now as we will have some bigger reorganization a swe add FDT support
here.
* Fixed retrieving rating summary for the list view.
* Rating and command are optional in the web app (or probably you need
to specify at least one of them). Handle ratings with just the comment
but no rating in average calculation.
Fix regression introduced in commit 2f60dea5: BSymlink::ReadLink()
returns a byte count in the success case, which ThrowOnError() does
not anticipate. Consequently, attempts to copy symlinks would fail.
No big functional reason for this, but rather keep it in sync now
then have to do lots of work later on, when there are major changes.
Once I have it fully fleshed out for ARM, I might take a look if
we can generalise it a little more, as there's lots of code
_exactly_ the same for both platforms (and other platforms in
progress using the same code).
* Removes default mapping of a portion of the RAM (will be done
as needed)
* Passes on the page directory area to kernel, so on early vm init
the kernel can use the area for pagetable allocation.
* Leaves it to the platform to pass in physical memory range(s). This
will ultimately come from FDT.
* Fix long standing issue with allocation of the heap, potentially
causing other part of the bootloader to overwrite the heap.
* Implements pagetable allocator in kernel for early vm mapping.
This fixes the first PANIC seen, we now just get the same one later
on when the VM is up... more to come...
We have _start/_end symbols to mark our start and end, use those
to determine where we are loaded. We're slowly getting closer to
a fully dynamic handling of our memory map!
Let the platform mmu_map_physical_memory the initrd region, and
reserve it before calling mmu_init. This removes another hardcoded
address, since e.g. U-Boot gets the address from the uImage file.
This reverts commit 3fbb24680c.
As I mentioned in #11131, this fix is not correct, and works around
the problem. The real reason was that arch_debug_call_with_fault_handler
was not working properly, so the fault handler went crazy.
With commit eb92810 that is fixed so this can be reverted.
This fixes the problem with KDL freaking out when doing a stacktrace
and having its fault handler triggered. Have no clue how this could
have worked before, but it did :P
and use it instead of the regular BTextControl.
Unfortunately it doesn't block multi-byte characters (to do that we
should create a subclass of BTextView and override InsertText()).