- Rewrite the low-level trap/exception/system call code from the ground up:
authorReactOS Portable Systems Group <ros-arm-bringup@svn.reactos.org>
Tue, 8 Jul 2008 09:11:44 +0000 (09:11 +0000)
committerReactOS Portable Systems Group <ros-arm-bringup@svn.reactos.org>
Tue, 8 Jul 2008 09:11:44 +0000 (09:11 +0000)
commitb513c98fb2a36d1b3d97eefd7f6b2f2c9e3e9f02
tree6412c340be3db287cdea3aee1e071b6a13c93b72
parent8249e5ced913f25a38955fd711c76ae86f4567cb
- Rewrite the low-level trap/exception/system call code from the ground up:
  - Do not corrupt the stack anymore
  - Use a consistent trap frame layout (enable OldIrql and PreviousMode, and set the 0xBADB0D00 debug mark)
  - Use slower but more correct trap prolog/epilog code for now.
  - Generalize all prolog/epilog code into macros just like on x86. As a result, traps are now 6 lines of code.
- Rewrite the system call interface from the ground up:
  - System calls didn't actually work: a debug print made the stack layout magical enough so that they didn't normally crush, but only slowly ate the stack.
  - Copying arguments from caller to system call was, as the comment on the original code so aptly put it, "total shit".
  - Due to ABI concerns, and to provide an actual template on how you're -supposed- to implement something like system calls on RISC processors, we now use
    a model similar to BSD, but about ten times better (with that much less code too). We'll document it later on the RosPSG Wiki.
  - This code probably contains some of the most vile-yet-elegant macro magic ever written for such low-level code as system call dispatching.
- The result of all this is that we're at the same place as before (RamdiskAddDevice needs to be implemented by the Ramdisk guys) but with a sane low-level
  backend that isn't slowly eating away the stack, corrupting data, and basically working through random chance.
- Move timebase code from stubs.c to its own file, time.c.
- Silence multiple debug prints and fix a corrupted debug print in KiSystemStartup.

svn path=/trunk/; revision=34366
12 files changed:
reactos/hal/halarm/generic/hal.c
reactos/include/ndk/arm/ketypes.h
reactos/ntoskrnl/include/internal/arm/ksarm.h
reactos/ntoskrnl/include/internal/arm/kxarm.h
reactos/ntoskrnl/ke/arm/ke_i.h [new file with mode: 0644]
reactos/ntoskrnl/ke/arm/kiinit.c
reactos/ntoskrnl/ke/arm/stubs.c
reactos/ntoskrnl/ke/arm/time.c [new file with mode: 0644]
reactos/ntoskrnl/ke/arm/trap.s
reactos/ntoskrnl/ke/arm/trapc.c
reactos/ntoskrnl/ke/arm/usercall.c [new file with mode: 0644]
reactos/ntoskrnl/ntoskrnl-generic.rbuild