There's no reason to reject them; they should just result in
a zero-byte output.
Should fix#20222.
(cherry picked from commit 4b6aad38968f9fe91712e742aff9166fec6e67a1)
Change-Id: Ifdbe17618d74eca0b873a6808ec0b14a7d38189a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11402
Reviewed-by: waddlesplash <[email protected]>
Instead of elsewhere. Fixes another missed Put(), in VMUserAddressSpace's
_InsertAreaIntoReservedRegion(), and guards against such problems
happening in the future.
Change-Id: If6d87d36225907e281e2341e8b53c461e6954f22
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11381
Reviewed-by: waddlesplash <[email protected]>
They were passed to TranslationMap::Query() directly, assuming that the
TranslationMap would just round down to the nearest page address. This
actually isn't guaranteed in the case of X86VMTranslationMap64Bit and
the physical map area, which uses hugepages, and so adds the offset
to the page address itself.
So, here the logic is rewritten to always pass page-aligned addresses
to Query(), and then re-add the offset for the first page only. We then
increment virtualAddress instead of an offset, making the next Query
naturally page-aligned.
This was the cause of #20142: when the BFS I/O hook was disabled,
virtual addresses in the physical map region were passed down to
the disk I/O routines, which were then mistranslated by this function,
resulting in corruption of adjacent pages by DMA, and incorrect
data in the pages where it was supposed to be read into.
Fixes#20142.
Change-Id: Ibacd00b7f5ce23a7b41c620224ddf8d338b6de4a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11377
Reviewed-by: waddlesplash <[email protected]>
The video buffer used for colorspace conversion was not aligned enough
(it could need as much as 64 bytes alignment) and did not include enough
padding (the functions work on 64 bytes blocks at once in some cases).
This code could be made simpler by using sws_scale_frame instead of
sws_scale, but that's more refactoring than I'm willing to do right now.
Thanks to k32n13 for providing a script to generate test videos!
Fixes#20200.
Change-Id: I8b51fd777201cdb899ce1834152066378b258521
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11343
Reviewed-by: waddlesplash <[email protected]>
(cherry picked from commit a0bfeae472eee24a9855e9685a507f6f85d91673)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11344
The BIOS module is used to run BIOS code in a "fake" machine so it can
be called from protected mode without having to go back to real mode.
To achieve this, it copies some parts of the physical memory into that
physical machine. It used to also map some of that memory directly
rather than copying it.
In hrev55544 this was changed to do a copy instead of a mapping. The
copy can then be written to, which opens the way for VESA BIOS live
patching.
However, the copy also means that the entire copied physical memory area
is accessed by the CPU. That area includes the VGA memory, which may not
exist or be masked. In particular this happens in QEMU by default (the
memory is only mapped when graphics mode is activated). In the case of
the NVMM virtualizer, this results in a crash of the virtualizer as
the guest attempts to access memory that doesn't exist.
To avoid the issue, the "fake" machine now includes a copy of the EBDA
(top of RAM) and the BIOS ROMs, but not the video RAM (that part of the
memory space is left uninitialized). This way, it doesn't matter if the
hardware has valid memory there or not.
With this fix, Haiku can boot even without the "Don't call the BIOS"
option set.
Thanks to sed4906 and waddlesplash for the help in locating the issue!
Fixes#20123.
Change-Id: Ide9b6900d2b2abe59138c0c370c8f37a856c4bcd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11337
Haiku-Format: Haiku-format Bot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
(cherry picked from commit f8e60239a31589e57f0693f27bf731fa98ad1c52)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11338
The cache may not have all pages needed to be fully locked. Therefore
we have to use B_LAZY_LOCK if it doesn't.
Fixes some KDLs I was seeing when using NVMM against a raw disk device.
(cherry picked from commit 0ea1a0a835e8093355c5ea4fbe08dc9be93e3eb5)
Change-Id: I403eaf2f14677101cdd327d4b99c12318815c116
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11332
Reviewed-by: waddlesplash <[email protected]>
Discovered by compiling with UBSan (it triggered as a compile-time
warning; I don't know if this actually causes any problems at runtime.)
(cherry picked from commit 6b28f736c09757156abadd560e69b8e090e60f25)
Change-Id: I91f6930fd4b9e870ecc1bad357aae2722f252cd1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11329
Reviewed-by: waddlesplash <[email protected]>
off_t is a signed 64-bit type, but size_t isn't signed or 64-bit
on 32-bit platforms. That meant adding a sign bit caused strange
things to happen there.
Fixes incorrect free-memory computations on 32-bit.
(cherry picked from commit cc565c81afd2dfba34de6ced607199d757080a8d)
Change-Id: I294f92ac1279a6311347b5e25341542d8c862013
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11326
Reviewed-by: waddlesplash <[email protected]>
We allocate/free ranges with the write lock held, so the depot is
just a waste, and actually in low-memory conditions hurts (if we
need a Range and there's none in the cache but there were in the
depots, a scenario I saw when trying to boot with a DEBUG=1 kernel
on my laptop.)
(cherry picked from commit ad189ca258d42e68f493c22bb3ce5f904e1589bc)
Change-Id: Id4af983a8b1337f8e90640218fe63402543355f8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11322
Reviewed-by: waddlesplash <[email protected]>
This change corrects the selection of a package
so that if it could not have been in the filtered
list of packages then it becomes unselected. Also
fix a problem where `StackedFeaturedPackagesView`
is getting pointer events and so getting
`MouseDown(..)` all the time. Also remove some
disused code.
Fixes#20195
Change-Id: I4e30a79d1bfe9cd59bca10113376e8fa87f37ec6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11318
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
(cherry picked from commit a2cb86260ce9e1898ed31d9a45f8f76e718c0a1b)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11319
It was a complete no-op before. Now, when enabled, BIOS calls
won't be done past the bootloader, and the Framebuffer driver
will be used instead of VESA.
(cherry picked from commit 7f12208162a5fc676f7a03e050f7671919f4fb12)
Change-Id: Id7670cc060ab5273411222e27467a6dfdbbb9e7f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11313
Reviewed-by: waddlesplash <[email protected]>
No functional change. Reasonably we should have architecture-specific
headers for some of these, but that can wait.
(cherry picked from commit 450728b4b717b3ea09fb2145daf2e6a24874c6de)
Change-Id: I887d37a54b44e127e4d1fe46675bf57bc2a392dc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11312
Reviewed-by: waddlesplash <[email protected]>
We publish devices in the driver register hook, and if we try
to unpublish them from the device removed hook, not the driver
removed hook, we'll confuse the device_manager and cause it
to do use-after-frees on list iteration.
The two are called in quick succession of each other, so this
shouldn't cause problems.
Fixes a KDL reported by OscarL when unplugging a USB card reader
(which I reproduced with another USB card reader.) It seems the problem
would happen with any USB disk device that published more than
one LUN.
(cherry picked from commit a688b173e7c1e903845b6cac78baa7bd2ea23c31)
Change-Id: Ia9fae3428a45e199cb2c903acfe9c689dfa9bed4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11305
Reviewed-by: waddlesplash <[email protected]>
Avoids the media checker retrying uselessly after devices have been
removed.
(cherry picked from commit a88cbfae4fcaf80d8786d144fccbeb349c3bd91b)
Change-Id: I3fefcbe515bf46bb84b6a6476e9cef7dcbbb48eb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11304
Reviewed-by: waddlesplash <[email protected]>
We want the DriverData not the device_node.
Discovered while working on usb_disk. I wonder if anyone ever actually
used this method for hot-unplug before...? Looking at the source code
of other modules, only a select few try to do anything with the cookie,
and most of those likely don't use hot-unplug.
(cherry picked from commit 5fec48b27d7b4c1c831b93db3d4abc1cfaee4982)
Change-Id: Iaf8973b8212758ba2148ad88832f9f96aa5158f1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11303
Reviewed-by: waddlesplash <[email protected]>
This way, we can use it even after the "early" boot phase is over
but before PCI is initialized, and also add the locking necessary
once there are multiple threads.
Should fix#20196.
Change-Id: Ie96daf44cc7c82050d0aa686d0d395228ffa4f20
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11285
Reviewed-by: waddlesplash <[email protected]>
(cherry picked from commit 4e8abe02f6384e6c35895785557b1eeaed85a607)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11287
Fixes#18778, #19602, #19716, #19948, #20165
The ACPI tables on certain recent-ish Intel platforms read some
values from PCI config space during ACPI init. Since we haven't
initialized PCI yet during ACPI init, instead of reading from
config space, the ACPI bytecode gets garbage values. These values
are later used in an address compution. An address compution with
garbage values produces a garbage address. That garbage address
has certain upper bits set, which causes the corresponding page
table entry to have those upper bits set as well (since the page
mapping code doesn't sanitize the address). These upper bits being
set triggers a page fault due to invalid bits being set in the
page table, which we erroneously think is an SMAP violation.
Co-authored-by: Augustin Cavalier <[email protected]>
Change-Id: If75dffe47ebf3e14831ceac1dfbe492c6a6a6964
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11272
Reviewed-by: waddlesplash <[email protected]>
(cherry picked from commit aa519fec255ea2196453b7e62c6f1540efbeefee)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11281
- Move Philippe Houdoin back to active contributors (welcome back!)
- Add all GSoC contributors since 2012 who worked on directly
Haiku-related work (excluded: failed projects, projects related to
Trac or other tooling, and 3rd party apps). Students before 2012 were
already consistently added but we forgot to do it for some of them in
the next years. They are added to the "contributors" section (if some
of then do have commit access, they should be moved to past
maintainers or active maintainers accordingly).
Change-Id: Icc615b07bc2911ce81d13ee2a6305b7251405647
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11270
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: nephele nephele <[email protected]>
Haiku-Format: Haiku-format Bot <[email protected]>
(cherry picked from commit 33f8320181e5809e89bcdcaedcd1c259992a19ff)
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11275
EFI doesn't have a boot keys mechanism so we just disable the
routine that enables it entirely. Also disable it in early kernel
output before the settings file has been read.
This solves an old TODO, that the page writer could potentially cause
deadlocks when writing pages of different devices back at once. It's
also necessary after the previous change, as otherwise simultaneous
writes to disks with different write speeds would cause the quota
computations to be fluctuating and inconsistent.
Change-Id: I1c485f66625ea9013f17ab4fee007d7d58afd2ea
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8619
Reviewed-by: waddlesplash <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Otherwise, if we're marking pages modified faster than we can
write them out, the number of modified pages will just grow
unboundedly. This can lead (e.g.) to `sync` taking multiple
minutes after copying a lot of data to a slow disk. So, instead,
we now have a quota of no more than 3 seconds for all pages
to be written back.
Also drop a TODO comment from the page_writer thread. Since
we only start writing pages if there's at least 256 to be written,
or if someone wakes us up deliberately (which the page daemon
does, if it schedules pages to be written out), we shouldn't
need to wait shorter.
This should fix#5777 and related tickets.
Change-Id: I4d419d149ea780677b462f5fa46cfe4d65044b2c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10811
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
Reverts part of 05fd080554.
I got confused by the "Details" part of the variable, mistook it
for being related to the "Show details" checkbox…
Change-Id: I0eb2a72f83a55cb306a33384da1c5c2cdde32082
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11269
Reviewed-by: waddlesplash <[email protected]>
* Implement functionality so that changing the partition type via the
"Change parameters..." option will now work.
* Implement changing partition type for Intel extended partitions. This
included fixing the existing code so that changing partition type
results in the updated EBR being written to the correct location.
* Fix changing parameters of GPT partitions.
Fixes#19194
Change-Id: I4c8a2cbee25342acbab125b0b36b0106a872ea4b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/11266
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: waddlesplash <[email protected]>