Author: ros-arm-bringup
Date: Fri Feb 8 11:20:06 2008
New Revision: 32207
URL:
http://svn.reactos.org/svn/reactos?rev=32207&view=rev
Log:
We now also implement InterlockedExchange (Fixes rtl build).
We now set -lgcc for all builds (to get built-in division helpers), and also -static (not
to import libgcc.dll -- it seems -static isn't needed on x86, but it is on ARM).
We hackfix kdcom to use the FeroUart base address -- this driver won't be used for a
while, but we need to have it built.
Now binaries are being created properly (previously kernel was 15MB and importing .DLL
files...). FreeLDR output:
FreeLoader v3.0 for ARM
Bootargs: rdbase=0x2000000 rdsize=0x1400000
Detecting Hardware...
Loading...
Reading NTOSKRNL.EXE
Reading BOOTVID.DLL
Reading HAL.DLL
Reading HAL.DLL
Reading c_1252.nls
Reading c_437.nls
Reading l_intl.nls
Reading scsiport.sys
Modified:
trunk/reactos/ReactOS-arm.rbuild
trunk/reactos/drivers/base/kdcom/kdbg.c
trunk/reactos/include/psdk/intrin_arm.h
Modified: trunk/reactos/ReactOS-arm.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ReactOS-arm.rbuild?rev=322…
==============================================================================
--- trunk/reactos/ReactOS-arm.rbuild (original)
+++ trunk/reactos/ReactOS-arm.rbuild Fri Feb 8 11:20:06 2008
@@ -33,4 +33,7 @@
<compilerflag>-Wno-attributes</compilerflag>
<compilerflag>-fno-strict-aliasing</compilerflag>
+ <linkerflag>-s</linkerflag>
+ <linkerflag>-lgcc</linkerflag>
+ <linkerflag>-static</linkerflag>
</project>
Modified: trunk/reactos/drivers/base/kdcom/kdbg.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/kdcom/kdbg.c?…
==============================================================================
--- trunk/reactos/drivers/base/kdcom/kdbg.c (original)
+++ trunk/reactos/drivers/base/kdcom/kdbg.c Fri Feb 8 11:20:06 2008
@@ -59,6 +59,8 @@
const ULONG BaseArray[2] = {0, 0x800003f8};
#elif defined(_M_MIPS)
const ULONG BaseArray[3] = {0, 0x80006000, 0x80007000};
+#elif defined(_M_ARM)
+const ULONG BaseArray[2] = {0, 0xF1012000};
#else
#error Unknown architecture
#endif
Modified: trunk/reactos/include/psdk/intrin_arm.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/intrin_arm.h?…
==============================================================================
--- trunk/reactos/include/psdk/intrin_arm.h (original)
+++ trunk/reactos/include/psdk/intrin_arm.h Fri Feb 8 11:20:06 2008
@@ -72,6 +72,17 @@
return a;
}
+static __inline__ __attribute__((always_inline)) long _InterlockedExchange(volatile long
* const dest, const long exch)
+{
+ long a;
+
+ __asm__ __volatile__ ( "swp %0, %2, [%1]"
+ : "=&r" (a)
+ : "r" (dest), "r" (exch));
+
+ return a;
+}
+
static __inline__ __attribute__((always_inline)) char _InterlockedAnd8(volatile char *
const value, const char mask)
{
char x;