Commit Graph

10137 Commits

Author SHA1 Message Date
Axel Dörfler
53b0609a4a Initial support for cache modules.
Also fixed a minor bug in dec_vnode_ref_count(): the unusued vnode counter
was not decremented again when one vnode was removed.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10336 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-01 07:41:07 +00:00
Axel Dörfler
324fc66b90 Fixed another stupid bug in cache_io(): if one request needed new pages
more than once, the size requested was only correct for the first time.
Added preliminary support for cache modules.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10335 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-01 07:38:27 +00:00
Axel Dörfler
a16bf97a7d Added preliminary support for cache modules.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10334 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-01 07:35:20 +00:00
Axel Dörfler
097fa44066 Now also prints out power management information for AMD CPUs if present.
For Intel CPUs, the cache code 0x40 is now handled manually, as it changes
its meaning depending on the cpu type.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10333 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-01 07:29:12 +00:00
Axel Dörfler
1ec6a65f39 No longer prints out the extended processor signature on Intel CPUs as
it's only reserved but not defined or used for those.
If you have a stupid BIOS, the name string might not have been set; this
is now supported, and the standard vendor string is used in that case.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10332 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-01 07:00:50 +00:00
Axel Dörfler
2e507eba4a Factored out printing the processor signature.
The processor signature now correctly handles the extended family/model fields.
The cpuid 0x80000001 field is actually the same as cpuid_info::eax_1, so
dumping it now behaves in the same way, too.
Added printing of Transmeta specific features.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10331 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-01 06:35:05 +00:00
Axel Dörfler
b99d92939a Fixed some minor bugs that made it into the last version; for example
the 0x80000001 generation/model/stepping was displayed incorrectly.
Only the new features in cpuid 0x80000001 are printed, added support for
No-Execute ("NX") and Long Mode ("64").
Improved non-Intel TLB display, added page sizes, 2nd level cache is now
also displayed correctly (unlike the BeOS version which has a wrong
associativity).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10330 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-01 06:12:38 +00:00
Axel Dörfler
78ba30ed0e sysinfo needs private/shared headers.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10329 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-01 04:50:06 +00:00
Axel Dörfler
26a78aa41d Removed broken _user_exit(), and implemented working _user_exit_team().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10328 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-01 04:26:10 +00:00
Axel Dörfler
71463c834e Now uses _kern_exit_team().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10327 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-01 04:24:15 +00:00
Axel Dörfler
72013b22a5 Now uses _kern_exit_team().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10326 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-01 04:17:57 +00:00
Axel Dörfler
a32c8f261f Renamed _kern_exit() to _kern_exit_team(), just to avoid any confusion.
Added real _user_exit_team() syscall (it was previously incorrectly mapped
to _user_exit_thread()).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10325 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-01 04:14:55 +00:00
Axel Dörfler
2f9720f07d exit_thread() was using _kern_exit() instead of _kern_exit_thread().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10324 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-01 04:10:12 +00:00
Axel Dörfler
b385f97e3e Added our first x86-only syscall for get_cpuid().
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10323 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-01 03:54:23 +00:00
Axel Dörfler
f0e5f76de9 Almost rewrote sysinfo: it will now print out more information, and that
information is also visually more appealing.
It now also uses the private/shared/cpu_type.h header to get the CPU string.
Determining the availability of the extended cpuid info was broken - whoever
had problems with the previous "change_extended = 1" should test again, thanks.
Cleaned up.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10322 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-01 03:51:38 +00:00
Axel Dörfler
e25fbc6849 Moved cpuid.S from src/kernel/libroot/os/arch/x86/. Fixed it so that it
actually fills a cpuid_info structure. Renamed cpuid() to get_current_cpuid().
Added syscall _user_get_cpuid().
Added a lot of other vendor brand strings. The cpu_type and cpu_revision
fields should now be correctly set.
get_cpuid() now returns B_BAD_VALUE if the cpuNum parameter is out of bounds
(ie. higher than the number of available CPUs in the system).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10321 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-01 03:48:28 +00:00
Axel Dörfler
d86cadcdb3 Is now using the CPU string identification from private/shared/cpu_type.h.
Adapted to match our style guide better.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10320 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-01 03:43:08 +00:00
Axel Dörfler
bc93cc3fa7 Happy source compatibility breaking:
- Removed the OBOS_CPU_TYPE stuff - our types are now always defined.
- Made the cpu types consistent, renamed X86 to x86.
- cpuid_info.eax_1 now also contains the extended family/model info.
- Renamed cpuid_info.eax_0.vendorid to vendor_id.
- changed B_CPU_x86_VENDOR_MASK to 0xff to make some space for future changes.
- added some more CPU types (if anyone knows more Transmeta IDs; I
  couldn't find more of them).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10319 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-01 03:36:48 +00:00
Axel Dörfler
fc4ff6bda0 Renamed systeminfo.c to system_info.c - also replaced the (broken) get_cpuid()
implementation by a syscall. Moved cpuid.S to src/kernel/core/arch/x86.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10318 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-01 03:31:45 +00:00
Axel Dörfler
72873ebe36 Extracted CPU identification out of Pulse to be used by Pulse and sysinfo.
Might be better placed in a source file, but sysinfo is currently built
very simple, and I was too lazy to change this :-)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10317 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-12-01 03:28:47 +00:00
DarkWyrm
e57e5a53a9 A couple more files to include with AGG
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10316 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-30 22:22:58 +00:00
Axel Dörfler
7c3dbcf249 Threads and teams now maintain a used counter - they also provide a maximum
limit, but this is not yet enforced. Added getter functions.
team_init() now returns a status_t.
System info stuff is now globally initialized in main().
get_system_info() now also reports the number of used pages, and calls the
architecture dependent function.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10315 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-30 21:11:37 +00:00
Axel Dörfler
e774a942a9 Implemented basics of the architecture specific get_system_info(), also
added get_cpuid() function (does not respect the cpu parameter yet).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10314 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-30 21:08:19 +00:00
Axel Dörfler
545ecbe86d Extended the get_system_info() mechanism; it now gets info about threads/teams
as well as architecture specific stuff.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10313 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-30 21:06:11 +00:00
Axel Dörfler
f79889e75b Now also sets the cpu_clock_speed field.
Disabled debug output.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10312 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-30 20:59:55 +00:00
Axel Dörfler
a3129fbc3b Added cpu_clock_speed field for now - might either be moved to the main
kernel_args; depending on how it'll be done on PPC.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10311 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-30 20:57:36 +00:00
Jérôme Duval
312ba9dd6e Added bonnie from http://www.textuality.com/bonnie/
Bonnie is a benchmark for measuring performance of FS operations


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10310 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-30 20:01:20 +00:00
Axel Dörfler
f8df8bac3e Added a temporary work-around for the doubled shell prompt.
Added some missing return values.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10309 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-30 19:16:31 +00:00
Axel Dörfler
be505eacf5 Removed all error codes that are not used anymore.
Some of the remaining ones would be candidate for the standard Errors.h.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10308 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-30 18:32:02 +00:00
Axel Dörfler
d3ee51c1d2 Removed the ERR_VM_PF_BAD_ADDRESS constant, and use B_BAD_ADDRESS instead.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10307 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-30 18:27:38 +00:00
Axel Dörfler
7028b4da5d Cleanup, made C++ safe, updated license.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10306 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-30 18:17:59 +00:00
Axel Dörfler
50b844ee0b Removed the _user_delete_sem_etc() syscall prototype, as it is no longer present.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10305 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-30 18:10:32 +00:00
Axel Dörfler
bbe029d6b1 Cleanup, some more useful default levels for the debug output. It's now silent as well.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10304 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-30 18:03:47 +00:00
Axel Dörfler
959aeaf834 Style cleanup.
Some more useful default levels for the debug output (only wrapper.h, the
values actually used were okay).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10303 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-30 18:00:26 +00:00
Axel Dörfler
1ed378f0cc Some minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10302 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-30 17:55:42 +00:00
Axel Dörfler
a6e322002b Some more useful default levels for the debug output.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10301 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-30 17:52:04 +00:00
Axel Dörfler
f4561860ac Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10300 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-30 17:46:37 +00:00
Axel Dörfler
caa0ef0b4c Some old changes, probably shouldn't get lost, even if this boot method
is not being used by the PPC anymore.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10299 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-30 17:37:56 +00:00
Axel Dörfler
058569262f get_memory_map() is now silent when TRACE_MMU is not defined.
When the 0xe820 memory map method doesn't work for whatever reason (broken BIOS),
it currently just assumes to have 32 MB - it now also prints out a warning when
it does so.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10298 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-30 17:33:46 +00:00
Axel Dörfler
d99c404f77 Fixed all warnings in scsi2ata.c.
Style cleanup.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10297 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-30 17:24:04 +00:00
Axel Dörfler
4e9c28deed Added sysinfo, kill, diff, and cmp.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10296 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-30 15:11:07 +00:00
Jérôme Duval
13e65ff2a3 added kernel addon for config driver
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10295 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-30 10:39:45 +00:00
Nathan Whitehorn
2e61f6d929 Made things build again
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10294 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-30 04:42:07 +00:00
Nathan Whitehorn
81a1fbaee2 Made the same modification to blocking-mode handling I just made to the 440x driver.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10293 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-30 04:39:56 +00:00
Nathan Whitehorn
1c5f7ab9d6 Updated to version 3.0.8, improved (made work) nonblocking mode.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10292 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-30 04:38:11 +00:00
DarkWyrm
01e4e91366 Stupidman strikes again. :D
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10291 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-29 23:51:28 +00:00
DarkWyrm
6c41be783c FBC fix
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10290 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-29 23:40:20 +00:00
Axel Dörfler
b5d786bdac Improved fs_unmount(): it will now free all vnodes directly via free_vnode(),
and no longer relies on put_vnode() for the root node. This will also call
the FS release/remove vnode calls. Extended comments.
Added "flags" parameter to unmount.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10289 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-29 22:45:27 +00:00
Axel Dörfler
4c8e8f2f19 Added "flags" parameter to unmount.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10288 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-29 22:42:01 +00:00
Axel Dörfler
41c3a7a3d5 Moved freeing the vnode out of dec_vnode_ref_count() into a separate function
(free_vnode()). Upon freeing, the file cache is now only written back if the
file is not deleted.
dec_vnode_ref_count() no longer frees vnodes that are not going to be deleted.
Instead, it will add them to an unused vnode list, so that they can be freed
if needed (currently only 512 unused vnodes will be kept around). This should
speed up the whole thing, and makes the file cache much more useful, as it's
no longer dumped after the file is closed.
fs_unmount() is not yet respecting this (ie. it doesn't free those nodes as
it should).


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10287 a95241bf-73f2-0310-859d-f6bbb57e9c96
2004-11-29 21:27:17 +00:00