Commit Graph

4553 Commits

Author SHA1 Message Date
Michael Lotz
a07f84d9cb Do the PCI device matching using direct PCI config space matches instead of
using the already parsed pci_info data from the PCI module. This removes the
need to iterate over all of the pci_infos for each routing table entries which
makes this an order of magnitude less expensive. Heavily inspired by the
corresponding FreeBSD code.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41395 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-09 11:53:52 +00:00
Philippe Houdoin
48315186a8 Remove reference to SVN, now that revision is a VCS-agnostic string...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41394 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-09 11:49:03 +00:00
Michael Lotz
c2507ed4ae Actually use the ACPICA headers to get at the correct types instead of
duplicating the structs on our side. IRQ assignment didn't work with extended
IRQ resources because the alignment of the structs were different in our local
duplicates...
Brings in the ACPICA naming sheme and isn't really clean either. So all of the
reconfiguration should probably just be moved into the ACPI bus_manager.
On the plus side we can now use the proper descriptive macros instead of the
hardcoded numbers which fixes a few of the TODOs.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41393 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-09 01:56:20 +00:00
Oliver Tappe
6250297a08 Switch haiku-revision from uint32 to string, as that's going to be required soon, no matter if we switch to Git or Mercurial
* increase _SYS_NAMELEN defined in sys/utsname.h to 128 to allow long(ish) revisions
* sHaikuRevision is now a static character array (in both libroot and kernel)
* adjust build tool set_haiku_revision to write the revision as string


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41389 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-08 20:02:42 +00:00
Michael Lotz
d3e3ae8edc Implement a very naive configure_link_device() function that just blindly sets
the first possible configuration. This will probably result in a "everything
mapped to a single IRQ" situation, but should get systems that make use of link
devices in APIC mode at least running.
To make more sensible decisions the interface has to be changed next as it
currently doesn't allow to get anything but the very first possible config.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41384 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-08 13:15:26 +00:00
Michael Lotz
2a127b718c Reimplement the IRQ setting function. Based on the template we get from current
resources we input the desired configuration and then set them. Note that the
set_current_resources() ("_SRS") method is pretty picky (on the low-level ACPI
side) and needs the configuration in exactly the form get_current_resources()
("_CRS") returns, so that's why we need to utilize that buffer as a template.
Looking at FreeBSD there seem to be systems that don't actually provide a
"_CRS", where we will need to fall back to using the get_possible_resources()
("_PRS") data to construct a valid template...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41383 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-08 12:56:49 +00:00
Michael Lotz
348eade4a8 Print the routing table unconditionally for now.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41373 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-08 01:17:02 +00:00
Michael Lotz
9b50b2889a * Implement the PCI address retrieval on the kernel side and remove the need
for the introduced get_pci_info() method in ACPI as it doesn't work reliably.
  The new version should be more robust and efficient as it only resolves the
  root bridge values once.
* Don't try to read and use the secondary bus register for the root bridge as
  it isn't actually a normal bridge. We get the root bridge bus by using the
  Base Bus Number (_BBN) method.
* Rewrite the logic to recurse down to all busses.
* Minor debug output changes to make the info more readable.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41371 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-08 01:07:39 +00:00
Michael Lotz
56b5ad0781 Added a temporary opt-in option "enable_ioapic" to the boot menu. This way the
IO-APIC can be easily enabled to test it on various configurations. Note that
the previous default opt-out didn't work because the safemode options would not
be touched at all when not actually entering the boot menu.
Once IO-APIC is more broadly tested this can be removed again and the opt-out
option reenabled.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41370 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-07 21:41:09 +00:00
Michael Lotz
90fd2a0795 Added root name for PCI express, a note about why it works even without it and
a TODO to eventually do it correctly anyway.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41368 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-07 17:36:10 +00:00
Michael Lotz
8c804ef2d6 * Added functionality to resolve the addresses provided in the IRQ routing table
to PCI devices partly using the new ACPI interface and by using bridge config
  information from PCI.
* Added lookup of matching device/pin combinations and update of the relevant
  interrupt line variable via the new PCI module function. This means that the
  Global System Interrupt (GSI) that is used after switching to the IO-APIC is
  now stored in the PCI config space and drivers enumerating these devices will
  now attach their interrupt handlers to the right IRQs.
* Resolve all relevant interrupt information directly into the irq_routing_entry
  so that can be used as the single source for config information. This includes
  resolving the current setting of any PCI link devices into the irq field that
  represents a GSI now.
* Use that info to configure interrupts in arch_int.cpp and remove the logic
  there.
* Some cleanup and added debug output.

This implements the final missing part for using IO-APICs and full APIC mode for
interrupt routing. Note that there is no quirk handling of any form, so this
may very well not work on some configurations. Note also that I have tested this
only on one machine so far. Once proper testing is done the default of disabling
the IO-APIC can be removed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41367 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-07 17:32:12 +00:00
François Revol
6d4e8bc473 More Milan specific stuff...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41355 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-06 21:35:17 +00:00
François Revol
6091174371 Add some calls for Milan debugging.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41351 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-06 20:11:05 +00:00
Michael Lotz
218aaf536f * Prettify the printed routing table.
* Remove wrong extra line when printing an irq_descriptor.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41339 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-06 02:01:09 +00:00
Michael Lotz
1882d05b95 We need to specify the intended interrupt model with ACPI so that we get the
correct PCI IRQ routing table for that mode. With this, we finally get the right
PIRQ <-> Global System Interrupt mapping and can therefore program the right
IO APIC entries. The only missing part now is to fix up the pci_info of the
devices with the then active GSI.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41338 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-06 01:55:58 +00:00
Michael Lotz
c846e2aab0 Remove wrong comment.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41329 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-05 20:06:23 +00:00
Michael Lotz
c0b7f988f4 * Change some of the structure fields to more sensible types.
* The irq values we get from ACPICA are already converted, remove the wrong
  extra conversion from bitfield to irq number.
* Add and handle extended irq structures.
* Disable the legacy PIC when done configuring the IOAPIC. Since during that
  configuration the ACPI module is initialized, the ACPI SCI is still enabled
  in the PIC instead of the IOAPIC. We'll have to delay that routing in the
  ACPI module for it to work.
* Correctly handle the fixed IRQ case for the PCI interrupt routing (hopefully).
* Actually allow for enumeration of possible IRQ settings. Not yet used though.

All of this brings us a bit closer, though it still won't work for PCI
interrupts. ISA interrupts work fine through the IOAPIC as far as my hardware
goes, but PCI interrupts are connected to dedicated IOAPIC pins and I still
haven't figured out how to determine their exact routing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41328 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-05 19:59:04 +00:00
Michael Lotz
8e52f69ef2 Cleanup and a minor debug output change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41313 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-05-03 22:49:27 +00:00
Clemens Zeidler
08444962ae Interpret a year like 10 as 2010 and not as 1910 if the now time is near 2010. Add test case for that.
Should fix #7257.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41146 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-31 04:55:08 +00:00
Axel Dörfler
5b82a6b615 * Obviously forgot to compile after a last minute change, sorry!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41121 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-26 22:07:27 +00:00
Axel Dörfler
ea8749b6b5 * legacy_driver::devices_used was not taken into account when deciding to
unload a driver. This was causing bug #4608 depending on the order of events;
  now you should have less worries removing your USB device before having it
  unmounted.
* Added a "legacy_device" KDL command.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41119 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-26 20:26:33 +00:00
Axel Dörfler
31cf5e520a * Cleanup, no functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41118 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-26 20:23:21 +00:00
Axel Dörfler
2545ff58c1 * Applied patch by VinDuv/Jonas to use the existing check_for_key() that fixes
a problem on the Mac which obviously messed up its BIOS.
* This busy loops, but CPU utilization should be a maxed out in the boot loader
  anyway - we could add a pause, though.
* This closes bug #2654.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41117 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-26 20:01:37 +00:00
Fredrik Holmqvist
7fae779766 Just some cleanup. We won't need pci module for setup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41025 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-19 11:47:18 +00:00
Ithamar R. Adema
e59aab0981 ARM: Some header cleanup in preperation of more CPU support code...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40948 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-14 13:48:21 +00:00
Ithamar R. Adema
36fa904ede Fix aligment of data segment, by moving our ARM ldscript closer to the X86 one. This restores
the state of the ARM port to booting all the way up to the idle thread again.

However, will still need to investigate why we need the PHDRS magic, likely due to improper
setup of the ARM toolchain. If anyone has ideas, please let me know!



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40937 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-13 23:17:29 +00:00
Ithamar R. Adema
60644e6de6 * Add support for R_ARM_ABS32 to kernel ELF linker
* Removal of some commented out (messy) code



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40929 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-13 15:48:52 +00:00
Ithamar R. Adema
5707f2519c * Quiet down VM debug output, so we can easily find errors ;)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40927 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-13 10:42:18 +00:00
Ithamar R. Adema
8bbaee6124 * Fix ARM kernel compilation
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40926 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-13 10:28:51 +00:00
Jérôme Duval
8775d8d25d dir_remove() now handles a path which ends with "/./" and fixed #6817.
Another way would be to disallow removing such a path, as Linux does.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40819 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-05 17:17:19 +00:00
Oliver Tappe
e8226ce48d * fix support for influencing tzset() via TZ environment variable
(now at least <std> and <offset> are supported properly)
* instead of creating a TimeZone object whenever needed, we now
  create it in tzset() and keep it around
* add tests for TZ to locale_test

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40788 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-03 00:34:51 +00:00
Jérôme Duval
548836e4f8 * if ioctl hook wasn't found, now returns B_DEV_INVALID_IOCTL
* in case fd_ioctl() was about to return B_DEV_INVALID_IOCTL, translate to ENOTTY to satisfy #7279.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40787 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-03-02 18:58:14 +00:00
Jérôme Duval
57ceeee424 copy sig_action structure from the current thread if we're the same team. Helps with #7235
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40701 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-26 15:26:47 +00:00
Jérôme Duval
fa90700d74 reverted r40686
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40699 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-26 10:45:03 +00:00
Jérôme Duval
3116b031dc FIONBIO and FIONREAD don't apply to directories, files, attributes: returns ENOTTY in these cases. This fixes #7279.
ENOTTY could also be replaced with a B_ error code.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40686 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-25 19:58:25 +00:00
Philippe Saint-Pierre
85b2f68b69 Fix build on gcc2.
(Note, I honestly have no idea what was initially wrong with the code; everything seamt right to me..)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40676 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-25 01:49:26 +00:00
Jérôme Duval
3a04b74922 Don't dereference thread after free(). Thanks to Stephan for noticing.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40674 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-24 22:53:01 +00:00
Jérôme Duval
bafa759148 now correctly init the thread id in the pthread struct for main thread and threads spawned with spawn_thread(). This definitely helps for #7235.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40665 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-24 17:28:59 +00:00
Philippe Houdoin
a4c21b1c82 Check if the name is already used in add_debugger_command*() and reject
duplicate attempt(s).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40611 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-22 11:56:57 +00:00
Oliver Tappe
fff761afab Closing #7227:
* fix debug-heap's handling of page-guarded allocations in realloc()
* let calloc() use page-guarded allocations, too, if requested


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40533 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-16 17:42:23 +00:00
Axel Dörfler
3d0d4b6200 * Implemented a way to specify additional debug options via MALLOC_DEBUG when
using libroot_debug.so, instead of having to hardcode them in the application
  via calling private heap functions.
* The following options are implemented: 'p' turns on paranoid validation,
  'w' triggers periodic wall checking every 500ms ('W' does the same, but every
  100ms), 'g' to use guard pages (beware, this will dramatically increase
  memory usage), and 'r' which forbids reusing of memory, freed memory is never
  actually freed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40514 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-15 17:54:24 +00:00
Axel Dörfler
aa06eeb1b9 * If retrieving the cache line failed, try again using an uncached access. That
should help with the remaining I/O errors with (older) CDs that I see only on
  Haiku. Not yet tested, though.
* Added a bit of debug output to see when/if it's triggered.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40344 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-01 18:03:28 +00:00
Axel Dörfler
3f8bbbe05a * Cleanup, no functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40343 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-02-01 17:55:38 +00:00
Oliver Tappe
77a8a5cce3 * added B_COMMON_CACHE_DIRECTORY to find_directory()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40279 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-24 20:42:48 +00:00
Rene Gollent
d78e0dc9d7 CID 10326 - remove superfluous for loop.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40277 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-23 23:12:26 +00:00
Ingo Weinhold
b7786ebd30 find_undefined_symbol_add_on(): Resolve non-weak symbols defined in the add-on
to themselves. This works around the problem that those symbols could be
resolved to symbols in the application, which is usually undesired. Weak
symbols have the same problem, but the the runtime loader cannot decide which
should be resolved locally and which mustn't.

The root issue is that BeOS style add-ons simply cannot be supported by a
standard-complying ELF loader.

Affects gcc 4 only, since with gcc 2 we link everything symbolically. The best
solution for the time being would be to build gcc 4 add-ons with default
hidden visibility, exporting only the symbols that should be visible.

Related ticket: #7114


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40248 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-19 11:59:03 +00:00
Philippe Houdoin
4499da3990 Moved generic boot platform code to its own static lib, boot_platform_generic.a.
I hope I didn't break anything, as I can and have only test
bios_ia32's haiku_loader. Flame me otherwise.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40240 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-17 16:50:58 +00:00
Oliver Tappe
137c5fe2ba * add implementation of bindfs, which can be used to bind-mount
a folder to some other place in the filesystem hierarchy
* add helper function to VFS that encapsulates the "conversion" of a
  vnode-pointer to a fs_vnode-pointer (used by bindfs)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40238 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-16 16:33:11 +00:00
Axel Dörfler
51d7642503 * Added a new B_GET_DEVICE_NAME ioctl - this should be implemented by all
drivers in the future, such that NetworkStatus and similar software can show
  nice names for the devices. The device manager should implement this and
  return the B_DEVICE_PRETTY_NAME of the device (and in turn, new style drivers
  should actually set this).
* Implemented handling of this ioctl in the scsi_periph to return the vendor/
  product strings.
* Implemented this in the ATA bus manager to return the model from the info
  block.
* KDiskDevice now fills in the partition_data::name if the B_GET_DEVICE_NAME
  succeeds.
* As a side effect, at least BootManager now shows the drive name; maybe
  DriveSetup does as well for the raw device.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40231 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-13 19:41:01 +00:00
Ingo Weinhold
cd463b4dd2 find_undefined_symbol_beos(): Forgot to return the image in the code
introduced in r40211.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40228 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-12 22:43:01 +00:00
Axel Dörfler
b16710b814 * Replaced one occurence of sprintf() with snprintf().
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40224 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-12 18:42:48 +00:00
Philippe Houdoin
bcd197ad9b Removed last video_rle.cpp reference and made boot_zlib.a requirment more factual.
Thanks François for cleaning up after me.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40218 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-12 17:24:32 +00:00
François Revol
2f6b97dc30 This should hopefully fix build break introduced by r40215.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40217 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-12 17:16:05 +00:00
Philippe Houdoin
67938b0d59 Switched boot splash compression to use boot_zlib (which was already
used by tarfs anyway) instead of RLE.
While this should allows larger logo/icons, it doesn't remove the
current 300000 bytes size limits for haiku_loader, so #6710 is not yet fixed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40215 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-12 15:43:14 +00:00
Ingo Weinhold
ca7aa99f98 * Added SymbolLookupInfo::requestingSymbol which is passed in by
resolve_symbol().
* find_undefined_symbol_beos(): Does now check whether
  SymbolLookupInfo::requestingSymbol is defined, and, if so, returns it
  directly. This saves the time for the hash table lookup and also works
  around broken files like SoundPlay. Fixes the runtime loader part of #7094.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40211 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-12 12:43:13 +00:00
Ingo Weinhold
4535495d80 Merged the signals branch into trunk, with these changes:
* The team and thread kernel structures have been renamed to Team and Thread
  respectively and moved into the new BKernel namespace.
* Several (kernel add-on) sources have been converted from C to C++ since
  private kernel headers are included that are no longer C compatible.

Changes after merging:
* Fixed gcc 2 build (warnings mainly in the scary firewire bus manager).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40196 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-10 21:54:38 +00:00
Jérôme Duval
bee827e203 changed dirfd() to its POSIX signature, without const (see #4947).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40137 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-06 21:34:06 +00:00
Ingo Weinhold
44b9a93e46 Added intermediate (addr_t) casts before the cast of the parse_expression()
result (uint64) to pointer (CID 4723-4726).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40121 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-04 21:28:46 +00:00
Ingo Weinhold
0af0e394a5 Missed earlier: LargeMemoryPhysicalPageMapper::MemsetPhysical(): Changed
pageOffset variable type from phys_addr_t to addr_t. Avoids potential width
difference when casting to pointer later (CID 4718).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40120 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-04 21:16:53 +00:00
Ingo Weinhold
5defb0fe6f LargeMemoryPhysicalPageMapper::Memcpy{From,To}Physical(): Changed pageOffset
variable type from phys_addr_t to addr_t. Avoids potential width difference
when casting to pointer later (CID 4719-4722).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40119 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-04 21:13:53 +00:00
Ingo Weinhold
e468e31f7f Added intermediate cast to addr_t before cast to pointer (CID 4717).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40118 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-04 21:05:07 +00:00
Ingo Weinhold
40982d1e05 Check user_strlcpy() return value (CID 4053).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40096 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-03 19:09:14 +00:00
Ingo Weinhold
0068f3c810 Fixed uint32 underflow in backwards loop (CID 2601).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40095 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-03 18:30:19 +00:00
Ingo Weinhold
a5270963e5 Changed put_parameter() return type to void. The value was always true and
never checked anyway.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40094 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-03 18:03:23 +00:00
Ingo Weinhold
a0d93d1416 * VMCache::Unlock(): Renamed local variable consumerLocked to avoid shadowing
the parameter (CID 5329).
* _MergeWithOnlyConsumer(): Removed the somewhat weird consumerLocked
  parameter. The caller can unlock itself, if desired. Improves Unlock()
  readability.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40084 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-03 00:44:40 +00:00
Ingo Weinhold
b734adba63 find_thread(): thread::name is an array, so the NULL check is useless
(CID 4073).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40083 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-03 00:09:27 +00:00
Ingo Weinhold
66e8557230 common_rename(): Fixed incorrect check (array address instead of first
element, CID 4077).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40082 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-02 23:46:17 +00:00
Ingo Weinhold
e85a4793d2 strcpy() -> strlcpy() (CID 7986).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40081 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-02 23:32:47 +00:00
Ingo Weinhold
b0da468aeb call_apm_bios(): Moved otherwise unreachable code into "#if __GNUC__ < 4"
block (CID 10315).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40080 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-02 23:30:28 +00:00
Ingo Weinhold
b51ec9de58 sprintf() -> snprintf() (CID 7985).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40079 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-02 23:16:01 +00:00
Ingo Weinhold
3872a2d2fc Fixed suspicious implicit sign extension computing the frame buffer size
(CIDs 8056, 8057, 8058).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40078 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-02 23:14:10 +00:00
Ingo Weinhold
447e61909f Always initialize fSize in the BIOSDrive constructor -- InitCheck() uses it
(CID 10272).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40077 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-02 23:03:01 +00:00
Ingo Weinhold
b2330bb319 strcpy() -> strlcpy() (CID 7984).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40076 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-02 22:37:31 +00:00
Ingo Weinhold
80b5decbec Init MenuItem::fShortcut in constructor (CID 10273).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40075 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-02 22:35:09 +00:00
Ingo Weinhold
61aa1456a5 Check get_node_from() return value (CID 647).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40074 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-02 22:27:10 +00:00
Ingo Weinhold
70fc82404f sprintf() -> snprintf() (CID 7983).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40073 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-02 22:22:32 +00:00
Ingo Weinhold
3e9f742d23 Check fstat() return value (CID 2514).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40072 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-02 22:20:18 +00:00
Oliver Tappe
db03311342 Closing #7056:
* inherit umask of calling process to images loaded via exec...()

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40071 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-02 19:12:19 +00:00
Ingo Weinhold
be4b43e03f At least theoretically kernelSettings and safemodeSettings can be NULL
(CID 4230).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40069 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-02 14:44:33 +00:00
Ingo Weinhold
8018cd7f61 Also initialize fCachedBlock, as it is used in the destructor. Related to
CID 10271, though that's actually the only member it doesn't mention.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40068 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-02 14:36:25 +00:00
Ingo Weinhold
10a50e7cd5 Broken if condition (CID 2600).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40067 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-02 14:28:55 +00:00
Ingo Weinhold
9a3d05d795 Check return value of fstat() (CID 2513). Cannot really fail in the boot
loader, but the check doesn't harm either.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40066 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-02 14:22:32 +00:00
Ingo Weinhold
a037e9b3d0 Init fNode (CID 10264).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40065 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-02 14:16:19 +00:00
Ingo Weinhold
f746d7fb49 * Removed my copyright. I had nothing to do with this file.
* FileMapDisk::RegisterFileMapBootItem(): Commented out unreachable code
  (CID 10367).
* Automatic whitespace cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40064 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-02 14:13:21 +00:00
Ingo Weinhold
097b4917d3 Use the unnamed namespace instead of an unofficial one.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40061 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-02 00:44:41 +00:00
Oliver Tappe
bd2a7a1a44 Closing #3145:
* apply a patch by hamish (as part of GCI) that lets fseek() discard 
  characters pushed onto the stream via ungetc()

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40055 a95241bf-73f2-0310-859d-f6bbb57e9c96
2011-01-01 19:04:32 +00:00
Fredrik Holmqvist
7f83c5cd84 No need to use loadAddress as delta as delta isn't used for i==0. CID3197, CID 1972 and ticket #6990.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39987 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-28 17:04:58 +00:00
Fredrik Holmqvist
ec349ca3bb If there is an error opening the file (negative id) there is no need for close. CID 3474.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39975 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-28 11:59:34 +00:00
Fredrik Holmqvist
3c0241d8b5 While the functions didn't use the delta for i==0 accessing arrays at [0 - 1] can't be good.
CID 3197. 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39974 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-28 11:23:40 +00:00
Michael Lotz
c907ee755a Undo the part of r34947 that changed the re-use check. It wasn't broken, since
the address variable is incremented in the loop above and at the end will be
equal to sNextVirtualAddress if the address space can be reused. Fixes early
boot resets due to wrongly reused virtual addresses (and them being freed while
still in use by the original user). Fixes #7026, thanks to Urias for testing.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39961 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-27 02:15:05 +00:00
Michael Lotz
b2acbcbfb3 CID 8122, 2210 (pointing at the same), 8121 and 2209 (pointing at the same):
Taking the size of a pointer instead of the actual extended registers struct.
Not sure this is used, but if it is it made the whole fpu/sse state in the
debugger useless.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39960 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-27 01:44:43 +00:00
Michael Lotz
f3eff1ca00 Free the header after possibly accessing it when tracing is enabled. Also guard
the trace output against header being NULL (i.e. failed to map).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39958 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-27 00:51:05 +00:00
Oliver Tappe
9201344705 Fix CID-5893 (resource leak):
* close the dlopen()-ed image if the locale backend could not be created


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39950 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-26 15:26:58 +00:00
Oliver Tappe
4167bb128b Fix CID-34 (dead code):
* eliminate code that will never be reached

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39949 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-26 15:19:12 +00:00
Oliver Tappe
b97c958d25 Adjust for CID-8007:
use strlcpy() instead of strcpy() for improved clarity, although
the buffer is always wide enough [famous last words ...]

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39948 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-26 14:53:39 +00:00
Jérôme Duval
99f77939d9 adding a LegacyDrivers namespace to avoid clash with other components (see #7018).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39945 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-26 14:21:36 +00:00
Marcus Overhagen
1550ecf11a The IN_CLASS* macros use host byte order.
This fixes netmask and broadcast ip for PXE booting.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39928 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-24 00:32:19 +00:00
Marcus Overhagen
f9e04ff0e1 This removes pxe_stage1.S and thus also removes the build target "pxehaiku".
In r21611, about 3 years ago, the switch into protected mode was moved 
from stage1 to stage2, which makes stage1 obsolete. You have to use 
"pxehaiku-loader" when booting Haiku by PXE on x86.

Trying to use stage1 to boot stage2 resulted in tripple fault during
setup of ss segment, because stage1 switches to protected mode before
calling stage2, but stage2 expects real mode. The documentation is not
up to date.




git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39881 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-17 17:53:29 +00:00
Ingo Weinhold
d23cadce4c [_{kern,user}_]{start,stop}_system_watching()
-> [_{kern,user}_]{start,stop}_watching_system()


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39872 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-16 17:01:23 +00:00
Ingo Weinhold
88e38c178a Replace uses of obsolescent BReference[able] API.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39870 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-16 14:29:37 +00:00
Rene Gollent
260241b41b The wrong ID was being passed into _SendMessage(), leading to all thread
property change notifications being sent as having occurred for the team's
main thread.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39865 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-16 04:15:39 +00:00
Rene Gollent
03a4f3aff3 Fix gcc2 kernel build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39864 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-16 03:00:22 +00:00
Ingo Weinhold
d2bf328d72 Implemented a generic system watching mechanism with a userland API. Currently
only a few events can be watched (team creation/deletion/exec, thread creation/
deletion/name changes). The functions start_system_watching()/
stop_system_watching start/stop watching events.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39862 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-16 01:49:52 +00:00
Ingo Weinhold
4ebc8f615d * Added a "name changed" notification to the thread notification service.
* Added a "team" field to the notification events.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39861 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-16 01:44:15 +00:00
Ingo Weinhold
2d8d1cdbaa * Implemented a generic way to associate data with a team which is
automatically cleaned up when the team is deleted: Class AssociatedData is
  the base class for a data item, AssociatedDataOwner a container for them
  (struct team derives from it). Functions team_associate_data() and
  team_dissociate_data() add/remove data.
* Turned sTeamHash into a BOpenHashTable (necessary since struct team is no
  longer a POD).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39860 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-16 01:15:35 +00:00
Rene Gollent
27a115f668 Revert r39846 and r39847.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39849 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-14 17:55:38 +00:00
Rene Gollent
7040b50df5 Add support for thread rename and priority change notifications to the
debugger API/message set.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39846 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-12-14 05:08:47 +00:00
François Revol
917c4aeb8d ISO C and POSIX mandate _Exit() in stdlib.h to be the same as _exit().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39665 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-28 05:07:53 +00:00
Philippe Houdoin
3986ce0335 Relative add-ons pathnames are now searched in ADDON_PATH too
if they're not found from current working directory.
Fix #6427.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39661 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-27 09:57:16 +00:00
Ingo Weinhold
07655104d5 Eliminated _acquire_spinlock(). Since the macro is defined after
acquire_spinlock_inline(), there's actually no undesired recursion.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39647 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-26 13:55:20 +00:00
Ingo Weinhold
c07db2ec3f * elf_find_symbol(): Skip undefined symbols and symbols with the wrong binding.
* Implemented missing handling of symbolically linked images and of weak
  symbols.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39646 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-26 13:32:24 +00:00
Ingo Weinhold
78f7f8745e find_undefined_symbol_beos(): Look up the symbol in the requesting image
first. Fixes binary compatibility issue introduced with symbol preemption
support in the runtime loader. For unknown reasons liblayout.so, though
linked symbolically, contains a non-weak (!), preemptable BFont type info,
which was no longer resolved correctly with the new method.
Fixes #6892.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39617 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-24 22:11:42 +00:00
Ingo Weinhold
38eb09a376 Fixed regression introduced by r38409: For a parameterless escape sequence
process_vt100_command() would be invoked with argument count 1 (instead of 0).
This broke e.g. the "dis" command and the command history navigation.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39584 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-23 16:43:28 +00:00
Ingo Weinhold
25dc253d6a * Merged weak-symbols branch.
* Fixed trivial merge conflict in src/system/libroot/posix/locale/nl_langinfo.cpp
* Fixed gcc 2 compilation of src/system/glue/init_term_dyn.c.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39571 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-22 13:06:36 +00:00
François Revol
2757dc8c3a Fix build with VFS_PAGES_IO_TRACING.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39566 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-21 22:28:49 +00:00
François Revol
3bb30583a3 Fix the licence, we use MIT now.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39557 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-21 17:03:03 +00:00
François Revol
34dc99625d Update copyrights.
Btw Axel, keyboard.cpp (forked from the bios_ia32 one) is still under "OpenBeOS licence" with 2 other copies, I suppose you are ok to change to MIT ?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39548 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-20 18:41:52 +00:00
François Revol
180ffdeaa4 Cleanup. Try to exit ARAnyM from platform_exit().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39547 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-20 18:25:51 +00:00
François Revol
866bb10f42 Add some more Falcon video modes. Use VsetRGB() to set 8bit palette, though it's not really useful yet.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39544 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-20 17:33:44 +00:00
François Revol
20d6d508c1 Add the VsetRGB() XBIOS call.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39543 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-20 17:29:39 +00:00
François Revol
7a2ec456cf For now only output debug text on screen if framebuffer is not enabled.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39542 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-20 17:24:18 +00:00
François Revol
2d84444351 Native Falcon video modes support, including truecolor (16bpp chunky) which we can use for the boot splash. Some debugging code left to cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39533 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-20 04:30:49 +00:00
François Revol
67572c21e8 Print natfeat IDs as hex.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39532 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-20 04:29:12 +00:00
François Revol
ffc80aab15 Add some needed XBIOS calls.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39531 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-20 04:28:44 +00:00
François Revol
42df5ff102 Some support for video initialization using natfeat fVDI, but sadly it seems to return NULL for the framebuffer so it's not usable.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39506 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-19 13:52:17 +00:00
François Revol
a3f64d4460 Add a comment about why we currently force floppy boot when started from haiku.prg.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39493 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-19 09:02:59 +00:00
François Revol
6874c88139 When the boot drive API & id is not known, try to determine the id via natfeat. XXX not sure which API it refers too.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39492 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-19 08:55:15 +00:00
François Revol
9c30d75b8c - use only native error codes,
- fix nat_feat_call() macro for more than 1 arg,
- add BOOTSTRAP natfeat calls get_bootdrive() and get_bootargs().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39491 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-19 08:51:59 +00:00
Ingo Weinhold
631cc3ea7b Keep things in order.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39459 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-16 20:54:49 +00:00
Ingo Weinhold
698fcd85da Should have been part of r39453. The libroot implementation of
get_extended_team_info().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39454 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-16 19:43:37 +00:00
Ingo Weinhold
56d734a1aa Added new private API to get more information on a team:
* Userland interface: get_extended_team_info().
* Syscall: _kern_get_extended_team_info.

Only partially implemented yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39453 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-16 19:42:08 +00:00
Ingo Weinhold
f31ab90a8d KMessage::Dump(): Fixed broken format.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39452 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-16 19:39:45 +00:00
Andreas Färber
cb49ed72a6 boot_loader_openfirmware: Fix trace output
Update the variable name.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39430 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-14 19:04:48 +00:00
Oliver Tappe
de2e54ace0 Adjust tzset() implementation to better follow the POSIX specs and
make some more perl tests happy.
* no longer expect a ICU timezone ID in the TZ environment variable,
  but only expect this format if the TZ-value is starting with ':'
* accept "standard" TZ-values like "EST5" (of which only "EST" is
  relevant to us) - if such a value is specified, we hardcode the
  timezone name to the given value, no matter how ICU calls it
* adjust tests accordingly


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39415 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-13 01:13:38 +00:00
Oliver Tappe
5ae9cf0060 * fix warning about deprecated conversion
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39412 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-13 00:21:23 +00:00
Oliver Tappe
bd13a264f7 Fix #6740:
* remove declaration of ctype-..._l() functions, as we do not provide
  them and they are not really needed by our hacked glibc
* replace remaining invocations of isspace_l() and isupper_l() in glibc
  with isspace() and isupper() respectively
This allows libroot to be built in DEBUG mode, again.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39380 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-09 21:36:35 +00:00
François Revol
f3319425ed Return 0 on success for the mount() and unmount() compatibility calls. Just cleaner.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39362 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-08 21:46:22 +00:00
François Revol
193e56fbef Add mount() and unmount() BeOS compatibility calls. This should help to run some old apps like Helios...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39330 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-06 22:28:07 +00:00
François Revol
ceee0a32a4 Fix warning.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39328 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-06 20:39:48 +00:00
Ingo Weinhold
e5d4255933 Init AtExitInfoBlock::fFirstUnused in the constructor. Probably fixes #6793.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39324 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-06 13:08:04 +00:00
Ingo Weinhold
3d64976518 The TRACE() macro is defined in runtime_loader_private.h.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39315 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-05 20:37:57 +00:00
Stephan Aßmus
08e6655afe Patch by kaliber (ticket #6333): Removed many instances of
passing an additional -Wall to the compiler, which may actually
have unwanted effects. -Wall is standard by the build system.
Also, -Wno-multichar was passed unnecessarily for Haiku targets.
I didn't remove it for the bfs_shell, hope this is what Ingo meant
in the ticket.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39314 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-05 20:31:11 +00:00
Ingo Weinhold
aa3507feea terminate_program(): Call the termination function of all images, not only
of the program image and its transitive dependencies.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39306 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-04 21:15:39 +00:00
Ingo Weinhold
e60625b708 get_sorted_image_list(): Allow passing a NULL image argument, meaning that
all loaded images will be sorted and returned.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39305 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-04 21:14:09 +00:00
François Revol
2ef563d813 80 cols & cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39304 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-04 19:37:30 +00:00
François Revol
f649b1fa77 Make multiboot.h usable from assembler, and remove duplicate defines.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39303 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-04 19:06:36 +00:00
Ingo Weinhold
fb8e088927 Added dummy __cxa_atexit() and __cxa_finalize() to the kernel. We might
actually implement those, if we decide to support global
constructors/destructors in kernel add-ons.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39300 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-04 16:26:43 +00:00
Ingo Weinhold
d64f6189c0 unload_library(): Added comment about the exit hook handling.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39299 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-04 16:22:11 +00:00
Ingo Weinhold
85f9496a24 Implemented __cxa_atexit() and __cxa_finalize() which are required by the
Itanium ABI. Whether __cxa_atexit() really works for associating hooks with
DSOs has not been tested yet, as our compiler doesn't use the function.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39298 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-04 16:21:20 +00:00
Ingo Weinhold
b502275bc8 exit.c -> exit.cpp
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39295 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-04 11:07:01 +00:00
François Revol
4219bd961b Rework the ConsoleDevice to be a full featured window based console.
Only looses high intensity color from the plain console, but doesn't eat keystrokes, and a 2nd window opens for dprintf stuff.
Only Amiga makes it possible ;-)
http://revolf.free.fr/beos/shots/shot_haiku_loader_amiga_m68k_004.png


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39264 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-01 22:35:43 +00:00
François Revol
a55b596e1c Allocate the IOReq if not done yet at Open() time.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39256 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-01 17:57:36 +00:00
François Revol
499f2a5c48 Some more work to get video support working, add generic code to support the boot splash in.
However all modes available are planar, and there doesn't seem to be a way to tell it in the kernel args framebuffer struct...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39255 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-01 17:24:20 +00:00
François Revol
9bc9cf069d Cleanup. Add a LLKeyboardDevice using lowlevel.library but it doesn't seem to be available in the kickstart I have anyway.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39254 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-11-01 17:22:25 +00:00
Matt Madia
331c79ad0f Fixes error "SubInclude HAIKU_TOP without prior SubDir HAIKU_TOP", when
jamming from src/system/glue/arch.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39237 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-31 18:08:54 +00:00
François Revol
3091264bb5 s/Copyirght/Copyright/ unless it's a neologism from Ithamar :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39235 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-31 17:27:50 +00:00
François Revol
d9025c9aae Last remnants of NewOS here.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39223 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-31 00:56:14 +00:00
François Revol
3be6531e51 Remove antique makefile left from NewOS.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39222 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-31 00:46:38 +00:00
Ithamar R. Adema
e7682a8e3e ARM:
* Disable TRACE output of ELF relocation
* Implement R_ARM_RELATIVE (for kernel modules)

No more errors on 'loading' of kernel modules now!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39220 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-30 23:10:36 +00:00
Ithamar R. Adema
c9a4637342 * ARM: Initial stab at fixing ELF relocations (much more to do though for full ELF relocation support).
We now boot right up to "INIT: main: done... begin idle loop on cpu 0" ! :)
(Please note that there's still *lots* stubbed out)



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39219 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-30 22:53:32 +00:00
Ithamar R. Adema
c917cd6261 * ARM: Major VM work
- This is mostly a copy of the x86 32bit paging method and infrastructure, this was copied for two reasons:
		1) It is the most complete VM arch
		2) The first ARM PAE patches have landed on alkml, so we will have to deal with it in the future as well,
		   and this infrastructure has proven to be ready ;)
	- No protection features, or dirty/accessed tracking yet
	- Lots of #if 0

	but....

	It boots all the way up to init_modules() now, and then dies because of a lack of (ARM) ELF relocation implementation!

	Since at this point the VM can be fully initialised, I'm going to focus on CPU exceptions next, so we can get KDL to trigger
	when it happens, and I can actually debug from there ;)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39206 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-30 14:10:30 +00:00
Ithamar R. Adema
72d414a517 * ARM: Start physical allocated range at top of memory; otherwise our page directory/tables won't be included
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39204 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-30 13:55:29 +00:00
Ingo Weinhold
13b81a3b8e * Added new thread flag THREAD_FLAGS_SINGLE_STEP, which is set to indicate that
userland single-stepping is enabled for the thread.
* x86_exit_user_debug_at_kernel_entry(): Always store DR6 and DR7 in the CPU
  structure, not only when breakpoints are installed.
* x86_handle_debug_exception(): When encountering a syscall single-step, also
  set the THREAD_FLAGS_DEBUG_THREAD thread flag. Otherwise the
  B_THREAD_DEBUG_STOP would be ignored.
* x86 interrupt handling, DISABLE_BREAKPOINTS():
  - Renamed to STOP_USER_DEBUGGING().
  - Now it also call x86_exit_user_debug_at_kernel_entry() when
    THREAD_FLAGS_SINGLE_STEP is set, so that the debug registers are saved.

Fixes #6751.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39201 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-30 11:31:01 +00:00
Ingo Weinhold
ee7817042b update_thread_user_debug_flag(): Don't set the THREAD_FLAGS_DEBUG_THREAD thread
flag, when B_THREAD_DEBUG_SINGLE_STEP is set. Not sure, if there ever was a
reason to do that, but there isn't now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39200 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-30 10:33:04 +00:00
François Revol
c489b073c8 Partial build fix. Still a lot to do to catch up with Ingo...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39189 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-30 01:33:50 +00:00
Ithamar R. Adema
7bc3564aa8 * ARM: Some more cleanup...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39168 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-28 11:19:20 +00:00
Ithamar R. Adema
ac4c302248 * Adjust code to use the new page directory/table helper macros.
* Some more code cleanup.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39138 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-25 11:19:17 +00:00
François Revol
ee0c130257 Display flags and interlace in the mode menu items.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39136 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-24 22:46:06 +00:00
François Revol
b14f16077c Fix setting console position.
Generate a list of video modes, though there seem to be some dups and missing ones... The Nominal resolution doesn't mean it can't be better.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39135 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-24 22:28:13 +00:00
François Revol
2e74287ab2 Force a 040 detection for now, it seems E-UAE is making kickstart detect it randomly :(
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39134 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-24 22:26:27 +00:00
Clemens Zeidler
4a5a077ff7 Add a private B_ATTR_CHANGE_NOTIFICATION flag to the open query syscall to tell the query to send notifications when an entry attribute changed and the entry stays in the query. Previously you only get created and removed messages, now you can also get updated messages. Only implement it for bfs.
Fix copy right.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39131 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-24 20:47:46 +00:00
François Revol
062c606d62 An implementation of a ConsoleDevice using console.device but it seems it requires having a window open.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39128 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-24 16:28:23 +00:00
François Revol
77fd9ce1f9 Of course we need the Exec call definition for ColdReboot().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39127 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-24 16:26:17 +00:00
François Revol
e4e2237013 reboot sanely from platform_exit().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39126 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-24 16:21:59 +00:00
Clemens Zeidler
ccdff0eb1f Fix bug when comparing flags. Simplify hash map key. Thanks Ingo!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39118 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-24 08:54:21 +00:00
François Revol
fc13691eeb Add a Clear() call to ExecDevice.
Seems there is a lowlevel.library which might be easier to use for keyboard, add some defs for it.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39113 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-24 02:55:46 +00:00
François Revol
4ae7f92a58 Fix console_clear_screen(), ClearScreen() only clears from the current y position so we must Move() before.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39111 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-24 02:12:18 +00:00
François Revol
6fff309da9 Almost working keyboard input. One can now select menu items, though it seems to miss 2/3 of the key presses.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39110 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-24 02:06:30 +00:00
François Revol
f2b7a266d7 Add an ExecDevice class to handle devices using Exec's IORequest calls. Subclass it as KeyboardDevice to use keyboard.device.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39108 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-24 01:16:36 +00:00
Clemens Zeidler
d63309cf5e Store the volume watcher in a separate hash table to not collide with
normal nodes.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39107 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-24 00:49:48 +00:00
Ithamar R. Adema
3164579353 * ARM: Map full page directory, instead of just the first page
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39092 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-23 20:28:49 +00:00
François Revol
22d81b6c8e Implement proper console color handling.
Don't draw over the screen title.
Oddly the menu doesn't seem to clear the screen.
Looks much better now:
http://revolf.free.fr/beos/shots/shot_haiku_loader_amiga_m68k_003.png


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39076 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-23 19:13:55 +00:00
François Revol
bf6cf21094 Fix AmigaOS calls : a6 is required to point to the library base, but our gcc uses it as frame pointer, so we must save it before calling.
Fix the console and remove test panics. We now display the menu, although not in the best colors :
http://revolf.free.fr/beos/shots/shot_haiku_loader_amiga_m68k_002.png
(Yes, the mouse moves too :p)
Amiga !!!!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39074 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-23 15:53:51 +00:00
Ithamar R. Adema
e8b7cfe80e * ARM: print memory map before starting kernel
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39058 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-23 08:51:09 +00:00
François Revol
04fc737059 Start of implementation for the console. dprintf() now uses one of the console handles for simplicity.
It crashes for now though, seems we have a stack alignment issue or maybe mangled registers. Or maybe it's due to non-static initializers not being done.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39053 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-22 21:09:10 +00:00
François Revol
2be003bc1e Add missing packed attributes.
Add needed TextFont struct.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39052 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-22 21:06:25 +00:00
François Revol
5a0d2097fe - DisplayAlert() already waits for a mouse click.
- Implement dprintf() with DisplayAlert() for now.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39050 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-22 19:19:03 +00:00
François Revol
51bac633cf More of the needed AmigaOS APIs.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39049 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-22 19:16:43 +00:00
Ithamar R. Adema
29ce3dedd9 * Remove references to vectors, they are not at physical address 0, but on either virtual address 0 or (in case of high vectors) on 0xffff0000....
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39046 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-22 15:57:57 +00:00
Clemens Zeidler
33d9a03d72 Add a watch_volume method to the node monitor to be able to watch node changes on a whole volume and not only for one node.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39020 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-20 12:31:53 +00:00
Ithamar R. Adema
18b48221c9 * don't mess with the stack before storing the register state :$
This finally makes KDL fully usuable on the ARM port!



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39015 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-19 23:11:57 +00:00
Ithamar R. Adema
22e3bbdf9b * Implement ARM TLB/cache functions
* General code cleanup...



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39010 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-19 12:26:38 +00:00
Rene Gollent
ad47c011b8 More fixes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39009 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-10-18 20:32:46 +00:00
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