Commit Graph

58656 Commits

Author SHA1 Message Date
Augustin Cavalier
b06628148f HaikuPorts: Update nano to not depend on libmagic. 2018-06-17 15:37:05 -04:00
Jessica Hamilton
7f7f3618dd webpositive: force download window on screen.
* When Download window is initially shown, it is correctly
  fully onscreen; however, adding a download resizes the
  window such that it becomes partially offscreen. Now,
  when the frame is resized, reposition the window onscreen
  again.

Fixes #12704
2018-06-17 17:00:47 +00:00
Augustin Cavalier
c1f451fa9b HaikuPorts: Sync packages with latest buildmaster (most notably, WebKit.) 2018-06-17 12:58:36 -04:00
Kacper Kasper
c49f045421 Link WebPositive with libWebKitLegacy on x86_64
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2018-06-17 12:58:19 -04:00
Augustin Cavalier
4a459f066d :kernel: Fix stack alignment in syscall entry on x86_64.
The user iframe and associated data that the syscall entry pushes to the
stack directly were causing the stack to be mis-aligned by 8 bytes. Since
we re-aligned %rsp afterwards, for most usecases this wasn't a problem.
However, since we stored the pre-realinged %rsp in %rbp (as we need it to
access the iframe data), this also meant that anything which depended on
%rbp being 16-byte-aligned would run into serious problems.

As it turned out, GCC 7 assumed that %rbp was indeed 16-byte-aligned, and
so optimized certain accesses to use SSE instructions that depended on this
alignment. Since inside any callstack begining with a syscall this was not
the case, a "General Protection Exception" resulted (see #14160 for an example)
at the first usage of such an instruction. I wasn't really sure what was going
on when it first came up, and so "fixed" it by disabling the GCC optimization
that used such instructions. Replacing the -fdisable... with -mstackrealign thus
also "fixes" the problem, as I discovered earlier today, as it forces GCC to
realign the stack in function prologues.

So instead of rounding %rsp down to the nearest aligned address after the
pushes are complete, we offset %rsp by the amount the pushes are not,
thus fixing both %rsp and %rbp in syscall handling routines. This of course
depends on syscall_rsp being already aligned, which it is.

Thanks to PulkoMandy and js for the advice and guidance (and PulkoMandy
for the ASCII art), as this is essentially my first time working with
kernel assembly.
2018-06-16 17:24:33 -04:00
Jessica Hamilton
77c8afb47f libroot_build: don't define system_time() on Haiku host.
* On x86_64, this was causing an infinite loop between
  libroot & libroot_build in the host unzip tool.
2018-06-16 10:08:56 +00:00
Jessica Hamilton
d284524815 libroot_build: replace void* with addr_t for hidden functions.
* Using attribute visibility hidden doesn't get applied if a
  function returns a non-class pointer type, so the functions
  weren't being hidden for gcc4+ builds, resulting in stack
  overflows. Using addr_t, which should be the same size as
  void* works around this restriction.
2018-06-16 10:08:56 +00:00
Alexander von Gluck IV
64d4515abf kernel: Only apply rtl-stv1 hack to x86 & x86_64
Change-Id: I971f7bf3bb95ee466a59ab777c2f6fc56fbcbd43
2018-06-15 13:43:13 +00:00
Augustin Cavalier
4f7b9506fd Revert the rest of the COMPAT_MODE changes (back to hrev52003.)
This reverts commit 458e758f37.
This reverts commit ce5eb94a82.
This reverts commit aac8d4c317.
This reverts commit c70cba914a.
This reverts commit 2ffbe7aaca
This reverts commit c6e120e2d2.
2018-06-15 00:20:56 -04:00
Augustin Cavalier
513403d420 Revert team and thread changes for COMPAT_MODE (hrev52010 & hrev52011).
This reverts commit c558f9c8fe.
This reverts commit 44f24718b1.
This reverts commit a69cb33030.
This reverts commit 951182620e.

There have been multiple reports that these changes break mounting NTFS partitions
(on all systems, see #14204), and shutting down (on certain systems, see #12405.)
Until they can be fixed, they are being backed out.
2018-06-14 22:25:06 -04:00
Rene Gollent
211cb77acf Debugger: don't auto-download packages non-interactively.
- When in non-interactive mode, i.e. saving a crash report, don't
  allow the image debug info loader to automatically grab missing but
  available info packages. Otherwise we potentially download very large
  packages with the user being entirely unaware, i.e. the 200MB debug
  information package now present by default for gcc7's libgcc. This
  should eventually be made a configurable preference though.
2018-06-14 16:51:32 -04:00
Augustin Cavalier
b337e9a8fd Remove HAIKU_INCLUDE_PATENTED_CODE.
Nothing uses it anymore. Fixes #8935.
2018-06-13 18:07:30 -04:00
Jérôme Duval
08bc83d7ae bootstrap: update x86_64 versions. 2018-06-12 23:56:18 +02:00
Alexander von Gluck IV
7d95ab67ad intel_extreme: Update PCH mask to match new bits
* Missed in 87628f17eb
2018-06-12 14:20:34 -05:00
Jérôme Duval
c558f9c8fe kernel/x86_64: stacktrace for threads in compatibility mode.
* add compat_stack_frame struct.
* user symbols are't yet looked up in compatibility mode.

Change-Id: I94b45f25564c246bb174f9491f4abc4aa8676549
2018-06-12 17:56:55 +02:00
Jérôme Duval
44f24718b1 kernel/x86_64: add compatibility source files to the build.
* add x86 versions of fnsave frstor.
* add missing declaration for elf32_resolve_symbol().

How-to build a x86_64/x86 bootstrap build:
mkdir generated_bootstrap; cd generated_bootstrap
../configure --bootstrap /dir/to/haikuporter/haikuporter /dir/to/haikuports.cross \
  /dir/to/haikuports --build-cross-tools x86_64 /dir/to/buildtools --build-cross-tools x86 -j8 --use-gcc-pipe
jam -q -sHAIKU_PORTER_EXTRA_OPTIONS="-j8 --sourceforge-mirror=freefr --no-source-packages" @bootstrap-raw

Change-Id: I6eae3653c42a53683ae307107fae595c4b8ebcfb
2018-06-12 17:56:55 +02:00
Jérôme Duval
a69cb33030 kernel/x86_64: setup a new thread in compatibility mode.
* define compat_thread_info, compat_rlim_t, compat_rlimit and
compat_thread_creation_attributes to be used when applicable in compatibility
mode.
* handle 32-bit types in _user_spawn_thread(), _user_get_thread_info(),
_user_get_next_thread_info(), _user_getrlimit(), _user_setrlimit(),
other syscalls are compatible as is.
* init TLS for compatibility mode threads.

Change-Id: I483ba95e6198ddac9d240671bcb56fcd2ad831d2
2018-06-12 17:56:55 +02:00
Jérôme Duval
951182620e kernel/x86_64: setup a new team in compatibility mode.
* in load_image_internal(), elf32_load_user_image checks whether the binary
format requires the compatibility mode.
* we then set up the flag THREAD_FLAGS_COMPAT_MODE and the address space size.
* the compatibility mode runtime_loader is hardcoded with x86/runtime_loader.
* if needed, the 64-bit flat_args structure is converted in-place to its 32-bit
layout.
* a 32-bit flat_args isn't handled yet (a 32-bit team execs a 64-bit binary).

Change-Id: Ia6a066bde8d1774d85de29b48dc500e27ae9668f
2018-06-12 17:56:55 +02:00
Jérôme Duval
458e758f37 kernel/x86_64: compatibility syscalls for vm.cpp.
* define compat_area_info to be used when applicable in
compatibility mode.
* handle 32-bit types in _user_reserve_address_range(), _user_get_area_info(),
_user_get_next_area_info(), _user_transfer_area(), _user_clone_area(),
_user_create_area(), _user_map_file(), other syscalls are compatible as is.
* _get_next_area_info() doesn't work well with a 32-bit address cookie (address
could be in 64-bit range). Instead use _compat_get_next_area_info() which uses
the area id as cookie, though the areas are not ordered by address any more.

Change-Id: Ic7519ca8824aa2d534b0f03ea75a1bf6ae321535
2018-06-12 17:56:55 +02:00
Jérôme Duval
ce5eb94a82 kernel/x86_64: compatibility syscall for system_info.cpp.
* define compat_system_info to be used in _user_get_system_info() in
compatibility mode.

Change-Id: Ib917d41a3a87155aee9cb536fd09e7231b232bc8
2018-06-12 17:56:55 +02:00
Jérôme Duval
aac8d4c317 kernel/x86_64: compatibility syscalls for signal.cpp.
* handle 32-bit types in _user_send_signal(), _user_sigaction(), _user_sigwait(),
_user_set_signal_stack(), _user_restore_signal_frame(), other syscalls are
compatible as is.

Change-Id: I4c8dc47bfa80f36e363d444d2a5a7be6c621606d
2018-06-12 17:56:55 +02:00
Jérôme Duval
c70cba914a kernel/x86_64: compatibility syscalls for image.cpp.
* define compat_image_info, compat_extended_image_info
to be used for respective 32-bit types of syscalls in compatibility mode.
* handle 32-bit types in _user_register_image, _user_get_image_info,
_user_get_next_image_info, other syscalls are compatible as is.

Change-Id: Ibbd33e6796208dfa70d869e36bf745bc3e18d330
2018-06-12 15:55:55 +00:00
Jérôme Duval
2ffbe7aaca kernel/x86_64: compatibility syscalls for vfs.cpp.
* define compat_flock, compat_timespec, compat_stat, compat_attr_info,
compat_fs_info, compat_fd_info to be used for respective 32-bit types
of syscalls in compatibility mode.
* handle 32-bit types in common_fcntl(), _user_read_stat(), _user_stat_attr(),
_user_read_index_stat, _user_read_fs_info, _user_write_fs_info,
_user_get_next_fd_info, other syscalls are compatible as is.

Change-Id: I5b372169fe142f67b81fd6c27e0627d5119ba687
2018-06-12 15:55:43 +00:00
Jérôme Duval
c6e120e2d2 kernel/x86_64: add setup_compat_signal_frame.
* add compatibility signal types.

Change-Id: I665020234be0ba2ccbb33bdbc338c11a214ab6e8
2018-06-12 15:55:18 +00:00
Alexander von Gluck IV
87628f17eb intel_extreme: Add additional more recent PCH devices
Change-Id: Ib9f7dc187300c9f746bca9fd7f721c1954f5be44
2018-06-11 20:34:14 -05:00
Augustin Cavalier
3ad0683efb intel_extreme: Map VBIOS for kernel only.
korli's first suggested change from #14190. Gets past the first KDL,
but not all the way to desktop.
2018-06-11 20:20:34 -04:00
Augustin Cavalier
d22143c84e freebsd11_wlan: Change paths and add new files to Jamfile. 2018-06-11 19:49:46 -04:00
Augustin Cavalier
3c410aba97 freebsd11_wlan: Copy Haiku-specific files from FreeBSD 9 directory.
Again, unmodified.
2018-06-11 19:47:52 -04:00
Augustin Cavalier
293a2cae7a Import FreeBSD 11.1 net80211 core.
Completely unmodified and not wired into anything. Since my Haiku-specific
changes will go through Gerrit, it makes sense to import this first, so that
the diffs are readable.
2018-06-11 19:45:39 -04:00
Augustin Cavalier
8085ed3fec UserTimer: Zero-initialize sigevents.
CID 1234670 and friends. Probably harmless, though.
2018-06-11 18:57:00 -04:00
Augustin Cavalier
a287df1c5b efi: Fix bad mode changes from previous commit. 2018-06-11 17:40:38 -04:00
Jessica Hamilton
86b12d85c7 efi: move various init before call to main().
* With the previous commit, we can now move functions that require
  calling mmu_map_physical_memory to where they should have been
  originally. This also allows the SMP safe mode menu entries to
  be properly generated, now that smp_init is called prior to
  main().

Change-Id: I05ddca5273b11cb4846021664c1ea2cf8ba723b7
2018-06-11 15:17:40 +12:00
Jessica Hamilton
b2d0b3699e efi: redo mmu_map_physical_address to not require allocations.
* mmu_map_physical_address will get called prior to calling main()
  which leaves us without a heap, malloc, and new. Instead, use
  the kernel args physical allocated range array, and then
  convert to our allocated memory region type on-demand.

Change-Id: I265fd165ef7143681e8e40c3686fda1a583c20dc
2018-06-11 15:17:39 +12:00
Augustin Cavalier
8845ad353d bootloader: Update copyright years.
We've definitely changed the bootloader a good amount since 2014.
2018-06-09 22:25:33 -04:00
Augustin Cavalier
98a4ebbe3c efi: Actually add items to safemode menu.
The call to smp_... is not working since it relies on gKernelArgs being
fully initialized, which it isn't at this stage in the EFI loader. Jessica
says that in order to have that happen, the heap would also need to be
initialized early, which it also is not.

At least you can now force a safe videomode, which is enough for me to
be able to test video drivers.
2018-06-09 22:21:21 -04:00
Andrew Lindesay
a9edb9bffa HaikuDepot: Multiple improvements for user-ratings
* Display of the user-ratings listing improved
* When a user-rating is created / edited, the pkg is updated
* Creation date of the user-rating is unpacked shown
* Ability to create a user-rating with a comment, but no numerical rating
* Stars display show grey if no numerical rating present
* Improvements to error reporting when problem arise
* Parsing of the 'revision' field of the version working
* Removed debug logging for the text engine
* Other minor tweaks

Change-Id: I99f881ab1426641ef4177eec2d3bcacc7cb74e95
2018-06-09 17:07:03 +00:00
Augustin Cavalier
466255e324 freebsd11_network: Add definition missing from previous commit. 2018-06-08 21:29:04 +00:00
Augustin Cavalier
800e9d6652 freebsd11_network: More changes for freebsd11_wlan. 2018-06-08 21:03:04 +00:00
Augustin Cavalier
e1c961d028 network: Update comments in Jamfile with respect to ethernet driver upgrades. 2018-06-07 23:26:44 -04:00
Augustin Cavalier
9ac8151269 ipro1000: Delete the old BeOS driver.
"Where we're going, we don't need BeOS drivers..."
2018-06-07 23:09:03 -04:00
Augustin Cavalier
52d1e93353 Revert "intel_extreme: Broadwell is really Gen7(.5), not 8."
This reverts commit 4f059c1fc5.

From discussion on the mailing list, it seems I was correct the first time
and Broadwell is Gen8. The confusion comes from the SER5/SOC distinction,
which is not in the Linux driver, and I still don't know which one it really
belongs in.
2018-06-05 21:07:59 -04:00
Augustin Cavalier
02cb8503d2 freebsd11_network: Changes and additions for freebsd11_wlan.
There is still a lot to be done, though.
2018-06-05 18:48:02 -04:00
Adrien Destugues
1407e6d7b1 Complete implementation of printer serial transport
- Allow to configure the baudrate (it is set by the printer settings,
  but the transport didn't care)
- Implement reading from the serial port (some printers will need us to
  poll the status and the like, as there is usually no hardware flow
  control)

Change-Id: I70ba2566595d5dfa5eda3d518614db6514cb2398
2018-06-05 21:44:14 +00:00
Augustin Cavalier
4f059c1fc5 intel_extreme: Broadwell is really Gen7(.5), not 8. 2018-06-05 17:27:45 +00:00
Jérôme Duval
bdd7dae89c kernel/x86_64: add a compatibility syscalls table.
* install syscall handlers in compatibility mode.
* copy the syscall entry in the compatibility commpage, ATM only for Intel
SYSENTER.
* copy the thread exit handler in the compatibility commpage.

Change-Id: Ic350799938815194377d8a4560cb106fe7366cc6
2018-06-05 17:13:08 +00:00
Jérôme Duval
0d1e94a465 mount_server: restore automount notification.
Fix #14149.
2018-06-04 22:58:47 +02:00
Jérôme Duval
8088f452ff efi: fix loader build. 2018-06-03 18:14:32 +02:00
Jérôme Duval
379d232693 net80211: fix ieee80211_node_dectestref().
* sync with FreeBSD.
* implement atomic_cmpset_int() with atomic_test_and_set().
2018-05-31 19:19:50 +00:00
Jérôme Duval
499712a9ec device_manager: IORequest: use user_memcpy() to access a user buffer.
* should fix #14164, but the case can't be reproduced easily it seems.

Change-Id: I636db93cc1efe2784b2530dced6a900fbfe3dce8
2018-05-31 11:55:18 +00:00
Augustin Cavalier
92875838d6 WebPositive: Remove now-uneeded -std=, disable Wformat-truncation.
Same case as last commit.
2018-05-28 20:46:44 -04:00