Author: arty Date: Wed Apr 11 07:52:48 2007 New Revision: 26318
URL: http://svn.reactos.org/svn/reactos?rev=26318&view=rev Log: Remove the rest of the LE parts in freeldr. We get into freeldr proper in BE.
Modified: branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/mmu.c branches/powerpc/reactos/boot/freeldr/freeldr/include/of.h
Modified: branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c URL: http://svn.reactos.org/svn/reactos/branches/powerpc/reactos/boot/freeldr/fre... ============================================================================== --- branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c (original) +++ branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c Wed Apr 11 07:52:48 2007 @@ -36,23 +36,6 @@ volatile char *video_mem = 0; boot_infos_t BootInfo;
-void le_swap( void *start_addr_v, - void *end_addr_v, - void *target_addr_v ) { - long - *start_addr = (long *)ROUND_DOWN((long)start_addr_v,8), - *end_addr = (long *)ROUND_UP((long)end_addr_v,8), - *target_addr = (long *)ROUND_DOWN((long)target_addr_v,8); - long tmp; - while( start_addr <= end_addr ) { - tmp = start_addr[0]; - target_addr[0] = REV(start_addr[1]); - target_addr[1] = REV(tmp); - start_addr += 2; - target_addr += 2; - } -} - void PpcPutChar( int ch ) { char buf[3]; if( ch == 0x0a ) { buf[0] = 0x0d; buf[1] = 0x0a; } @@ -266,10 +249,10 @@ ofw_getprop(display_package, "linebytes", (void *)&BootInfo.dispDeviceRowBytes, sizeof(int));
- BootInfo.dispDeviceRect[2] = REV(BootInfo.dispDeviceRect[2]); - BootInfo.dispDeviceRect[3] = REV(BootInfo.dispDeviceRect[3]); - BootInfo.dispDeviceDepth = REV(BootInfo.dispDeviceDepth); - BootInfo.dispDeviceRowBytes = REV(BootInfo.dispDeviceRowBytes); + BootInfo.dispDeviceRect[2] = BootInfo.dispDeviceRect[2]; + BootInfo.dispDeviceRect[3] = BootInfo.dispDeviceRect[3]; + BootInfo.dispDeviceDepth = BootInfo.dispDeviceDepth; + BootInfo.dispDeviceRowBytes = BootInfo.dispDeviceRowBytes;
if(ofw_getprop (display_package, @@ -280,7 +263,7 @@ return; }
- BootInfo.dispDeviceBase = (PVOID)(REV(device_address)); + BootInfo.dispDeviceBase = (PVOID)(device_address);
display_size = BootInfo.dispDeviceRowBytes * BootInfo.dispDeviceRect[3];
@@ -334,8 +317,8 @@
for( i = 0; i < returned / 2; i++ ) { BiosMemoryMap[slots].Type = 1/*MEMTYPE_USABLE*/; - BiosMemoryMap[slots].BaseAddress = REV(memdata[i*2]); - BiosMemoryMap[slots].Length = REV(memdata[i*2+1]); + BiosMemoryMap[slots].BaseAddress = memdata[i*2]; + BiosMemoryMap[slots].Length = memdata[i*2+1]; printf("MemoryMap[%d] = (%x:%x)\n", i, (int)BiosMemoryMap[slots].BaseAddress, @@ -527,8 +510,8 @@ ofw_print_number(stdin_handle_chosen); ofw_print_string("\r\n");
- stdin_handle = REV(stdin_handle_chosen); - mmu_handle = REV(mmu_handle_chosen); + stdin_handle = stdin_handle_chosen; + mmu_handle = mmu_handle_chosen;
MachVtbl.ConsPutChar = PpcPutChar; MachVtbl.ConsKbHit = PpcConsKbHit;
Modified: branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/mmu.c URL: http://svn.reactos.org/svn/reactos/branches/powerpc/reactos/boot/freeldr/fre... ============================================================================== --- branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/mmu.c (original) +++ branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/mmu.c Wed Apr 11 07:52:48 2007 @@ -18,7 +18,6 @@ "mflr 0\n\t" "stwu 0,-16(1)\n\t" "mfmsr 5\n\t" - "xori 3,3,4\n\t" /* Undo effects of LE without swapping */ "andi. 6,5,0xffef\n\t"/* turn off MSR[DR] */ "mtmsr 6\n\t" "isync\n\t" @@ -38,7 +37,6 @@ "mflr 0\n\t" "stwu 0,-16(1)\n\t" "mfmsr 5\n\t" - "xori 3,3,4\n\t" /* Undo effects of LE without swapping */ "andi. 6,5,0xffef\n\t"/* turn off MSR[DR] */ "mtmsr 6\n\t" "sync\n\t" @@ -60,7 +58,6 @@ "mflr 0\n\t" "stwu 0,-16(1)\n\t" "mfmsr 5\n\t" - "xori 3,3,7\n\t" /* Undo effects of LE without swapping */ "andi. 6,5,0xffef\n\t"/* turn off MSR[DR] */ "mtmsr 6\n\t" "sync\n\t"
Modified: branches/powerpc/reactos/boot/freeldr/freeldr/include/of.h URL: http://svn.reactos.org/svn/reactos/branches/powerpc/reactos/boot/freeldr/fre... ============================================================================== --- branches/powerpc/reactos/boot/freeldr/freeldr/include/of.h (original) +++ branches/powerpc/reactos/boot/freeldr/freeldr/include/of.h Wed Apr 11 07:52:48 2007 @@ -3,8 +3,6 @@
#define OF_FAILED 0 #define ERR_NOT_FOUND 0xc0000010 - -#define REV(x) (((x)>>24)&0xff)|(((x)>>8)&0xff00)|(((x)<<24)&0xff000000)|(((x)<<8)&0xff0000)
#include "of_call.h" #include <string.h> @@ -13,7 +11,6 @@ ( int table_off, void *arg1, void *arg2, void *arg3, void *arg4, void *arg5, void *arg6 ); typedef long jmp_buf[100]; extern of_proxy ofproxy; -extern void le_swap( void *begin, void *end, void *dest );
int setjmp( jmp_buf buf ); int longjmp( jmp_buf buf, int retval );