Commit Graph

4839 Commits

Author SHA1 Message Date
Philippe Saint-Pierre
a65ef31585 CID 609036: Avoid to exceed length of string 2012-07-20 18:31:43 -04:00
Axel Dörfler
752f5c972f cache_abort_[sub_]transaction() did not work correctly.
* cache_abort_transaction() left the block dirty which was causing bug
  #8123 as well.
* cache_abort_sub_transaction() did, in addition to not clearing the dirty
  flag, not reset the block's transaction member either if the block was
  not part of the parent transaction.
2012-07-20 00:03:38 +02:00
Axel Dörfler
0579a69564 Added a bit of documentation, minor cleanup.
* Documented the cached_block::transaction, and previous_transaction
  members.
2012-07-20 00:03:37 +02:00
Andreas Henriksson
8959a4e0c3 An unused dirty block would put again into the unused list.
* This could cause bug #8123. While this fixes the crash, one underlying
  problem is still there, as dirty blocks should never leave a transaction.
2012-07-19 23:44:25 +02:00
Ingo Weinhold
e6418c88b5 Declare syscall_numbers.h include for x86_signals_asm.S
Fixes #8718 (again).
2012-07-13 07:08:52 +02:00
Fredrik Holmqvist
a51a5f3e1e Fixes to Haiku specific code to work with ACPICA 20120711. 2012-07-12 18:32:56 +02:00
Alex Smith
7dc738b0fb Fixed ordering of registers in arch_debug_gdb_get_registers.
Current code was sending EAX, EBX, ECX, EDX..., GDB (all versions as far
as I can tell) expects EAX, ECX, EDX, EBX... Also added missing FS and GS.
2012-07-12 15:59:50 +01:00
Ingo Weinhold
8c51cca27e Fix accidental partial revert of 0174267 2012-07-12 11:06:10 +02:00
Ingo Weinhold
b1700b2cd1 Declare syscall_numbers.h include for x86_signals.cpp
Fixes #8718.
2012-07-12 10:54:30 +02:00
Ingo Weinhold
e2d2662bc4 Automatic whitespace cleanup 2012-07-12 10:53:42 +02:00
Fredrik Holmqvist
0174267ad4 Move ACPICA files into acpica subdir and use acpica subdir layout.
This matches layout in ACPICA and keeps a cleaner boundry between
Haiku and ACPICA code. The only haiku specific file in ACPICA is
achaiku.h and it will hopefully be included upstream soon.

Merging will be simpler as we can just replace acpica contents and
fix Jamfile and build errors in our code.
2012-07-11 18:50:06 +02:00
Rene Gollent
fd04f5cc26 Fix image deletion events.
- Due to (most likely) a copy/paste error, image deletion events were
  mistakenly being sent to the userland debugger as creation events.
2012-07-08 10:50:46 -04:00
Rene Gollent
7f7b659ec5 Use safer but slower approach to copying the string. 2012-07-02 20:17:03 -04:00
Rene Gollent
29291c8c92 Cleanups/optimizations. 2012-07-02 19:42:20 -04:00
Rene Gollent
dc5a16bb70 Add TODO note with respect to needed asm implementations. 2012-07-02 15:42:38 -04:00
Rene Gollent
8695be5049 Fix regressions in arch_cpu_user_strlcpy().
- repnz movsb turns out to not actually be a legal instruction,
  resulting in various strings being copied incorrectly, leading to
  random crashes in various places. Rework to use loop instead.
  Thanks to Alex Smith for helping review changes and offering
  improvements.
- Minor cleanups.
- Fixes #8650 properly.
2012-07-02 15:07:17 -04:00
Rene Gollent
fb8447d595 Fix ticket #8650.
- Replace arch_cpu_user_strlcpy() and arch_cpu_user_memset() with x86 assembly
  versions. These correctly handle the fault handler, which had broken again
  on gcc4 for the C versions, causing stack corruption in certain error cases.
  The other architectures will still need to have corresponding asm variants
  added in order for them to not run into the same issue though.
2012-07-02 02:06:29 -04:00
Michael Lotz
5521e28415 Reuse two unused lower ASCII chars for block drawing.
Characters 17, 18 and 19 (device control 1, 2 and 3) become "full block",
"upper filled block" and "lower filled block". Using back- and foreground
color inversion these could be reduced to a single "half block", but
having them available as idividual chars is more convenient.
2012-07-01 06:37:26 +02:00
Michael Lotz
fcc4ecb0c7 Add debug_calloc() to the debug_heap. 2012-07-01 06:37:25 +02:00
Fredrik Holmqvist
91102c544e Logging calculations was done outside the #def TRACE_VM_PAGE, but never printed.
Now done inside #def as well as this triggered unused variables warnings.
2012-06-23 22:43:24 +02:00
Alexander von Gluck IV
548b1a4988 cpuid: Rework AMD CPUID numbers
* If family is 0xF, we grab extended family and model
  like Intel does
* Idenfify AMD cpu's more correctly
2012-06-04 11:01:39 -05:00
François Revol
dc09611aad U-Boot: move gFDT declaration to shell.S
* this avoids it falling into the BSS section which we clear quite late,
and allows setting it from asm code if needed.
2012-06-02 13:46:45 +02:00
François Revol
cce9d8cf89 U-Boot PPC: Enable ppc440 FPU correctly
* On ppc440, the FPU is implemented as an Auxiliary Processing Unit,
we must therefore enable sending commands to it,
in addition to setting the MSR bit.
2012-06-02 01:30:48 +02:00
Alexander von Gluck IV
b7aa0a94ff ARM platform: Undo change to MMU page table assignment
* While the baremetal arm book I have says mrc, it breaks
  verdex and doesn't work on the Pi.
* Moving the page table address to the p15 coprocessor makes
  more logical sense anyway... i think mrc was a typo.
2012-05-24 10:25:52 -05:00
François Revol
1348022133 PPC: Move asm helpers to U-Boot arch Jamfile
* the OpenFirmware arch/ppc/Jamfile already has it, so move it to avoid duplicated symbols.
2012-05-24 21:55:21 +02:00
Alexander von Gluck IV
93d5b79f06 rPi console: Implement console_wait_for_key 2012-05-24 08:53:32 -05:00
François Revol
037f252fd0 U-Boot: split cpu.cpp into arch-specific and common parts
* the common part should try to use the U-Boot API when found.
* the arch part can make use of cpu features (like timer register)
* the ppc code enables the FPU in the MSR, since it's used by vsnprintf(),
which at least saves one FP register in its prologue.
2012-05-24 21:27:37 +02:00
François Revol
3bd0ac4aa3 PPC: Add eioio as barrier for the UART class
* probably unneeded but it shouldn't harm.
2012-05-24 21:20:15 +02:00
François Revol
6ca4ac0978 PPC: Add some kernel asm helpers to the bootloader
* get/set_msr() will be useful for U-Boot.
2012-05-24 21:20:14 +02:00
François Revol
134ef79db0 U-Boot: add some sections to the ppc ldscript
* it seems ld creates most of them anyway, taken from the openfirmware script.
2012-05-24 21:20:14 +02:00
Alexander von Gluck IV
9b2efb1ad5 rPi Console: Fix console vt100 calls
* Use correct clear screen escape codes
* Use correct set cursor location escape codes
* Use correct set color escape codes
2012-05-24 06:39:43 -05:00
Alexander von Gluck IV
361ec26f10 rPi MMU: Cleanup, add gPeripheralBase
* gPeripheralBase keeps track of the device
  peripherals before and after mmu_init
* Add ability to disable mmu for troubleshooting
* Remove static FB_BASE, we actually don't know
  where the FB is yet. (depends on firmware used)
2012-05-24 06:39:43 -05:00
Alexander von Gluck IV
16307934fa rPi: Fix missing % 2012-05-24 06:39:42 -05:00
Pawel Dziepak
021ccbd18f Fix #8596: common_getgroups copies too little data
common_getgroups, when called from within the kernel, copies actualCount
bytes instead of actualCount * sizeof(gid_t) bytes.
2012-05-23 12:56:10 -04:00
Alexander von Gluck IV
4fd190af6e MMU: Add in section L1 MMU size
* Not used atm, but exists.
2012-05-22 09:07:29 -05:00
Alexander von Gluck IV
f0ba7f9400 MMU: Clean up arm L1 MMU types
* Include map for each page table type
* Reduce MMU_TYPE define name length
2012-05-22 08:30:52 -05:00
Alexander von Gluck IV
9c5e60f656 rPi MMU: Fixes to hrev44189
* I had the wrong addresses, 0x20 was the physical
  address not a mapped one.
* Attempt to map uart in mmu post mmu_init.
2012-05-22 08:30:52 -05:00
Alexander von Gluck IV
b8733e36c7 rPi MMU: Working towards mapped memory
* BCM2708 defines no longer assume 0x20 address
  We will be throwing away the blob memory mapping
  and using our own.
* Use existing blob mapping to turn GPIO led on pre mmu_init
* Remap MMU hardware addresses from 0x7E. We could map each device,
  however the kernel will throw away the mappings again anyway. For
  now we just map the whole range and use offsets.
* Serial uart no longer works, however at least
  we know why now :). Serial driver now needs to
  use mapped address.
2012-05-18 10:16:30 -05:00
Alexander von Gluck IV
e8aa6be532 rPi MMU: Enhance debugging
* TRACE calls no longer need double '('
* Added CALLED trace function
* Add better debugging output
2012-05-18 08:57:00 -05:00
Alexander von Gluck IV
249e5492c1 ARM MMU: Use MRC vs MCR for TTBR
* Verified to use MRC vs MCR multiple locations
* Small bit of style cleanup as well
* Better comment function usage
2012-05-18 08:57:00 -05:00
Alexander von Gluck IV
77591e9657 rPi: MMU Work
* Use U-Boot mmu code as base
* This will be factored out someday into common arch mmu
  code when we can read Flattened Device Trees
* Move mmu_init after serial_init.
  Temporary change as we will want serial_init to use
  memory mapped addresses... for debugging.
2012-05-18 06:36:53 -05:00
Alexander von Gluck IV
6d4270e3ce U-Boot mmu: Style cleanup, no functional change 2012-05-18 06:36:52 -05:00
François Revol
61d7e75709 U-Boot ppc: Add missing sections to ldscript
* it seems we missed some sections that exist on ppc, add them.
* resulting binary runs a little further in QEMU but still screws up.
2012-05-17 23:52:35 +02:00
François Revol
b011337e20 U-Boot: save passed FDT and call common code
* should work better this way :D
2012-05-17 20:46:46 +02:00
François Revol
de1c936185 U-Boot: include board name in uimage header
* for clarity, include the board in the uimage name field, it's long enough.
2012-05-17 19:55:27 +02:00
François Revol
7663f51c66 U-Boot: Fix ppc build
* we have an uimage for the Sam460 \o/
2012-05-17 19:41:19 +02:00
François Revol
e02218f140 Cleanup 2012-05-17 19:40:26 +02:00
François Revol
7e53f7bdc3 U-Boot: fix the guards
* mmu_init*() are used by cpu.cpp
2012-05-17 19:24:11 +02:00
François Revol
4ab5d2f998 U-Boot: Add a ppc ldscript
* mostly copied from the ARM one
2012-05-17 19:15:58 +02:00
François Revol
386671b4d0 U-Boot: Guard ARM-specific stuff
* those must be cleaned up and moved away
* allows building U-Boot loader for ppc
2012-05-17 19:10:10 +02:00