Commit Graph

160 Commits

Author SHA1 Message Date
Michael Phipps
53aaaf43d8 Make mmap work, more testing, fixed some bad bugs.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@771 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-16 01:09:45 +00:00
Axel Dörfler
9b458ca3e7 Fixed some crashing bugs in the pci code - the kernel now boots again.
Added trace methods.
Cleaned up some code.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@759 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-14 02:09:45 +00:00
Axel Dörfler
6057f25bc6 Fixed a typo; dbg_init2() called dbg_init() instead of arch_dbg_init(), causing
many kernel debugger commands to be removed accidently...
Added a message if you entered an unknown command.
Some cleanups.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@758 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-14 00:04:59 +00:00
Axel Dörfler
c65ac9cbe8 Disabled debug output.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@757 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-14 00:02:37 +00:00
Axel Dörfler
5ca8da7a4b Backported the new stack crawl command ("sc", not "bt" like in NewOS) from
NewOS. Untested yet, though.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@750 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-13 21:42:53 +00:00
Axel Dörfler
ef8d7092e8 Turns out that the old and unused redir_vnode was also still included here.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@749 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-13 21:41:33 +00:00
Axel Dörfler
4c405cbdd4 The fs interface functions should now return a "status_t" rather than an "int".
Added syscalls for, and implemented sys_create_link(), sys_remove_dir().
Implemented link(), unlink(), rmdir().
Fixed the inconsistent path buffer handling in the user|sys vfs functions; the
path buffer is now exactly SYS_MAX_PATH_LEN from userland (incl. terminating
null byte).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@748 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-13 20:39:25 +00:00
Axel Dörfler
854fc92a7c Implemented some more calls in unistd.h.
Replaced the unused syscall for getdtablesize() with one for access().
Implemented sys_access() and added it to the file system interface.
Removed the fs function interface from vfs.h.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@738 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-13 13:51:36 +00:00
Axel Dörfler
e867ec51af Added mount.c, implementation of mount() and unmount().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@670 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-09 20:48:30 +00:00
Axel Dörfler
beddff0f56 Replaced opendir.c with directory.c, implemented chdir(), fchdir(), and
getcwd().
Introduced new xyz(int fd, char *path, ...) style of functions for
sys_setcwd(), and sys_write_stat().
Added missing sys_fstat(). Removed duplicated prototypes in syscalls.h
Fixed some minor bugs.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@669 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-09 20:20:28 +00:00
Axel Dörfler
63f16f88e2 Removed the getdtablesize() syscall hack.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@668 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-09 17:53:02 +00:00
Axel Dörfler
2f5118ccdc Changed the argument order of sys_read/write() to be more intuitive.
Fixed a bug in module.c that I caused due to changes in the VFS.
Added the sys_write_link() call.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@666 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-09 17:03:03 +00:00
Michael Phipps
148c5492ba Added another test thread and varied the timing. Still seems to work right.
Updated the TODO list.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@645 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-08 04:06:41 +00:00
Axel Dörfler
2de6c0e035 Initial driver settings - don't worry there is nothing implemented at all,
it just exports the API.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@637 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-07 22:25:03 +00:00
Michael Phipps
7bebb1dec3 Just to make Daniel happy... ;-)
swapfile blocks are now put on a free list and properly reused, so it
no longer grows out of control.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@626 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-07 03:21:02 +00:00
Axel Dörfler
c2f9230c91 For some strange reason, elf_relocate_rel() crashed and reported a high
rel type (111) when it tried to load the PCI bus manager - I've only removed
the crash, but I didn't dig any deeper yet.
Note, this only happens using bochs - on a real computer, the kernel runs
obviously without any problems.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@593 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-05 06:41:57 +00:00
Axel Dörfler
1e3eaf3b95 Added the write_link() call (currently only local to the VFS).
Added a mode parameter to sys_create_symlink().
Added an open_mode field to struct file_descriptor.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@592 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-05 05:37:17 +00:00
Axel Dörfler
fbc9a56c28 Added a missing return value.
Some code cleanups.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@590 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-05 05:26:52 +00:00
Axel Dörfler
267cf83fb3 Added a missing return value in port_init().
Cleaned up the code a bit.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@588 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-05 05:25:26 +00:00
Axel Dörfler
7f88f899f4 Added a missing return value.
Cleaned up the code a bit.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@587 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-05 05:23:23 +00:00
Axel Dörfler
75faf9fda3 Added a missing return value in vm_resize_region().
Cleaned the code a bit.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@586 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-05 05:22:27 +00:00
Axel Dörfler
c931f4823d Added a missing return value.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@585 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-05 05:20:40 +00:00
Michael Phipps
c70c326c96 Fixed a serious bug in list.h. :-(
Improved tests to be multi-threaded. Still needs a lot more testing.
Removed the nasty global variable in test.C.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@584 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-05 03:41:16 +00:00
lillo
91363a4278 Converted thread states to BeOS equivalents (excluding THREAD_STATE_FREE_ON_RESCHED, which will probably go away once the slab allocator is in). Converted priorities to BeOS equivalents; we now have 60 priority queues to map the 120 BeOS priority levels (which have a granularity of 2, thanks Axel) plus the idle queue. Fixed PS.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@573 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-04 20:10:06 +00:00
lillo
854c31f835 finished implementing get_thread_info, get_next_thread_info, get_team_info, get_next_team_info. New ps command behaving like the BeOS one is here, but doesn't work as libroot seems to crash when loaded at process startup... :/
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@570 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-04 02:04:37 +00:00
lillo
aded06e0aa Second round of changes. Splitted thread.c into thread.c, team.c and scheduler.c. First kernel-only get_team_info and get_next_team_info implementation.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@569 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-03 23:39:50 +00:00
Axel Dörfler
28cdc245d3 Added a "symlink" command that can create symlinks from the shell (like "ln -s").
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@561 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-03 02:04:50 +00:00
Axel Dörfler
ae372703ce Big commit: Added symlink support to the kernel.
- added needed syscalls to access symlink support from userland
- implemented lstat(), symlink(), and readlink()
- added dev_t to ktypes.h (for now - should be in a public header anyway)
- added symlink support to the "ls" command (now calls lstat() and shows the
  link target with the -l option)
- changed the sys_read_stat() call to support symlinks, and updated files
  using that function (it gets an extra argument: bool traverseLink)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@560 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-03 02:03:27 +00:00
Axel Dörfler
7d141659a6 Fixed some crucial bugs in the elf_load_uspace() function:
- if the path name exceeded about 56 bytes, the function would have seg-faulted
- the calculation to decide if there is an extra region for the bss needed was wrong -
  that caused the kernel to be not able to load certain executables

Also, fixed a warning, and cleaned up the above mentioned function a bit, added
some more comments.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@558 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-03 01:10:06 +00:00
lillo
3cfbecf1a6 First round of big changes: the term team has replaced proc all over the kernel, the few kern_* syscalls have been renamed to sys_* for consistency, and other small changes. The ps app is temporarily disabled until get_next_team_info is implemented.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@557 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-03 00:41:27 +00:00
Michael Phipps
74407d8836 Some clean up, prep work to make more tests.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@554 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-08-02 03:09:41 +00:00
lillo
c0f8c7be80 little scheduler fixes and made team death synchronized by a semaphore
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@548 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-31 20:08:27 +00:00
lillo
8f4dae6773 applied small patch to boost priority on sem block
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@547 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-31 20:05:24 +00:00
Michael Phipps
e03166f0e2 Added tests for and fixed freeArea. Note that this generated some more work to do.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@542 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-31 02:20:33 +00:00
Michael Phipps
1314ca6a7f Enabled saver thread.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@540 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-30 02:02:40 +00:00
Michael Phipps
fbafb4de2b Added more tests and we now start the thread for the page cleaner.
Verified (manually) that cleaned pages are used where possible.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@539 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-30 01:39:50 +00:00
Michael Phipps
8985112ee5 Fixing list.h (doh!) and some smaller changes.
Improved all of the printf's to have their method name, for easier tracking


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@538 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-30 00:29:00 +00:00
Axel Dörfler
847248db20 path_to_vnode() should now be able to resolve symbolic links (not tested
yet) - up to 16 symlinks are allowed in one path (following BeOS' restriction).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@518 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-28 19:39:49 +00:00
Axel Dörfler
b98a89a763 Forgot to set the stream type for the root directory...
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@516 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-28 19:36:43 +00:00
Axel Dörfler
7be577a363 Beginnings of symbolic link support.
Cleanup of the code in many places.
Fixed bad bugs in dir_vnode_to_path(), and entry_ref_to_vnode().
Fixed some other bugs.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@509 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-28 18:41:07 +00:00
beveloper
3fe5330ccb While Intel documentation lists PCI capability as 32 bit entities,
the PCI specifications lists it as two 8 bit entities, followed by
a unknown number of vendor specific data. It should be better to do
two 8 bit reads, instead of one 16 or 32 bit access.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@479 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-27 20:24:45 +00:00
beveloper
a4c97c95ce Fix the problem that resulted in a invisible shell on my system.
We were disabling the PCI to PCI bridge which is the connection
to the AGP port on my system, and made an error when trying to
enable it again. Fixed now!


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@470 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-27 00:38:12 +00:00
beveloper
b055a362cb PCI configuration space read/write of 32bit never worked. Fixed.
PCI configuration space read/write of 16bit at offset 1 never worked. Fixed.
Added warnings for unsupported PCI configuration space read/write offsets.
Fixed numerous bugs in PCI Capabilites detection code.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@468 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-26 23:27:40 +00:00
David Reid
f3b40ada80 This is a 5 minute attempted fix for Marcus's AGP card not working
for VGA accesses.

Marcus: can you try this and see if it makes any difference? There should
be a debug message if it detects your agp bridge and applies the fix.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@451 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-26 05:32:00 +00:00
David Reid
e805f0e904 Better debugging and final fix to the bus numbering, though that's
style not function.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@448 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-25 23:32:59 +00:00
beveloper
8d5863f44b ups, now it's correct.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@447 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-25 22:51:27 +00:00
beveloper
2b48bdcef9 Correct the bus number that is assigned to pci-pci bridges.
Now finds PCI cards connected to second pci-pci bridge on my motherboard.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@446 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-25 22:43:36 +00:00
David Reid
a0bc23f288 I've been trying to figure out how the division of work between
config_manager and busses works, and this is a large correction based on
my current working thoughts.

I also think we need to have a new interface between the bus modules and
the config_manager to allow them to work together. I have some ideas
on it and will start fleshing it out next week.

This update basically moves all PCI stuff back to the PCI module and
cleans up config_manager.c. We now print a small amount of info for
devices and more for bridges. My system only has a single bridge, but if
anyone has a more exotic system and tries this can they let me know
what sort of results they see?


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@444 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-25 18:11:45 +00:00
notion
66554a4c98 Fixed the overflow bug in heap.c that would occur on allocation of all the memory of the heap.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@442 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-25 14:49:29 +00:00
David Reid
a537d866cf Another support function. This time we add the ability to change
power management states for cards that support it.

ISTR that Be forced all devices to full power, so we do the same
for the moment.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@439 a95241bf-73f2-0310-859d-f6bbb57e9c96
2002-07-25 14:16:57 +00:00