It seems GCC2 occasionally will inline a call to memcpy with
a count of 0, which this function did not previously expect
and would result in a "Divide Error Exception."
Hopefully fixes#14613.
* Initialize "status" to B_NO_INIT, which will skip the main 'if'
the first go-around and go straight to the acquire_sem_etc(),
as we will have be invoked from the callout initializer, and so
there will of course be no callouts.
* Actually check the return code of mutex_lock, and do another loop
iteration (which skips this main 'if' as status will not be one
of those things.)
* Correct failure deinitialization order in init_callout().
* Destroy the mutex after the worker thread exits (this is the real fix.)
Fixes#14660, and other "hang on cursor" / "hang on black screen" /
or possibly even a "hang on rocket" introduced in yesterday's builds.
DeleteChains() needs the chain locks and domains, so those need to
be uninitialized after them. This now matches the constructor's
deinitialization order.
Fixes a panic exposed by the previous commit.
Previously, there were a number of circumstances where these were
not getting reset properly, leading to some destroyed mutexes having
holders of the last thread which locked them, and some with "-1",
which meant that the next call to "mutex_lock" just behaved as if
the lock was still valid (!), and so the unlucky caller would deadlock
forever.
Now we properly reset these fields, which means from now on attempts to
lock or unlock destroyed mutexes will lead to "PANIC: uninitialized mutex"
on KDEBUG kernels, and (as before) an infinite deadlock on non-KDEBUG
kernels (perhaps we should store the thread_id of the locker on non-KDEBUG
kernels also?).
As the next commits will show, this already uncovered a number of bugs,
and there are of course potentially more strange deadlocks caused by this.
Added subsystem_vendor_id and subsystem_id for iMac 24 inch early 2008 (iMac 8,1) and Macbook Pro 3,1 with specific quirks for those systems. This enables sound via head phone out at a decent level and quality. Previously, sound with the Haiku HDA driver was distorted and very low
Change-Id: I8e3dc3dbf5324bafff2b35ae64b43a0088272c8d
Reviewed-on: https://review.haiku-os.org/647
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Use delete[] instead of delete, since memory is allocated by new[]
at line 139.
Pointed out by clang.
Change-Id: I70396283b8d2c01d52886f7543804998d891ea44
Reviewed-on: https://review.haiku-os.org/646
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Some packages have excessively long copyright labels that were forcing
the HaikuDepot window to become too wide. So in this case, put the full
copyright string in the tooltip, and only the first 45 characters in
the label.
As discussed in #14598, there are now two tabs instead of the
checkbox: "Featured packages" and "All packages". It otherwise
behaves as before.
Also fixes#12428.
Currently using the LEGACY_TX path as the newer one requires mtx_trylock()
and "curcpu", which I haven't implemented yet.
Completely untested as I don't have this hardware.
* init_hardware is unnecessary and mostly a duplicate of init_driver;
so just remove it in favor of that.
* Deduplify some of the _DRIVER macros as possible
* Don't include net_stack.h, we don't need it here; and fix
callout.h following that.
* Fixed colour localization on test page
* Changed JobListView to use plural placeholders
* Changed PrintersWindow to use placeholders
Change-Id: I39477351364a0182cf629476de767af18f9c0d61
Reviewed-on: https://review.haiku-os.org/524
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
This addresses some of what's reported in ticket #14637.
* Keymap preferences: Localize key labels. Translators have
to be careful not too use too long words here...
* Media preferences: Fix typo "SoundFonts" -> "SoundFont"
The two popup menus, Video input/output, both use "<none>",
which when the catkeys are collected is reduced to one item.
Apparently, Italian likes to have different tranlsations for
them. I hope to fix that by using B_TRANSLATE_COMMENT with
differing comments. Not sure if that'll work...
* Network preferences: Localize "on/off" and "Enable/Disable"
in the Services.
* Repositories preferences:
Add RepoRow.cpp to DoCatalogs.
* Shortcuts preferences: Localize "Left/Right/Both/Either/None"
* Bluetooth replicant: Localize menu items and alerts.
* DeskCalc: Localize button names.
* HaikuDepot:
- Use BStringFormat and variables to replace for the WorkStatusView.
- Put package name in single quotes; nicer if you have package names
with spaces.
- Avoid leading and trailing spaces in translatable strings. Those
can be overlooked b the translator.
- Use B_UTF8_ELLIPSIS instead of "...".
Change-Id: Ia32908f9faad5188aa87c918c31229277decbda9
Reviewed-on: https://review.haiku-os.org/631
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Since index's type is uint8 (range 0-255) and kTermColorCount set to 256
(declared in terminal/Colors.h at line 31), 'index < kTermColorCount' is
always true.
Pointed out by clang.
Change-Id: I49e45cbd8a55223177fd2d6a64a0e37cf6341fc7
Reviewed-on: https://review.haiku-os.org/637
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
* I have not idea what this is for. Seems stuff from a long time ago
when for some reason someone wanted an audio driver implemented in
a kernel module. It is not used anywhere. If someone feels this should
be reverted please let me know and add an explanation.
* This media_add-on was provided to support the old
BeOS audio API (R3?), it is not working and will probably
not work on anything enough modern to run Haiku.
Modify if condition, since:
1) Comparison of array 'current->buffer_log' equal to a null pointer
is always false. Pointed out by clang.
2) XHCI::CreateDescriptor() sets buffer_log[0] to NULL,
when bufferSize <= 0.
Change-Id: I9a632dcf9c41435653b0556ed981d78bab846038
Reviewed-on: https://review.haiku-os.org/638
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This fixes the KDL while loading iprowifi2100 w/o firmware installed.
Full explanation:
1) device_attach calls start_wlan
2) start_wlan fails, because lack of firmware
3) ... -> device_detach called (from device_delete_child)
4) it calls stop_wlan that faults with BAD_VALUE
5) we leave device attached... then uninit_mbufs called -> KDL
Change-Id: I18d06ea7be48e569838f17e3779d054000898043
Reviewed-on: https://review.haiku-os.org/635
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
* Move MMU image to a real image define vs being crammed into
the u-boot bootloader Jamfile
* ARM not working yet, but better!
* x86 still builds
Change-Id: I3fb873dbac06fe2db893915b667bf3ce1df44686
I rewrote the "config.h" at the same time, which enables usage of gettimeofday
and some other API functions we didn't have whenever this port was first done,
enabling more accurate timestamp handling, among other things.
Probably this was a copy/paste error from the "FAST_INTR" method
which did not return handled information (and was removed in FreeBSD ~8.)
Note that this is a *major* change, as our interrupt scheduling system
puts "no handling information" interrupts last, and so it's possible
this unbreaks some of the more esoteric chipsets.
But it's also possible that our interrupts glue code for some of the
drivers is incorrect, and so this will break other devices on the same
interrupt line. Please test carefully.
* haiku_loader is the hpkg name in system/packages and not the
loader name.
* bios_ia32 stage1 assumes the bios_ia32 loader is the first
file in haiku_loader.hpkg. This isn't ideal.. but space in
stage1 is *limited*
As the IMAP connection handler disconnects when idle, it loses the
folder state at that time - however, it wasn't resetting it's internal
folder selected flag. This is now fixed.
Change-Id: Ib56f55664ab5d7383a13705a8f4a8585b29f2c92
Reviewed-on: https://review.haiku-os.org/627
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
In XXorRegion(), memory allocated in if statement might be leaked.
Pointed by Clang Static Analyzer.
Change-Id: I6b8b68bc5fea7b7c1fd354f05f03d3ebb0b11b62
Reviewed-on: https://review.haiku-os.org/633
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
This replaces the one in the "playground." It's identical to the current
kernel implementation, except with the few VFS functions replaced with
Storage Kit calls.
Userland packagefs will need this.
In AddResource(), parameter 'index' is not used.
It seems AddItem() use index instead of count.
Change-Id: I997ac96b7d32c5705606cdbf23c7fd71550c9aa6
Reviewed-on: https://review.haiku-os.org/630
Reviewed-by: Rene Gollent <rene@gollent.com>
check_path_name() had NULL check of path, but its result was not used.
So, add if statement to return B_BAD_VALUE when path is NULL.
Change-Id: I8ceec5d592267bf0f00f606eba44c0ecaef5a209
Reviewed-on: https://review.haiku-os.org/628
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Suppress -Werror=class-memaccess pointed out by gcc8.
* Remove unneed memset(), since media_format is cleared by constructor.
* Use media_format::Clear() instead of memset()
Change-Id: If905db6c0b7d759e72cfa649951be5109f952f54
Reviewed-on: https://review.haiku-os.org/485
Reviewed-by: Barrett17 <b.vitruvio@gmail.com>
Fixes#13768.
Change-Id: Ia783e62a15917a2c8f7b3169ee5204a8d8d6f5ef
Reviewed-on: https://review.haiku-os.org/622
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: Alexander von Gluck IV <kallisti5@unixzen.com>
Unfortunately reference data is not downloaded
from HDS to HD (it is being worked on) and in
the meantime somebody wants to work with Italian
translations so this will add Italian into the
list of hard-coded supported languages.
Change-Id: Ie0b923ce60acd473cbbea5bbac2254402d7a8fdd
Reviewed-on: https://review.haiku-os.org/618
Reviewed-by: Humdinger <humdingerb@gmail.com>
The "mount" command which calls fs_mount_volume direclty handled this
properly, but this class did not; which meant that user-visible error
messages about partitions failing to mount just said "general system error"
instead of the real one.
Fixes#14540.
This is Haiku's first 10Gb ethernet driver, ported upon request
by kallisti5. It's completely untested (I don't have this hardware),
so for now it's not been added to the image.
This commit resolves a problem where a user would be
unable to rate an installed packge.
fixes#14554
Change-Id: I3141eaebbdf531f17eb05302a536c6e0d722a164
Reviewed-on: https://review.haiku-os.org/611
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Performance improvements for the application updating
lists of packages when the user is operating with the
locale set to Russian.
fixes#14513
Change-Id: I1e2514a2afbd43503ac0edfe280a856411738026
Reviewed-on: https://review.haiku-os.org/612
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit resolves a problem where the user-rating
is able to specify a rating (how many stars) or not.
The behaviour was not properly honouring the checkbox
to specify if the rating was to be used or not.
Change-Id: I01067bf899e1d5beab1474a197c5698166b9f582
Reviewed-on: https://review.haiku-os.org/600
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
* Fixes#13119
Change-Id: Ia75f06c61476324951d44cfe2a1b281bf014b5f4
Reviewed-on: https://review.haiku-os.org/607
Reviewed-by: Alexander von Gluck IV <kallisti5@unixzen.com>
Changes the logic flow around reverting the position of
the request / response buffers when the buffer is logged
during trace logging.
Change-Id: I025ca9988b32447e225e3ad1b1d4da1174d2d122
Reviewed-on: https://review.haiku-os.org/599
Reviewed-by: Rene Gollent <rene@gollent.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Corrections to some areas where the 'position' of a
data stream was not being set correctly before reading.
Change-Id: I0030a113008028d5480dc36d034cf06915d928de
Reviewed-on: https://review.haiku-os.org/588
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
getsockname() now set the socket family and zero all other fields
of sockaddr if an unnamed socket is passed as an argument. This allows
retrieving the socket family from an unnamed socket.
This change is compatible with POSIX and appears to aligns with
Linux, FreeBSD, DragonflyBSD and OpenBSD behaviors.
Fixes#14312
Change-Id: I55dbf4d6738399941bef71e6b3d7201cf78876df
Reviewed-on: https://review.haiku-os.org/594
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Fixes#13622.
The "media_node_framework" is such a huge mess. We really should sit down
and design a MediaKit2 someday that doesn't require ~15,000 lines of media
node support code just to have a "fully functioning media player."
It seems to be as if not faster than the built-in method now as far
as I can tell, and this means one less arch-specific difference.
I haven't ripped all of it out yet, though.
It has been deprecated since FFmpeg ~3.0, and is internally implemented
using these functions now, so this should largely be a no-op change.
AVCodecEncoder still uses it.
All of the functions it calls are deprecated and no longer needed,
as FFmpeg loads all codecs automatically now, and uses pthreads internally
for locking as needed.
From mmlr's analysis in #13370 comment:22: "We actually do ignore a missing
routing in case the interrupt line is 0. In this case it isn't 0 but 0xff,
which is invalid and generally treated the same as 0 in the rest of the code.
Ignoring the missing routing on 0xff seems like the way to go here."
Indeed, I managed to locate a footnote in the PCI 3.0 specification which
confirms that this is the case on x86, and a commit in the Linux kernel
which essentially does the same thing this change does:
https://github.com/torvalds/linux/commit/e237a5518425155faa508a087f2826
Interestingly, that commit is only from 2016, while PCI 3.0 is from 2004.
This probably fixes#13370 ("Haiku doesn't MBR boot on Ryzen"), and potentially
other interrupt-routing-related boot failures.
Change-Id: I88129f6507c62d24cb50cf5c78597ca7bd7872d7
Reviewed-on: https://review.haiku-os.org/590
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
* There was an off-by-one error in initialization code;
BRect(0, 0, 15, 15) does not create 16x16 bitmap - it is 15x15.
As a result vector icons were rendered at 15x15 and then scaled to
16x16.
Change-Id: If1b57148e5a887a4bf71e01606d3d0d6fd0ed149
Reviewed-on: https://review.haiku-os.org/585
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
We do not know anything about the symbols we are being asked to demangle;
it is entirely possible they are malformed, or that we parse them incorrectly,
which previously led to buffer overflows. E.g. the "2","8" in "SetTo__Q28_GLOBAL_"
is presently incorrectly parsed as a length, leading to an access 21 bytes past
the end of the string.
This caused a page fault under the guarded heap, a fact I had the misfortune
to discover when trying to attach Debugger to a guarded-heap'd application
which somehow ran the demangler under the guarded heap also, and that symbol
above was in runtime_loader, so it crashed while loading its symbols.
So now we do what the GCC3+ demangler does here, and keep track of the input
buffer through the use of a state class, which will prevent us from incrementing
past the buffer's end.
I've tested this patch using the new haikuc++filt utility against libtracker
(indeed, it took multiple rounds of testing to get the diff to be 0 bytes)
and it seems to work exactly as before, though now without out-of-bounds
accesses.
As this demangler is also used in the kernel, it's possible that some
triple-faults on x86_gcc2[h] are caused by this bug (although that would
be rare; one of the incorrectly-parsed symbols would have to be in the
stack trace, and then it would have to read past the end of the buffer
containing the symbol.)
Change-Id: I343991cebd7d2887812c8c6b3dc2e0df2fcd79fa
Reviewed-on: https://review.haiku-os.org/579
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Built as "haikuc++filt" so you can keep it in PATH without replacing GCC's.
The implementation is a very close copy of "demumble", which is
under the Apache 2 license, so this is also. Most of the modifications
to "demumble" were to strip out Windows symbol support, and then
add GCC2 symbol support (this required reworking of the main loop,
as we detect GCC2 symbols in a different way than Itanium symbols.)
I've also added a command-line flag to ignore GCC2 symbols when stream-
processing, which is sometimes useful when demangling GCC3+ symbols.
Running this under guarded heap with some random SOs shows that there are
some symbols which apparently cause memory corruption in the GCC2 demangler.
I haven't yet looked into that, though.
They may still be running at the point we detach from the window, and
as we stop watching everything else at that point (and the threads
themselves depend on the window looper as the global "lock"), we
need to tear them down then.
We especially cannot do this in the destructor, as there are some
virtual methods that the threads need during their teardown which
obviously will not work in ~BPoseView.
Fixes#13371, and potentially other Tracker crashes that occured
as a result of closing the window while the add-poses tasks were
still operational.
Change-Id: Ib7ec0d1d413096be899a05887399f5b087eb8f99
Reviewed-on: https://review.haiku-os.org/574
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Fixes the tests added in the previous commit, and also #8552.
Change-Id: Idf9459474bc66054f94cf66065ed6fcf9c60cece
Reviewed-on: https://review.haiku-os.org/572
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
BeOS R5 treats NULL passed as the "replace with" argument as if it were
an empty string. Our BString currently does nothing.
Change-Id: I54b661e4ea8335ce531e6b6e3de2095a41112cd7
Reviewed-on: https://review.haiku-os.org/571
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
The action vm_page_fault takes should depend on whether the iframe to be
handled is a user iframe or not. The check for the user flag in the
error code does however only check if the fault happend in user or
kernel space. Use IFRAME_IS_USER() instead which checks the privilege
level of the iframe. Under 32 bit x86 this also handles vm86
compatibility mode properly.
This is the same logic as used on FreeBSD (TRAPF_USERMODE).
Fixes#13930.
Change-Id: I9c348b6ab4c60daaaaa2c0fe33bcc3336aa29f7b
Reviewed-on: https://review.haiku-os.org/560
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Patch by Pete Goodeve, ticket #9134.
(Removed play_sample_rate and record_sample_rate as suggested in
patch review, adjusted hda.settings accordingly.)
Tune buffer size and buffer count with an optional settings file
/boot/home/config/settings/kernel/drivers/hda.settings. Same as
it's done for the auich driver.
Pete:
> I [...] request 4 buffers of 1024 frames, I get a nice 13-14ms latency.
Change-Id: I3c1c64375d22b525afb970d5e8379b22b8514438
Reviewed-on: https://review.haiku-os.org/521
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Thanks Axel and Jerome for the reviews!
Change-Id: I4f116c540cf59ba74b79d9d2f95ed40edc9c4174
Reviewed-on: https://review.haiku-os.org/557
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Fixes#12034, and a variety of other strange "no wireless networks
appear" bugs that have plagued Haiku for years.
Change-Id: I734cb8084e8a626b8e03511519609bf80c1559eb
Reviewed-on: https://review.haiku-os.org/552
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This depends on the previous commit to return the correct error code
from ioctl().
If there are no VAPs running (which is the case after a forced disconnect
from an access point), scans will fail. In that case, we call
IEEE80211_IOC_HAIKU_COMPAT_WLAN_UP, which will restart a VAP, and then
initiate the scan.
Change-Id: I732aefe67e386dbb0ed3d232ed9deda678132601
Reviewed-on: https://review.haiku-os.org/551
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Previously, if a device driver returned an error of any kind, -1 was
propagated the rest of the way up through the stack instead of the
actual error code.
Change-Id: I6839763c6b2eb86d6112d3732e6cb80d022f1fe8
Reviewed-on: https://review.haiku-os.org/550
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
* _VirtualWidth() ignores invisible columns
This makes the horizontal scrollbar match the width of the visible columns.
Also trigger an initial update of the scrollbars.
* Fixes#14480
Change-Id: I7d4b27a8fdca58c150ac47f9b948b127fb275fdf
Reviewed-on: https://review.haiku-os.org/543
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
This fixes the (intermittently) crashing test added in the previous commit,
and should also fix#12024 and #14348.
Note that this is a slight behavioral departure from BeOS, though since
BeOS crashed when this was done previously, it shouldn't cause any
other problems.
Change-Id: I90b6132ff7741b8d6cb601375a9b11fc3ffacb40
Reviewed-on: https://review.haiku-os.org/541
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Adds/removes items as rapidly as possible from the menu from the
main thread while the menu is open. That part works. Then it deletes
all of the BMenuItems and then closes the menu, which crashes,
as the BMenuItems do not notify the BMenu they are being deleted.
I tested this on BeOS and it seems that this model crashes there also
(looking through the code comments, it seems there are a number of
testcases found throughout the years like this.) Removing the items
before deleting them indeed fixes the crashes on both BeOS
and Haiku.
Change-Id: I8624f966bdc17030ddca05b97aa57b518ab420c5
Reviewed-on: https://review.haiku-os.org/540
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
...if the row is present in the list, but continue to return false if the
row is not currently visible on the screen.
Part of #11675. Cherry-picked from https://review.haiku-os.org/442.
BFS does this as part of journal management, but not as part of block
cache synchronization (which makes sense, as flushing it then would
defeat the purpose of the drive's write cache.) No other file system
seems to touch it at all, so we should do it as part of an explicit sync.
This may help with some of the filesystem corruption issues, as it seems
that on slow disks, the drive might not have enough time to flush the cache
before it is powered off (or on some SATA/AHCI based disks, it is not flushed
before close at all), so triggering it here and, as the ioctl is supposed to be
synchronous, waiting for it also, seems to make sense.
Change-Id: I7d9992c21ca4b59c839711dcc96c973b4b8df052
Reviewed-on: https://review.haiku-os.org/530
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
* The difference is visible when control background doesn't match
panel background.
Change-Id: Ie3a034acaa52929becd6601520e0e05f32ecc8d8
Reviewed-on: https://review.haiku-os.org/537
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
When URLs combine a base URL with a relative part, the relative part's
path component was being pre-processed. This removed any ".." from the
path and in some cases in the unit test cases, the ".." should have been
retained and then only later applied to the base URL. This changes
fixes this so that the relative part is not pre-processed and is applied
with it's path in a raw state.
Completes Fixes for #14377
Change-Id: I9cebb8599889494e11f40a3b54c87ebca3ed1a21
Reviewed-on: https://review.haiku-os.org/529
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Here's what happens:
* BPackageManager created a BRefreshRepositoryRequest with a BContext
of an empty DecisionProvider and itself.
* Since there is no internet access, the FetchFileJobs that the refresh
class queued fail. Specifically, the first one does, but then as the
subsequent ones depend on it, they are all aborted.
* As some jobs were aborted, the StateListener is notified.
* The state listener of course has the BPackageManager class as one of
the listeners, and so calls it, because even though the handler methods
of BRefreshRepositoryRequest, they are powerless to stop event propagation.
* The BPackageManager's highest subclass' implementation gets called, which is
of course pkgman's.
* pkgman decides to DIE() upon receiving word that a job was aborted.
There are thus four potential solutions to this issue:
* Rewrite the package kit's event & job handling systems to not be so
screwed up in terms of propagation. Seriously, there is way too much
stuff that we send to the "user" in here, and as you can see, it can
get *extremely* convoluted even for supposedly "simple" tasks. This
is probably the best "long-term" solution; but obviously is far too
involved for the present.
* Only partially rework event handling; specifically in the SupportKit to
allow JobStateListeners to stop further propagation. This is probably
the best "medium-term" solution.
* Do not pass the package manager as the JobStateListener to the
RefreshRepositoryRequest. This would have the downside that the
regular notifications about download state, etc. would not be returned
at all, which we don't want. We could make a shim ... but that would be
a lot of code for little benefit. The prior solution makes more sense.
* Completely ignore "JobAborted" notices in pkgman. In fact, this is the
solution that virtually all other consumers of this API take (although
some of them seem to have TODOs about it), including package_daemon,
HaikuDepot, etc., and so it's the one I've taken here. If a "job aborted"
error is actually fatal, then it's the Package Kit's problem.
Fixes#13075.
"Elementary streams" were introduced with MPEG-2, but did not find much use
outside of internal data interchange until now, which finds some HEVC
files being actually distributed in this format.
The first four bytes (00 00 00 01) are common to all (packetized?) elementary
streams, while the three following (40 01 0c) identify a HEVC stream. Actually
I could not find good data on these; all the HEVC files I saw (and some hex-
dumps on online mailing lists of more) contain these three bytes in common
while following ones appear to be the internal header. (I didn't dig deeply
enough into FFmpeg's source code to find out the "real deal.")
Fixes#12565.
Resetting the drawing mode to B_OP_COPY was not right, since the previous mode could be anything.
Use WritePush/PopState() instead.
Change-Id: If9cba2c46bf372fd0164d951fcc49696cf72d576
In the AS_CLIP_TO_PICTURE case, the "picture" variable was shadowing the outer "picture" variable.
Change-Id: I3b9de2432f93a683aaccdb899051a14ebf9b7e6e
* Make the status message view have a minimum height of the logo
view's height.
* Properly add the views to the BGroupView layout.
* Instead of trying to set the explicit minimum size from the status
view information, just invalidate the GroupLayout. This seems to fix
a number of bugs relating to text overflowing the view, while it doesn't
fix others (e.g. orphan words on their own lines are still not drawn
in some cases, which appears to be a BTextView bug.)
* Use BString::SetToFormat instead of snprintf in some places.
As far as I can make out, fixes#13608.
All other functions in this file that locate the TTeamGroup via FindTeam()
do a NULL check afterwards, so the fact that this one did not just looks
like an oversight.
Fixes#14457.
Change-Id: I52ada3447b638db07622fa51746e75ce6cce7a46
Reviewed-on: https://review.haiku-os.org/518
Reviewed-by: Alexander von Gluck IV <kallisti5@unixzen.com>
* Set url (identifier) as generic hpkg.haiku-os.org url
* Set base-url (actual repo location) as eu.hpkg.haiku-os.org (our eu mirror)
* Drop old "repository" url mess
I had a realization that haikudepot operates off of the base-url, if
we continue using old url's after r1beta1, we're going to be stuck
with all the symlinks and redirects for a looooong time.
This also opens the chance for us to go off of the generic "url"
for haikudepot identification, which will let it work when users
leverage mirrors.
Change-Id: Ic8fa954190cc26602911e133dd3c25ce2a96ce9d
Change-Id: I669c73a990b0fff84cf5d37b5a4cc57ad97905ff
Reviewed-on: https://review.haiku-os.org/514
Reviewed-by: Alexander von Gluck IV <kallisti5@unixzen.com>
Suppress -Werror=class-memaccess pointed out by gcc8.
* Remove unneed memset(), since media_format is cleared by constructor.
* Use media_format::Clear() instead of memset()
Change-Id: I02e19c1fab1f1b3f6c348e1d3ac63536d5c829b2
Reviewed-on: https://review.haiku-os.org/484
Reviewed-by: Barrett17 <b.vitruvio@gmail.com>
A URL in string form should be able to be parsed and then verbatim
regenerated according to 'UrlTest'. This change fixes this ability
for the case where there is a '?' initiating a query or a '//'
initiating a host/authority section.
Partly Fixes#14377
Change-Id: I6547253c3cdc22d79514edf75284e9725d1a2d17
Reviewed-on: https://review.haiku-os.org/512
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
untested.
Change-Id: Icbb3ddf8c0f840fae0e2107ca211728036ba8aa7
Reviewed-on: https://review.haiku-os.org/510
Reviewed-by: Alexander von Gluck IV <kallisti5@unixzen.com>
* De-escalate the severety of data loss from "high risk" to "risk".
* Remove the advice to not create partitions with DriveSetup. It's been tested
and been working well since the last alpha. Do recommend making backups of
all partitions.
* Remove description how to add Haiku to Grub. It's too much detail and the
user would have to memorize the info. Add a link to our Booting guide
instead.
* Mention BootManager as an alternative to boot Haiku, refering to the
Userguide for more info.
* Alpha -> Beta
* Only give normal thanks instead of "a lot" and don't beg to like us.
Sounded a bit desperate...
Change-Id: I212513fde01287f5d1c9c5c9891827aaf0b7e1ea
Reviewed-on: https://review.haiku-os.org/502
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
(cherry picked from commit 1edc131debcf8ea1c9cd9eafd41c356f0432d9a5)
Reviewed-on: https://review.haiku-os.org/508
The kernel's handling of SIGABRT is just to terminate the application
immediately without doing anything else (it only notifies the debugger if
there's one installed for this application already.) More serious faults
(e.g. SIGSEGV) originate in the kernel and handle this logic before they
even invoke the signal handler.
So the correct solution is to do the same here in libroot. This incurs
a very, very slight performance penalty of the syscall time for sigaction(),
though I expect whatever applications are causing SIGABRT to be invoked more
than once a second will call raise() directly instead of abort()...
string_for_size uses KiB, etc., and so when the two are combined (e.g.
pkgman's progress display), it looked especially strange to have two
different units.
This allows applications to theoretically open() the poke device but
then change their uid/euid to something more restrictive. The mem
device is not even this permissive; but I can think of some scenarios
in which this might be useful.
As the comment says, there are a number of scenarios when this is
the case, e.g. non-interactive SSH sessions.
Change-Id: I3a10043820039f344b3f036f7861c81f6fb7ef05
Reviewed-on: https://review.haiku-os.org/499
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Our implementation of tsleep does this. It seems very few things
actually use that, though, so the issue referenced in the previous
commit may be one of the first things to use pause/tsleep.
Change-Id: Id2edb2268b3b078b9ded5d634cfa241599f882f1
Reviewed-on: https://review.haiku-os.org/490
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This is much simpler than the prior condvar-based method and should be
functionally equivalent. It seems tsleep() cause a NULL dereference,
though (which will be fixed in the next commit), so this probably
also fixes#14355.
Change-Id: I36968de38ceb0a1c0896cae8839821f5ca383504
Reviewed-on: https://review.haiku-os.org/489
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
* PRE_BETA_2 is now the default in master.
* For libbe: R1/alpha4 used internal=8, but nobody bumped master
at the same time, so now we are on internal=9.
Fix -Werror=class-memaccess pointed out by gcc8.
* Use TerminalLine::Clear() instead of memset()
* Use rgb_color::operator=() instead of memcpy()
Change-Id: I41360e245fd55c526d9c2802a2f247ba22583080
Reviewed-on: https://review.haiku-os.org/483
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
* Incremental rendering allows the user to see how the render is progressing.
* Can move to a new location before the render finishes. Render will automatically restart at the new location.
* Multi-threaded rendering now renders from a horizontal line in the center, giving a better experience.
* Improved behavior for scrollwheel zooming. Now zooms with the mouse as the origin, as is the standard behavior in other applications such as map viewers.
* Added lots of TRACE statements internally, which can be turned on in the code for debugging.
Change-Id: I1ad39a262ebe5c1b51d46b8cc09fb4de5113b9de
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
The limits were wrong in several places. Checked the sandy bridge, ivy
brige and haswell docs, they all say mostly the same.
- The value of p2 is either 7, 14, 5 or 10 depending on 1 bit in the
config register and on the display type. We can guess which values are
right according to the global P limit (5-80 when using 5/10,
28-something when using 14/7). The values are different because CRT
need a precise, but rather low pixel clock, while modern display
interface can accomodate being faster than required by a few MHz, but
need a much higher speed (the bits are transferred serially, so they
need to be at least 8 times faster than a DAC).
- The limits for N were obviously wrong, as the register is written with
N-2, so values less than 2 make no sense. Use 3-8 as specified in the
datasheet.
- The reference frequency (set by the driver) was wrong, too. It is
120MHz, not 96. It is 100MHz in some cases (FDI, etc), we should see
when this happens and switch to the right reference for PLL
computations.
- There was an attempt to minimize the value of N (a powersaving effort,
I guess?), but it would basically force the loop to stop at the first
value of N tested, resulting in way off timings in some cases.
- To ease testing and stop sending patches and syslogs back and forth
with vidrep, extract the "test mode" from pll.cpp into a proper test
executable, making it a little easier to experiment with the code and
fix the problems.
This should fix#13669 and possibly other cases of "out of range", black
screen, bad timings, etc.
Change-Id: Ic4c1c159701f352b7c1ef15a647f023c82ac26c
Reviewed-on: https://review.haiku-os.org/360
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
* Fix build on 64-bit.
* Test suite can now run from start to finish.
* Changes in OutlineListView test need an explanation:
for some reason when BApplication is created on heap, be_app is not
reset. This causes other tests to crash due to second BApplication
object being created.
Change-Id: Ic7d55f4622192f83572bfd83fa37f1f5fd641e22
Reviewed-on: https://review.haiku-os.org/465
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Replace class with struct, since PCIDev is previously declared
as a struct in pci.h
Pointed by clang [-Wmismatched-tags]
Change-Id: I6d85a8e4faa039c9905e4710715331e72beff413
Reviewed-on: https://review.haiku-os.org/481
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
As expected there was a lot of bikeshedding.
Just change the color of the path, green on success, red on failure.
Constraints taken into account:
- Keep the > for now
- Prompt should be as compact as possible for those of us using 80
column terminals.
- Prompt should not change size between success and error cases
Not taken into account:
- The feature should be accessible to colorblind people (we could
replace the > with another char but we couldn't find something that
looks suitable)
Fixes#10919.
Removing an interface triggers this sequence:
datalink_control() calls interface->ReleaseReference() which causes the
Interface destructor to be called. The Interface destructor calls
put_device_interface(fDeviceInterface) which destroys the
net_device_interface, then calls put_domain_datalink_protocols(this, datalink->domain)
in a loop. put_domain_datalink_protocols() tries to access the deleted
net_device_interface, hence the KDL.
Change-Id: I2326bcd6d1fd80a69e5fdfa6629563b38ecdbbac
Reviewed-on: https://review.haiku-os.org/469
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
* Store pointers in an addr_t instead of int32, for 64-bit's sake
* Use DebugSupport.h instead of userlandfs Debug.h and remove extra parentheses
* Create a header-only String class based on the userlandfs String and use it
* RecursiveLock instead of Locker.
* Jamfile cleanups and other misc. changes.
It isn't yet adapted to the new VFS API, so the build is still somewhat
broken.
This contains the contents of Haiku's sources, which is necessary
to include in "with source" builds for proper (L)GPL compliance,
mostly because we have GPL code in the tree.
TeamDebugger:
- When a job is aborted, instead of calling into the user interface directly
to reset the status message, post a message to do so. Also, only post the
message if we aren't already in a terminating state. Otherwise, if jobs
were still running while the team debugger is executing its destructor, it
would attempt to make calls to the already destroyed user interface. This
bug has likely been with us for quite some time, but was hidden by incorrect
ref counting in the past (see #12343).
ExpressionPromptWindow:
- Post a quit requested rather than quitting directly. As a consequence of
this oversight, the team window would never get the notification that the
prompt had been closed, and would consequently not reset its internal state
properly.
It seems the old one was just broken (see mailing list discussion.)
This new one was built from the generic one, but it was done using
a trunk build of Clang 8 with tuned optimization flags, and is
smaller (101 instructions) than GCC 8's (134 instructions) and
the old hand-optimized one (~125 instructions?) as well as being
targeted for ARMv7 instead of ARMv6 like the old one was.
In the future, we may want to look at newlib's ARM memcpy, which
is probably much more hand-optmized than this one is, but this
is at least better than what we had before.
Thanks to mmlr for spotting this. The wrong format specifier was used,
which would lead the server to get the wrong size and do strange things.
Chunked uploads should now work a lot better.
While I was at it, put the line termination in the printf to save a
write to the socket (these are unbuffered and each of them costs us a
syscall, and in some cases this has been found to confuse webservers as
we end up sending super small TCP packets).
Replace strncpy with strlcpy, since destination size equals
maximum number of characters to copy.
Pointed by gcc8 [-Werror=stringop-truncation]
Change-Id: I528a35bd071b1d13f16dcec2e8c2007b5bb072b2
Reviewed-on: https://review.haiku-os.org/473
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Increase array size, since gcc8 x86_64 warns 'sprintf' output
between 2 and 20 bytes into a destination of size 16
[-Werror=format-overflow=].
Change-Id: I641db97d963b64b0c3434cd498f29f4dcb61c373
Reviewed-on: https://review.haiku-os.org/472
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Since hrev52136 holding Shift while clicking the zoom button will
ignore the Deskbar and resize the window to take whole screen area
(the original behavior).
It'd be nice if the keyboard shortcut for zooming - Ctrl+Alt+Z
recognized an additionally held Shift in the same way.
Add shortcut to window.
Fixes#14365
Change-Id: I919ff2c3e8c41e022f8c675ea631daf18ff41eb3
Reviewed-on: https://review.haiku-os.org/470
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
As Stephan said, some apps ignore the return value of Encode(),
and since _OpenCodecIfNeeded() is called from there, this could
cause wasting of cpu cycles.
Change-Id: I80e1464d8532ebf80c514685ef3a25d98d8142fb
A codec context cannot be reopened, anymore.
Reorganize code accordingly.
Remove usage of the AVFormat context (which was not enabled, anyway) since it's no longer possible to do that.
Use av_frame_free() instead of av_free()
* Realized we already had a function which iterates over
an fdt node and maps it's memory regs. Make it work for
physical mappings or identity mappings.
Change-Id: I0e3e323798bc2dfcead1accc1d403b30a8ab188f
GCC provides these but Clang does not; these come from the ones Clang
was going to provide, but decided against it in favor of letting libc vendors
distribute them instead, hence the license headers.
For now, they are only enabled when building with Clang, as we still use GCC's
versions otherwise. But I've tested them with apps built with GCC 7 (as Clang
builds are still too broken at present) and they seem to work just fine. (They
will not build with GCC 2 of course, due to how they use __attribute__.)
To indicate this is a menu you can enter to select a previous
state to boot. Also rename "Latest version" to "Latest state" as
that is more correct.
Thanks waddlesplash for pointers.
Fixes#14362
This reverts commit 033f3450e3.
The discussion on the mailing list has tended towards changing the BFont API
so that these kind of fonts return true for IsFixed() as well as IsFullAndHalfFixed
if only to avoid the API ugliness of be_fixed_font->IsFixed() returning
false.
But since that change should not really affect applications, as BeOS ones will
probably not support CJK characters at all and Haiku ones should work properly,
and the present state of affairs has been pretty annoying to CJK users, we can
at least allow users to select full-and-half-fixed fonts as their default
fixed font, and begin dealing with whatever bugs that may cause now.
In USB, the interface and endpoint descriptors, and possibly other
vendor-specific descriptors, are nested inside the configuration
descriptors. This makes it possible to retrieve the complete information
about a configuration in one single call.
Our drivers do this, and so does libusb (the Device Kit doesn't, it only
cares about individual descriptors and does not provide access to the
vendor-specific ones).
The driver did not expose the full descriptor, only the part that
belongs strictly to the configuration. libusb worked around this by
getting the descriptor from the device directly, using a control
transfer. This should be ok, but apparently some devices get confused
when you do this too often or at unexpected times.
These changes introduce a variation of the GET_CONFIGURATION_DESCRIPTOR
ioctl that allows the caller to specify a size. This way, one can get
the complete descriptor (after getting the configuration-only part to
figure out the size needed, most likely). The data is copied from
structures stored by the driver, so no further communication with the
device is necessary, making this safe to the problems mentioned above,
and faster.
Change-Id: Id97e40ea0d45b8c051ae8548486c4751fc6aad2a
Reviewed-on: https://review.haiku-os.org/453
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
The ICU class is named MessageFormat, but on Haiku, it sounds too much
like something related to BMessage (which it isn't in the slightest)
and not part of the Locale system. It works almost entirely with BStrings,
so naming it BStringFormat makes much more sense.
OK'ed by PulkoMandy and Humdinger.
Gcc8 x86_64 warns sprintf() output between 2 and 9 bytes
into a destination of size 4. But, sprintf output can be
within 4 bytes since SMP_MAX_CPUS is 64 max.
So replace sprintf() with snprintf() and modify
format string to fix Wformat-overflow.
Change-Id: I7a23e6d98a5dd02a32a5aae573947a5650c82f7f
Reviewed-on: https://review.haiku-os.org/446
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Two files remain: "argv.c" and "argv.h", as these are still used by some
other, non-FS-related tests.
This was one of the last significant chunks of "no commercial use" code
in the tree, as it originally came from the "Filesystem Construction Kit,"
the sample code distributed with "Practical Filesystem Design with the Be FS",
and contained a sigifincant amount of BeOS kernel filesystem code in it
(the original README, not preserved here, noted that "the cache code is
the real Release 4 BeOS disk cache code".)
It has long been replaced by Ingo's from-scratch, MIT-licensed fs_shell
that lives in src/tools/fs_shell. Perhaps a note should be made somewhere
of this code's prior existence, but I don't think we will have much use for
it again, so confined to the dustbin of Git history it shall be.
src/tools is for tools used in the build or other miscellaneous utilites
that go along with Haiku itself. btrfs is, at least for now, just another
filesystem addon, so its shell should live here with all the others.
No functional change intended.
EachItemUnder selects items that are not in fact under the superitem
passed to the method.
ticket: #13730
Change-Id: I12a2e29204e1b9bbecd5704e60a02e3613a7f4fd
Reviewed-on: https://review.haiku-os.org/52
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Streaming means the stream is endless, so don't compute a duration.
ffmpeg computes an estimation using what it thinks is the file size, but
is instead some internal buffer size from BAdapterIO.
Fixes second part of #14326.
Since destination size equals number of characters to copy.
Pointed out by gcc8. [-Werror=stringop-truncation]
Change-Id: I8f2118129ec2324bb1f93857f5abfdf121c864f0
Reviewed-on: https://review.haiku-os.org/450
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Skipp_OSX <jscipione@gmail.com>
* This was making unresponsive the target window, making impossible
to cancel it at all. Now the current filename is reported at 20Hz,
well enough for good visual search progress feedback. Fixed#14175.
Signed-off-by: Kacper Kasper <kacperkasper@gmail.com>
Style fixes:
* Commit message formatting.
* Removed commented code and unnecessary whitespace.
DIESubprogram:
- Adjust to inherit from DIENamespace, as gcc can and will use it as a
container in some circumstances.
DIEClassBaseType:
- Add accessor for member functions.
DwarfImageDebugInfo:
- Adjust recursive walking for types to take into account any DIENamespace,
not just DW_TAG_namespace specifically.
- Factor out adding function to list into a helper.
- When retrieving the list of functions, perform a similar recursive walk as is
done when building the types table, as some subprograms are apparently not
always added to the root compilation unit entry. Curiously, this behavior
seems to be relatively specific to a struct/class type declared inside a
function in GCC's case, but based on the DWARF spec, there does not appear to
be any specific restriction as far as where these can be nested, so be a bit
more paranoid to ensure we don't encounter similar cases in the future.
On Haiku host, we need _GNU_SOURCE defined when stdio.h is included
to use fopencookie. We did that in libsolv sources, but we now include
stdio from BeOSBuildCompatibility.h which is included from the command
line. So set _GNU_SOURCE from command line as well.
Spotted while reading through the VM code while thinking about how to
implement vfork().
When axeld disabled this in 2005 (!), Haiku's kernel was still young,
BeOS drivers were still "a thing," and there was no distinction in this
function from being called by the kernel / not by the kernel.
Now, it's 2018, we manage all drivers ourselves, have SMAP enabled by
default when available, and as axeld recently noted on the mailing lists,
"there's not much reason we still use GCC2 for the kernel anyway." So we
probably don't care about any BeOS drivers that may be broken by this
(are there any still around?)
Besides the usual fixes to get this 13-year-old chunk to work again, there
are two functional changes:
1) Allow the kernel to clone whatever it likes into the user's address space.
It seems that this is often done legitimately (e.g. team creation), and
so attempting to distinguish those cases seems more work than it may be
worth right now.
The disadvantage is that drivers without proper checks may be "tricked"
into cloning areas they shouldn't; but I'm guessing if that's the case,
then something else is probably broken and the driver should be fixed.
It seems the reverse case (cloning a userland area into the kernel)
is much more common (in fact, it looks like all 4 of the 4 places
where clone_area is used in kernel-space outside the kernel itself
are doing this.)
2) At KDEBUG_LEVEL 2 and higher, throw a panic when attempting to clone
an area that does not have the protection flag set. This should make
finding any bugs exposed by this change much easier than "hardware doesn't
work" / "black screen on boot" / etc., as well as any potential future
bugs introduced in the process of driver development.
The Controller would always pause and resume playing, even if it found
out there was no position or volume to restore. Since pausing on http
streams appears to be broken, this is not a good idea. Just check if we
have something to restore, and leave the function if not.
Fixes#14326
* 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>
* This fixes booting Haiku on Raspberry Pi and qemu (-M raspi2)
* Makes several assumptions which need corrected.
/axi is broadcom only
size is fixed
* The final solution will be "probing" each simple-bus device
from the fdt. A lot of fdt support code needs written though
for "finding" compatible devices and determining the full size
of the devices in memory.
Change-Id: Ifd5fbab7490c8456247115f5aada618909f1bb9e
* Use strlcpy() and strlcat() instead of sprintf()
to suppress -Wformat-overflow pointed by gcc8.
* Add <string.h> to mga_std.h for strlcpy() and strlcat().
Change-Id: Ib038283fd213c9e0ac9f19482402b55d2e3f204a
Reviewed-on: https://review.haiku-os.org/429
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Affects *all* nodes, i.e., both directories and files. It is still possible
to override these, but it must be done in another system_package, not just by
mounting a package with newer datestamps on the conflicting files.
This is the pure version of axeld's proposal 2(d) from #10071. However,
as the haiku_secondary packages contain application mime_db entires and
are also 'system_package's, it does not fully solve that ticket.
This function is used when serializing a BPackageInfo object, which is not
done very often, and flags are used even less often. But both of these things
are done for the system packages, as they have the "system_package" flag
set, and are processed by "update_package_requires", and so this meant
that the "system_package" flag was turned into the "approve_license" flag.
This commit does not amount to any functional change: we still compare
purely by modification date alone. But it does de-duplify the code somewhat,
and makes it possible to easily implement changes to the comparison.
1. SDHCI PCI Bus: Discovering SDHC device from the PCI bus
and registers a child node(MMC bus) to which slots
are attached. SDHC registers are mapped by MMUIO,
they are binded in a structure(struct* registers).
A pin based interrupt handler is also installed,
which triggers the handler function and interrupts
are being taken care of. Added API's to set-up and
the clock for SD/MMC card, change frequency and
reset the registers.
2. Device Manager: Currently, busses subdir lists are har-
dcoded and in order to load the driver. We hard
coded the bus dir under PCI devices.
3. MMC Disk Driver: In order to register the slots under
/dev/disk/mmc and hence data transfer and other
operations can be done.
4. MMC Bus Manager: Setted up a bus manager to create an object
to do a particular for eg certain data transfer and
get freed until another operation is requested.
Change-Id: I369354da6b79adc6b6dfb08fe160334af1392a34
Reviewed-on: https://review.haiku-os.org/318
Reviewed-by: Alexander von Gluck IV <kallisti5@unixzen.com>
* Fix garbage put into videos while encoding.
* Testing welcome.
* Various fixes are still waiting to be merged into Haiku.
* Fixes sponsored by the V\OS project.
* av_get_context_default(1,2,3) are deprecated. The functions are supposed
to "reset" a codec context to a clean state so that it can be opened again.
It was used to allow using AVStream.codec as a decoding context
That behaviour is now deprecated, so that's why the function is too.
* hint: The code is probably still doing something bad in that regard.
* Unfortunately the macro removal did end up in the codecparam diff,
but was originally intended to be a commit alone I can't rewrite history
unfortunately, at least an explanation is given here. In any case the
code wasn't used so no functional change, this is mostly educated cleanup.
Untested, but this now better matches how the FreeBSD code does it.
Potentially fixes a bug where interrupts would be spuriously re-enabled
after the driver had disabled them, which may fix a KDL humdinger
reported to me via IRC.
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.
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.
Check a range of characters to see if they have the same width.
Change-Id: I9cef12f78d1e1d01acc6284eae90dbfb86166fc6
Reviewed-on: https://review.haiku-os.org/47
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
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.
Since they were being Use'd at global scope, the FreeBSD versions
of a number of POSIX headers were being used instead of the POSIX ones,
which breaks the build on non-x86 as these headers presently do not work
elsewhere.
Instead, just include the base directory, and then include the compat
headers manually in the one place that actually requires them.
Also fix all the other files that expected errno.h and others to
be included implicitly, which they now are not.
This should fix the PowerPC and (part of the) ARM builds.
Clang's equivalent of .tfloat is .x86_fp80, but apparently that
is not enabled for Haiku. So for now, use .double instead.
This is the same thing MinGW does.
This block was originally disabled in libbind, and we enabled it
independently; and so did NetBSD. But they also made one other
fix:
From: christos <christos@netbsd.org>
Date: Thu, 28 Dec 2017 15:12:15 +0000
Subject: [PATCH] PR/52837: Michael Kaufmann: getaddrinfo() resolves "127.0.0.1
www.example.com" to 127.0.0.1. Apply the patch from FreeBSD and explain the
rationale.
I attempted to merge NetBSD's new irs code, but their changes turned
out to be too invasive to do trivially, but in the process I had to
read our commit logs to find what we've changed, so at least I can
mark that.
Commits merged from the semi-official Git mirror of NetBSD
trunk (https://github.com/IIJ-NetBSD/netbsd-src/).
Commit authors/messages in chronological order follow:
---------------------------------------
From: christos <christos@netbsd.org>
Date: Thu, 28 Sep 2017 23:32:01 +0000
Subject: [PATCH] PR/52578: Benjamin M. Schwartz Set the AD bit when DNSSEC is
enabled (RFC 6840 Section 5.7).
From: lukem <lukem@netbsd.org>
Date: Fri, 2 Mar 2018 06:31:53 +0000
Subject: [PATCH] PR/48585: Set errno when returning NULL for AF_INET
In inet_ntop4(), errno wasn't set before returning NULL.
Seems like an oversight in the existing fix for PR/48585.
Noticed by code inspection.
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