Commit Graph

35476 Commits

Author SHA1 Message Date
Ingo Weinhold
20a11e0220 The vm_page_num_pages() return type has changed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37234 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-23 16:16:55 +00:00
Ingo Weinhold
f3eead13e4 Changed to 64 bit physical addresses for x86. This enabled PAE support.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37233 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-23 16:10:08 +00:00
Ingo Weinhold
2a25d16d33 * get_memory_map(): Changed parameters types to fixed-width types.
* Added BeOS compatibility wrappers for get_memory_map(), map_physical_memory(),
  and create_area().


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37232 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-23 16:09:26 +00:00
Ingo Weinhold
ef4fd448b5 vm_create_anonymous_area(): Optimized the B_32_BIT_{FULL_LOCK,CONTIGUOUS}
cases for B_HAIKU_PHYSICAL_BITS > 32 and accessible physical memory < 4 GB.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37231 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-23 13:55:44 +00:00
Ingo Weinhold
b46540452a Added vm_page_max_address() which returns the greatest address of accessible
physical memory.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37230 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-23 13:52:32 +00:00
Ingo Weinhold
58bdffb967 Disabled tracing and removed a bit of debug output.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37229 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-23 13:37:53 +00:00
Ingo Weinhold
8d71819a01 Restrict B_DMA_HIGH_ADDRESS to 4 GB. AHCI can generally support 64 bit DMA,
but whether the respective controller does is indicated by a capability flag,
which we can't easily access at this point.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37228 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-23 13:36:08 +00:00
Ingo Weinhold
5e679f282f Set B_DMA_HIGH_ADDRESS to 4 GB in the ATA/IDE modules.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37227 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-23 13:31:03 +00:00
Ingo Weinhold
9fb2d73772 Replaced B_32_BIT_MEMORY by B_32_BIT_FULL_LOCK and B_32_BIT_CONTIGUOUS, so
the constraint can be expressed more precisely. ATM B_32_BIT_FULL_LOCK is
implemented as B_32_BIT_CONTIGUOUS when B_HAIKU_PHYSICAL_BITS > 32, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37226 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-23 13:29:25 +00:00
Ingo Weinhold
7b1d69ecbb Added safe mode option B_SAFEMODE_4_GB_MEMORY_LIMIT (plus a boot loader menu
item) and kernel settings option "4gb_memory_limit". Enabling either one
causes the memory beyond 4 GB to be ignored.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37225 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-23 11:13:39 +00:00
Ingo Weinhold
ff9151d11f Added ignore_physical_memory_ranges_beyond_4gb() which removes the memory
beyond 4 GB from the physical memory ranges.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37224 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-23 11:10:01 +00:00
Joachim Seemer
bdf17d41a1 Of course I missed to adjust the bolding in About after renaming from RepliShow to OverlayImage.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37223 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-22 18:11:08 +00:00
Joachim Seemer
99b6a9f151 Added a new demo: OverlayImage is based on the code presented in this article:
http://www.haiku-os.org/documents/dev/replishow_a_replicable_image_viewer

I applied Haiku's code style, added support for transparent images, a tool tip and
limited localization (how does one make it work in the replicant's about alert?)
Since I'm a c++ newbie, corrections are probably needed and welcome.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37222 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-22 17:58:12 +00:00
Ingo Weinhold
c5e722714e Reimplemented _kernel_contigmalloc() to support the physical address
restrictions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37221 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-22 12:22:35 +00:00
Ingo Weinhold
06a6bec0c0 Force 32 bit physical addresses.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37220 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-21 23:22:59 +00:00
Ingo Weinhold
3553f1894d Use the correct type for physical addresses.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37219 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-21 23:22:19 +00:00
Ingo Weinhold
6a76b51960 * Force 32 bit physical addresses.
* Added TODO about apparently ignored 64 KB boundary.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37218 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-21 23:21:07 +00:00
Ingo Weinhold
24309cde24 Fixed more issues with 64 bit physical addresses. Mostly by restricting
allocations to 32 bit.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37217 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-21 22:54:42 +00:00
Ingo Weinhold
2c9f2dcb89 map_mem(): Fixed handling of physical address parameter.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37216 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-21 22:30:47 +00:00
Ingo Weinhold
34a662eda7 Force 32 bit physical addresses. Added TODOs.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37215 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-21 22:02:31 +00:00
Ingo Weinhold
509c0b22d5 Radeon_PrepareDMA(): Fail when encountering physical addresses > 4 GB.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37214 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-21 21:48:02 +00:00
Ingo Weinhold
d108c41998 Force memory allocations to 32 bit physical addresses. The code using them
has implicit limitations (probably because the devices/controllers/... do).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37213 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-21 21:17:23 +00:00
Ingo Weinhold
2cbd922b91 Removed undead code.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37212 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-21 21:00:51 +00:00
Ingo Weinhold
fb2ec51289 Fixed build.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37211 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-21 21:00:28 +00:00
Ingo Weinhold
c53724f7bf Added work-arounds for intel_gart not being able to deal with physical
addresses > 4 GB.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37210 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-21 20:21:06 +00:00
Ingo Weinhold
160c9c661d scsi_alloc_dma_buffer():
* Use create_area_etc() instead of create_area() so we don't have to deal
  with the physical address restrictions by hand.
* Force physical addresses < 4 GB for the time being.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37209 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-21 19:25:50 +00:00
Adrien Destugues
6e608fa5fb Patch by Jorma Karvonen (#6075): translate Inspector application. Thanks!
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37208 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-21 19:10:46 +00:00
Ingo Weinhold
bf48aa4321 scsi_init_emulation_buffer():
* Use create_area_etc() instead of create_area(), so the alignment doesn't
  need to be ensured by hand.
* Use B_32_BIT_MEMORY for the time being.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37207 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-21 18:50:51 +00:00
Adrien Destugues
bb61af4f64 iPatch by Jorma Karvonen : fix warning about deprecated convertion in raw translator.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37206 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-21 18:49:53 +00:00
Ingo Weinhold
84161eb0da Removed useless code.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37205 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-21 18:26:41 +00:00
Ingo Weinhold
41ad209240 For the time being use B_32_BIT_MEMORY to allocate the auto-sense area.
Should rather use the device's DMA restrictions.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37204 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-21 18:26:12 +00:00
Ingo Weinhold
91af25d302 vm_create_anonymous_area():
* Fixed check: If a low *or* high address restriction is given, we need to
  force B_CONTIGUOUS wiring.
* Optimization: Contiguous single-page allocation can be allocated as
  full-lock, if the no low/high address restrictions are given.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37203 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-21 18:22:42 +00:00
Ingo Weinhold
ae531e279d prepare_sleep_state():
* Use the respective error types for OS and ACPICA functions.
* Don't lock the memory. The caller must do that, since there's no balancing
  function that would unlock the memory again.
* Get the memory map of the given function, not of the on-stack variable.
* Added 64 bit support and a check for the PAE case.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37202 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-21 17:15:52 +00:00
Ingo Weinhold
64cf56f5cd Force allocation of physical memory < 4 GB until the related TODOs are fixed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37201 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-21 16:47:29 +00:00
Ingo Weinhold
be87d0a03e * Added area creation "lock" constant B_32_BIT_MEMORY for physically
contiguous memory < 4 GB.
* vm_create_anonymous_area(): Implemented support for B_LOMEM and
  B_32_BIT_MEMORY.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37200 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-21 16:46:19 +00:00
Ingo Weinhold
02507604e7 read_write(): Consider a request created from an io_operation DMA safe. This
saves some checking in the bus manager.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37199 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-21 16:19:49 +00:00
Ingo Weinhold
1043be1d7c Fixed build -- code including <vm/vm.h> must be C++.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37198 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-21 16:14:31 +00:00
Ingo Weinhold
e7a5527b53 Some enum definitions were also defining variables.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37197 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-21 16:13:47 +00:00
Ingo Weinhold
0a35130cc6 Removed undead code.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37196 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-21 16:00:37 +00:00
Ingo Weinhold
13638944db Removed never read VMCache::scan_skip.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37195 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-21 15:10:37 +00:00
Ingo Weinhold
94226016cc Mark caches of null areas temporary, so we don't try to write back modified
pages when deleting the area.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37194 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-21 15:07:32 +00:00
Ingo Weinhold
2a81a99203 Optimized implementations for UnmapPages() and UnmapArea().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37193 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-21 14:43:42 +00:00
Ingo Weinhold
86b6de1fae UnmapPages(): Avoid potential integer overflow.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37192 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-21 14:28:07 +00:00
Ingo Weinhold
8bcc0694ad Simplifications and indentation correction.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37191 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-21 13:58:05 +00:00
Ingo Weinhold
a19f81b6c7 Unmap(),Protect(): Removed goto programming by a do {} while loop. Also fixed
problem with potential integer overflow at the end of the address space.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37190 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-21 13:57:00 +00:00
Ingo Weinhold
66f9974b06 Use InvalidatePage() instead of playing with the invalidation cache by hand.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37189 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-21 13:41:23 +00:00
Ingo Weinhold
c6f52e8328 Missed in r37187: Use the new VMTranslationMap::[Accessed]PageUnmapped()
helper methods to avoid code duplication.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37188 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-21 13:39:52 +00:00
Ingo Weinhold
0d5ab7a14d Moved duplicate code from the VMTranslationMap subclasses' UnmapPage() and
ClearAccessedAndModified() implementations into helper methods PageUnmapped()
and UnaccessedPageUnmapped() in the base class.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37187 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-21 13:32:33 +00:00
Adrien Destugues
e77e4cff3e Patch by Jorma Karvonen (#6080) : improve diskprobe localization.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37186 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-21 10:58:26 +00:00
Adrien Destugues
e8f533b27b Fix a bug in native version of collectcatkeys (not the one used in
buildtools) that prevented it from working at all. This fixes #4840


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37185 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-06-21 10:10:36 +00:00