Commit Graph

8953 Commits

Author SHA1 Message Date
Augustin Cavalier
f2015c2f81 boot/platform/cfe: Remove, unused.
All platforms it was theoretically useful for also have U-Boot.
OK'd by mmu_man.
2018-08-11 20:21:12 -04:00
Jérôme Duval
81375d4fbb Package Kit: add Zstd compression.
Change-Id: Idbdb7cf1bde659046a88ea69a76e3b5fc4cd7013
Reviewed-on: https://review.haiku-os.org/323
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2018-08-11 23:10:00 +00:00
Augustin Cavalier
f6ff5a9790 headers/private: Fix wrong filemode. 2018-08-08 23:48:37 -04:00
Murai Takashi
410632da71 UserlandFSDefs.h: Fix gcc8 build
Remove index of portInfos[], since gcc8 warns -Werror=array-bounds
in UserlandFSServer::_Announce().

Change-Id: I79c4ee9d7dc301c54454974698ebd88d1a30750a
Reviewed-on: https://review.haiku-os.org/428
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2018-08-06 23:40:54 +00:00
Alexander von Gluck IV
5d0fd0e422 fdt: Major over-haul of fdt
* Consolidate all fdt code into fdt bus_manager
* Build boot and kernel static libraries

Change-Id: I2a69cd7e1f1276999a80734ff12918fd49b599e5
Reviewed-on: https://review.haiku-os.org/440
Reviewed-by: Alexander von Gluck IV <kallisti5@unixzen.com>
2018-08-06 15:46:49 +00:00
Fredrik Holmqvist
04cbc2588e Use fast clearing of visible screen for splash
memset uses rep stosb on x86 during boot, with memory
not set to write-combining, which makes it slow.

Instead we do aligned writes of 2 x four bytes at once.
Only clear the minimum of size and width * height * 4
UEFI framebuffer size can be huge, upto 512MB here,
and rep stosb seems to be around 25-30MB/s

This is written as generic as possible to work on
old compilers and different platforms, without
expecting boot memset to be optimized.

This makes it almost unnoticable compared to not
clearing.
2018-08-03 13:40:04 +02:00
Jaroslaw Pelczar
3a72e3ebee ARM64: Add initial kernel headers
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
aarch64 -> arm64 and coding style fixes by me.
2018-08-02 20:10:13 -04:00
Augustin Cavalier
25cd28e8c1 posix: Add initial ARM64 headers.
Almost directly copied from jpelczar's work.
2018-08-02 19:59:30 -04:00
Augustin Cavalier
fb4cc98472 build: Add initial ARM64 target.
It will probably be just stubs for the significant future, but,
here it is anyway.

Regarding the naming: Yes, the official name is "aarch64." However,
Linux, FreeBSD, and Zircon all call it "arm64", and so we will do the same.

I've configured it initially to be a Clang-only port, making no
changes to GCC buildtools whatsoever here. We'll see if that sticks,
however.
2018-08-02 19:48:29 -04:00
Augustin Cavalier
edb6d3b17b kernel_cpp: Move the C++14 operator delete out of the header.
It seems not all of the kernel includes this, but some use new/delete
anyway. Further, operator delete[] was not implemented at all.

Possibly fixes the ARM build.
2018-08-01 23:42:24 -04:00
Fredrik Holmqvist
15db6949b6 Don't clear video mem on UEFI, efi video mode refactor
Writes to videomem is slow without memory remapping
Can't do the mapping without leaving UEFI, so skipping
the clear. Afaict it should always be cleared by UEFI

This saves ~10 seconds of booting on my machine
(1920*1080*4 bytes)

EFI video mode (should have been it's own commit)
 * Only do strcmp if there are enough params
 * break when found
2018-08-01 21:12:08 +02:00
Alexander von Gluck IV
605e7eaed3 arch: Cleanup a few typos. Sorry for spam.
Change-Id: Ic2fce841acdee8572005cf2a9710188d03d7cecd
2018-07-31 19:37:01 -05:00
Alexander von Gluck IV
9642f7705b arch: Cleanup of __ARM__ checks
* gcc 7.x defines __arm__ and __ARM__ (and others)
* clang defines __arm__ and __arm
* cleanup a few related ifdef vs if macros

Change-Id: I5da4bafac590f6fa3e10e543688001c2449f840d
2018-07-31 19:12:20 -05:00
Augustin Cavalier
b5c220fb7d build: Use BeOSBuildCompatibility on Haiku also.
This forces usage of the libroot_build wrapper functions even on GCC2.
Probably fixes some strange ExtractHPKGArchive failures on Haiku.
2018-07-31 19:50:46 -04:00
waddlesplash
fe66a314c8 Revert "BScrollBar: Add lines and dots knob styles to scroll bar"
This reverts commit ec1b18c58a.

This was not well enough reviewed, and it seems that at least some
consumers of the old API (e.g. WebPositive) need more than the new one provides.

Change-Id: Ie7ad1fc70dab889922424298661504b00f66d31d
2018-07-22 18:26:06 +00:00
Jérôme Duval
679518f417 setjmp.h: add noreturn keyword on longjmp variants. 2018-07-21 12:27:27 +02:00
Hrishi Hiraskar
bc8427c522 Tracker: Allow add-ons to dynamically extend popup menu.
An add-on may now add custom entries to the popup menu, in order
to provide more than one action.

Change-Id: Ib4726c0c1e70c59e3ba4d752df24b76cfee1c4a4
2018-07-19 14:00:48 +00:00
John Scipione
ec1b18c58a BScrollBar: Add lines and dots knob styles to scroll bar
Fixes #9137

Move scroll bar drawing into HaikuControlLook

Added B_SCROLLABLE flag to BControlLook

Update FakeScrollBar in Appearance to also draw using HaikuControlLook.

Focus works on scroll bars again, used by FakeScrollBar... and probably
nowhere else.

Added private _ScrollingEnabled() convenience method to BScrollBar and
use it in a few places making.

Create ScrollBarPrivate.h header to share a couple of scroll bar related
enums with HaikuControlLook that come from BeOS Scroll Bar prefs.

Stuff arrow_direction enum into BScrollBar::Private as it has been
succeeded by a similar enum already present in BControlLook and is only
around now for BScrollBar::Private::DrawScrollBarButton.

Change-Id: Idc31ee41de091ba45ded2f0315a004af00143803
2018-07-16 16:11:46 +00:00
Andrew Lindesay
3b17d8dd7f HaikuDepot / PackageKit: Repositories 'Identifier' URL
Repositories are identified with a 'url' in the
remote 'repo.info' file.  There is also a
'base url' which is the URL locally with which
the system is able to access the repository
data on.  There is some confusion between these
two terms in the source.  This change aims to
separate the two out and consistently name them.
The settings for the repository locally also was
not storing these values and that has been fixed.
Debug info about the repositories also did not
display the two urls consistently and will now
also do so.  Finally, HaikuDepot now correlates
locally configured repositories with the data in
HaikuDepotServer using the identifier URL; this
makes the use of mirrors with HaikuDepot possible.

Fixes #13888
Change-Id: I66dfe589b05c24e1ab123a6945352e0f24b60bf1
2018-07-05 20:06:54 +00:00
Murai Takashi
12ed45b60f Media kit: Suppress -Werror=class-memaccess
* Add media_format::Clear(), media_format::Unflatten().
* Replace memset() with media_format::Clear()
* Replace memcpy() with media_format::Unflatten()

Fix #14156

Change-Id: I38ebc2de4915b954a15b6f4f6b40d016506910e5
2018-07-02 21:14:30 +00:00
Augustin Cavalier
f81f6999ee Remove private vmware driver headers.
Not used since the VMware drivers were migrated out of the tree
a few years ago.
2018-06-26 17:23:23 -04:00
Augustin Cavalier
f4b42b518a drivers: Deduplify joystick_driver.h.
Now there is only the one copy in headers/private/device.
2018-06-21 18:46:30 -04:00
Augustin Cavalier
e4104854c3 if_dl: Increase size of sdl_data from 20 to 46 bytes.
FreeBSD's is presently 46 bytes. CID 1422869 warns that it can get overrun
in if_attach() in copying if_xname which is IF_NAMESIZE bytes (32).

This breaks ABI, but BeOS did not have sockaddr_dl, it is only a modern-GCC
ABI break. Since most applications assume that sockaddr_dl is variable-length
and is null-terminated, as well as not used very often, hopefully this will
require relatively few rebuilds.
2018-06-20 21:26:21 -04:00
Augustin Cavalier
9216fc0178 More class/struct mixup fixes.
Spotted by Clang.
2018-06-18 23:16:50 -04:00
Augustin Cavalier
fe17f0df1f scsi: Use _res and not res in MK_ERROR.
Some users of MK_ERROR pass in parameters from a variable called "res",
which is obviously not what they want to do, as that will use this "res"
and not theirs.

Spotted by Clang.
2018-06-18 22:05:45 -04:00
Augustin Cavalier
9ac3062734 kernel: Small fixes for Clang. 2018-06-18 19:32:13 -04: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
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
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
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
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
9e75e900da kernel: use non-deprecated signatures for new/delete operators.
add posix_memalign(), needed for c++17.
2018-05-28 20:49:15 +02:00
Adrien Destugues
8bca37d604 vfs: Bind flock locks to file descriptors
* File locks created by flock should only apply for the file descriptor
  that was used to lock the file. Another fd on the same file should then
  be denied access (calling flock should fail).
* fcntl based locks, however, are in a separate namespace and are global
  to a team.
* This issue was found when running webkitpy test suite, and should close
  ticket #13795.
* Don't use session or team as comparison in release_advisory_lock(), as
  that information might not be available anymore (e.g. when called from
  Team::~Team()). This fixes #14121.

Change-Id: I9efb96cfcefe7e72b0060220c635a665e7e643cc
Co-authored-by: Axel Dörfler <axeld@pinc-software.de>
2018-05-22 20:29:21 +00:00
Alexander von Gluck IV
7f167d4f4a radeon_hd/dp: Fix bug in lane training. Kudos gcc7
* GCC7's static analysis found this one and it still
  took #gcc and me a while to spot. Nice work gcc7!
* Should help DisplayPort training issues :-)

Change-Id: I9b47f13c95e622a2c08ff329ec9c3fc7e3db493d
2018-05-21 18:02:32 -05:00
waddlesplash
3f9e3b0a62 ICU locale backend: Increase size of fLocaleDescription from 512 to 1024 bytes.
GCC7 gave a Werror that we were snprintf'ing potentially ~860 bytes into
a 512-byte buffer.
2018-05-19 20:44:51 -04:00
Jérôme Duval
db9b70ee54 kernel: add a compatibility commpage on x86_64.
* x86 uses a commpage with 32-bit addresses, incompatible with the one used for
x86_64. For this reason, a compatibility commpage is needed to support a 32-bit
userland on x86_64.
* define ADDRESS_TYPE as a macro for addr_t (default) or uint32 (for the 32-bit
commpage).
* team_create_thread_start_internal() will use clone_commpage_area() with
KERNEL_USER_DATA_BASE or clone_commpage_compat_area() with
KERNEL_USER32_DATA_BASE, to setup the correct commpage.
* real_time_clock (in compatibility mode) also updates the compatibility
commpage with real time data.

Change-Id: I61605077ce0beabab4439ef54edd1eae26f26fd2
2018-05-18 05:11:07 +00:00
Jérôme Duval
c7c3973e09 kernel: generic user_memcpy now saves the old state.
fixes #14135.
2018-05-16 06:58:33 +00:00
Jérôme Duval
a553e95d85 kernel: support elf32 on x86_64.
* define ELF32_COMPAT to enable ELF32 macros.
* add a flag ELF_LOAD_USER_IMAGE_TEST_EXECUTABLE to only check the format.
It will be used by load_image_internal() to check which mode to use when
loading an image.
* in arch_elf_relocate_rel(), switch to elf_addr instead of addr_t, which
would be the wrong size for elf32 on x86_64.
* the ELF compat loader reuses the relevant parts of elf.cpp and arch_elf.cpp,
excluding for instance load_kernel_add_on() or dump functions.

Change-Id: Ifa47334e5adefd45405a823a3accbd12eee5b116
2018-05-15 10:29:00 +00:00
Jérôme Duval
27b32ee02c kernel/x86_64: adjust descriptors tables for compatibility mode.
* also adjust BOOT_GDT_SEGMENT_COUNT for x86, the definition is used by the
boot loader.
* add some 32-bit definitions.
* add a UserTLSDescriptor class, this will be used by 32-bit threads.

Change-Id: I5b1d978969a1ce97091a16c9ec2ad7c0ca831656
2018-05-15 10:27:02 +00:00