Commit Graph

4310 Commits

Author SHA1 Message Date
Rene Gollent
c7b27349ee Another build fix.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39008 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-18 20:30:12 +00:00
Rene Gollent
1f0b0045c2 Fix build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39007 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-18 20:26:33 +00:00
Ithamar R. Adema
7889c39de4 * Fixup longjump too... One step closer to a working KDL...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39002 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-18 14:00:17 +00:00
Ithamar R. Adema
4795b05a88 * Fixup trace message
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39001 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-18 13:03:59 +00:00
Ithamar R. Adema
a9de9aea54 * Fix atomic_get :$
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39000 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-18 12:39:59 +00:00
Ithamar R. Adema
60beb9c01e * Fixup atomic calls; currently only minimally tested on __ARM_ARCH__ < 6
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38999 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-18 12:10:16 +00:00
Ithamar R. Adema
c395771a69 * Force GCC to align sInitialHeap on 8-byte boundary, otherwise Free() will complain (hit on ARM)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38997 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-18 09:42:59 +00:00
Ithamar R. Adema
fb2cbc781e * Fix incorrect class name in kprintfs
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38995 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-18 01:43:47 +00:00
Ithamar R. Adema
cd4265c803 * For ARM, we now always read from the serial for KDL input.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38994 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-18 01:15:13 +00:00
Ithamar R. Adema
a85c91d6f0 * Fix setjmp/jmpbuf_t size so we can finally get to the KDL prompt
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38993 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-18 00:50:59 +00:00
Ithamar R. Adema
ce30d635e3 * fix outdated commented dprintf (still useful for local debugging)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38990 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-17 20:00:21 +00:00
Ithamar R. Adema
1ca7a3536c * let arch_debug_call_with_fault_handler() at least do the call, though without fault handler for now
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38989 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-17 19:58:14 +00:00
Ithamar R. Adema
2d3913afba * Pass through physical RAM area to kernel.
* More code cleanup....

Currently working on getting the MMU code on the kernel side to function correctly, some progress already there, will follow in later commits...



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38988 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-17 15:27:36 +00:00
Matt Madia
ead0844514 Created some pseudo targets, to make jamming easier. For example,
jam -q -sHAIKU_BOOT_BOARD=verdex haiku-arm-image
will build "haiku_verdex_flash_image_raw.img"


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38984 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-16 17:08:22 +00:00
Matt Madia
fc9a8806b1 Automatic whitespace cleanup. No functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38983 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-16 16:44:29 +00:00
Ithamar R. Adema
71b60eaf35 Remove leftover debug code. Thanks François!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38973 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-15 11:16:18 +00:00
Ithamar R. Adema
1a6a5dc39d Minor code cleanup. No functional changes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38972 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-15 10:20:21 +00:00
Ithamar R. Adema
ecaa4c2990 * Incorporate ARM board name in flash/mmc image names; Fixes ticket #5213.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38971 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-15 09:48:43 +00:00
François Revol
4cbffbf53f Style is overrated.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38957 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-12 10:24:49 +00:00
François Revol
14016c7ce9 Add some simplified structure definitions the way NetBSD does.
Implement cpu detection using Exec's AttnFlags.
Now panics a little later.

Note you need to tell UAE to emulate a 040 now (020 not supported) with -C4 to boot.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38956 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-12 10:11:04 +00:00
François Revol
0128537395 Cleanup leftover atari code.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38954 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-12 09:12:59 +00:00
François Revol
7171eb5907 Actually it seems using HD ADF image is what is causing this issue with 6 sectors. Using DD images seems to work fine.
Fix panic(). Now panic() in _start.

To try it, do :

TARGET_BOOT_PLATFORM=amiga_m68k jam -j1 -q haiku_loader
dd if=/dev/zero of=haiku.adf count=1760
dd if=generated/objects/haiku/m68k/release/system/boot/haiku_loader of=haiku.adf conv=notrunc
uae -s floppy0=haiku.adf -s cpu_type=68020/68881 -s chipmem_size=8 -i


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38952 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-12 00:20:53 +00:00
François Revol
52d6ea00ea Adapt the putx routine from atari code to update the string for the alert with a code. Use it to indicate remaining sectors to read on error.
It seems DoIO() fails after 6 sectors. Could it have something to do with side handling ? I hope I won't have to dig trackdisk.device specific stuff...
Anyway even with 6 sectors read, the boot code now calls _start() successfully. Use _floppy_err_alert() to assert this until the copying is fixed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38951 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-11 23:33:01 +00:00
Philippe Houdoin
89fa2a8573 Move the boot images conditional selection in one place, to remove
possible mismatch images info between loader and kernel.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38947 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-11 12:54:21 +00:00
François Revol
7ddba3d2ad s/amicalls/rom_calls/
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38944 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-10 20:44:33 +00:00
François Revol
4543fd0ef6 Define the needed Library Vector Offsets in the header and use them from the asm.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38943 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-10 20:41:41 +00:00
François Revol
396a612a64 Better error codes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38942 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-10 20:27:46 +00:00
François Revol
1d4497a8f6 The Coding Style Police is much more efficient than the HADOPI...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38941 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-10 20:18:07 +00:00
François Revol
aed95f3c6c Also checksum the bootsector in the Atari version of haiku_loader.
Remove duplicate of the checksum tool.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38939 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-10 18:28:07 +00:00
François Revol
06abf33747 Add a rule to checksum the bootblock inside haiku_loader for Amiga. It seems Jam correctly runs the action after creating the file, though I'm not sure it's correct with respect to jam -j.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38938 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-10 18:19:02 +00:00
Oliver Tappe
72cf60a534 * replace glibc-base wcwidth() and wcswidth() with the one from
Bruno Haible's libunistring, which seems to work just fine

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38936 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-10 17:49:09 +00:00
François Revol
398144a1b4 We don't need dos.library here.
Open intuition.library correctly.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38935 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-10 16:14:58 +00:00
François Revol
3b939cb0b6 Comment out atari stuff.
Initialize SysBase and IntuitionBase that will be needed by C++ code.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38933 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-10 14:18:05 +00:00
François Revol
918ac85f32 Comment out atari stuff.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38932 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-10 14:15:10 +00:00
François Revol
816efc4097 Seems gas doesn't like the syntax from the syscall macros, prefixing a6 with %% helps. Add some Exec calls and the Intuition call needed for panic().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38931 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-10 14:14:41 +00:00
François Revol
788565c49a Copy the Atari bootloader ldscript.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38930 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-10 14:10:49 +00:00
François Revol
7030ac1279 Library call macros from fd2pragma Include/inline/macros.h. The header has no copyright claims, and there is no point in rewriting this anyway.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38929 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-10 13:29:27 +00:00
François Revol
7364eb8e9b Remove Atari stuff.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38928 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-10 13:15:39 +00:00
François Revol
648d00c49c Those are C++ files now.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38927 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-10 13:15:16 +00:00
François Revol
fb6b9ae341 Remove Commodore code and rewrite. Hate wasting time on this...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38926 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-10 13:03:19 +00:00
François Revol
6ed98199f1 Amiga is just an Atari clone :-P
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38925 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-10 12:42:18 +00:00
François Revol
acb1d6c8e0 s/tos/ami/g;s/ATARI/AMIGA/g
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38924 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-10 11:27:52 +00:00
François Revol
2231a4e6a3 Copy some more from Atari.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38923 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-10 11:22:50 +00:00
François Revol
9c720d59e3 Copy Handle stuff from Atari.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38922 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-10 11:20:55 +00:00
François Revol
4ae92968ab Stub out some more of the platform code.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38921 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-10 11:16:46 +00:00
François Revol
1ae25236b2 Some useful Amiga API definitions. We'll just stuff what we need in there from all the SDK headers. More to come.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38920 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-10 11:09:51 +00:00
François Revol
b780f56676 Add some amiga code from stage1.S.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38919 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-10 11:07:14 +00:00
François Revol
92d1f05e9a Cleanup. Some more tries.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38918 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-10 11:05:05 +00:00
François Revol
f3ab95c889 Fix ROM base. On Amiga the first page is a bit special but it should still be mapped at boot time. Will need more checks.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38917 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-10 11:04:25 +00:00
François Revol
12760a5cc9 Copy the Atari memory map for Amiga.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38916 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-10 09:23:09 +00:00
François Revol
7fbfbc1dac Cleanup. Offsets were wrong for dos.library.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38914 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-10 02:00:14 +00:00
François Revol
948720fa91 cpu-specific mmu files are in arch/m68k now. Remove leftover atari prg stuff.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38913 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-10 01:04:36 +00:00
François Revol
ca7ec01422 Use cpu-specific mmu code from arch/m68k.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38911 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-09 23:38:09 +00:00
François Revol
33c4ca7e1d The mmu code is almost not platform specific. Copy it to arch/m68k for now.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38910 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-09 22:03:37 +00:00
François Revol
2830084019 More tries at doing something useful in the boot sector... For now it displays a welcome message.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38909 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-09 21:38:50 +00:00
François Revol
646e14e5e9 Clone the atari shell code.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38908 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-09 20:57:39 +00:00
François Revol
408aa82a13 Fix comment.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38906 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-09 20:55:01 +00:00
Philippe Houdoin
20e654cab0 unsetenv() should remove *any* occurence of name=value.
As with putenv() both value and name can be modified afterwise in our 
back, multiple occurence of the same name is a possibility.
Fix #6706. 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38904 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-09 09:09:01 +00:00
Philippe Houdoin
5b2ed54046 Fix the fix: sleep() should return *remaining* seconds.
Closed #6707.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38903 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-09 08:28:46 +00:00
Philippe Houdoin
82539c6155 sleep() remaining time was returned in microsecond, not second.
Fix #6707.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38902 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-09 07:19:41 +00:00
Axel Dörfler
c5e2c3ec4d * Fixed a bug that would cause allocate_page_run() to be called with an out of
bounds index - the system would overwrite memory then and eventually KDL.
  This could best be reproduced with overlays after a while.
* Added a TODO comment that explains why free_cached_pages() might fail even
  though the page is actually free now.
* Added an explanation of how the sFreePageQueuesLock is to be used, thanks to
  Ingo for explaining it to me in the first place :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38895 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-08 07:40:42 +00:00
Philippe Houdoin
64141b1b74 Enable development splash logo for "official" --distro_compatibility.
The official release one stay the well-known one, just renamed to show it's trademarked images.
Fixed #6183.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38891 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-05 10:31:13 +00:00
Scott McCreary
e86eb77b1b Patch from kaliber to a the glibc strtold implentation.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38710 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-18 16:42:59 +00:00
Oliver Tappe
6a5dacaa3c part1 of fixing #6599:
* protect against invocations of ctype-macros/-functions with negative
  character indices by mirroring the corresponding values at negative
  array indices (the legal access range of __ctype_b is now [-128..255])


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38708 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-18 15:55:42 +00:00
Oliver Tappe
338ddd836f Closing #6499:
* add missing getsubopt() POSIX-function
* added corresponding test


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38650 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-14 18:43:24 +00:00
Oliver Tappe
86932f41cc Try to fix #6581:
* avoid trying to overwrite values of a constant structure when
  updating the numeric locale data values used by glibc


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38623 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-12 17:24:38 +00:00
Oliver Tappe
ccee6057f0 * fix wrong signedness in values put into global 'timezone' variable,
the POSIX specs are a bit vague on this (to say the least)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38606 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-11 18:34:48 +00:00
Fredrik Holmqvist
01f964efeb Introduce a gSystemShutdown flag to be able to check if system is shutting down. ACPI Embedded Controller now uses polling when it is set to true.
This might help with ACPI shutdown issues, if not this change can be reverted. Not verified as it works on all my machines even without this.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38585 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-08 19:19:49 +00:00
Andreas Färber
3243de5750 boot_loader_openfirmware: Add iSCSI boot support
If no Haiku remote disk server is found, try an iSCSI discovery session on
the TFTP server, using the IP address from the boot command or OF options.
All available IPv4 targets are considered, Target Portal Groups are ignored.

RFC 4173 suggests a mechanism that avoids a discovery session by using DHCP;
that requires a compatibly configured DHCP server though and we wouldn't have
access to such data currently anyway. iSCSI is currently used as fallback,
and when it doesn't succeed it falls back to the menu as before.

Resolves ticket #5319.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38537 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-05 22:56:22 +00:00
Andreas Färber
5b086e27e8 boot_net: Add iSCSI initiator support
Add support for both discovery and regular iSCSI sessions. Command and status
sequence numbers do differentiate between session and connection but only
one connection per session is currently supported.

Code is Big Endian for now, so compile it for ppc only.

Based on RFC 3720 ff. Tested against OpenSolaris 2009.06.

Resolves most of ticket #5319.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38536 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-05 22:30:41 +00:00
Andreas Färber
eb5e456002 boot_net: Various TCP fixes
Don't enqueue a packet whose sequence number matches the first one in queue
or is between the next and the acknowledged on. This would lead to packet
duplication in the queue and leftovers after dequeuing.

Optimize calculation of acknowledgement number for out-of-order reception.
If a single missing packet arrived, this could have resulted in a timeout
depending on the window size.

In case the connection is closed, do dequeue remaining packets. This would
have caused a read error after a unidirectional FIN.

Prepare a dynamic window size calculation.

Do checksum calculation before attempting to trace packet contents. I have
seen a few and couldn't spot an error in the checksum calculation.

More fine-grained control over trace output.
Trace the Maximum Segment Size option if present; break after End of Options.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38535 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-05 21:02:38 +00:00
Fredrik Holmqvist
b0c5015140 If source_index is != 0 it is hardwired to a GSI (Global System Interrupt).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38532 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-05 08:20:47 +00:00
Andreas Färber
040b33980c boot_net: Prepare socket-specific TCP window size
Pass the desired window size from the socket to the service.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38530 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-04 22:36:35 +00:00
Andreas Färber
7d415c01cc boot_net: TCP and UDP style cleanup
Remove superfluous comments.
Adjust spacing and initializer indentation.
Make NULL pointer checks explicit.
Don't assign in if-clause.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38529 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-04 22:14:20 +00:00
Fredrik Holmqvist
688768804f The flag returns true if io_apic is disabled. Use the proper check so that it can be toggled while booting. (io_apic is not working though so no need to try unless you are interested in development).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38525 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-03 21:45:41 +00:00
Andreas Färber
3bc0fcc66e boot_net: Fix TCP memory leaks
In some error conditions the packet would have been leaked.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38503 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-09-01 18:19:57 +00:00
Andreas Färber
1f4a2bd985 boot_net: Disable TCP for all archs but ppc
Unbreaks the build until a better solution is found.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38485 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-31 22:57:33 +00:00
Andreas Färber
6c2e0f4377 boot_net: Mute some TCP debug output
Trace packet dequeing only when asked to.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38483 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-31 20:32:50 +00:00
Andreas Färber
6dfef7e9b2 boot_net: Use real_time_clock_usecs() for TCP
Initialize the PRNG seed for the sequence number with real_time_clock_usecs()
rather than system_time(). The remaining uses of system_time() for timeout
calculation match UDP.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38482 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-31 18:51:57 +00:00
Andreas Färber
58b1d4608a boot_loader_openfirmware: Implement real_time_clock_usecs()
Partially revert r38465 and move the code from system_time() into a new
real_time_clock_usecs() function. The system_time() implementation was correct
in relying on of_milliseconds(), as pointed out by Axel. Add the correct
function for the desired functionality.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38481 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-31 18:42:57 +00:00
Andreas Färber
a9e71a07a9 boot_loader_openfirmware: Style cleanup
Fix coding style issues and bump copyright (although there's not much anyway).

No functional changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38480 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-31 17:39:06 +00:00
Andreas Färber
b7e825d6e7 boot_net: Add TCP support
Modelled after UDP, add limited TCP support to the boot net stack. The socket
works by queuing received packets as well as sent packets that have not yet
been ACK'ed. Some known issues are documented, especially there's only limited
congestion control. I.e., we send immediately and in unlimited quantity, thus
its use should be restricted to local networks, and due to a fixed window size
there is potential for our socket being overrun with data packets before they
are read. Some corner cases like wrapping sequence numbers may cause a timeout.

The TCP implementation is based on Andrew S. Tanenbaum's "Computer Networks",
4th ed., as well as lecture notes from Prof. W. Effelsberg, the relevant RFCs
and Wikipedia. The pseudo-random number Galois LFSR used for the sequence
number was suggested by Endre Varga.

Since the code is unlikely to get much smaller, better merge it now so that
subsequent changes get easier to review. No platform actively uses TCP sockets
yet, and the receiving code has been reviewed for endianness issues and should
terminate okay after verifying the checksum if no sockets are open.
Based on a version tested with custom code (#5240) as well as with iSCSI.
Compile-tested boot_loader_openfirmware, pxehaiku-loader with gcc4 and
haiku_loader with gcc2. Closes ticket #5240.

Changes from #5240 proposed patch:
* Various bug fixes related to queuing, some memory leaks fixed.
* Never bump the sequence number when dequeuing a packet. It's done afterwards.
* Don't bump the sequence number again when resending the queue or ACK'ing.
* Aggressively ACK while waiting for packets.
* Don't queue sent ACK-only packets.
* More trace output, esp. for queue inspection.
* Adapted use of TCP header flags to r38434.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38472 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-31 01:00:06 +00:00
Andreas Färber
56f837e265 boot_loader_openfirmware: Fix system_time()
system_time() was based on of_milliseconds(), which returns the number of
milliseconds since power-on. This would produce very similar or identical
results for subsequent boots due to limited clock resolution; therefore it
was unsuited as PRNG seed, e.g., for TCP ports.

Try to inquire the RTC device node with get-time to return an improved time
value, if possible.

Closes ticket #6061.

Changes from proposed patch:
* Obtain the RTC handle once and reuse it for each inquiry.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38465 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-30 21:13:10 +00:00
Axel Dörfler
506894b6a8 * Return an error on initialization error. This fixes CID 1566.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38461 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-30 20:21:06 +00:00
Axel Dörfler
73b1cb8240 * The IOCache always needs a DMAResource; it was sometimes checked, and
sometimes not.
* This fixes CIDs 1755-1756, and 1505-1506.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38460 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-30 20:06:52 +00:00
Axel Dörfler
9910e4f1bf * The parent of an IOOperation cannot be NULL for completed operations.
* This fixes CID 1507.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38458 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-30 19:41:08 +00:00
Axel Dörfler
31d8c43d1c * Fixed CID 1262: waitForLock was not only -1 when exiting the loop, it didn't
make much sense to wake up any waiters either in this case.
* Fixed doubled semaphore deletion.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38418 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-28 15:17:23 +00:00
Axel Dörfler
46af4e7787 * Fixed CID 566 that was duplicated in blue_screen.cpp as well (but was not
discovered by Coverity for some reason): commands without arguments would
  overwrite memory (in this case the sConsole::arg_count only, though).
* Travis's copyright was missing in blue_screen.cpp.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38409 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-27 21:36:07 +00:00
Axel Dörfler
00400fd683 * Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38389 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-27 10:48:31 +00:00
Axel Dörfler
1e0617da2e * dladdr() apparently should work on any symbol, not just functions. This
closes bug #6491.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38373 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-26 13:49:14 +00:00
Andreas Färber
884432c2da boot_loader_openfirmware: Fix style issues
Adjust initializers.
Respect 80-column limit and adjust copyright notice.
Reorder some header groups. Enforce line spacing.

No functional changes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38343 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-24 20:03:26 +00:00
Andreas Färber
f5aaa387bd boot_loader_openfirmware: Fetch EDID
Read the EDID from OF and pass it on to the kernel.

Last part of ticket #6105.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38307 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-22 02:38:55 +00:00
Andreas Färber
36ee6a8731 boot_loader_openfirmware: Add frame buffer support
Use the OF "screen" device alias to query frame buffer properties. Postpone
the opening of the device as far as possible as it erases the screen output.
Initialize the kernel arguments and hook into generic code to display the
splash screen.

Like on x86, the frame buffer is enabled by default. To disable it, either
press ESC during early boot or, for debugging, make sure in start.cpp that
platform_boot_options() has the BOOT_OPTION_DEBUG_OUTPUT flag set.

Resolves ticket #6105.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38306 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-22 01:56:40 +00:00
Andreas Färber
e633c3c15b kernel_ppc: Disable fake serial output for frame buffer
Avoid writing to stdout if the frame buffer is enabled.

Part of ticket #6105.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38305 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-22 00:57:20 +00:00
Andreas Färber
3c1cb3fd02 boot_loader_openfirmware: Enable boot options by keyboard
Introduce a non-blocking function for checking keyboard input, and refactor
existing code to share the escape key translations. The comment that key-up and
key-down result in a zero char is confirmed to apply.

If the space bar is pressed, enter the boot menu. If the escape key is pressed,
disable the frame buffer and keep showing the usual debug output. Apparently
the key press must come after console/keyboard initialization but before the
"Welcome to the Haiku bootloader!" line.

Closes ticket #6140.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38304 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-22 00:06:32 +00:00
Andreas Färber
4142bceb25 boot_loader_openfirmware: Refactor Jamfile
The frame buffer will need more generic sources than just the text menu.
Adapted from bios_ia32 platform.

Part of ticket #6105.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38301 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-21 19:52:46 +00:00
Andreas Färber
4d95518e60 boot_loader_openfirmware: Avoid console interference with frame buffer
Debug output calls OpenFirmware methods writing text into the frame buffer.
Depending on the screen mode this leads to garbled display or parts of the
screen overwritten, so mute the output during frame buffer use for now.

A better solution would be to redirect the output elsewhere (e.g., #6168),
so that ConsoleHandle::WriteAt() is not called for the problematic handle
in the first place. That does not work inside the kernel yet.

Part of ticket #6105.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38300 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-21 18:42:25 +00:00
Andreas Färber
0dfe97ade1 boot_loader_openfirmware: Preparations for frame buffer
Initialize the frame buffer as not enabled. Add checks for this condition
and for the debug boot option to the video functions.

Code is adapted from bios_ia32 platform. Part of ticket #6105.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38299 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-21 17:42:28 +00:00
Andreas Färber
3f0a83281f boot_loader_openfirmware: Coding style fixes
Rearrange copyright notice, reorder #includes.

No functional changes yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38298 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-21 17:01:18 +00:00
Andreas Färber
ff46905b11 kernel_ppc: Remove unused commented-out variable
This is a leftover from the r25913 build fix. It used to be an out parameter.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38294 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-21 12:50:17 +00:00
Andreas Färber
edaaaae8cd ppc: Implement arch_vm_translation_map_is_kernel_page_accessible()
This remedies "Current thread pointer [...] is an address we can't read from."
on entering KDL. Closes ticket #6163.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38293 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-21 02:12:25 +00:00
Andreas Färber
f290297bb6 ppc: Support other memory types
Let setting the memory type to B_MTR_UC succeed.

Add initial support for those memory types in the translation map,
pointed out by Ingo in ticket #5193.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38292 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-21 00:36:09 +00:00
Andreas Färber
31bce16715 ppc: Keep memory mappings set up by OpenFirmware
Revert r36886 and fix compilation of insert_virtual_range_to_keep().
The use of void* vs. addr_t matches the surrounding boot loader code
but should probably be revised in favour of addr_t.

create_area() in the kernel wrongly assumed a RAM-backed address range,
which was destined to fail since ranges below the kernel address space
were ignored anyway. Use vm_map_physical_memory() instead.

This fixes a hang once the frame buffer and other resources used by OF
get unmapped. Closes ticket #5193 again.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38291 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-20 22:22:38 +00:00
Fredrik Holmqvist
59ada82f26 First version of reading IRQ's that returns proper results.
There are TODO's in here, because the ACPI module needs restructuring and which I will take care of.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38289 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-20 19:48:49 +00:00
Fredrik Holmqvist
6555d1e061 Mismatch with ACPI definition.
(Refactoring ACPI never looked so good...)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38283 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-19 20:10:52 +00:00
Axel Dörfler
4af303359b * We need to reset the blockNumber, or else we'll discard the wrong blocks
which has rather desastrous consequences - thanks to Stippi for the heads
  up :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38242 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-18 16:44:51 +00:00
Axel Dörfler
c141a31f83 * Fixed CID 1447 which was an actual bug which completely voided the whole
discard mechanism eventually causing the conflicts between the file cache
  and the block cache it intended to fix.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38232 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-18 12:23:38 +00:00
Axel Dörfler
7ac6de66a4 * Removed a few superfluous "else" keywords.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38231 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-18 11:58:27 +00:00
Axel Dörfler
3e86abbd71 * Added an extra check as requested by CID 1567, but also added a comment why
this (and other checks) should not be necessary in the first place.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38229 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-18 11:39:39 +00:00
Axel Dörfler
d74f5f5bb5 * Cleaned up the code which also closes CID 176 which was not a bug, though.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38228 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-18 11:26:23 +00:00
Axel Dörfler
adc92cdef7 * Fixed CID 1750: the team args could be leaked in exec_team() on error.
* Also fixed a leak of the same object in team_create_thread_start() I spotted
  while looking into it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38227 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-18 11:07:20 +00:00
Axel Dörfler
9189743037 * Style cleanup.
* Made an enum out of the mailbox type.
* Rearranged some code to get rid of CID 1328 which was not a bug, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38209 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-17 19:07:16 +00:00
Axel Dörfler
87de0cb4e1 * Fixed CID 1199-1202: only call the cache listener in case the open succeeded
(this might also have derefenced a potentially freed vnode).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38196 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-17 16:15:45 +00:00
Axel Dörfler
297e601d68 * Fixed CID 1293: a vnode reference, and the cookie could be leaked.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38195 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-17 16:08:50 +00:00
Axel Dörfler
6dcca7f6ab * Fixed CID 1472: "next" could be NULL and dereferenced.
* Simplified code a bit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38194 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-17 15:39:26 +00:00
Oliver Tappe
dbe1e23aa8 Optimised passing around of timezone a bit
* _kern_[sg]et_timezone() now accepts/passes out the timezone name, too
* adjust Time preflet and clockconfig to pass the timezone name into the kernel
  when calling _kern_set_timezone()
* ajust implementation of tzset() to fetch the timezone name from the kernel
  via _kern_get_timezone() instead of reading 'libroot_timezone_info'
* the Time preflet no longer writes 'libroot_timezone_info'


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38164 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-16 22:01:28 +00:00
Oliver Tappe
560b10ff88 Implement tzset(), gmtime(), localtime() and mktime() on top of ICU
* no longer keep a separate time-backend, since the implementation needs to
  access (data of) the locale backend anyway
* moved more stuff from localtime_fading_out.c to localtime.cpp
* added respective tests to locale_test
* added two more tests copied from glibc, test_time.c and tst-mktime.c


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38162 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-16 21:14:23 +00:00
Stefano Ceccherini
5574811008 CID 1653. symbolTable could be leaked in certain error cases.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38116 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-15 12:46:10 +00:00
Axel Dörfler
7a1123a7bf * Moved the "run me on the boot CPU" code to where it is actually used.
* Added a TODO that thread_yield() doesn't like to be called from the idle
  thread.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38109 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-15 10:17:42 +00:00
Jérôme Duval
5091a866ec To be validated as part of bug #6386. Update glibc regex to 2.11, headers/posix/regex.h included. This imposes some changes in some of our sources using the regex.h,
mostly bin tools and mail kit. The use of __USE_GNU macro is needed for instance when the expected regex implementation is the GNU one.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38031 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-11 16:49:58 +00:00
François Revol
746efef3d3 Add more debug output to help finding why 16bit modes are broken. Oddly 15bit seems to work.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38003 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-10 11:16:20 +00:00
François Revol
d79351ea5e Attempt to use the framebuffer already set up by U-Boot... doesn't work yet though.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37999 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-10 10:01:54 +00:00
François Revol
3d08ac9237 Add the fmemopen() and open_memstream() POSIX extensions to libroot. Those can be used to build FILE pointers to in-memory buffers, a possible use would be to make resources available to ported applications. Untested.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37997 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-10 09:56:13 +00:00
Stefano Ceccherini
5e2ed2f356 tempName was leaked in case team was NULL. CID 1702
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37970 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-08 12:11:46 +00:00
Oliver Tappe
562ccb03cc * introduced stubbed TimeBackend to libroot, which will contain implementations
of localtime(), gmtime() and mktime()
* implemented tzset() to read the required info from libroot_timezone_info

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37935 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-05 21:50:26 +00:00
Oliver Tappe
2cb26c0ab0 * moved ErrnoMaintainer into its own header to be reusable.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37931 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-05 21:41:29 +00:00
Oliver Tappe
e0ea55e0a0 * added get_timezone_offset() to kernel, which returns the offset in seconds
* made FAT add-on use get_timezone_offset(), this time correctly adjusted for
  the difference in units (minutes/seconds)
This makes the times in our FAT-fs agree with Linux again, at least :-)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37905 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-04 17:11:47 +00:00
Oliver Tappe
28bedeb547 Applied a patch by MrSunshine that adds modfl() - thanks!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37904 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-04 15:46:33 +00:00
Axel Dörfler
3426ce1404 * Thanks to Janito I had a closer look to cache_detach_sub_transaction(), and it
turned out it's pretty much broken. Not only did it potentially leak memory,
  it would also potentially replace the original data with a NULL pointer,
  making the current transaction non revertable. The code should now be much
  clearer. This fixes bug #6378.
* Changed a few "if (... != NULL)" into ASSERTs, since the code should bail out
  earlier in these cases already.
* Added a TODO comment to cache_start_sub_transaction() about its broken discard
  handling. This can cause FS corruptions in case the parent transaction is ever
  going to be aborted (which shouldn't happen in real life, though).
* Added a bit more and better comments.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37899 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-04 13:19:20 +00:00
Oliver Tappe
7e965f506d More consolidation of timezone code:
* dropped DaylightSavingTime from real_time_clock code in kernel, it was
  never really being used for what it meant (and just being referred to by
  gettimeofday(), which put a different meaning to it
* adjusted the syscalls get_timezone() & set_timezone() as well as their callers 
  accordingly
* got rid of get_rtc_info() and rtc_info struct in kernel, as it was only
  being referred to by the FAT add-on and that one (like gettimeofday()) put a
  different meaning to tz_minuteswest. Added a comment to FAT's util.c
  showing a possible solution, should the hardcoded GMT timezone pose a problem.
* fixed declaration of gettimeofday() to match POSIX base specs, issue 7
* changed implementation of gettimeofday() to not bother trying to fill struct
  timezone - it was using wrong values before, anyway.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37888 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-03 23:02:57 +00:00
Axel Dörfler
dac5d7fe4f * Made sure that at least the common case with a single writer exits write()
once the file descriptor is closed.
* Reinstantiated the FIFO functionality as long there are no writers yet as
  explained by Ingo.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37883 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-03 19:27:52 +00:00
Oliver Tappe
80ac9aef07 * corrected the copyright header, as that file no longer contains what
the copyright header refers to

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37882 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-03 17:48:48 +00:00
Oliver Tappe
96ac47e312 Made some progress with consolidation of timezone-related code:
* renamed syscalls _kern_[gs]et_tzfilename 
  to _kern_[gs]et_real_time_clock_is_gmt, as the filename part is no longer
  relevant (and the two corresponding parameters were removed)
* C++-ified and reworked clockconfig to use the info from 'Time settings' 
  to setup the timezone info during boot
* removed invocation of _kern_get_tzfilename() from tzset(), as the syscall
  no longer exists and tzset() is currently broken anyway
* adjusted the Time preflet to use the renamed syscall when getting/setting 
  the RTC info


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37881 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-03 17:47:26 +00:00
Oliver Tappe
308ca58d67 * deprecated set_timezone(), as we no longer support (and need) timezone files
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37875 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-03 16:50:28 +00:00
Axel Dörfler
1ffa502964 * Cleanup, no functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37861 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-03 07:35:42 +00:00
Axel Dörfler
81fcd71e3a * Implemented a different way to notify waiting read()s when a file descriptor
is closed; their ReadRequest will now be notified with B_FILE_ERROR.
* This is a better fix for #5947, though note that I left the changes in
  Inode::ReadDataFromBuffer() in place, as I think this is what POSIX requires.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37860 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-03 06:55:28 +00:00
Axel Dörfler
8e855d520a * Changed some POSIX error codes to native ones.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37842 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-02 14:17:35 +00:00
Axel Dörfler
29145bab8a * Allow heap.cpp to compile if both, KERNEL_HEAP_LEAK_CHECK, and
USE_SLAB_ALLOCATOR_FOR_MALLOC are defined.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37837 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-02 11:10:51 +00:00
Axel Dörfler
da6c14611b * I see no reason for the fActive check here. Until Ingo enlightens me, this
fixes bug #5947, IOW BePDF should now close fine again :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37836 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-02 09:43:29 +00:00
Axel Dörfler
9061bf7e80 * Improved debug output.
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37835 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-08-02 09:41:25 +00:00
Axel Dörfler
61729d9323 * Reworked the complete stack to allow more than one address per network
interface - this caused quite a number of changes.
* Network interfaces, and its addresses are now reference counted (not yet
  complete, though, InterfaceAddresses need to hold references to their
  interface as well).
* There are two known regressions of this commit that I will fix later:
  - you cannot remove interfaces anymore
  - IPv4 multicast was broken anyway, but now it's disabled, too.
* Moved a device_interfaces.cpp|h out of interfaces.cpp.
* The datalink layer chain is now instantiated per domain per interface,
  not just per interface anymore.
* When a buffer reaches the network layer, it has no known interface yet, ie.
  the ipv4|6|whatever modules need to set this manually.
* Added more debug output, and some new debugger commands, the control option
  is now printed in clear text.
* Added hash_address() function to the address modules. Added "const" to
  set_to_defaults() where needed.
* Fixed net_buffer's restore header functions offset use as reported by Atis.
* Improved buffer dump output, use the domain module to print the address if
  available.
* Moved net_buffer::type into the union, as it's not needed by the upper layers
  anymore.
* Moved IPv6 specific code from {add|remove}_default_route() to where it
  belongs, but disabled it for the time being.
* Completely discarded useless ipv4_datagram module.
* Added ping6 to the build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37794 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-28 17:38:23 +00:00
Axel Dörfler
2ebcf777bf * Implemented support for the 'z' qualifier prefix for [s]size_t.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37773 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-27 15:39:47 +00:00
Matt Madia
2dc707e529 Utilize HAIKU_DISTRO_COMPATIBILITY for the boot splash. Currently only
'--distro-compatibility official' will result in the HAIKU logo being
displayed. When 'default' or 'compatible', only the icons will display. Due to
issues with generate_boot_screen, the "development" logo is not utilized.

Relates to #6183 and #6255


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37740 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-25 20:22:10 +00:00
Oliver Tappe
60656c54d1 * don't use B_USE_POSITIVE_POSIX_ERRORS in libroot, let any interested party
use that and the posix_error_mapper

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37737 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-25 17:20:39 +00:00
Oliver Tappe
ac055d4bf8 Avoid rm switching to interactive mode for any locale other than POSIX:
* reset errno to 0 if it has been set during execution of any ICU method
  (which doesn't set errno itself, but may invoke system functions that do)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37736 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-25 17:10:52 +00:00
Oliver Tappe
bc981208fa * replace use of strcmp with strcasecmp, as locale names are supposed to be
case insensitive

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37735 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-25 11:31:56 +00:00
Oliver Tappe
a4823efd7d Fix problems with sed and gcc caused by reintegration of posix-locale:
* support invocation of ctype/wctype macros with EOF/WEOF (-1), which would
  access more or less random memory before - I don't know why this worked
  more or less reliably for the POSIX locale, but it didn't for any other


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37730 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-24 16:20:52 +00:00
Oliver Tappe
c0f9765409 * minor cleanup (whitespace and superfluous include)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37729 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-24 16:04:43 +00:00
Oliver Tappe
a3f665982e * reintegrated posix-locale
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37725 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-23 23:13:00 +00:00
Oliver Tappe
bca50be432 Second go at fixing what should have been part of r31927:
* uncommented fwscanf() in wchar.h to make it available
* imported wcsftime() from FreeBSD-8 (which just wraps strftime()), so that we 
  not only declare it, but provide an implementation, too
As a result, the next build of gcc4 should be able to detect full support for wchar_t and in turn activate wchar_t-based template types (like std::wstring).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37720 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-07-23 17:34:33 +00:00