Commit Graph
100 Commits
Author SHA1 Message Date
François Revol f12a8a2c14 3rdparty: Add my old scripts to convert linux console keymap
I wrote that for the initial Bépo keymap.

Change-Id: Ib1d54a3326724741615fb5ead6fd5f98701ad782
2025-11-19 16:07:38 +01:00
François Revol 71522c937e net: Rename IFT_TUN to IFT_TUNNEL as on BSD
We already use their value, let's use the name too.

Change-Id: I5afbd69923ae3b5e702dfb935a709c3069de5365
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7146
Reviewed-by: Adrien Destugues <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: François Revol <[email protected]>
2023-12-10 19:50:48 +00:00
François Revol a143f249c2 Readme.Compiling.md: Mention the need for zstd and python3
Change-Id: I9d787e3e79a6da419e6d08496463df493026e720
2023-11-18 14:58:01 +01:00
François Revol 768aa9d339 safemode: Add usage help option
Change-Id: I25c96070327f43ea12df7df9bf0d8e9b994a80af
2023-11-18 14:24:20 +01:00
François Revol 6f80a9801f Some script for a crude convertion from Hugo to Pandoc
I wrote this to make a print copy of my lenovo blog post.

Change-Id: Id39bfda3d95532a4049b58d9008b695f340513ed
2022-05-29 23:29:46 +02:00
François Revol 627fb72d50 app_server: only turn screens on once at start
Previous code from hrev55212 was triggered on every workspaces change.

Fixes #17078.

Change-Id: I13108cddbd57662650e06c05bd43931c12b3dfae
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4208
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2021-07-24 19:35:49 +00:00
François Revol 08d7c6e8f3 poke: raise IOPL on x86 when opening the driver
This should allow easier porting of things like flashrom,
as it mimics FreeBSD's /dev/io behaviour.

Change-Id: Iaa6b6342cf7983a9655a7155adfcc46c8a8264f1
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1077
Reviewed-by: Jérôme Duval <[email protected]>
2021-06-13 21:07:28 +00:00
François Revol e5495bf648 poke: allow multiple open()
Not sure why it only ever allowed a single instance.

Change-Id: I972a1d601d93725674a97fb341aa7ffb3625b105
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1075
Reviewed-by: Jérôme Duval <[email protected]>
Tested-by: Commit checker robot <[email protected]>
2021-06-13 21:03:11 +00:00
François Revol df026fdf16 BMessage: fix typos 2021-04-24 12:55:17 +02:00
François Revol c7ac2d5042 SettingsMessage: Remove existing int32 when saving an uint32
Fixes #16922 for good.

Previous attempt did read the saved value but didn't save it back properly.
2021-04-24 12:48:20 +02:00
François Revol ad22267906 m68k: Add missing disklabel.h for NeXT support
Currently used by fixup_next_boot_floppy.

Change-Id: I47c10657b5280f00e470a3171ad11744859ce76c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3310
Reviewed-by: Adrien Destugues <[email protected]>
2020-10-12 06:36:15 +00:00
François Revol 425515d0ac m68k: really add fenv from musl-1.1.24
Somehow the first review merged only the commit log.

FreeBSD doesn't have m68k anyway, so use fenv from musl with as less
changes as possible.

Change-Id: I6372af6679e6773fbb6bf4c8b5b30512971a97a6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3161
Reviewed-by: Alex von Gluck IV <[email protected]>
2020-08-19 15:23:47 +00:00
François Revol 48099e3e48 m68k: don't take CD boot stuff in floppy image
Note it is not enough to fit, you also need to disable USB boot.

Change-Id: I5159c9ddebb242c4d4874d70430da6852073fdb4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3102
Reviewed-by: Adrien Destugues <[email protected]>
2020-08-19 13:39:53 +00:00
François Revol d4b7d64b81 m68k: force fold segments into text, [ro]data & shave 100kB of ELF stuff
For some reason the kernel ended up with a bunch of .text.foo or
.data.rel.bar sections, each with their own ELF section headers and
other metadata. Forcing them into the base sections drops the binary
size by about 100kB, even for the stripped one.

I suspect it should work on other archs as well.

Change-Id: I7a8f46480d71267c07b75325423a0f5bfd2d12fb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3101
Reviewed-by: Alex von Gluck IV <[email protected]>
2020-08-19 13:39:32 +00:00
François Revol ab51e305e9 m68k: fixup_next_boot_floppy: force bootblock at 8k to fit before tgz
We don't have room for disklabel copies anymore.

+ style fixes

Change-Id: I22502167a4f5f8bc3df1b017072461d77a299b16
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3100
Reviewed-by: Alex von Gluck IV <[email protected]>
2020-08-19 13:39:04 +00:00
François Revol 50addaaab6 m68k: fixup_next_boot_floppy: use Haiku names, write copies
Change-Id: I99b007d8c67f278f5bb7a784ea0e56fdd15209c0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3099
Reviewed-by: Alex von Gluck IV <[email protected]>
2020-08-19 13:38:25 +00:00
François Revol ea3142ecba m68k: fixup_next_boot_floppy tool (actually writes the disklabel)
Next floppies actually do have a "disk label" (partitionning scheme),
the boot block being later on the disk.

This commit generates an identical label to the image I have here (but
not the copies at other sectors), including the checksum.

Change-Id: I7f939c26e70e3626d9af7a3eb342cfd32c298e3d
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3098
Reviewed-by: Alex von Gluck IV <[email protected]>
2020-08-19 13:37:39 +00:00
François Revol 86776c1ebe m68k: detect NeXT framebuffer
Doesn't work yet though:
- we don't implement heap yet,
- non-color machines have 2bpp, so we'll have to hack this in some way.

Change-Id: Idf8f69c2256837db3915949d93265decbb43a524
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3097
Reviewed-by: Alex von Gluck IV <[email protected]>
2020-08-19 13:37:21 +00:00
François Revol ab17378328 m68k: Add more NeXT boot rom stuff
Those were found in the official headers in the NeXTstep ISO, how come I
didn't even look there in the first place?

We do get enough info to use the framebuffer, but sadly the SCSI IO
seems invalid. Both the NetBSD and even NeXTstep bootblock have their
own embedded drivers, maybe they didn't trust their own rom?

Change-Id: I0a47c433da89b15091644cd5c69ffff24d0cdd1f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3096
Reviewed-by: Alex von Gluck IV <[email protected]>
2020-08-19 13:36:51 +00:00
François Revol 5c9d51ef00 m68k: make sure boot & kernel code can run on 020-060
Change-Id: I5830085fcd6120600ff3be85a2fdd2602e1935fe
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2221
Reviewed-by: Adrien Destugues <[email protected]>
2020-08-19 13:35:41 +00:00
François Revol ec5a799719 m68k: add next_m68k boot platform
Since the boot ROM API structure is declared with a custom alignment, we
simulate it with padding bytes around, and use aligntest.prg to verify
using ARAnyM + TOS/MiNT as we know how to link simple PRG files.

It now prints something to the screen then panics when initializing the
heap.

For now one must insert the loader manually into an existing floppy
image:
dd if=generated-m68k/objects/haiku/m68k/release/system/boot/next_m68k/haiku_loader.next_m68k bs=$((0x8000)) seek=1 of=next_floppy.img conv=notrunc

Change-Id: I06d74e9d85a352aab68dedce545bbe5fe9e990d5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2220
Reviewed-by: Adrien Destugues <[email protected]>
2020-08-19 13:35:19 +00:00
François Revol 53b97f0d18 m68k: add fenv from musl-1.1.24
FreeBSD doesn't have m68k anyway, so use fenv from musl with as less
changes as possible.

Not sure the 'hidden' define should go there.

Change-Id: I343f72d61dcacf7dfc180d112529f5a6521d7e3b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2213
Reviewed-by: Alex von Gluck IV <[email protected]>
2020-08-19 13:34:55 +00:00
François Revol a088631dc6 build/repositories: Fix m68k HaikuPorts and Cross
Change-Id: I0ebdd096558a6f060d6bcd56807903f1496e8ed6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2211
Reviewed-by: Alex von Gluck IV <[email protected]>
2020-08-19 00:08:10 +00:00
François Revol 4bfd65a2b7 system/boot: Fix relocations in ARM EFI loader
The .rel.* sections were forgotten in the PE binary, so we just put them in a single .rel

Change-Id: I7bc564e18ec8dd64410b43106272ee74696c2883
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2973
Reviewed-by: Alex von Gluck IV <[email protected]>
2020-06-30 16:25:07 +00:00
François Revol 8a9a366fef strings.h: s/inline/__inline__/
As suggested by http://gcc.gnu.org/onlinedocs/gcc-4.2.4/gcc/Inline.html

This should fix building things like NBDkit.

Change-Id: I1da7fc140dd8451ff2ddaf599fe4e951401d0cb3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2794
Reviewed-by: Adrien Destugues <[email protected]>
2020-05-24 13:59:57 +00:00
François Revol f0ba8f6aca TCP: Fix Zero Window Probes.
I did some tcpdump recording, and I believe we confuse the receiver
with our Zero Window Probe, because we don't resent even though it only
ACKs the previous segment, and we keep sending things after it:

 * we send the last segment before window is closed, next seg = N,
 * we get ACK for N, with window=0
 * we send Zero Window Probe with 1 byte, next seg = N+1,
 * we eventually get a window>0 ACK still at N,
 * we start sending stuff again, but starting from N+1,
 * receiver keeps ACKing N because it never accepted it.

It seems sending either 1 or 0 byte is valid for a ZWP, although I'm not
entirely sure. At least it's easier to handle 0 than 1, and it seems to work.
Wireshark shows them as duplicate ACKs, but they get the thing going.

References:
 * RFC 793: https://tools.ietf.org/html/rfc793#section-3.7
 * RFC 6429: https://tools.ietf.org/html/rfc6429
 * Wireshark wiki: https://www.wireshark.org/docs/wsug_html_chunked/ChAdvTCPAnalysis.html

Should fix #13769.

Change-Id: I95264ebbbb8c66c23411dfce6fc41871e0427166
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1188
Reviewed-by: waddlesplash <[email protected]>
2020-02-06 00:41:05 +00:00
François Revol 8a0fd7e14e m68k: use generic stack_trace for now
Change-Id: I76638296ac0d92f4be5e7138b52f8e7e40e403eb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2218
Reviewed-by: Adrien Destugues <[email protected]>
2020-02-06 00:07:15 +00:00
François Revol f1d285df02 m68k: more atomic stubbing
Change-Id: Ic8f0078068b0d01973d67424187d11bd2bef019f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2217
Reviewed-by: waddlesplash <[email protected]>
2020-02-06 00:07:15 +00:00
François Revol 0960949012 m68k: build fix
Change-Id: I3e2b106d5b14a84523e74024616a5c168f011e1a
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2216
Reviewed-by: waddlesplash <[email protected]>
2020-02-06 00:07:15 +00:00
François Revol 66f88b473a m68k: stub out more TLS
Change-Id: Ia226dcf996556622faf66798647447f2311fbb03
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2215
Reviewed-by: waddlesplash <[email protected]>
2020-02-06 00:07:15 +00:00
François Revol f614bad4a6 m68k: fix linking atari_m68k loader
Change-Id: Idb266a55bf72d14a0ebe9a4ee16a981f39b8adec
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2214
Reviewed-by: waddlesplash <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2020-02-06 00:07:15 +00:00
François Revol 086766edf9 m68k: fix math in libroot
Change-Id: Icd50c5887d1b96818c620046b20ba51aac55ec18
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2212
Reviewed-by: waddlesplash <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
2020-02-06 00:03:15 +00:00
François Revol 15e39e1c67 elf2aout: Fix for 32bit
Sadly the NetBSD elf2aout only support 32bit, and this one from FreeBSD
only supports 64bit. This one was simpler to fix because it only handles
basic stuff.

Change-Id: I70165f680ec1cd95c156d4116f9d96c6b4ac53b0
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2206
Reviewed-by: Adrien Destugues <[email protected]>
2020-02-05 14:52:31 +00:00
François Revol 0ef0921d99 Package Kit: Return proper errors in FetchFileJob
This should give more meaningful errors in pkgman
(not so sure, feel free to tweak the mapping),
and also avoid running the next job if fetching failed.

Change-Id: If76968f705ff25f7ecf1a5f91d88a02040d24665
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2186
Reviewed-by: Ryan Leavengood <[email protected]>
2020-02-04 02:18:09 +00:00
François Revol 8fd4412d88 m68k: update bootstrap packages versions
Change-Id: I484ee07d8a916581f5b3c94d137e5e2b26cc2fc9
2019-11-03 03:50:32 +01:00
François Revol 9efa7fd520 kernel/m68k: Fix a few build regressions around types
Change-Id: I17e5452bc6abd6311c9631f88d199cb9c4f501c4
2019-11-03 03:50:32 +01:00
François Revol 494acd2185 m68k: update build to support MultiBootSubDirSetup
Change-Id: Idbbbb089286ad7d76f61993670a20d240bfe773c
2019-11-03 03:50:32 +01:00
François Revol 9ad59bd841 kernel: arch_vm_set_memory_type takes a phys_addr_t now
Change-Id: I94a8f8453238a9ed2b2ac549d9b500c83e6c53b8
2019-11-03 03:47:57 +01:00
François Revol 96e0ae70d4 dump_windows: off-by-1
Change-Id: Iaa6bd350cbc8b07016f7a73a267107431e173e93
2019-09-17 19:56:34 +02:00
François Revol f60531661b Add a dump_windows script to help with automating screenshoting
Oddly hey hangs when asking Pe, someone should investigate.

Change-Id: Ic94d0a2600ceae5f73ce11d5666b6a7abd54c0c0
2019-09-17 19:32:32 +02:00
François Revol 733f097b97 Appearance: Add a ControlLook MenuField
Change-Id: If815fa6a864d2a916eb1ae878400d342f666e3d2
Reviewed-on: https://review.haiku-os.org/c/1434
Reviewed-by: waddlesplash <[email protected]>
2019-05-13 22:15:30 +00:00
François Revol e88c3d58bd Add setcontrollook minimal CLI tool
Just does what the name says

Change-Id: I6cf23f997ce544df83d4ef2f73a3b130dea8825c
Reviewed-on: https://review.haiku-os.org/c/1432
Reviewed-by: Stephan Aßmus <[email protected]>
2019-05-13 22:15:30 +00:00
François Revol 26b5a18eb0 Add a BeControlLook addon
Very simple for now, just reuses the Haiku one with some gradients
removed.

Add it to the haiku_extras package.

Change-Id: I41729ed65b147fed72bf56e7c5c89367b75563bb
Reviewed-on: https://review.haiku-os.org/c/1431
Reviewed-by: waddlesplash <[email protected]>
2019-05-13 22:15:30 +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 <[email protected]>
2019-05-13 22:15:30 +00:00
François Revol 25de7c1b12 loader: VESA: make nvidia scaling fixup a driver setting
Since not everyone likes the default, make it an option in the vesa
settings file. Note setting a mode with the Screen prefs overwrites
the file so it will discard the option.

Also move the code to get_mode_from_settings() since we can't load driver
settings as early as vesa_init().

Change-Id: I93080bd1fbc064dab053624ad37935268b1ed17d
2019-05-08 04:42:33 +02:00
François Revol 0bed4dedc9 haiku utils rdef: bump Copyright year and fix indentation
Change-Id: Ib33df34029d0ab0189754024dd07beef3a2864bc
2019-05-08 02:00:04 +02:00
François Revol 547b5497e3 googlefs: fix warnings
Someone should rewrite this.

Change-Id: I08ddd10ac39c025f2ea1c28213a744bc2ada8516
2019-05-03 19:37:46 +02:00
François Revol 7409049765 Fix warning
Change-Id: I83250cc76a709404c52b91c992abb64f162e259b
2019-05-03 19:22:38 +02:00
François Revol 1b48852e84 Fix doxygen + whitespace
Change-Id: Ief0b2646e95841604a0396f15a054ff2086db198
2019-05-03 19:22:38 +02: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
François Revol 80934b8395 runtime_loader: Fix handling of #!/usr/bin/* introduced in hrev53048
Code was comparing "/usr/bin/" with "/usr/bin/env" of whatever was
passed. We now only compare the substring.

Change-Id: I0d09589fa83227d88fc8ba458eaf4293e86a041b
2019-04-08 23:50:33 +02:00
François Revol 5e4336f30a GLTeapot: allow multiple instances
starsseed told me it worked fine and is actually nice for demos :-)

Another option could be to add a menu entry to open a new window, but
I'm just back from JDLL so I'm quite lazy :p

Change-Id: I91e34517812f84157db7e24f2edff587deabbbe9
2019-04-07 22:00:32 +02:00
François Revol eae1e95256 Add a proper (but ugly) icon for ThemeManager
Feel free to propose a better one ;-)

Change-Id: I481b730d8d715415dfdfc07c16aaa302b5724a7b
2019-04-02 21:55:17 +02:00
François Revol 88255e0890 BFS: Add support for building big-endian BFS
I tried to use the feature stuff to relocate objects but didn't managed
to get it to work, having another subdir seems to be the simplest
solution.

I managed to mount a clone of my BeBox' drive, but it KDLed shortly when mouting
read-write.

Change-Id: Ia4f126673e553e4f3e524a40218e6c623527b96d
Reviewed-on: https://review.haiku-os.org/c/645
Reviewed-by: Adrien Destugues <[email protected]>
2019-03-13 19:59:34 +00:00
François Revol d51c92f872 Actually add AutoRaise to the regular image
Change-Id: Ied73e217ba91531c8b149fc5c23fd95bca53e732
2019-03-11 13:37:02 +01:00
François Revol dc2d41d7e6 Add AutoRaise to the regular image
It now works reasonably well to be of some use.

Change-Id: I2e031e4d4a7e395d4c597014b73e399c65d15041
2019-03-11 04:33:29 +01:00
François Revol 0305dc14b4 AutoRaise: Make it actually working again
It seems we don't sort the window token list anymore, so it only worked
in very few cases.
2019-03-11 03:17:15 +01:00
François Revol 46308e28e5 AutoRaise: Just add itself to Deskbar on run
It's simpler, nobody runs things in Terminal, right?
2019-03-11 03:16:39 +01:00
François Revol 6ff7e25bd0 mime_db: consider recipe files as text/x-source-code
Opening them in StyledEdit isn't handy.

Change-Id: Icbdcbdbace0432cd7c808eb0011186a4310aed79
2019-03-10 18:19:57 +01:00
François Revol 46113563a3 mime_db: Add some more text/x-source-code extensions
Change-Id: Ia0799e2614ebfeb1e1dd86e0cd60dfc2c3cb391a
2019-03-10 18:18:38 +01:00
François Revol f82b4294d8 urlwrapper: add support for binary plist webloc files
Quite hardcoded but it works.

We only support URLs shorter than 256 bytes as it's the only samples I have.
2019-03-06 04:54:56 +01:00
François Revol ee55f593fd mime_db: Add text/x-webloc
Also try to match the binary plist for the examples I have here.
2019-03-06 04:19:52 +01:00
François Revol 2c73537c43 Add a catarea bin tool
Untouched as of 2004, can be useful sometimes.
2019-03-02 13:37:23 +01:00
François Revol 54a4352649 Coding Style Police
Change-Id: I93ebe389dbc685f4277cf32c4d0a6d529c81a354
2019-02-24 15:54:34 +01:00
François Revol 447b98e474 net_socket: Fix deferencing NULL+8 in KDL commands
Change-Id: I50d4dab27699614b0bfc977e10d6d11cbb5f79fa
2019-02-24 04:44:10 +01:00
François Revol d18fe1c54c loader: disable scaling on nvidia VESA BIOS
cf. https://patchwork.kernel.org/patch/7113461/

Change-Id: I3f564bd1037aeb4b539f495d57397446ae14e5ed
2019-02-21 05:28:56 +01:00
François Revol 38c4c8bfa9 kernel: fix mount arguments checks from userland
Since NULL is not considered a user address anymore, we must check for
it first.

This fixes the "mount: Bad address" error after hrev52905.

Change-Id: If60ea58bb81b6c35c6bf27ecfa9b29bd7a25d8aa
2019-02-21 03:14:23 +01:00
François Revol b98f12a601 freebsd_network: use proper BAR size in bus_alloc_mem_resource
This time we use the pci_info directly, it avoids a possible race with
PCI config regs, and we already have the value there anyway.

Signed-off-by: Augustin Cavalier <[email protected]>
One crucial fix by me: check if size == 0. This avoids the deadlock
seen in #14795.
2019-01-05 14:45:54 -05:00
François Revol 35eb380e1a Add Shelf screen-saver to the regular image
It builds and works, so let's have people test it.

Change-Id: I33016527e89aab29ba3200c8b4bf72376a32312b
2018-11-20 16:58:52 +01:00
François Revol 84f9d70b0f shelf saver: hopefully fix x86_64 build 2018-11-20 16:54:43 +01:00
François Revol 8c4a96818d shelf: use layout for the config view & B_TRANSLATE 2018-11-20 05:05:11 +01:00
François Revol 5d558f271c BFS: Use separate name & pretty name for big-endian
Change-Id: I7e3a99e3cff35ae5f8cd84fa7243579bf93de904
Reviewed-on: https://review.haiku-os.org/644
Reviewed-by: waddlesplash <[email protected]>
2018-10-27 17:48:25 +00:00
François Revol 2522f69ee9 BFS: make sure we #error if asked to build both big & little endian
Change-Id: Ia7dd0046a2a527d9acbeb31b665d98f099642102
Reviewed-on: https://review.haiku-os.org/643
Reviewed-by: waddlesplash <[email protected]>
2018-10-27 17:48:25 +00:00
François Revol 4a3dae2bac package kit: add a NULL check on requests
This avoid crashing on malformed repository URL (like missing http://).
2018-10-08 00:56:11 +02:00
François Revol 8865af3950 BApplication docs: fix example
Fixes #14520.
2018-09-24 19:30:05 +02:00
François Revol cbd7818322 radeon: make the framebuffer user-cloneable
This avoids an annoying panic...
2018-09-24 03:07:56 +02:00
François Revol e4fac18200 data/profile: fix and simplify secondary arch detection
The previous code was wrong: running bash --login was reported
as if we used setarch x86_gcc2.

Current code also saves 3 fork+exec.
2018-08-21 23:26:33 +02:00
François Revol 4fced27d37 acpi: fix format warnings with DEBUG_OSHAIKU set 2018-08-16 18:29:19 +02:00
François Revol c476e73be7 freebsd11_network: allocate a new root device for each attach
else the pci_info struct is reused and overwritten.

This made the broadcom43xx driver write to the PCI config regs of other
devices...
2018-08-10 07:21:30 +02:00
François Revol 4cd13e2a54 freebsd11_network: calculate the size of memory resources from the BAR
128kB ought to be enough for everyone, but that's not a reason.
2018-08-10 07:18:49 +02:00
François Revol ba88131cfd broadcom43xx: fix dereferencing uninitialized pointer in bwi_getradiocaps
bwi_attach wasn't setting ic->ic_softc early enough.
2018-08-10 07:16:32 +02:00
François Revol 4498948fcf recover: Work around use-after-free
Inode::_FindPath() always deletes the inode it uses regardless
the source, including when it's from the HashtableInodeSource.

But the later returned the inode object directly from the hashtable
when it's inside, so it gets deleted bu _FindPath… then reused later on
when searching the hashtable again.

I'm not sure it's the correct solution but at least malloc_debug doesn't
complain anymore.
2018-03-27 23:14:32 +02:00
François Revol 4069b740e5 pthread: assign handle argument before resuming the created thread
It's not specified by POSIX:
http://pubs.opengroup.org/onlinepubs/009695399/functions/pthread_create.html
"There is no requirement on the implementation that the ID of the
created thread be available before the newly created thread starts executing."

However I've run into it with MPD which assumed this, probably because
of Linux:
https://github.com/MusicPlayerDaemon/MPD/issues/188

It doesn't hurt anyway.
2018-01-06 05:07:43 +01:00
François Revol f254805b43 usb_webcam: UVC: guard against NULL config or interface from USB device 2017-11-22 14:06:06 +01:00
François Revol 9c7aacad7b Typo 2017-11-22 14:06:06 +01:00
François Revol e96fd79311 ata_adapter: Remove bad casts for ram_address()
We now accept and return a phys_addr_t as we ought to.
2017-11-21 21:44:02 +01:00
François Revol 4dde854c8a silicon_image_3112: Remove bad casts for ram_address()
We now accept and return a phys_addr_t as we ought to.
2017-11-21 21:44:02 +01:00
François Revol aef94baf32 ISA: fix ram_address() to use phys_addr_t for completeness
I don't know of any driver actually making use of it, but some weird
architecture might want to emulate an ISA bus to reuse a driver maybe...
2017-11-21 21:44:02 +01:00
François Revol 16bb99fdac PCI: fix ram_address() to use phys_addr_t
Since it handles physical address it should really be this.

It's not like many drivers actually used it anyway. It shouldn't harm
compatibility, drivers calling it with only 32bit would leave garbage in
the higher bits but since on x86 it's a noop anyway, it would end up in
the MSB register tha's ignored because it expects a 32bit result.
2017-11-21 21:44:01 +01:00
François Revol dd1454bd96 Defer calling arch_debug_console_init_settings
when we can actually read driver settings :-)
2017-11-20 18:16:54 +01:00
François Revol 7c7390c719 work around "cast specifies signature type" from gcc2
...when build by gcc6 or 7 on my Debian Sid.
2017-11-20 17:18:08 +01:00
François Revol 0835170c80 Actually use the serial port and speed from the kernel settings
Turns out we just reused the already set values, disregarding the new ones.
2017-11-20 11:44:43 +01:00
François Revol 587b70d5cd Add a get_driver_settings debugging tool 2017-11-20 11:23:34 +01:00
François Revol b7fc170ebd MIME: Open Gopher URLs with WebPositive, as we support them now 2017-09-01 22:18:11 +02:00
François Revol e62e979e60 Allow dumping SSL session keys on TRACE_SESSION_KEY
This dumps SSL session keys to a log file specified by the
SSLKEYLOGFILE environment variable.

This permits decrypting SSL trafic in wireshark with a tcpdump
capture for example.
cf.
https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/Key_Log_Format
https://security.stackexchange.com/questions/35639/decrypting-tls-in-wireshark-when-using-dhe-rsa-ciphersuites/42350#42350
https://wiki.wireshark.org/SSL#Using_the_.28Pre.29-Master-Secret
https://jimshaver.net/2015/02/11/decrypting-tls-browser-traffic-with-wireshark-the-easy-way/

Looks like we miss the required function from SSL...
SSL_SESSION_print_keylog is only in 1.1.0.
Also added dumping of client_random as it's required by wireshark.
2017-05-04 00:56:15 +02:00
François Revol 28fb504bb8 Style fix, also fixes an indentation warning 2016-12-02 05:33:18 +01:00
François Revol 8a6724a0ee makefile-engine: use grep -a for RDEF parsing
ThemeManager has an UTF-8 copyright symbol in its rdef file.
The chroot set up by haikuporter doesn't export anything that would
hint grep to accept UTF-8 as text, so it freaks out...
So we force it to accept anything as text.
2016-11-05 00:55:53 +01:00
François Revol b1e2427d75 glibc: replace extern __inline with __extern_always_inline for ppc
As was done for x86 in hrev49774.
2016-10-22 15:53:57 +02:00
François Revol 72ddc912a6 PPC: make arch_framebuffer.h more like ARM version
Now the only difference is the physical address, which is returned as
phys_addr_t as should be.
2016-10-22 15:53:52 +02:00