* Fix Endpoint Context Initialisation (Refer xHCI v1.1 - 6.2.3)
* Fix Interval Calculation (Refer xHCI v1.1 - 6.2.3.6 , USB 2.0 - 9.6.6 page 271)
* Fix MaxBurst, MaxPacketSize Calculation (Refer xHCI v1.1 - 6.2.3.5, USB 2.0 - 9.6.6 page 271)
* Fix MaxESITPayload Calculation (Refer xHCI v1.1 - 4.14.2)
* Remove Link TRBs as they were never being used
* Increase Number of TRBs per endpoint (to utilise the whole area allocated for Device TRBs)
* Fix usage of XHCI_MAX_ENDPOINTS (most of the checks were failing at corner cases)
* Some coding style fixes.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
Before this patch, writes to USB disks on XHCI in VirtualBox (which emulates
an Intel C210) stalled or failed. After this patch, they apparently work,
although I got mixed results - a BFS disk seemed to work perfectly, a FAT32
one also seemed to work OK but after a reboot there was data corruption. USB
mouse is still as busted as ever.
These are now done in AcpiInitializeSubsystem(), as part of the
early init so they can be present when the tables are loaded.
Should fix ACPI not working since the merge.
Requested by RudolfC. Apparently there was a regression which prevented
ACPI battery/power from working on his system, which was fixed by
https://github.com/acpica/acpica/commit/a3267967c.
The only testing I did with this was confirm it compiles and boots
in a VM, so apologies if this breaks something else.
The heap implementation of the runtime_loader was switched to the one
of the bootloader in 6f0994d but was since updated independently.
To keep the diff between the two implementations as small as possible,
the bootloader implementation was first copied to the runtime_loader
and then some features not relevant in the runtime_loader (like the
special large allocation handling) have been removed and the
runtime_loader specific features (grow_heap, add_area) have been
reintegrated. But basically this applies 96689a5..HEAD of
src/system/boot/loader/heap.cpp to the runtime_loader heap.
This brings in the switch from a linked list to a splay tree based
free chunk management. Since the allocation counts in the runtime_loader
are rather small, this does not perceptibly affect performance in either
direction though.
The needed storage space for tracking the allocation size was not
accounted for when growing the heap. Since the growth size is always
rounded up to a multiple of 32KiB, this did almost never matter as the
new allocation wouldn't need the full size. If the allocation did
happen to need the full size however, the newly added area would always
be too small. As the allocation attempt was simply restarted after each
successful growth, this lead to an endless loop creating small new
areas, which would then quickly starve the system for memory.
Haiku does not yet support certain features related to POSIX threads.
Constants used to test for the presence of these features should
therefore be left undefined, according to the POSIX spec, but are
currently set to -1. This can cause software built on Haiku to
incorrectly detect the presence of these features.
* unistd.h: Undefine _POSIX_THREAD_ATTR_STACKADDR,
_POSIX_THREAD_PRIORITY_SCHEDULING feature constants.
* conf.cpp: __sysconf: Return -1 for unsupported features.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
This code is closer to what we used before for gcc2, and should not
crash there anymore. I could not get exactly the same code to work, but
reduced the difference to a single statement (which makes gcc2 work and
breaks gcc4). This is protected under a guard with appropriate ffmpeg
version test.
This code works for both gcc2 and gcc4 (tested with mp3 and aac files as
well as youtube videos). It still gets the timestamps wrong with ffmpeg
2.4, but I'll try to solve that another time.
Commit 856cc59e58 didn't really "fix"
anything; it just broke audio pretty much everywhere but YouTube,
and there videos play at 2x speed so it wasn't really worth it.
Stopgap solution for #12509.
* IvyBridge or higher can auto-train.
* Linux doesn't use this feature, however
manual FDI link training is *really*
complex... lets try auto-training first.
* I really hope we can kill head_mode some day
* Break pll code out from mode code
* The LVDS and Digital are smooshed together and
likely need broken apart.
* Save the package state before attempting to install/uninstall the package.
* In the case of failure set the package state back to what it was.
* Use the synchronous version of BAlert so that the package state won't
change until the user clicks the Close button on the dialog.
Fixes#10838
This allows the Cmd+A key shortcut to select all text on
the subject control. You could already Select All from the
View menu but this is more convinient.
Fixes#12361
* Since we're disk bound, and not CPU bound, it doesn't make much sense
to restrict the number of threads on the number of CPUs.
* It's still not completely independent of the number of CPUs now,
though: we'll have 3 * CPU count worker threads.
* This was the harmless part: a job was been requeued that already was
being launched.
* I was already aware of this one, and only accidentally stumbled over
the non-harmless case in the JobQueue code when I tried to fix that
little issue... (ie. never ignore warnings, even if you think you
know what's going on).
* A dependent job was requeued even if it wasn't part of the queue
before. The code relied on dependent jobs being already enqueued;
but that cannot be guaranteed.
* If a job failed, its dependent jobs are now also set to failed, so
that they won't be requeued at a later point.
* This caused some of the "Launching xxx failed: Operation not allowed"
messages in the boot process. Those actually weren't harmless, and
could mess up the natural job order.
* Triggered whenever a volume is mounted (surprise!).
* There is no way to specify which volume you are interested in for now
(if someone knows a good use case, I'd be willing to add that,
though :-)).
* Sticky events are events that keep their signal raised, ie. even if
a job is initialized afterwards, it will still be triggered.
* Consolidated naming for external events.
* Events are now registered once they are actually being used. This
allows them to allocate the resources they need to do their thing.
* With events being registered, this proved to be confusing, and it also
helps to differentiate between event objects within the daemon, and
events coming from external sources.
* No impact to non-ValleyView chipsets
* Bump some register locations for VLV
* Only have HDMI port to test with on my ValleyView GPU
and our driver seems to be missing all HDMI and
sideband functionality.
* As ValleyView chipsets seem to be UEFI only, we don't
have VESA fallback, so this shouldn't cause regressions.
(unless we get UEFI framebuffer support)
This issue only manifested itself when the navigation toolbar was shown.
The scrollbar appeared to have no border while the rest did. This issue
manifested when the scrollbar insets were adjusted in hrev49654. The
scroll bar insets were really hiding the bug underlying bug though.
I'll try to explain what was happening and how I fixed it. The PoseView
container, called BorderedView, was showing its top border when the
navigation bar was hidden, and hiding its top border when the navigation
bar was shown. This (almost) worked because the menu bar provided a
bottom border while the navigation toolbar didn't. However hiding
BorderedView's top border also hid the scroll bar border.
My solution was to draw a bottom border on the navigation toolbar and
then remove the top border from BorderedView unconditionally. So either
the menu bar or the navigation toolbar provides a bottom border and the
BorderedView has no top border.
Fixes#12392
Highlighting was added in hrev45983, stopped working in hrev49614, specifically
d891923650.
Add comment to explain what is happening and hopefully deter this from being
removed again in the future.
Fixes#12359
* Properly flag missing devices
* Do away with shifts and define ssts and sctl masks
* Tested working on 6 different systems with a
combination of drive configurations.
* Empty media on AHCI devices still cause port change
storms. (the issue that was attempted fixed in
5584c22fdd)
* Seems to work fine, although it should probably also be triggered when
there are still jobs in the queue -- someone more knowledgeable might
want to chime in here, please :-)
* If this turns out to be problematic, we can just drop the "on_demand"
job config again.
* Was broken in two ways: if only the shortcut "on_demand" was used,
the event didn't get created at all due to a bug in
Events::AddOnDemand().
* Furthermore, _LaunchJob() always triggered a demand, but it should
only do this when not called from a target.
* devfs: set st_rdev to the inode number of the node being queried. This
may not be the best thing to do, as it does not match what is set in
st_dev for other files, so it can't be used to find which device
stores a particular file. I'm not sure if st_rdev is actually used that
way anywhere, however.
* vfs: do not clobber st_rdev with -1 for "special" (device) files.
Refactor the code a little so setting the common attributes is done in
a single place.
Fixes#12390.
src/tools/makebootable defines _USER_MODE, which we can check
for in gpt/Header.cpp to remove the dependency on libuuid, as
makebootable only needs read-only access to partition maps
anyway.
Previously, deleting a partition was lazy and only changed
the partition type to an invalid UUID, and would still
show up as a partition in many partitioning tools.
POSIX requires SIGTTOU to be sent to a process in a background process
group that tries to change the foreground process group ID associated
with its controlling terminal, unless the process is ignoring SIGTTOU or
the calling thread is blocking it. Previously the code checked the
former condition but not the latter, making it possible for calls to
tcsetpgrp() to get stuck in a loop and never return.
Should fix#3417.
Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
- Correct a TRACE_LOCALS statement in ValueWriter.cpp and update it to
match the current definition of ValuePieceLocation.
Fixes#12411.
Signed-off-by: Rene Gollent <rene@gollent.com>
- Add jamfile for a build variant of libuuid.
- Adjust the build version of makebootable to link to that instead, as it would
otherwise link in the target platform's version of libuuid_kernel, which
wasn't necessarily compatible with the build platform's objects (i.e. when
building a 32-bit Haiku image on a 64-bit host OS), and would consequently
fail.
When writing an individual entry to disk, the offset of the entry
was omitted, which resulted in entries not block-aligned to
overwrite previously valid entries. This in turn resulted in the
stored entries CRC no longer matching what was on disk, causing
the partitioning system to fail to identify it as a valid GPT
when read from disk later (e.g. after a reboot).
E.g. if the first entry is the ESP (which it typically is), and
then the second being an entry for a BFS partition, updating the
BFS partition entry would overwrite the entry for the ESP, thus
corrupting the entries table.
* Move to more standardized functions matching AHCI spec
* Don't perform unnecessary double port resets
* Begin implementing a software reset to try first per spec.
Software reset needs more work, falls through to port reset
for the moment which is stable.
* Don't duplicate ATA defines, use what we already provide.
* Tested working on VirtualBox 1-16 AHCI ports, Intel C200,
and AMD FCH.
* For the moment i still remain with the classic lateness calculus.
My code wasn't perfect, but this commit fix the remaining
problems from my perspective.
* The first reason is that if we have a patologic latency
such as adding for experimental reasons a snooze() before a SendBuffer or
in the BufferReceived callback, we still can't do anything about it.
If we use enqueue_time and don't send a LateProducer notice, this latency
will never be detected by the API client. We can't do anything about it,
and it's even better that systems with such problems are recognized as
soon as possible IMO.
* The second reason is that the lateness calculus described in the BeBook
is done this way because the media_kit want us to adjust our timing in both
early and late situations.
* Realtime expect that things are always delivered under a certain time
limit, if the software at the bottom doesn't meet with this requirement,
it's just not realtime and things can't work in realtime.
* enqueue_time has nothing to do with the performance_time. But we can
still add this to the media_timed_event struct so that applications can
make use of it.
* Lateness was probably not used a lot in BeOS programs as it looks like
a relatively new feature but i have the concern to complete our API
implementation to be close to what i see was reasonably the designers aim.
In preparation for implementing Undo/Redo support, we need _Insert() to
take a TextDocument instead of a BString, CharacterStyle and ParagraphStyle.
When a chunk of the TextDocument has been removed, we need to be able to
Insert() that as part of the Undo operation. Not well tested, but typing
still works.
Added TODO about which data the TextChangedEvent should have in order to
know how to respond in the TextDocumentLayout. For now, update all paragraphs
in the layout, add new ones as necessary, and remove the ones we have in
excess by using Invalidate().
Changed from white on red background, to yellow on black
(neutral) background. Red on black made it look like a
warning, whereas yellow feels more informative.
* The previous code was broken, and did not take the actual window
size into account; it's now using BWindow::MoveOnScreen().
* Also, make the width of the time zone list relative to the font size.
* The monitor size now scales with the font size.
* It now uses BWindow::MoveOnScreen() to find a good position on screen.
* The monitor info is now properly hidden when there is no info (this
removes a blank line at the top of the left box).
* As the specs say, this causes undefined behavior.
* Should help with the recently introduced boot issues, but cannot
be considered a full fix -- as mmlr pointed out, one has to detect
unsolicited COMINITs.
* This should fix ticket #4157, although I probably have missed
something.
* In any case, it no longer messes with the ref counts of the
file descriptor, and the race condition in put_fd() should be
gone.
* It's still rather messy all in all.
* Each io_context now has a "inherit_fds" member that decides whether
or not this context allows to inherit FDs to its children.
* This replaces the former O_CLOEXEC mechanism.
Make sure that the caret starts blinking half a second after it last moved.
The previous solution using Pulse() had a number of problems:
* The caret could be hidden during moving it or during typing. It would then
be shown again very soon after, i.e. when typing the next character or
when moving it to the next offset. But it looks bad anyway.
* When the caret stopped moving, it started blinking a random amount of
time afterwards, getting back into the rhythm of Pulse() messages.
However, starting to blink a constant time after the caret last moved,
looks much more satisfying.
* It now uses a font that's 3/4 the size of the plain font; ie. there
shouldn't be any change with the default font size.
* Also cleaned up some weird layout code on the way.
* You can specify which borders will be drawn using the
BControlLook::B_TOP_BORDER, ... constants.
* Adapted Mail to no longer need the SetInsets() hack.
* Use a scale factor depending on the font size.
* Be more generous when it comes to the max width.
* Use StringWidth() for the default size of the size and status columns.
* Moved entirely into MainWindow.
* Moved duplicated code into separate methods.
* Resize the main window on larger screens by default, as we can make
use of the extra space.
* Use BWindow::MoveOnScreen() instead of make_sure_frame_is_on_screen()
as the former has more info. And is even smarter now as it can
optionally resize windows to fit on screen.
* Center window on screen by default (ie. when there are no settings).
... and invalidate based on TextChangedEvents. I am not yet sure whether
TextChangeEvent needs separate counts for removed and changed paragraphs.
It is most likely not yet correct and may either update too many paragraph
layouts or miss updating some at the end.
TextDocument:
* Moved implementation of Remove() and Insert() into private methods.
* Reimplement all public Insert() methods and Remove() on top of Replace().
* In Replace(), send a TextChangedEvent. Added TODO for sending a
TextChangingEvent, although at this point, I am not sure if it will be
needed at all.
The int32 was cast to a ssize_t which has a different size on 64 bit,
therefore clobbering the stack.
Also remove the use of basic type references in arguments, which
probably was the reason for doing the above in the first place.
The cleanup commit df48d3f9a8 broke
constructing a BPicture from an archive due to an incomplete rename.
The passed in BMessage was used as the data buffer instead of the
extracted data field.
Fixes the application side crash of #12340. Seeing how long this was
broken without anyone noticing, the feature doesn't seem to be very
popular.
This introduces a more sane API (currently private) that allows for
safer and possibly more efficient implementations:
* It uses a struct of named and typed function pointers instead of just
a void pointer array. This adds type safety to the callbacks so the
compiler can figure out if things match up before subtle bugs get
introduced.
* It provides bounds for all strings/buffers passed to the callbacks.
* It uses const references instead of implicitly copying arguments.
* It folds stroke_x/fill_x pairs into draw_x functions with a fill
argument to reduce the amount of functions needed.
* It uses unsigned values where negative values make no sense.
The old API has been implemented on top of the new one using adapter
functions. It makes copies of all data passed to the callbacks which
effectively keeps the picture data from being modified. This matches
with the R5 behaviour.
This also reimplements the buffer parsing to be safe against corrupted
data by validating that the types actually fit in the provided sizes
and buffers (using a templated reader).
Since this class is used from the app_server with user provided data,
making it more safe is important even though it comes with a slight
overhead (replicating R5 behaviour, i.e. crashing the app_server when
corrupted data is fed, doesn't seem very appropriate here).
While not thread-safe, it should still be possible to use it in
non-threaded programs, or with locking on the application side.
The "thread-safe" implementation we got from NetBSD called abort(),
which is not a good solution. Restore the non-thread-safe
implementation, which should still work.
Fixes issues in openssh and mtr, and possibly other ported apps.
* Added HeaderTextControl that draws the text in black, and uses the
panel background without a frame when it's disabled. Only the label
is still drawn as disabled.
* Changed AddressTextControl to behave in the same way.
* The date view is now a HeaderTextControl, too.
* Unfortunately, the label is not vertically aligned with the contents.
* Added missing const to some getter methods.
* Date() now tries to parse the date of the mail, and return it as
a time_t; you can still retrieve the actual string via
HeaderField("Date") if you have to.
* Mail now shows the time in the local time zone, and with the
current locale.
* While this breaks binary compatibility with earlier Haiku releases,
use values that are less likely to clash with actual use cases.
* Specifically, using a negative spacing is one way to get rid of the
border of BScrollViews, to put them into a window neatly.
* Also, BControlLook now uses a switch to resolve them.
* It's still convenient to have.
* Furthermore, the distinction between when settings are stored is hard
to grasp otherwise.
* Plus, adopting the current window size is now much more straight forward.