Commit Graph

9150 Commits

Author SHA1 Message Date
Augustin Cavalier
218a8c03cb Revert the Codec Kit.
All of Barrett's individual reverts have been squashed into this
one commit, save a few actual bugfixes.

Change-Id: Ib0a7d0a841d3ac40b1fca7372c58b7f9229bd1f0
2019-05-17 14:43:32 -04:00
Calvin Hill
6ee7bb4f7b cpu_type.h: Allow cpu_type functions to be accessible from C.
This allows cpu_type.h to be used in C-based software,
with the get_cpu_*() functions all accessible via C as well
as C++ code.

Tested changes with sysinfo, AboutHaiku and Pulse.

Change-Id: Ide87d8e3f2ba5f0f1890f385b1ac90c677bcc274
Reviewed-on: https://review.haiku-os.org/c/1453
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-05-16 17:07:38 +00:00
Jérôme Duval
89f1fd6512 Bump gutenprint version.
needs gutenprint8 packages to be uploaded.

Change-Id: I1204ff8b1bb85cc0eb615082b205280daabbc290
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
2019-05-14 19:11:41 -04:00
Jeroen Oortwijn
72f7f7d976 USB_hid.h: Add Report Type constants
From "Device Class Definition for Human Interface Devices (HID)
Ver. 1.11", par. 7.2.1, page 51.

Change-Id: I4628f8ca940758aaf4a09290e9fa407d30374e7a
Reviewed-on: https://review.haiku-os.org/c/1450
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-05-14 07:24:09 +00:00
François Revol
629397f222 Add basic support for loading ControlLook add-ons
app_server just passes the add-on path around.

Maybe we should make sure the add-on can be loaded when setting it.

Change-Id: I3acd3299782a22c1666bd5435dbf3d8053e359fa
Reviewed-on: https://review.haiku-os.org/c/1430
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-05-13 22:15:30 +00:00
Murai Takashi
0ecfc6f3e3 Added some support for GCC 9.
Change-Id: I6b6cd53e00601592b44e1f2aa2804c8c9c9593d9
Reviewed-on: https://review.haiku-os.org/c/1438
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-05-07 23:07:17 +00:00
Augustin Cavalier
c2cbf95810 kernel: Add and fix ownership checks in mutex_destroy and mutex_transfer.
* mutex_destroy() only checked wether or not there were waiters,
   not if the lock itself was presently held by another thread.
   Now we do, which should make #15015 panic much earlier instead
   of trying to use freed memory.
 * mutex_transfer_lock() and recursive_lock_transfer_lock() did
   not check that the calling thread actually owned the lock.
   Now it does, which should trigger asserts if anyone tries
   to do this.
2019-05-02 16:07:39 -04:00
Alexander von Gluck IV
d117379205 posix/if_types.h: Remove IFT_IEEE1394, breaks build
* Sneaky ifdef in libnetwork/netresolv/irs
* Sorry for spam.

Change-Id: I241d65b63d0bb8b281e3db0adcad2814b1476c7e
2019-04-22 13:21:50 -05:00
Alexander von Gluck IV
db3b4a3caf posix/if_types.h: Fix tun id, add a few more
* Oops, there's a standard for these. Stick to the standard.
* Add a few that could be useful someday.
* Mention iana spec.

Change-Id: I4cf75e8c1e4b25f65d10921c7075fbd53f44e14e
2019-04-22 13:06:04 -05:00
Alexander von Gluck IV
612c05bd76 network/tun: Style fixes; no functional change 2019-04-17 19:24:19 +00:00
Alexander von Gluck IV
64948daae8 tun/tap: Build fixes for tun add-on 2019-04-17 14:12:59 +00:00
François Revol
23901a75de Stub out a tun/tap module from the loopback code
Not functional yet.

Change-Id: I6f7427c5fa176595927d73dd3b11b04945f66d84
2019-04-17 14:12:59 +00:00
François Revol
b110fce124 Add sources for my original BeOS BONE tun/tap config driver
as a starting point.

Change-Id: I9c3b1027a7fda4ab1eaced486eb2455a19571fee
2019-04-17 14:12:59 +00:00
Jérôme Duval
02f7c69828 TranslationErrors.h: document as deprecated.
TranslationDefs.h: SupportDefs.h already includes Errors.h, remove TranslationErrors.h.
2019-04-15 20:45:19 +02:00
Augustin Cavalier
f1fafe317f kernel/OS.h: Include sys/types.h instead of pthread.h.
This avoids polluting the namespace significantly. Also adjust
all files which depended on this behavior to include pthread.h
directly.
2019-04-12 15:26:25 -04:00
Les De Ridder
e982a0b217 btrfs: make file system name consistent
Change-Id: I5276be636875809f78201cb6274d64499252de73
Reviewed-on: https://review.haiku-os.org/c/1394
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
2019-04-09 12:03:12 +00:00
Alexander von Gluck IV
40fcf16358 kernel/riscv64: Add missing kernel_arg ranges to get build going.
Change-Id: Idf549a5e4d01e6dc8949ec1252296337e5ef970c
Reviewed-on: https://review.haiku-os.org/c/1380
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-04-05 14:29:23 +00:00
Alexander von Gluck IV
e0ec8de753 kernel/riscv64: ATOMIC64 FUNCS are not syscalls
Change-Id: I8696939ec2fab6f3960a9a41f0b5c9fcd6949760
Reviewed-on: https://review.haiku-os.org/c/1379
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-04-05 14:29:23 +00:00
PulkoMandy
fea91fdc77 sparc: pci bus manager
Copied from PPC with the hooks for Apple hardware removed.
To be completed with the actual PCI bus implementation for Sun machines.
This is where we start doing machine specific stuff, apparently.

Change-Id: I06af4de9621e9d40593d153642478d928083e49a
Reviewed-on: https://review.haiku-os.org/c/1364
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-04-04 20:31:25 +00:00
PulkoMandy
e8f58ba4be 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>
2019-04-04 20:31:25 +00:00
Alexander von Gluck IV
566e253f24 kernel: Fill remaining riscv64 architecture headers 2019-04-04 09:09:49 -05:00
Alexander von Gluck IV
5e06ebe141 kernel/arch/riscv64: Correct some architecture headers 2019-04-04 09:09:38 -05:00
Alexander von Gluck IV
45b21f00ce riscv64: Drop duplicate KERNEL_LOAD_BASE 2019-04-04 09:09:34 -05:00
Alexander von Gluck IV
c59cde3d69 riscv32: Drop any remaining mentions
* I added this early on, but to be honest, any interesting
  workstation class hardware would be riscv64.
* Since riscv32 is mostly embedded or low power, just drop.

Change-Id: Id36274c882c46e766268f2ab53eb1bd5f95227be
Reviewed-on: https://review.haiku-os.org/c/1352
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-04-04 13:23:32 +00:00
Alexander von Gluck IV
382c3f6e0c headers/config: Fix RISCV64 define typoed to 32
Change-Id: I20890218f5edd279ab1080432a4d91f5a7f64dee
2019-04-02 14:46:28 -05:00
Augustin Cavalier
454b04ca27 HaikuConfig: Change _BEOS_COMPATIBLE_TYPES to only be defined on i386.
Hopefully soon we will have our first 32-bit non-x86 architectures.
No functional change for x86 32- and 64-bit intended.
2019-03-30 16:57:05 -04:00
Augustin Cavalier
5ffbe7d778 Change all references to "__INTEL__" to "__i386__".
They are functionally identical, but the former is a BeOS/Haiku-specfic
macro that we include in the compiler specs, and the latter is defined
by GCC.
2019-03-30 16:54:01 -04:00
Augustin Cavalier
b357daa5c5 build: Deprecate SetSubDirSupportedPlatformsBeOSCompatible.
By default, all targets support the "haiku" platform, and we no longer
support building for BeOS, Dan0, Zeta, or other BeOS-compatible targets,
so this is no longer needed.

Also remove all references to the non-Haiku compatible platforms, and
change all BEOS_COMPATIBLE checks to HAIKU_COMPATIBLE. Removal of
all SetSubDirSupportedPlatformsBeOSCompatible invocations
will be in the next commit.
2019-03-30 14:54:14 -04:00
PulkoMandy
8ff82ee2d4 sparc: fix debug support
Declare and use the correct registers to define a stack frame.

Change-Id: Ice3ba8f8715313a715f6b1cb553a6883541f5cc4
Reviewed-on: https://review.haiku-os.org/c/1327
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2019-03-30 15:23:15 +00:00
PulkoMandy
3bfbec8336 sparc: More missing defines in platform headers
* Kernel is 64 bit, and we won't need a 32bit load base.

Change-Id: I729bab01c8f71083002db061e153b0e5052b9a1c
Reviewed-on: https://review.haiku-os.org/c/1326
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
2019-03-30 15:23:15 +00:00
Augustin Cavalier
569791be52 headers/posix: Define the byteswap macros unconditionally.
It helps if one tests GCC4+ fixes on GCC4+...
2019-03-27 10:19:50 -04:00
Augustin Cavalier
8e309168b9 headers/posix: Use separate naming for the byte-swap macros.
This avoids a compile error on GCC4 when ByteOrder.h is included
after it.
2019-03-27 00:25:34 -04:00
Augustin Cavalier
6d5e91f0c9 headers/posix: Make casts in netinet byteswap functions uniform. 2019-03-26 22:31:33 -04:00
Augustin Cavalier
fcf0b31fb9 bootloader: Add the network endianness macros to NetDefs.h.
This file contains all the protocol- and interface-related
definitions, so this seems to be where they belong.

Required following previous commits.
2019-03-26 21:51:42 -04:00
Augustin Cavalier
fb52ab82d2 Minor tweaks to fix the build after the last commit.
* firewire and freebsd_network expect the macros come from
   sys/param.h, as this is one of the places FreeBSD defines them
 * All others are Haiku-native and can use Be-style macros.
2019-03-26 20:06:09 -04:00
Augustin Cavalier
9cb15d72bd netinet/in: Use the GCC4 builtin byteswap functions for htonl.
Fixes the build breakage caused by PulkoMandy's recent commit.
Remove these from ByteOrder.h now also, as per POSIX they should
come from netinet/in.h.

This is a small source compatibility breakage, but it will only
affect a small portion of non-POSIX, partially-Be applications.
2019-03-26 19:33:43 -04:00
Augustin Cavalier
204ec4dec6 build: Use the main ByteOrder.h.
The only differences between the two were whitespace and then the
GCC4 builtin byteswap functions.
2019-03-26 19:13:01 -04:00
Augustin Cavalier
d15fda2c7e build/BeBuild.h: Throw an error if the compatibility headers are not included.
If this triggers, it means something is using the "build" errors while
the build system thinks it is not, which is always an error. Nothing
triggers this at present, but some subtle bugs in the build system
a while back would have been caught by this.
2019-03-26 18:59:42 -04:00
Andreas Faerber
e1b41d44a3 boot loader: Wire up net_stack_cleanup()
Add a platform cleanup hook before starting the kernel. The openfirmware
and PXE loaders clean up their network stack there, while the other
loaders currently do nothing.

This closes ticket #6166

Change-Id: I34765892dfd9b2310c6af97c9ff7d414afae49e5
Reviewed-on: https://review.haiku-os.org/c/50
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-03-26 20:25:19 +00:00
Alexander von Gluck IV
c085f38639 riscv64: Fill in more bulk architecture items around libroot/kernel
Change-Id: Ia2a86d8814d06950ea2d2d19d966c642d26f81d6
Reviewed-on: https://review.haiku-os.org/c/1302
Reviewed-by: Alex von Gluck IV <kallisti5@unixzen.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-03-25 17:16:03 +00:00
CodeforEvolution
e2c7bb900c Add Reboot Check to BPackageRoster
A bit of an explanation for these weirdly named functions:
LatestActivePackageInfos() returns the packages on the system that are
both installed and fully set up. When packages are in the middle of being
installed, LatestInactivePackageInfos() shows the packages in the process
of being installed. Once the installation process is done,
LatestInactivePackageInfos() returns nothing. If there are packages that
can't be fully activated without a reboot, CurrentlyActivePackageInfos()
will return the same information as LatestActivePackageInfos(), or if
everything has been installed and activated, it will return no packages.

Change-Id: Ia1814a5abda6d815c46e0b46dc812b4e7af81de3
Reviewed-on: https://review.haiku-os.org/c/1129
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-03-18 14:10:42 +00:00
Augustin Cavalier
d3f27239b1 bus: Remove IDE.h and change ATA bus manager paths. 2019-03-13 11:34:13 -04:00
PulkoMandy
f42cda29e8 sparc: get libroot to build
Add various stubs to fix undefined references. No implementation for
anything yet.

Change-Id: I2d398bc2369d099e3a35f0713058d6a5edc6801d
Reviewed-on: https://review.haiku-os.org/c/1138
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-03-10 20:57:18 +00:00
PulkoMandy
eea7ceb31d Add BytePointer to help with pointer conversions
This behaves mostly like a pointer, but pointer maths works in bytes,
not the native object size.

It avoids casting to char* and back when doing byte-based pointer math,
making the code easier to read.

Change-Id: I6a8681a398345f0c7d419a2cfe7244d972ffa62f
Reviewed-on: https://review.haiku-os.org/c/1086
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-03-09 17:09:11 +00:00
Jérôme Duval
ba56d0a513 pthread: add pthread_getattr_np.
non standard extension, but widely available to obtain attributes for a thread.
also provides an alias for pthread_getattr_np which is the bsd equivalent.

Change-Id: I26ef8245ed2537186f48c8b8bdf3e42b03e70892
Reviewed-on: https://review.haiku-os.org/c/1172
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
2019-03-08 19:50:45 +00:00
Jérôme Duval
901c3d44b0 pthread: implement pthread_attr_[get|set]stack.
remove pthread_attr_[get|set]stackaddr from unimplemented functions.

Change-Id: I58807e86c75a189a576639ae1b2e4505a63700a5
Reviewed-on: https://review.haiku-os.org/c/1152
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-03-07 16:55:14 +00:00
Jérôme Duval
9e1ce8ed92 kernel: tweak USER_SIZE.
Change-Id: Id0a4ad785bbd195e425dd32ca891dc4525bb3e18
Reviewed-on: https://review.haiku-os.org/c/1151
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-03-05 22:38:49 +00:00
Augustin Cavalier
ee735d1b33 PackageKit: Fix BPackageInfoAttributeValue::Clear for GCC2.
These are simple structs, so hopefully GCC8 will be OK with us
memsetting them. We can't use the standard = {} route because
GCC2 does not support that.
2019-03-03 17:04:22 -05:00
Murai Takashi
752ec5c625 Package kit: Fix -Werror=class-memaccess
Initialize each class members instead of memset()
for clearing PackageInfoAttributeValue.
Pointed out by gcc8.

Change-Id: I8bdb328e2271e49e840b1294dba9cca544805e72
Reviewed-on: https://review.haiku-os.org/c/1114
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-03-03 21:07:42 +00:00
PulkoMandy
a7c23bb4a9 kernel/arch/sparc: stubs to get the kernel to link
Add empty implementation of timer, elf, vm, debugger support, to let the
kernel link.

Also add the kernel linker script.

Change-Id: If0795fa6554aea3df1ee544c25cc4832634ffd78
Reviewed-on: https://review.haiku-os.org/c/1108
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2019-03-03 20:56:20 +00:00