The previous package was broken (would often segfault, prevented
building Haiku cross-tools under x86_64), so update to the latest
version in HaikuPorts.
Signed-off-by: Alex Smith <alex@alex-smith.me.uk>
* I rebuilt all packages that depend directly on python: I hope I
didn't miss anything.
* SVN upgraded to 1.8.10 because I couldn't get 1.6.18 to build. This
required uodating expat, apr and apr_util, and adding serf which
replaces neon for SVN http support.
* Everything seems to be running fine so far.
* Disable the menu item when the folder doesn't exist, as the bar won't
show in that case.
* Use a mark on the item to tell wether the bar is visible, rather than
changing its label
* Simplify the logic for hiding and showing the bar. It is safe to call
_ShowBookmarkBar even if the bar doesn't exist, so no need to check for
it everywhere.
Fixes#11199.
BUrl is passed by value in many places, and we should make sure this is
as efficient as possible. There is little point in initializing all the
strings then overwriting them by using the copy constructor, when we can
set them directly.
* Move default context management to BUrlRequest since some code
(including the testsuite) bypass the BUrlProtocolRoster.
* Introduce proxy host and port in BUrlContext
* Have BHttpRequest use the proxy when making requests
Comments to #9672 agree that there's really no need to
expose the dev_t handle, thus simplifying the API.
The dev_t handle, if required, can be retrieved via
BPartition::GetVolume() instead.
This patch adds user_access() which can be used to gracefully handle
page faults that may happen when accessing user memory. It is used
by arch_cpu_user{memcpy, memset, strlcpy}() to allow using optimized
functions from the standard library.
Currently only x64 uses this, but nothing really is arch specific here.
Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
This is a major rework of how Haiku implements memset() and memcpy() on
x64. These functions are now removed from the commpage and reimplemented
in C++ using sse2 where it proved to be beneficial. That required some
serious changes in handling fpu state. Now, full fpu state is saved
at each interrupt, but not on task switch.
Some numbers: results of building targets: kernel libroot.so runtime_loader
and HaikuDepot on Intel i7 4770 with 16GB of memory.
real
user
sys
before:
1m54.367
7m40.617
0m58.641
1m33.922
8m12.362
1m0.852
1m32.922
8m10.509
1m1.006
1m31.947
8m12.596
1m1.353
after:
1m50.959
7m43.118
0m58.923
1m30.644
8m6.385
1m0.584
1m31.549
8m7.976
0m59.792
1m31.546
8m6.733
1m0.242
As Alex pointed out we can leak possibly sensitive data in xmm registers
when returning from the kernel. To prevent that xmm0-15 are zeroed
before sysret or iret. The cost is negligible.
Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
The kernel is allowed to use fpu anywhere so we must make sure that
user state is not clobbered by saving fpu state at interrupt entry.
There is no need to do that in case of system calls since all fpu
data registers are caller saved.
We do not need, though, to save the whole fpu state at task swich
(again, thanks to calling convention). Only status and control
registers are preserved. This patch actually adds xmm0-15 register
to clobber list of task swich code, but the only reason of that is
to make sure that nothing bad happens inside the function that
executes that task swich. Inspection of the generated code shows
that no xmm registers are actually saved.
Signed-off-by: Paweł Dziepak <pdziepak@quarnos.org>
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>