Commit Graph

4739 Commits

Author SHA1 Message Date
Alexander von Gluck IV
b4a80cfb69 Pi: Add GPIO controls to Raspberry Pi Haiku Loader
* When first32k.bin is added in front of haiku_loader,
  the OK led comes on verifying haiku_loader is actually
  running on the Pi.
2012-05-04 22:00:23 -05:00
Alexander von Gluck IV
5426ff9347 system loader: Initial work on new rasberrypi_arm loader
* Used routerboard loader as a base skel
* May just be temporary if u-boot ever gets Raspberry Pi
  support
2012-05-01 16:57:58 -05:00
Alexander von Gluck IV
258d4ef93d kernel arm: Quick style cleanup; No functional change 2012-04-27 12:29:11 -05:00
Fredrik Holmqvist
e5b4a1671d Since we are patching strncpy.c change it over to strncpy.cpp. 2012-04-25 18:47:42 +02:00
Hamish Morrison
7e87b73402 strncpy: pad the destination with NULs
And optimize for word aligned loads/stores

Signed-off-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2012-04-25 18:17:41 +02:00
Yongcong Du
45cf3294b2 x86: add cpuid feature 6 flags
Signed-off-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2012-04-22 21:03:57 +02:00
Yongcong Du
cc586f1655 x86: AMD C1E with no ARAT(Always Running APIC Timer) idle support
AMD C1E is a BIOS controlled C3 state. Certain processors families
may cut off TSC and the lapic timer when it is in a deep C state,
including C1E state, thus the cpu can't be waken up and system will hang.

This patch firstly adds the support of idle selection during boot. Then
it implements amdc1e_noarat_idle() routine which checks the MSR which
contains the C1eOnCmpHalt (bit 28) and SmiOnCmpHalt (bit 27)  before
executing the halt instruction, then clear them once set.

However intel C1E doesn't has such problem. AMD C1E is a BIOS controlled
C3 state. The difference between C1E and C3 is that transition into C1E
is not initiated by the operating system. System will enter C1E state
automatically when both cores enters C1 state. As for intel C1E, it
means "reduce CPU voltage before entering corresponding Cx-state".

This patch may fix #8111, #3999, #7562, #7940 and #8060

Copied from the description of #3999:
>but for some reason I hit the power button instead of the reset one. And
>the boot continued!!
The reason is CPUs are waken up once power button is hit.

Signed-off-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2012-04-14 18:18:29 +02:00
François Revol
599f30f93d Fix building the m68k kernel
* Restructured the vm support code to align with the changes done to other archs.
* Not completely finished, but the kernel loads and panics. I had this sitting on the disk anyway.
* Only support 040 for now, 030 will need to be added back.
* This commit is dedicated to Jack Tramiel who passed away away last sunday:
http://www.forbes.com/sites/davidthier/2012/04/09/computer-legend-and-gaming-pioneer-jack-tramiel-dies-at-age-83/
2012-04-13 00:53:09 +02:00
François Revol
cffda6bf03 Add PPC to U-Boot bootloader support.
This should be useful for SAM440 and SAM460 boards for example.
The generic U-Boot code still has some ARM-specific parts that must be moved out though.
2012-04-10 18:41:41 +02:00
Ingo Weinhold
c83bde410a switch_sem_etc(): Unbreak the actual switch case
The scheduler lock was still being held when release_sem_etc() was
called. The bug was introduced in
24df65921b. Fixes #8448.
2012-04-05 17:35:59 +02:00
Hamish Morrison
43e7b1c2b0 Fix dladdr behaviour
* If dladdr can't find an exact match, it returns the nearest symbol
  less than the given address.
* If no suitable symbol can be found, but the address is within a
  loaded library, dladdr returns the library name and base address.

Signed-off-by: Ingo Weinhold <ingo_weinhold@gmx.de>
2012-04-05 12:32:31 +02:00
Oliver Tappe
ee374beebf Reset ICU converter pointer after closing it.
* The pointer to the ICU converter that's kept in TLS needs to be
  reset (to NULL) immediately after closing it, as opening a new
  container may fail, leaving a dangling pointer to a now closed
  container in the TLS value.

Fixes #8361 & the userland cause of #8430.
2012-04-01 17:38:44 +02:00
Oliver Tappe
a91e17db42 Cleanup: drop unused implementation file. 2012-04-01 17:22:59 +02:00
Jerome Duval
57c324a753 arm: added some missing arch bits and changed asm section for arm compat. 2012-04-01 14:03:36 +02:00
Hamish Morrison
8d40592821 mmap should try to honour the address hint 2012-03-29 20:02:37 +02:00
François Revol
6552b1085c Fix a typo
This code will go away anyway, but fix it for reference.
2012-03-26 23:38:14 +02:00
François Revol
8f5e824baa Return something from CFE entry point
Return something in case of mismatched signature.
Added some test code, the entry point didn't seem to be called at all during last tests.
2012-03-26 22:07:35 +02:00
John Scipione
81b45e484a Fix build on Mac OS X 10.6 gcc2 and gcc4 and 10.7 gcc4 by adding some Mac OS X specific files that implement missing *at() functions.
Mac OS X 10.7 generates a gcc2 cross-compiler that fails when assigning NULL to a static method pointer so is still broken.
Added a weak attribute in driver_settings.cpp.
Move futimesat() from fs.cpp to fs_darwin.cpp since it is implimented on FreeBSD.
Implemented eaccess(), for the AT_EACCESS flag of faccessat()
Fix configure script to correctly detect case-sensitive file system
2012-03-08 23:28:49 -05:00
Humdinger
34f10aee41 Added a hint that connection parameters are defaults. 2012-03-08 11:19:09 +01:00
Humdinger
0a1b16486b Small cosmetics of the boot loader.
* Updated copyright to 2012.
* Corrected capitalization of "Welcome To The..."
* Added info for serial debug "(115200, 8N1)"
2012-03-06 18:38:48 +01:00
Oliver Tappe
ec17468f63 Allow switching of timezone string to messages locale, too.
* adjust POSIX locale backend to redirect the timezone string
  through the messages/time-locale indirection
2012-02-23 23:15:36 +01:00
Oliver Tappe
1e1278f46f Implement taking date strings from messages locale.
* mimic LocaleKit and add option to POSIX locale backend for taking
  the date strings from the messages locale (instead of time locale)
2012-02-23 23:15:36 +01:00
Jerome Duval
4bbb27e3cc More 'GCC4.6 variable set but not used' fixes. 2012-02-23 20:32:12 +01:00
Alexander von Gluck IV
c1cd48b72f kernel: Fix fpu on non-apic systems
* If apic is not present, the smp code never gets called
  to set up the fpu.
* Detect lack of apic, and set up fpu in arch_cpu.
* Should fix #8346 and #8348
2012-02-21 11:58:15 -06:00
Alexander von Gluck IV
3f1eed704a kernel: x86 SSE improvements
* Prepend x86_ to non-static x86 code
* Add x86_init_fpu function to kernel header
* Don't init fpu multiple times on smp systems
* Verified fpu is still started on smp and non-smp
* SSE code still generates general protection faults
  on smp systems though
2012-02-15 12:33:45 -06:00
czeidler
7ef47de908 Revert "Finally applying the patch that adds support to add path information to stat and attr monitor messages."
Will recommit it when I have more time to work on the todos.

This reverts commit 610ef6c007.
2012-02-14 15:36:46 +13:00
Ingo Weinhold
88520e79d8 create_thread_user_stack(): Fix incorrect handling of TLS size
In case a custom stack was given, the TLS size was subtracted from the
stack base, not the stack size.
2012-02-12 15:04:30 +01:00
Oliver Tappe
0bbc9d0e04 Remove some more glibc-files that are not required. 2012-02-07 22:32:19 +01:00
Oliver Tappe
86beacd179 Drop as much of gconv as possible. 2012-02-07 21:43:02 +01:00
Oliver Tappe
2370b92e15 Drop all unneeded gconv converters.
* implement wchar->multibyte & multibyte->wchar conversions, make those
  the default converters and drop all others (except for ascii)
2012-02-07 21:43:02 +01:00
Oliver Tappe
99916f57cc Adjust yet another version of mbstate_t in glibc:
* yuck, glibc uses yet another version of mbstate_t (__c_mbstate_t),
  adjusting this to match the other glibc-internal version (__mbstate_t)
  fixes another crash triggered by fwide_test.
2012-02-07 21:43:02 +01:00
Oliver Tappe
40135926f9 Adjust glibc's definition of mbstate_t
* instead of unification, we now keep both our and glibc's fields
  separate in order to allow for both our code and glibc's to use
  such a struct at the same time (independently)
2012-02-07 21:43:02 +01:00
Oliver Tappe
0d03f689b2 Fix crash in fwide():
* _IO_USER_BUF was being used to indicate a user-owned buffer without
  taking into account that there are two of those: one for the normal
  and another one for the wide version of a stream. Backport
  _IO_FLAGS2_USER_WBUF from current glibc version to fix that.
2012-02-07 21:43:01 +01:00
czeidler
610ef6c007 Finally applying the patch that adds support to add path information to stat and attr monitor messages.
* for all open FD the path information is stored in a map
* this info is used to fill the missing fields in the node monitor
2012-01-22 17:34:17 +13:00
Alexander von Gluck IV
8dd1e875c1 kernel: Fix FPU SSE + MMX instruction usage.
* Rename init_sse to init_fpu and handle FPU setup.
* Stop trying to set up FPU before VM init.
  We tried to set up the FPU before VM init, then
  set it up again after VM init with SSE extensions,
  this caused SSE and MMX applications to crash.
* Be more logical in FPU setup by detecting CPU flag prior
  to enabling FPU. (it's unlikely Haiku will run on
  a processor without a fpu... but lets be consistant)
* SSE2 gcc code now runs (faster even) without GPF
* tqh confirms his previously crashing mmx code now works
* The non-SSE FPU enable after VM init needs tested!
2012-01-20 15:06:01 -06:00
Jérôme Duval
c59b279b71 Added workarounds and options for gcc 4.6.2
* add -Wno-unused-but-set-variable for gcc 4.6.x with a TODO
* fix warnings about wrong size of pointer cast in ioapic.cpp and AudioBuffer.cpp
2012-01-19 19:44:42 +01:00
Jérôme Duval
c40f31867b Fix with enabled tracing. 2012-01-19 18:28:34 +01:00
Oliver Tappe
174676503b Drop now unneeded glibc wchar-files (plus others). 2012-01-07 22:03:24 +01:00
Oliver Tappe
b7417fbec1 Switch wchar from glibc to our own implementations. 2012-01-07 22:02:48 +01:00
Oliver Tappe
7efc2e3a0e Add our own implementations for all wchar.h functions.
* add implementation for wcpcpy(), wcpncpy(), wcscasecmp(), wcscat(),
  wcschr(), wcscmp(), wcscpy(), wcscspn(), wcsdup(), wcslcat(),
  wcslcpy(), wcslen(), wcsncasecmp(), wcsncat(), wcsncmp(), wcsncpy(),
  wcsnlen(), wcspbrk(), wcsrchr(), wcsspn(), wcsstr(), wcstok(),
  wmemchr(), wmemcmp(), wmemcpy(), wmemmove(), wmemset
* add implementations for GNU-extensions used by our glibc and some
  other programs/libs: wcschrnul(), wmempcpy()
* add stub for wcsftime()
2012-01-07 22:01:40 +01:00
Oliver Tappe
d7965519f2 Cleanup: LocaleBackend.h is not a local header for wchar. 2012-01-07 21:48:39 +01:00
Oliver Tappe
bd55dcbefb Add our implementation for wcscoll() and wcsxfrm().
* add Wcscoll() and Wcsxfrm() ICU locale backend
* provide implementations of wcscoll() and wcsxfrm() that are using
  the respective methods of the locale backend
2012-01-07 21:47:31 +01:00
François Revol
8e977a874f M68K: Only enumerate ST modes as fallback. 2012-01-05 01:44:38 +01:00
François Revol
595938e710 M68K: Don't trace mmu boot code anymore 2012-01-05 01:44:37 +01:00
François Revol
68aea33966 Try another load address for PPC CFE loader.
This is the address the OpenFirmware is loaded to by CFE on the Amiga X-1000.
Doesn't seem to help much though.
2012-01-05 01:03:28 +01:00
Philippe Saint-Pierre
4040b622f4 VM: Memory leak fix in case of bad driver settings file
CID 5891.
2012-01-02 22:12:09 -05:00
Fredrik Holmqvist
9aec8e8424 Remove strlen from PPC glibc as well.
This should fix the PPC build. Sorry for that, k thx bye.
2011-12-31 21:32:57 +01:00
Philippe Saint-Pierre
a42c52c07e devfs: Fix memory leak
Following r25662 (where devfs was migrated to the new driver architecture),
the issue noted in CID 872 and already fixed in r25643 was reintroduced.
2011-12-30 20:50:48 -05:00
Philippe Saint-Pierre
d2a423e499 driver_settings: Replace type of bufferSize from size_t to ssize_t
At various locations, checks are made so that bufferSize is >= 0, which never
occurs. CID 4197.
2011-12-29 14:08:15 -05:00
Fredrik Holmqvist
79423142ff Stylefixes as pointed out by Axel and some minor changes possible in cpp.
No functional change.
2011-12-29 18:59:00 +01:00