ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
March 2005
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
26 participants
609 discussions
Start a n
N
ew thread
[sedwards] 14395: remove these control panels, they never worked
by sedwards@svn.reactos.com
remove these control panels, they never worked Deleted: trunk/rosapps/ctlpanel/
19 years, 8 months
1
0
0
0
[sedwards] 14394: add a inline strupr for us Unix folk
by sedwards@svn.reactos.com
add a inline strupr for us Unix folk Modified: branches/xmlbuildsystem/reactos/tools/rbuild/pch.h _____ Modified: branches/xmlbuildsystem/reactos/tools/rbuild/pch.h --- branches/xmlbuildsystem/reactos/tools/rbuild/pch.h 2005-03-31 19:33:50 UTC (rev 14393) +++ branches/xmlbuildsystem/reactos/tools/rbuild/pch.h 2005-03-31 19:54:03 UTC (rev 14394) @@ -19,6 +19,8 @@ #endif #ifndef WIN32 +#include <string.h> +#include <ctype.h> #include <wctype.h> #include <math.h> @@ -29,7 +31,15 @@ *p++ = tolower(*p); return str; } - + +inline char* strupr ( char* str ) +{ + char *c = str; + while ( *str++ ) + toupper( *str ); + return c; +} + #define _finite __finite #define _isnan __isnan #define stricmp strcasecmp
19 years, 8 months
1
0
0
0
[hpoussin] 14393: Add OBJ_KERNEL_HANDLE value
by hpoussin@svn.reactos.com
Add OBJ_KERNEL_HANDLE value Modified: trunk/reactos/w32api/include/ntdef.h _____ Modified: trunk/reactos/w32api/include/ntdef.h --- trunk/reactos/w32api/include/ntdef.h 2005-03-31 18:26:31 UTC (rev 14392) +++ trunk/reactos/w32api/include/ntdef.h 2005-03-31 19:33:50 UTC (rev 14393) @@ -5,13 +5,16 @@ #endif #define NTAPI __stdcall -#define OBJ_INHERIT 2L -#define OBJ_PERMANENT 16L -#define OBJ_EXCLUSIVE 32L -#define OBJ_CASE_INSENSITIVE 64L -#define OBJ_OPENIF 128L -#define OBJ_OPENLINK 256L -#define OBJ_VALID_ATTRIBUTES 498L +#define OBJ_INHERIT 0x00000002 +#define OBJ_PERMANENT 0x00000010 +#define OBJ_EXCLUSIVE 0x00000020 +#define OBJ_CASE_INSENSITIVE 0x00000040 +#define OBJ_OPENIF 0x00000080 +#define OBJ_OPENLINK 0x00000100 +#define OBJ_KERNEL_HANDLE 0x00000200 +#define OBJ_VALID_ATTRIBUTES (OBJ_KERNEL_HANDLE | OBJ_OPENLINK | \ + OBJ_OPENIF | OBJ_CASE_INSENSITIVE | OBJ_EXCLUSIVE | \ + OBJ_PERMANENT | OBJ_INHERIT) #define InitializeObjectAttributes(p,n,a,r,s) { \ (p)->Length = sizeof(OBJECT_ATTRIBUTES); \ (p)->RootDirectory = (r); \
19 years, 8 months
1
0
0
0
[blight] 14392: Fix little bug.
by blight@svn.reactos.com
Fix little bug. Modified: trunk/reactos/ntoskrnl/dbg/kdb.c _____ Modified: trunk/reactos/ntoskrnl/dbg/kdb.c --- trunk/reactos/ntoskrnl/dbg/kdb.c 2005-03-31 17:11:43 UTC (rev 14391) +++ trunk/reactos/ntoskrnl/dbg/kdb.c 2005-03-31 18:26:31 UTC (rev 14392) @@ -1413,6 +1413,7 @@ /* Exception inside the debugger? Game over. */ if (InterlockedIncrement(&KdbEntryCount) > 1) { + Ke386RestoreFlags(OldEflags); return kdHandleException; }
19 years, 8 months
1
0
0
0
[robertk] 14391: changed target arc for the release to i586 for better optimization
by robertk@svn.reactos.com
changed target arc for the release to i586 for better optimization Modified: branches/ros-branch-0_2_6/reactos/config _____ Modified: branches/ros-branch-0_2_6/reactos/config --- branches/ros-branch-0_2_6/reactos/config 2005-03-31 17:09:15 UTC (rev 14390) +++ branches/ros-branch-0_2_6/reactos/config 2005-03-31 17:11:43 UTC (rev 14391) @@ -14,7 +14,7 @@ # be optimized for. # -OARCH := i486 +OARCH := i586 # # Whether to compile in the kernel debugger
19 years, 8 months
1
0
0
0
[robertk] 14390: potential revision for RC2
by robertk@svn.reactos.com
potential revision for RC2 Modified: branches/ros-branch-0_2_6/reactos/include/reactos/version.h _____ Modified: branches/ros-branch-0_2_6/reactos/include/reactos/version.h --- branches/ros-branch-0_2_6/reactos/include/reactos/version.h 2005-03-31 16:08:09 UTC (rev 14389) +++ branches/ros-branch-0_2_6/reactos/include/reactos/version.h 2005-03-31 17:09:15 UTC (rev 14390) @@ -22,7 +22,7 @@ #define KERNEL_VERSION_PATCH_LEVEL 6 /* KERNEL_VERSION_BUILD_TYPE is L"SVN", L"RC1", L"RC2" or L"RELEASE" */ -#define KERNEL_VERSION_BUILD_TYPE L"RC1" +#define KERNEL_VERSION_BUILD_TYPE L"RC2" #endif
19 years, 8 months
1
0
0
0
[blight] 14389: * Move the KdbEntryCount (check for exception inside KDB) into the critical section to prevent KDB from not handling simultaneous exceptions correctly.
by blight@svn.reactos.com
* Move the KdbEntryCount (check for exception inside KDB) into the critical section to prevent KDB from not handling simultaneous exceptions correctly. * Flush input when KDB is entered. * Detect if terminal is connected and filter out escape sequences if no terminal is present. Modified: trunk/reactos/ntoskrnl/dbg/kdb.c Modified: trunk/reactos/ntoskrnl/dbg/kdb_cli.c _____ Modified: trunk/reactos/ntoskrnl/dbg/kdb.c --- trunk/reactos/ntoskrnl/dbg/kdb.c 2005-03-31 14:23:11 UTC (rev 14388) +++ trunk/reactos/ntoskrnl/dbg/kdb.c 2005-03-31 16:08:09 UTC (rev 14389) @@ -1141,12 +1141,6 @@ BOOLEAN EnterConditionMet = TRUE; ULONG OldEflags; - /* Exception inside the debugger? Game over. */ - if (InterlockedIncrement(&KdbEntryCount) > 1) - { - return kdHandleException; - } - KdbCurrentProcess = PsGetCurrentProcess(); /* Set continue type to kdContinue for single steps and breakpoints */ @@ -1342,7 +1336,6 @@ { if (!EnterConditionMet) { - InterlockedDecrement(&KdbEntryCount); return ContinueType; } DbgPrint("Entered debugger on unexpected debug trap!\n"); @@ -1357,7 +1350,6 @@ } if (!EnterConditionMet) { - InterlockedDecrement(&KdbEntryCount); return ContinueType; } @@ -1372,7 +1364,6 @@ if (!EnterConditionMet) { - InterlockedDecrement(&KdbEntryCount); return ContinueType; } @@ -1419,6 +1410,12 @@ Ke386SaveFlags(OldEflags); Ke386DisableInterrupts(); + /* Exception inside the debugger? Game over. */ + if (InterlockedIncrement(&KdbEntryCount) > 1) + { + return kdHandleException; + } + /* Call the main loop. */ KdbpInternalEnter(); @@ -1461,6 +1458,9 @@ "r"(KdbTrapFrame.Cr3), "r"(KdbTrapFrame.Cr4)); #endif + /* Decrement the entry count */ + InterlockedDecrement(&KdbEntryCount); + /* Leave critical section */ Ke386RestoreFlags(OldEflags); @@ -1479,7 +1479,6 @@ } - InterlockedDecrement(&KdbEntryCount); return ContinueType; } _____ Modified: trunk/reactos/ntoskrnl/dbg/kdb_cli.c --- trunk/reactos/ntoskrnl/dbg/kdb_cli.c 2005-03-31 14:23:11 UTC (rev 14388) +++ trunk/reactos/ntoskrnl/dbg/kdb_cli.c 2005-03-31 16:08:09 UTC (rev 14389) @@ -1678,11 +1678,12 @@ { STATIC CHAR Buffer[4096]; STATIC BOOLEAN TerminalInitialized = FALSE; + STATIC BOOLEAN TerminalConnected = FALSE; STATIC BOOLEAN TerminalReportsSize = TRUE; CHAR c = '\0'; - PCHAR p; + PCHAR p, p2; INT Length; - INT i; + INT i, j; INT RowsPrintedByTerminal; ULONG ScanCode; va_list ap; @@ -1695,7 +1696,25 @@ if (!TerminalInitialized) { DbgPrint("\x1b[7h"); /* Enable linewrap */ + + /* Query terminal type */ + /*DbgPrint("\x1b[Z");*/ + DbgPrint("\x05"); + TerminalInitialized = TRUE; + Length = 0; + for (;;) + { + c = KdbpTryGetCharSerial(5000); + if (c == -1) + break; + Buffer[Length++] = c; + if (Length >= (sizeof (Buffer) - 1)) + break; + } + Buffer[Length] = '\0'; + if (Length > 0) + TerminalConnected = TRUE; } /* Get number of rows and columns in terminal */ @@ -1706,17 +1725,17 @@ { /* Try to query number of rows from terminal. A reply looks like "\x1b[8;24;80t" */ TerminalReportsSize = FALSE; - //DbgPrint("\x1b[18t"); - c = KdbpTryGetCharSerial(10); + DbgPrint("\x1b[18t"); + c = KdbpTryGetCharSerial(5000); if (c == KEY_ESC) { - c = KdbpTryGetCharSerial(5); + c = KdbpTryGetCharSerial(5000); if (c == '[') { Length = 0; for (;;) { - c = KdbpTryGetCharSerial(5); + c = KdbpTryGetCharSerial(5000); if (c == -1) break; Buffer[Length++] = c; @@ -1815,6 +1834,20 @@ { c = '\0'; } + + /* Remove escape sequences from the line if there's no terminal connected */ + if (!TerminalConnected) + { + while ((p2 = strrchr(p, '\x1b')) != NULL) /* Look for escape character */ + { + if (p2[1] == '[') + { + j = 2; + while (!isalpha(p2[j++])); + strcpy(p2, p2 + j); + } + } + } DbgPrint("%s", p); @@ -1920,12 +1953,12 @@ OUT PCHAR Buffer, IN ULONG Size) { - CHAR Key, NextKey; + CHAR Key; PCHAR Orig = Buffer; ULONG ScanCode = 0; BOOLEAN EchoOn; STATIC CHAR LastCommand[1024] = ""; - STATIC CHAR LastKey = '\0'; + STATIC CHAR NextKey = '\0'; INT CmdHistIndex = -1; INT i; @@ -1935,7 +1968,7 @@ { if (KdDebugState & KD_DEBUG_KDSERIAL) { - Key = KdbpGetCharSerial(); + Key = (NextKey == '\0') ? KdbpGetCharSerial() : NextKey; ScanCode = 0; if (Key == KEY_ESC) /* ESC */ { @@ -1961,7 +1994,8 @@ } else { - Key = KdbpGetCharKeyboard(&ScanCode); + ScanCode = 0; + Key = (NextKey == '\0') ? KdbpGetCharKeyboard(&ScanCode) : NextKey; } if ((Buffer - Orig) >= (Size - 1)) @@ -1980,6 +2014,8 @@ NextKey = KdbpTryGetCharSerial(5); else NextKey = KdbpTryGetCharKeyboard(&ScanCode, 5); + if (NextKey == '\n') + NextKey = '\0'; DbgPrint("\n"); /* * Repeat the last command if the user presses enter. Reduces the @@ -1996,7 +2032,6 @@ strncpy(LastCommand, Orig, sizeof (LastCommand)); LastCommand[sizeof (LastCommand) - 1] = '\0'; } - LastKey = Key; return; } else if (Key == KEY_BS || Key == KEY_DEL) @@ -2079,7 +2114,6 @@ *Buffer = Key; Buffer++; } - LastKey = Key; } } @@ -2163,6 +2197,18 @@ DbgPrint("\n"); } + /* Flush the input buffer */ + if (KdDebugState & KD_DEBUG_KDSERIAL) + { + while (KdbpTryGetCharSerial(1) != -1); + } + else + { + ULONG ScanCode; + while (KdbpTryGetCharKeyboard(&ScanCode, 1) != -1); + } + + /* Main loop */ do { /* Print the prompt */
19 years, 8 months
1
0
0
0
[weiden] 14388: don't bugcheck on object type mismatch in PsLookupCidHandle
by weiden@svn.reactos.com
don't bugcheck on object type mismatch in PsLookupCidHandle Modified: trunk/reactos/ntoskrnl/ps/cid.c _____ Modified: trunk/reactos/ntoskrnl/ps/cid.c --- trunk/reactos/ntoskrnl/ps/cid.c 2005-03-31 13:52:49 UTC (rev 14387) +++ trunk/reactos/ntoskrnl/ps/cid.c 2005-03-31 14:23:11 UTC (rev 14388) @@ -119,7 +119,6 @@ &ObjectType->TypeName, Entry->u2.GrantedAccess); ExUnlockHandleTableEntry(PspCidTable, Entry); - KEBUGCHECK(0); } }
19 years, 8 months
1
0
0
0
[ion] 14387: Clean up catch.c
by ion@svn.reactos.com
Clean up catch.c Modified: trunk/reactos/ntoskrnl/ke/catch.c _____ Modified: trunk/reactos/ntoskrnl/ke/catch.c --- trunk/reactos/ntoskrnl/ke/catch.c 2005-03-31 09:30:29 UTC (rev 14386) +++ trunk/reactos/ntoskrnl/ke/catch.c 2005-03-31 13:52:49 UTC (rev 14387) @@ -4,7 +4,8 @@ * FILE: ntoskrnl/ke/catch.c * PURPOSE: Exception handling * - * PROGRAMMERS: David Welch (welch(a)mcmail.com) + * PROGRAMMERS: Anich Gregor + * David Welch (welch(a)mcmail.com) * Casper S. Hornstrup (chorns(a)users.sourceforge.net) */ @@ -18,7 +19,7 @@ ULONG RtlpDispatchException(IN PEXCEPTION_RECORD ExceptionRecord, - IN PCONTEXT Context); + IN PCONTEXT Context); /* * @unimplemented @@ -56,13 +57,15 @@ /* Increase number of Exception Dispatches */ KeGetCurrentPrcb()->KeExceptionDispatchCount++; - if (!Context) { + if (!Context) + { /* Assume Full context */ TContext.ContextFlags = CONTEXT_FULL; /* Check the mode */ - if (PreviousMode == UserMode) { + if (PreviousMode == UserMode) + { /* Add Debugger Registers if this is User Mode */ TContext.ContextFlags = TContext.ContextFlags | CONTEXT_DEBUGGER; @@ -76,13 +79,15 @@ } #if 0 /* FIXME: Isn't this right? With a break after? */ - if (ExceptionRecord->ExceptionCode == STATUS_BREAKPOINT) { + if (ExceptionRecord->ExceptionCode == STATUS_BREAKPOINT) + { Context->Eip--; } #endif /* Check if a Debugger is enabled */ - if (KdDebuggerEnabled && KdDebugState & KD_DEBUG_GDB) { + if (KdDebuggerEnabled && KdDebugState & KD_DEBUG_GDB) + { /* Break into it */ Action = KdEnterDebuggerException (ExceptionRecord, Context, Tf); @@ -92,13 +97,16 @@ if (Action == kdContinue) return; /* If the Debugger couldn't handle it... */ - if (Action != kdDoNotHandleException) { + if (Action != kdDoNotHandleException) + { /* See what kind of Exception this is */ - if (PreviousMode == UserMode) { + if (PreviousMode == UserMode) + { /* User mode exception, search the frames if we have to */ - if (SearchFrames) { + if (SearchFrames) + { PULONG Stack; ULONG CDest; @@ -140,12 +148,15 @@ (12 + sizeof(EXCEPTION_RECORD) + sizeof(CONTEXT))); /* Check for success */ - if (NT_SUCCESS(StatusOfCopy)) { + if (NT_SUCCESS(StatusOfCopy)) + { /* Set new Stack Pointer */ Tf->Esp = (ULONG)pNewUserStack; - } else { + } + else + { /* * Now it really hit the ventilation device. Sorry, @@ -180,7 +191,9 @@ DPRINT1("Unhandled UserMode exception, terminating thread\n"); ZwTerminateThread(NtCurrentThread(), ExceptionRecord->ExceptionCode); - } else { + } + else + { /* This is Kernel Mode */ #ifdef KDBG @@ -201,7 +214,8 @@ /* If RtlpDispatchException() did not handle the exception then bugcheck */ if (Value != ExceptionContinueExecution || - 0 != (ExceptionRecord->ExceptionFlags & EXCEPTION_NONCONTINUABLE)) { + 0 != (ExceptionRecord->ExceptionFlags & EXCEPTION_NONCONTINUABLE)) + { DPRINT("ExceptionRecord->ExceptionAddress = 0x%x\n", ExceptionRecord->ExceptionAddress); #ifdef KDBG
19 years, 8 months
1
0
0
0
[arty] 14386: Added boot carrier for freeldr. I'm at the point where I need to do
by arty@svn.reactos.com
Added boot carrier for freeldr. I'm at the point where I need to do something about the mac disklabel, because freeldr is trying to read a PC partition table. I'll need to sleep on it a bit. Modified: trunk/reactos/boot/freeldr/Makefile Modified: trunk/reactos/boot/freeldr/bootsect/Makefile Added: trunk/reactos/boot/freeldr/bootsect/Makefile.i386 Added: trunk/reactos/boot/freeldr/bootsect/Makefile.powerpc Added: trunk/reactos/boot/freeldr/bootsect/ofwboot.s _____ Modified: trunk/reactos/boot/freeldr/Makefile --- trunk/reactos/boot/freeldr/Makefile 2005-03-30 22:04:56 UTC (rev 14385) +++ trunk/reactos/boot/freeldr/Makefile 2005-03-31 09:30:29 UTC (rev 14386) @@ -29,7 +29,7 @@ $(MAKE) -C fdebug test: - + clean: $(MAKE) -C bootsect clean $(MAKE) -C freeldr clean @@ -38,6 +38,7 @@ $(MAKE) -C tools clean bootcd: +ifeq ($(ARCH),i386) $(CP) bootsect/isoboot.bin ${BOOTCD_DIR}/../isoboot.bin $(CP) bootsect/dosmbr.bin ${BOOTCD_DIR}/loader/dosmbr.bin $(CP) bootsect/ext2.bin ${BOOTCD_DIR}/loader/ext2.bin @@ -46,5 +47,6 @@ $(CP) bootsect/isoboot.bin ${BOOTCD_DIR}/loader/isoboot.bin $(CP) freeldr/freeldr.sys ${BOOTCD_DIR}/loader/freeldr.sys $(CP) freeldr/setupldr.sys ${BOOTCD_DIR}/loader/setupldr.sys +endif .PHONY : clean _____ Modified: trunk/reactos/boot/freeldr/bootsect/Makefile --- trunk/reactos/boot/freeldr/bootsect/Makefile 2005-03-30 22:04:56 UTC (rev 14385) +++ trunk/reactos/boot/freeldr/bootsect/Makefile 2005-03-31 09:30:29 UTC (rev 14386) @@ -25,56 +25,8 @@ .PHONY : clean bootcd -all: $(BIN2C) dosmbr.bin fat.bin fat32.bin isoboot.bin ext2.bin - - -$(BIN2C) : - @$(MAKE) --no-print-directory -C $(FREELDR_TOOLS_PATH) - -dosmbr.bin : dosmbr.asm - @echo freeldr: Assembling dosmbr - @$(NASM_CMD) $(NFLAGS) -o dosmbr.bin -f bin dosmbr.asm - -fat.bin : fat.asm $(BIN2C) - @echo freeldr: Assembling fat - @$(NASM_CMD) $(NFLAGS) -o fat.bin -f bin fat.asm - @$(BIN2C) fat.bin fat.h fat_data - - -fat32.bin : fat32.asm $(BIN2C) - @echo freeldr: Assembling fat32 - @$(NASM_CMD) $(NFLAGS) -o fat32.bin -f bin fat32.asm - @$(BIN2C) fat32.bin fat32.h fat32_data - -isoboot.bin : isoboot.asm - @echo freeldr: Assembling isoboot - @$(NASM_CMD) $(NFLAGS) -o isoboot.bin -f bin isoboot.asm - -ext2.bin : ext2.asm - @echo freeldr: Assembling ext2 - @$(NASM_CMD) $(NFLAGS) -o ext2.bin -f bin ext2.asm - @$(BIN2C) ext2.bin ext2.h ext2_data - - -.PHONY : bootcd -bootcd: bootcd_dirs isoboot.bin - $(CP) isoboot.bin $(BOOTCD_DIR) - $(CP) dosmbr.bin $(BOOTCD_DIR)/disk/loader - $(CP) ext2.bin $(BOOTCD_DIR)/disk/loader - $(CP) fat.bin $(BOOTCD_DIR)/disk/loader - $(CP) fat32.bin $(BOOTCD_DIR)/disk/loader - $(CP) isoboot.bin $(BOOTCD_DIR)/disk/loader - -.PHONY : bootcd_dirs -bootcd_dirs: - $(MKDIR) $(BOOTCD_DIR) - $(MKDIR) $(BOOTCD_DIR)/disk - $(MKDIR) $(BOOTCD_DIR)/disk/reactos - $(MKDIR) $(BOOTCD_DIR)/disk/install - $(MKDIR) $(BOOTCD_DIR)/disk/bootdisk - $(MKDIR) $(BOOTCD_DIR)/disk/loader - -clean: - @-$(RM) *.bin - @-$(RM) *.h - @echo freeldr: Clean ALL done. +ifeq ($(ARCH),powerpc) +include Makefile.powerpc +else +include Makefile.i386 +endif _____ Added: trunk/reactos/boot/freeldr/bootsect/Makefile.i386 --- trunk/reactos/boot/freeldr/bootsect/Makefile.i386 2005-03-30 22:04:56 UTC (rev 14385) +++ trunk/reactos/boot/freeldr/bootsect/Makefile.i386 2005-03-31 09:30:29 UTC (rev 14386) @@ -0,0 +1,52 @@ +all: $(BIN2C) dosmbr.bin fat.bin fat32.bin isoboot.bin ext2.bin + +$(BIN2C) : + @$(MAKE) --no-print-directory -C $(FREELDR_TOOLS_PATH) + +dosmbr.bin : dosmbr.asm + @echo ===================================================== Assembling dosmbr + @$(NASM_CMD) $(NFLAGS) -o dosmbr.bin -f bin dosmbr.asm + +fat.bin : fat.asm $(BIN2C) + @echo ===================================================== Assembling fat + @$(NASM_CMD) $(NFLAGS) -o fat.bin -f bin fat.asm + @$(BIN2C) fat.bin fat.h fat_data + + +fat32.bin : fat32.asm $(BIN2C) + @echo ===================================================== Assembling fat32 + @$(NASM_CMD) $(NFLAGS) -o fat32.bin -f bin fat32.asm + @$(BIN2C) fat32.bin fat32.h fat32_data + +isoboot.bin : isoboot.asm + @echo ===================================================== Assembling isoboot + @$(NASM_CMD) $(NFLAGS) -o isoboot.bin -f bin isoboot.asm + +ext2.bin : ext2.asm + @echo ===================================================== Assembling ext2 + @$(NASM_CMD) $(NFLAGS) -o ext2.bin -f bin ext2.asm + @$(BIN2C) ext2.bin ext2.h ext2_data + + +.PHONY : bootcd +bootcd: bootcd_dirs isoboot.bin + $(CP) isoboot.bin $(BOOTCD_DIR) + $(CP) dosmbr.bin $(BOOTCD_DIR)/disk/loader + $(CP) ext2.bin $(BOOTCD_DIR)/disk/loader + $(CP) fat.bin $(BOOTCD_DIR)/disk/loader + $(CP) fat32.bin $(BOOTCD_DIR)/disk/loader + $(CP) isoboot.bin $(BOOTCD_DIR)/disk/loader + +.PHONY : bootcd_dirs +bootcd_dirs: + $(MKDIR) $(BOOTCD_DIR) + $(MKDIR) $(BOOTCD_DIR)/disk + $(MKDIR) $(BOOTCD_DIR)/disk/reactos + $(MKDIR) $(BOOTCD_DIR)/disk/install + $(MKDIR) $(BOOTCD_DIR)/disk/bootdisk + $(MKDIR) $(BOOTCD_DIR)/disk/loader + +clean: + @-$(RM) *.bin + @-$(RM) *.h + @echo Clean ALL done. _____ Added: trunk/reactos/boot/freeldr/bootsect/Makefile.powerpc --- trunk/reactos/boot/freeldr/bootsect/Makefile.powerpc 2005-03-30 22:04:56 UTC (rev 14385) +++ trunk/reactos/boot/freeldr/bootsect/Makefile.powerpc 2005-03-31 09:30:29 UTC (rev 14386) @@ -0,0 +1,35 @@ +TOOLS=$(PATH_TO_TOP)/tools +SECTIONS= \ + --only-section=.text \ + --only-section=.data \ + --only-section=.bss +LDSECT= -Ttext 0xe00000 -Tdata 0xe10000 +OBJS=ofwboot.o freeldr.o +CFLAGS=-mbig -meabi -fPIC -fno-builtin -I../freeldr/include +FREELDR=../freeldr/freeldr.sys + +.SUFFIXES: .c .o + +all: ofwldr + +hack-coff$(EXEEXT): + $(HOST_CC) -I../freeldr/include hack-coff.c -o $@ + +ofwboot.o: ofwboot.s + $(NASM_CMD) $< -c -o $@ + +$(FREELDR): + $(MAKE) -C ../freeldr + +freeldr.o: $(FREELDR) + $(TOOLS)/ppc-le2be $< freeldr.tmp + $(OBJCOPY) -I binary -O elf32-powerpc -B powerpc:common freeldr.tmp $@ + rm freeldr.tmp + +ofwldr: $(OBJS) + mppcw32-ld --no-omagic $(LDSECT) $(OBJS) -g -o $@.elf + mppcw32-objcopy $(SECTIONS) -O aixcoff-rs6000 $@.elf $@ + $(TOOLS)/hack-coff $@ + +clean: + rm -rf ofwldr *.o *.elf *.tmp _____ Added: trunk/reactos/boot/freeldr/bootsect/ofwboot.s --- trunk/reactos/boot/freeldr/bootsect/ofwboot.s 2005-03-30 22:04:56 UTC (rev 14385) +++ trunk/reactos/boot/freeldr/bootsect/ofwboot.s 2005-03-31 09:30:29 UTC (rev 14386) @@ -0,0 +1,960 @@ + .section .text +_start: + .long 0xe00000 + 12 + .long 0 + .long 0 + +/* + * LIFTED FROM arch/macppc/stand/ofwboot/Locore.c + * Copyright (C) 1995, 1996 Wolfgang Solfrank. + * Copyright (C) 1995, 1996 TooLs GmbH. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by TooLs GmbH. + * 4. The name of TooLs GmbH may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY TOOLS GMBH ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL TOOLS GMBH BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES ; LOSS OF USE, DATA, OR PROFITS; + * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +_begin: + sync + isync + + lis %r1,stack@ha + addi %r1,%r1,stack@l + addi %r1,%r1,16384 - 0x10 + + mfmsr %r8 + li %r0,0 + mtmsr %r0 + isync + + mtibatu 0,%r0 + mtibatu 1,%r0 + mtibatu 2,%r0 + mtibatu 3,%r0 + mtdbatu 0,%r0 + mtdbatu 1,%r0 + mtdbatu 2,%r0 + mtdbatu 3,%r0 + + li %r9,0x12 /* BATL(0, BAT_M, BAT_PP_RW) */ + mtibatl 0,%r9 + mtdbatl 0,%r9 + li %r9,0x1ffe /* BATU(0, BAT_BL_256M, BAT_Vs) */ + mtibatu 0,%r9 + mtdbatu 0,%r9 + isync + + li %r8,0x3030 + mtmsr %r8 + + /* Store ofw call addr */ + mr %r21,%r5 + lis %r10,0xe00000@ha + stw %r5,ofw_call_addr - _start@l(%r10) + + lis %r4,_binary_freeldr_tmp_end@ha + addi %r4,%r4,_binary_freeldr_tmp_end@l + lis %r3,_binary_freeldr_tmp_start@ha + addi %r3,%r3,_binary_freeldr_tmp_start@l + + lis %r5,0x8000@ha + addi %r5,%r5,0x8000@l + + bl copy_bits + + bl zero_registers + + lis %r3,0xe00000@ha + addi %r3,%r3,freeldr_banner - _start + + bl ofw_print_string + + bl ofw_print_eol + + /* Zero CTR */ + mtcr %r31 + + lis %r3,0x8000@ha + addi %r3,%r3,0x8000@l + + mtlr %r3 + + lis %r3,call_ofw@ha + addi %r3,%r3,call_ofw - _start + + b call_freeldr + + .align 4 +call_freeldr: + /* Get the address of the functions list -- + * Note: + * Because of little endian switch we must use an even number of + * instructions here.. Pad with a nop if needed. */ + mfmsr %r10 + ori %r10,%r10,1 + mtmsr %r10 + + nop + + /* Note that this is little-endian from here on */ + blr + nop + + .align 4 +call_ofw: + /* R3 has the function offset to call (n * 4) + * Other arg registers are unchanged. + * Note that these 4 instructions are in reverse order due to + * little-endian convention */ + andi. %r0,%r0,65534 + mfmsr %r0 + mtmsr %r0 + /* Now normal ordering resumes */ + subi %r1,%r1,0x100 + + stw %r8,4(%r1) + stw %r9,8(%r1) + stw %r10,12(%r1) + mflr %r8 + stw %r8,16(%r1) + + lis %r10,0xe00000@ha + add %r9,%r3,%r10 + lwz %r3,ofw_functions - _start@l(%r9) + mtctr %r3 + + mr %r3,%r4 + mr %r4,%r5 + mr %r5,%r6 + mr %r6,%r7 + mr %r7,%r8 + + /* Goto the swapped function */ + bctrl + + lwz %r8,16(%r1) + mtlr %r8 + + lwz %r8,4(%r1) + lwz %r9,8(%r1) + lwz %r10,12(%r1) + + addi %r1,%r1,0x100 + /* Ok, go back to little endian */ + mfmsr %r0 + ori %r0,%r0,1 + mtmsr %r0 + + /* Note that this is little-endian from here on */ + blr + nop + +zero_registers: + xor %r2,%r2,%r2 + mr %r0,%r2 + mr %r3,%r2 + + mr %r4,%r2 + mr %r5,%r2 + mr %r6,%r2 + mr %r7,%r2 + + mr %r8,%r2 + mr %r9,%r2 + mr %r10,%r2 + mr %r11,%r2 + + mr %r12,%r2 + mr %r13,%r2 + mr %r14,%r2 + mr %r15,%r2 + + mr %r12,%r2 + mr %r13,%r2 + mr %r14,%r2 + mr %r15,%r2 + + mr %r16,%r2 + mr %r17,%r2 + mr %r18,%r2 + mr %r19,%r2 + + mr %r20,%r2 + mr %r21,%r2 + mr %r22,%r2 + mr %r23,%r2 + + mr %r24,%r2 + mr %r25,%r2 + mr %r26,%r2 + mr %r27,%r2 + + mr %r28,%r2 + mr %r29,%r2 + mr %r30,%r2 + mr %r31,%r2 + + blr + +prim_strlen: + mr %r5,%r3 +prim_strlen_loop: + lbz %r4,0(%r3) + cmpi 0,0,%r4,0 + beq prim_strlen_done + addi %r3,%r3,1 + b prim_strlen_loop + +prim_strlen_done: + sub %r3,%r3,%r5 + blr + +copy_bits: + cmp 0,0,%r3,%r4 + beqlr + lwz %r6,0(%r3) + stw %r6,0(%r5) + addi %r3,%r3,4 + addi %r5,%r5,4 + b copy_bits + +ofw_print_string_hook: + bl ofw_print_number + bl ofw_exit + +ofw_print_string: + /* Reserve some stack space */ + subi %r1,%r1,32 + + /* Save args */ + stw %r3,0(%r1) + + /* Save the lr, a scratch register */ + stw %r8,8(%r1) + mflr %r8 + stw %r8,12(%r1) + + /* Load the package name */ + lis %r3,0xe00000@ha + addi %r3,%r3,ofw_chosen_name - _start + + /* Fire */ + bl ofw_finddevice + + /* Load up for getprop */ + stw %r3,16(%r1) + + lis %r4,0xe00000@ha + addi %r4,%r4,ofw_stdout_name - _start + + addi %r5,%r1,20 + + li %r6,4 + + bl ofw_getprop + + /* Measure the string and remember the length */ + lwz %r3,0(%r1) + bl prim_strlen + mr %r5,%r3 + + lwz %r3,20(%r1) + lwz %r4,0(%r1) + + /* Write the string */ + bl ofw_write + + /* Return */ + lwz %r8,12(%r1) + mtlr %r8 + lwz %r8,8(%r1) + + addi %r1,%r1,32 + blr + + /* Print 8 hex digits representing a number in r3 */ +ofw_print_number: + subi %r1,%r1,32 + stw %r8,0(%r1) + mflr %r8 + stw %r8,4(%r1) + stw %r9,8(%r1) + + xor %r9,%r9,%r9 + stw %r9,12(%r1) + + /* Set up and, devide, shift */ + mr %r8,%r3 + lis %r6,0xf0000000@ha + lis %r7,0x10000000@ha + li %r9,8 + +ofw_number_loop: + nop + cmpi 0,0,%r9,0 + beq ofw_number_return + subi %r9,%r9,1 + + /* Body: isolate digit, divide, print */ + and %r5,%r6,%r8 + divwu %r4,%r5,%r7 + srwi %r6,%r6,4 + srwi %r7,%r7,4 + + nop + + cmpi 0,0,%r4,10 + bge ofw_number_letter + addi %r4,%r4,'0' + b ofw_number_digit_out + +ofw_number_letter: + addi %r4,%r4,'A' - 10 + +ofw_number_digit_out: + stb %r4,12(%r1) + addi %r3,%r1,12 + + stw %r6,16(%r1) + stw %r7,20(%r1) + stw %r8,24(%r1) + stw %r9,28(%r1) + + bl ofw_print_string + + lwz %r6,16(%r1) + lwz %r7,20(%r1) + lwz %r8,24(%r1) + lwz %r9,28(%r1) + + b ofw_number_loop + +ofw_number_return: + /* Return */ + lwz %r9,8(%r1) + lwz %r8,4(%r1) + mtlr %r8 + lwz %r8,0(%r1) + addi %r1,%r1,32 + blr + +ofw_print_eol: + subi %r1,%r1,16 + stw %r8,0(%r1) + mflr %r8 + stw %r8,4(%r1) + li %r4,0x0d0a + sth %r4,8(%r1) + xor %r4,%r4,%r4 + sth %r4,10(%r1) + addi %r3,%r1,8 + bl ofw_print_string + lwz %r8,4(%r1) + mtlr %r8 + lwz %r8,0(%r1) + addi %r1,%r1,16 + blr + +ofw_print_nothing: + subi %r1,%r1,16 + stw %r8,0(%r1) + mflr %r8 + stw %r8,4(%r1) + li %r4,0 + sth %r4,8(%r1) + xor %r4,%r4,%r4 + sth %r4,10(%r1) + addi %r3,%r1,8 + bl ofw_print_string + lwz %r8,4(%r1) + mtlr %r8 + lwz %r8,0(%r1) + addi %r1,%r1,16 + blr + +ofw_print_space: + subi %r1,%r1,16 + stw %r8,0(%r1) + mflr %r8 + stw %r8,4(%r1) + li %r4,0x2000 + sth %r4,8(%r1) + xor %r4,%r4,%r4 + sth %r4,10(%r1) + addi %r3,%r1,8 + bl ofw_print_string + lwz %r8,4(%r1) + mtlr %r8 + lwz %r8,0(%r1) + addi %r1,%r1,16 + blr + +ofw_print_regs: + /* Construct ofw exit call */ + subi %r1,%r1,0xa0 + + stw %r0,0(%r1) + stw %r1,4(%r1) + stw %r2,8(%r1) + stw %r3,12(%r1) + + stw %r4,16(%r1) + stw %r5,20(%r1) + stw %r6,24(%r1) + stw %r7,28(%r1) + + stw %r8,32(%r1) + stw %r9,36(%r1) + stw %r10,40(%r1) + stw %r11,44(%r1) + + stw %r12,48(%r1) + stw %r13,52(%r1) + stw %r14,56(%r1) + stw %r15,60(%r1) + + stw %r16,64(%r1) + stw %r17,68(%r1) + stw %r18,72(%r1) + stw %r19,76(%r1) + + stw %r20,80(%r1) + stw %r21,84(%r1) + stw %r22,88(%r1) + stw %r23,92(%r1) + + stw %r24,96(%r1) + stw %r25,100(%r1) + stw %r26,104(%r1) + stw %r27,108(%r1) + + stw %r28,112(%r1) + stw %r29,116(%r1) + stw %r30,120(%r1) + stw %r31,124(%r1) + + mflr %r0 + stw %r0,128(%r1) + mfcr %r0 + stw %r0,132(%r1) + mfctr %r0 + stw %r0,136(%r1) + mfmsr %r0 + stw %r0,140(%r1) + + /* Count at zero */ + xor %r0,%r0,%r0 + stw %r0,144(%r1) + mr %r3,%r1 + stw %r3,148(%r1) + + /* Body, print the regname, then the register */ +ofw_register_loop: + lwz %r3,144(%r1) + cmpi 0,0,%r3,32 + beq ofw_register_special + lis %r3,0xe00000@ha + addi %r3,%r3,freeldr_reg_init - _start + bl ofw_print_string + lwz %r3,144(%r1) + bl ofw_print_number + bl ofw_print_space + lwz %r3,144(%r1) + mulli %r3,%r3,4 + add %r3,%r1,%r3 + lwz %r3,0(%r3) + stw %r3,152(%r1) + bl ofw_print_number + lwz %r3,144(%r1) + addi %r3,%r3,1 + stw %r3,144(%r1) + b done_dump + +dump_optional: + bl ofw_print_space + bl ofw_print_space + lwz %r3,152(%r1) + lwz %r3,0(%r3) + bl ofw_print_number + bl ofw_print_space + lwz %r3,152(%r1) + lwz %r3,4(%r3) + bl ofw_print_number + bl ofw_print_space + lwz %r3,152(%r1) + lwz %r3,8(%r3) + bl ofw_print_number + bl ofw_print_space + lwz %r3,152(%r1) + lwz %r3,12(%r3) + bl ofw_print_number + bl ofw_print_space +done_dump: + bl ofw_print_eol + b ofw_register_loop + +ofw_register_special: + /* LR */ + lis %r3,0xe00000@ha + addi %r3,%r3,freeldr_reg_lr - _start + bl ofw_print_string + bl ofw_print_space + lwz %r3,128(%r1) + bl ofw_print_number + bl ofw_print_eol + + /* CR */ + lis %r3,0xe00000@ha + addi %r3,%r3,freeldr_reg_cr - _start + bl ofw_print_string + bl ofw_print_space + lwz %r3,132(%r1) + bl ofw_print_number + bl ofw_print_eol + + /* CTR */ + lis %r3,0xe00000@ha + addi %r3,%r3,freeldr_reg_ctr - _start + bl ofw_print_string + bl ofw_print_space + lwz %r3,136(%r1) + bl ofw_print_number + bl ofw_print_eol + + /* MSR */ + lis %r3,0xe00000@ha + addi %r3,%r3,freeldr_reg_msr - _start + bl ofw_print_string + bl ofw_print_space + lwz %r3,140(%r1) + bl ofw_print_number + bl ofw_print_eol + + /* Return */ + lwz %r0,128(%r1) + mtlr %r0 + + lwz %r0,0(%r1) + lwz %r2,8(%r1) + lwz %r3,12(%r1) + + lwz %r4,16(%r1) + lwz %r5,20(%r1) + lwz %r6,24(%r1) + lwz %r7,28(%r1) + + addi %r1,%r1,0xa0 + + blr + +ofw_finddevice_hook: + subi %r1,%r1,32 + stw %r3,0(%r1) + mflr %r3 + stw %r3,4(%r1) + lwz %r3,0(%r1) + bl ofw_finddevice + stw %r3,0(%r1) + lwz %r3,4(%r1) + mtlr %r3 + lwz %r3,0(%r1) + addi %r1,%r1,32 + blr + +ofw_finddevice: + /* Reserve stack space ... + * 20 bytes for the ofw call, + * r8, r9, and lr */ + subi %r1,%r1,32 + + /* Store r8, r9, lr */ + stw %r8,20(%r1) + stw %r9,24(%r1) + mflr %r8 + stw %r8,28(%r1) + + /* Get finddevice name */ + lis %r8,0xe00000@ha + addi %r9,%r8,ofw_finddevice_name - _start + stw %r9,0(%r1) + + /* 1 Argument and 1 return */ + li %r9,1 + stw %r9,4(%r1) + stw %r9,8(%r1) + + stw %r3,12(%r1) + + /* Load up the call address */ + lwz %r9,ofw_call_addr - _start(%r8) + mtlr %r9 + + /* Set argument */ + mr %r3,%r1 + + /* Fire */ + blrl + + lwz %r3,16(%r1) + + /* Restore registers */ + lwz %r8,28(%r1) + mtlr %r8 + lwz %r9,24(%r1) + lwz %r8,20(%r1) + + addi %r1,%r1,32 + + /* Return */ + blr + +ofw_getprop_hook: + /* Reserve stack space: + * 32 bytes for the ofw call + * 12 bytes for r8, r9, lr + */ + /* Reserve stack space ... + * 20 bytes for the ofw call, + * r8, r9, and lr */ + subi %r1,%r1,48 + + /* Store r8, r9, lr */ + stw %r8,32(%r1) + stw %r9,36(%r1) + mflr %r8 + stw %r8,40(%r1) + + /* Get getprop name */ + lis %r8,0xe00000@ha + addi %r9,%r8,ofw_getprop_name - _start + stw %r9,0(%r1) + + /* 4 Argument and 1 return */ + li %r9,4 + stw %r9,4(%r1) + li %r9,1 + stw %r9,8(%r1) + + stw %r3,12(%r1) /* Package */ + stw %r4,16(%r1) /* Property */ + stw %r5,20(%r1) /* Return buffer */ + stw %r6,24(%r1) /* Buffer size */ + + /* Load up the call address */ + lwz %r9,ofw_call_addr - _start(%r8) + mtlr %r9 + + /* Set argument */ + mr %r3,%r1 + + /* Fire */ + blrl + + /* Workaround to a wierd crash ... not sure what causes it. + * XXX investigate me */ + bl ofw_print_nothing + + /* Return */ + lwz %r3,28(%r1) + + /* Restore registers */ + lwz %r8,40(%r1) + mtlr %r8 + lwz %r9,36(%r1) + lwz %r8,32(%r1) + + addi %r1,%r1,48 + + /* Return */ + blr + +ofw_getprop: + /* Reserve stack space: + * 32 bytes for the ofw call + * 12 bytes for r8, r9, lr + */ + /* Reserve stack space ... + * 20 bytes for the ofw call, + * r8, r9, and lr */ + subi %r1,%r1,48 + + /* Store r8, r9, lr */ + stw %r8,32(%r1) + stw %r9,36(%r1) + mflr %r8 + stw %r8,40(%r1) + + /* Get getprop name */ + lis %r8,0xe00000@ha + addi %r9,%r8,ofw_getprop_name - _start + stw %r9,0(%r1) + + /* 4 Argument and 1 return */ + li %r9,4 + stw %r9,4(%r1) + li %r9,1 + stw %r9,8(%r1) + + stw %r3,12(%r1) /* Package */ + stw %r4,16(%r1) /* Property */ + stw %r5,20(%r1) /* Return buffer */ + stw %r6,24(%r1) /* Buffer size */ + + /* Load up the call address */ + lwz %r9,ofw_call_addr - _start(%r8) + mtlr %r9 + + /* Set argument */ + mr %r3,%r1 + + /* Fire */ + blrl + + /* Return */ + lwz %r3,28(%r1) + + /* Restore registers */ + lwz %r8,40(%r1) + + mtlr %r8 + lwz %r9,36(%r1) + lwz %r8,32(%r1) + + addi %r1,%r1,48 + + /* Return */ + blr + +ofw_write: + /* Reserve stack space: + * 28 bytes for the ofw call + * 12 bytes for r8, r9, lr + */ + /* Reserve stack space ... + * 20 bytes for the ofw call, + * r8, r9, and lr */ + subi %r1,%r1,48 + + nop + + /* Store r8, r9, lr */ + stw %r8,28(%r1) + stw %r9,32(%r1) + mflr %r8 + stw %r8,36(%r1) + + /* Get write name */ + lis %r8,0xe00000@ha + addi %r9,%r8,ofw_write_name - _start + stw %r9,0(%r1) + + /* 3 Arguments and 1 return */ + li %r9,3 + stw %r9,4(%r1) + li %r9,1 + stw %r9,8(%r1) + + stw %r3,12(%r1) + stw %r4,16(%r1) + stw %r5,20(%r1) + + /* Load up the call address */ + lwz %r9,ofw_call_addr - _start(%r8) + mtlr %r9 + + /* Set argument */ + mr %r3,%r1 + + /* Fire */ + blrl + + /* Return */ + lwz %r3,24(%r1) + + /* Restore registers */ + lwz %r8,36(%r1) + mtlr %r8 + lwz %r9,32(%r1) + lwz %r8,28(%r1) + + addi %r1,%r1,48 + + /* Return */ [truncated at 1000 lines; 156 more skipped]
19 years, 8 months
1
0
0
0
← Newer
1
2
3
4
...
61
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
Results per page:
10
25
50
100
200