Commit Graph

3378 Commits

Author SHA1 Message Date
François Revol
13abd68fc3 Merge branch 'master' into sam460ex 2012-11-10 20:36:35 +01:00
Ithamar R. Adema
3d49fa31ec VMCache: Fix broken trace statements 2012-11-10 00:32:30 +01:00
François Revol
8e75bf5845 Merge branch 'master' into sam460ex 2012-11-09 10:56:13 +01:00
Jerome Duval
5ad12a800d vm_page_allocate_page_run: use a mask to enforce the boundary
* use a mask to enforce the boundary as suggested by Ingo. Thanks!
2012-11-09 00:21:41 +01:00
François Revol
17c270bd4f Merge branch 'master' into sam460ex 2012-11-08 10:25:41 +01:00
czeidler
9abf4591d5 Ok there are some more, thanks Rene. 2012-11-07 21:45:43 +01:00
czeidler
71d45a0f76 Coding style. 2012-11-07 21:37:40 +01:00
Ithamar R. Adema
e2b8ceb23c ARM/int: remove CPU fault handler debug output 2012-11-07 17:08:15 +01:00
Ithamar R. Adema
f86b582848 ARM: Cleanup of port support code.
This also implements the fault handler correctly now, and cleans up the
exception handling. Seems a lot more stable now, no unexpected panics or
faults happening anymore.
2012-11-07 16:24:22 +01:00
Ithamar R. Adema
0cf5ecba12 ARM: Add asm_offsets.cpp
This will generate asm_offsets.h which makes our assembly code
easier to maintain by preventing hardcoded offsets for fields within structures.

(copied from X86 and removed the X86 specifics)
2012-11-07 16:24:22 +01:00
Ithamar R. Adema
ff163585ec ARM/threads: Disable debug output
Tracing was accidently switched on by a previous commit.
2012-11-07 16:24:21 +01:00
Ithamar R. Adema
0e5d97e97e ARM/vm: small formatting change and trace fix.
Copy some minor changes over from the X86 paging implementation to keep
the two reasonably aligned. Smaller diff ;-)
2012-11-07 16:24:21 +01:00
François Revol
597636d909 Merge branch 'master' into sam460ex 2012-11-06 20:17:17 +01:00
François Revol
2d014a2886 U-Boot: Fix linking the kernel by adding FDT support
Add FDT support to the kernel,
move fdt_support.cpp and declare gFDT there for the kernel.
2012-11-06 19:43:12 +01:00
Jerome Duval
8ddec5b565 vm_page_allocate_page_run: fix previous commit
* remove superfluous codes
* when aligning, sPhysicalPageOffset would be substracted twice
+alpha4

Signed-off-by: Ingo Weinhold <ingo_weinhold at gmx dot de>
2012-11-06 19:40:47 +01:00
François Revol
f24f590392 U-Boot: implement part of the OpenFirmware wrapper
We'll see later on if it's really useful to keep it around.
2012-11-06 16:41:36 +01:00
François Revol
11e7e1aa75 Merge branch 'master' into sam460ex 2012-11-06 13:35:30 +01:00
Jérôme Duval
f5a14b17df vm_page_allocate_page_run: fix for aligned page allocations
* don't enforce a zero boundary or a zero alignment
* when going to the next range, takes alignment into account.
  It could previously just be enforced again through alignment and loop infinite.
* it should help with some FreeBSD based drivers
2012-11-06 00:41:08 +01:00
François Revol
5130ac0445 Merge branch 'master' into sam460ex 2012-11-05 15:42:03 +01:00
Ithamar R. Adema
de4f3cf3a7 ARM: only warn if unknown memory types are being mapped.
This is a workaround for missing writecombine & friends support. Needs
proper fixing, but too many other things to do atm to focus on that...
2012-11-05 01:45:25 +01:00
Ithamar R. Adema
4fc1dadd58 ARM: add context switch implementation 2012-11-05 01:45:25 +01:00
Ithamar R. Adema
f8b47f2b2a ARM: fixup interrupt enable/disable/restore functions 2012-11-05 01:45:25 +01:00
Ithamar R. Adema
02081e0950 ARM: Initial implementation of interrupt/exception handling.
This contains both the common ARM(v5) vector handling as well as
the PXA(verdex) specific interrupt controller code, to be seperated
when ARM support for FDT is implemented.

Functional enough to handle interrupts, needs work on KDL support.
2012-11-05 01:45:24 +01:00
Ithamar R. Adema
be7195d0f7 ARM: add initial timer support.
Currently hardcoded to PXA (verdex) support, needs SoC abstraction
for seperating implementations, best done using FDT code as committed
by Francois.
2012-11-05 01:45:24 +01:00
Ithamar R. Adema
d09e7b5b90 ARM: mark pages found in query as present 2012-11-05 01:45:24 +01:00
Ithamar R. Adema
b867e1156e fix a TRACE() formatting string 2012-11-05 01:45:23 +01:00
Ithamar R. Adema
457556ca12 Fix variable name in TRACE() statement
Signed-off-by: Ithamar R. Adema <ithamar@upgrade-android.com>
2012-11-05 01:45:23 +01:00
François Revol
04d6229ef8 Merge branch 'master' into sam460ex 2012-11-04 15:10:36 +01:00
Jérôme Duval
12e574a316 enlarge the buffer for the CPU features string
* 256 bytes wasn't enough for i5-2557m
2012-11-04 10:35:40 +01:00
Fredrik Holmqvist
9b0d045c59 Update to ACPICA 20121018.
This is an update from 20120711 and A LOT has happened since then. See
    https://acpica.org/download/changes.txt for all the changes.
2012-11-03 22:46:22 +01:00
François Revol
813cf8cdba Merge branch 'master' into sam460ex 2012-10-09 14:26:57 +02:00
Axel Dörfler
9b9cb227c7 Consolidated and fixed device_geometry computation.
* The only implementation that would accept more than 2 TB was the one in
  scsi_disk. But even that one was limited to 63 TB.
* Now there is a new utility function devfs_compute_geometry_size() which
  does it correctly for sizes up to 2^64 which should be good enough for
  quite some time :-)
* This fixes bug #8992.
2012-10-08 13:59:16 +02:00
François Revol
3d0f413d21 Merge branch 'master' into sam460ex 2012-10-03 22:52:25 +02:00
Prasad Joshi
45132e2b22 ps: fix uid and gid in the ps output
The function fill_team_info() completely ignored the user id and the
group id of the process (fields info->uid and info->gid respectively).
Since the info structure was zeroed earlier, the ps output showed uid
and gid of each process equal to zero.

The patch fixes the problem by properly initializing the members with
effective uid and gid. Now the output is correct.

Fixes #8995.

Signed-off-by: Ryan Leavengood <leavengood@gmail.com>
2012-10-03 15:45:56 -04:00
François Revol
0e5f979720 PPC: Add a stub PPCUBoot platform class
* use the platform field in arch_kernel_args to determine which platform to instanciate
2012-09-22 22:12:56 +02:00
François Revol
9a713d9417 U-Boot: PPC: stub out OF calls
* For now this allows linking the kernel and the pci bus manager.
* Could later on be turned into a wrapper to FDT methods since the
concepts are similar.
2012-09-22 20:45:25 +02:00
Axel Dörfler
8c3a938fc3 cache_abort_sub_transaction() did not maintain num_blocks.
* When a block was only used in a sub-transaction, it was thrown away,
  but the transaction::num_blocks field was not decremented.
* This caused transactions never considered finished which eventually
  led to bug #8942. This does not explain the disk corruption occurring
  in #8969, though.
2012-09-19 20:06:19 +02:00
Alexander von Gluck IV
58f219d49f beagleboard: Fix build, missing header 2012-09-15 12:50:08 -05:00
Ingo Weinhold
1bd0748253 Fix crash in MemoryManager::PerformMaintenance()
sFreeAreaCount wasn't decremented after removing an area from
sFreeAreas, thus causing the loop to continue until enountering and
crashing on a NULL pointer after removing the last area. Introduce
helper methods _PushFreeArea() and _PopFreeArea() to ensure this cannot
easily happen again.

Fixes ticket #8972.
2012-09-11 22:31:19 +02:00
Alexander von Gluck IV
534268052d Kernel VM: Utilize swap_auto option
* Refine the swap logic a little
* Refine header copyright to preferred format
  I had hamishm's verbal permission to change his entry
2012-09-07 00:13:14 +00:00
Alexander von Gluck IV
4517ef5728 Kernel VM: A few changes as per Axel in #7742
* Avoid floating point numbers in the kernel
* Warning would always show if custom swap file in use
* Don't change a custom swap file size if low space occurs
* Ram > 1GB? Don't double the memory for the automatic size
2012-09-04 15:35:10 -05:00
Alexander von Gluck IV
3e01905aca Kernel VM: Add compatibility logic
* If old-format swap config file found, parse it properly
2012-09-04 13:27:33 -05:00
Alexander von Gluck IV
0606074fd9 Kernel VM: Improve swap file selection
* Heavily based on Hamish Morrison's GCI work with some
  modified logic and cleanup. #3723
* Adds automatic swap as well as user specified swap
* Limits:
  Automatic: (ram * 2) up to 25% of the disk
  User: user specified up to 90% of the disk
* Supports changing the swap disk location
2012-09-04 12:31:56 -05:00
Alexander von Gluck IV
3d87b8120c Kernel VM: Style cleanup; No functional change 2012-09-04 08:42:36 -05:00
Axel Dörfler
098967cee1 Fixed the new issue in #8910 from r44585.
* The ASSERT() I introduced in r44585 was incorrect: when the sub transaction
  used block_cache_get_empty() to get the block, there is no original_data for
  a reason.
* Added a test case that reproduces this situation.
* The block must be moved to the unused list in this situation, though, or else
  it might contain invalid data. Since the block can only be allocated in the
  current transaction, this should not be a problem, though, AFAICT.
2012-09-04 01:00:33 +02:00
Yongcong Du
19187c464b x86: Initialize IA32_MSR_ENERGY_PERF_BIAS
The lowest 4 bits of the MSR serves as a hint to the hardware to
favor performance or energy saving. 0 means a hint preference for
highest performance while 15 corresponds to the maximum energy
savings. A value of 7 translates into a hint to balance performance
with energy savings.

The default reset value of the MSR is 0. If BIOS doesn't intialize
the MSR, the hardware will run in performance state. This patch
initialize the MSR with value of 7 for balance between performance
and energy savings

Signed-off-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
2012-08-29 22:11:56 +02:00
Axel Dörfler
713945cecb The original_data could be freed late.
* In cache_abort_sub_transaction(), the original_data can already be freed
  when the block is being removed from the transaction.
* block_cache::_GetUnusedBlock() no longer frees original/parent data - it
  now requires them to be freed already (it makes no sense to have them still
  around at this point).
* AFAICT the previous version did not have any negative consequences besides
  freeing the original data late.
2012-08-27 20:00:06 +02:00
Axel Dörfler
9089ab06bd Minor block cache refactoring.
* Extracted a write_blocks_in_previous_transaction() function out of
  cache_end_transaction(), and cache_detach_sub_transaction().
2012-08-27 12:46:22 +02:00
Axel Dörfler
dd9d610500 Fixed broken block list introduced in hrev44357.
* cache_abort_sub_transaction() was setting the transaction_next pointer to
  NULL in order to remove a block from a transaction -- however, it forgot to
  actually remove it from the transaction's block list.
* Minor restructuring.
2012-08-27 12:42:48 +02:00
Axel Dörfler
153d895337 Fixed broken discard handling in cache_start_sub_transaction().
* This actually resolves a TODO.
2012-08-27 12:38:35 +02:00