Author: arty
Date: Wed Apr 18 10:55:07 2007
New Revision: 26391
URL:
http://svn.reactos.org/svn/reactos?rev=26391&view=rev
Log:
Make disk ident work on qemu.
Revision to bootcd method.
Added:
branches/powerpc/reactos/tools/ppc.lost+found/hfsmap.lst
Modified:
branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/prep.c
branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/prep.h
branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/prep_ide.c
branches/powerpc/reactos/tools/ppc.lost+found/bootcd
Modified: branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/prep.c
URL:
http://svn.reactos.org/svn/reactos/branches/powerpc/reactos/boot/freeldr/fr…
==============================================================================
--- branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/prep.c (original)
+++ branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/prep.c Wed Apr 18 10:55:07
2007
@@ -5,7 +5,7 @@
int prep_serial = 0x800003f8;
-void sync() { __asm__("sync\n\teieio"); }
+void sync() { __asm__("eieio\n\tsync"); }
/* Simple serial */
@@ -63,7 +63,6 @@
void PpcPrepVideoPrepareForReactOS()
{
}
-
ULONG PpcPrepGetMemoryMap( PBIOS_MEMORY_MAP BiosMemoryMap,
ULONG MaxMemoryMapSize )
{
@@ -77,7 +76,8 @@
void PpcPrepInit()
{
MachVtbl.ConsPutChar = PpcPrepPutChar;
- printf("Breathing ...\n");
+
+ printf("Serial on\n");
ide_setup( &ide1_desc );
Modified: branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/prep.h
URL:
http://svn.reactos.org/svn/reactos/branches/powerpc/reactos/boot/freeldr/fr…
==============================================================================
--- branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/prep.h (original)
+++ branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/prep.h Wed Apr 18 10:55:07
2007
@@ -6,7 +6,7 @@
void sync();
void PpcPrepInit();
void ide_seek( void *extension, int low, int high );
-void ide_read( void *extension, char *buffer, int bytes );
+int ide_read( void *extension, char *buffer, int bytes );
void ide_setup( void *extension );
#endif//FREELDR_ARCH_POWERPC_PREP_H
Modified: branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/prep_ide.c
URL:
http://svn.reactos.org/svn/reactos/branches/powerpc/reactos/boot/freeldr/fr…
==============================================================================
--- branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/prep_ide.c (original)
+++ branches/powerpc/reactos/boot/freeldr/freeldr/arch/powerpc/prep_ide.c Wed Apr 18
10:55:07 2007
@@ -30,12 +30,21 @@
/* Wait for ready */
void ide_rdy( void *extension ) {
idectl_desc *desc = (idectl_desc *)extension;
- while( !(GetPhysByte(desc->port+7) & 8) ) sync();
+ while( !(GetPhysByte(desc->port+7) & 0x40) ) sync();
+}
+
+void ide_drq( void *extension ) {
+ idectl_desc *desc = (idectl_desc *)extension;
+ while( !(GetPhysByte(desc->port+7) & 0x08) ) sync();
}
void ide_bsy( void *extension ) {
idectl_desc *desc = (idectl_desc *)extension;
- while( GetPhysByte(desc->port+7) & 0x80 ) sync();
+ while( GetPhysByte(desc->port+7) & 0x80 )
+ {
+ printf("Waiting for not busy\n");
+ sync();
+ }
}
int ide_read( void *extension, char *buffer, int bytes ) {
@@ -52,10 +61,7 @@
SetPhysByte(desc->port+6, desc->seek_head | 0xa0);
SetPhysByte(desc->port+7, 0x20);
- sync();
-
for( inwords = 0; inwords < desc->bytespersec / sizeof(short); inwords++ ) {
- ide_rdy( extension );
in = GetPhysHalf(desc->port);
databuf[inwords] = SWAP_W(in);
sync();
@@ -74,14 +80,18 @@
short *databuf = (short *)identbuffer, in;
int inwords;
+ ide_rdy( extension );
ide_bsy( extension );
+ desc->bytespersec = 512;
+ SetPhysByte(desc->port+2, 1);
+ SetPhysByte(desc->port+3, 0);
+ SetPhysByte(desc->port+4, 0);
+ SetPhysByte(desc->port+5, 0);
+ SetPhysByte(desc->port+6, 0);
SetPhysByte(desc->port+7, 0xec);
- desc->bytespersec = 512;
-
- sync();
+ ide_drq( extension );
for( inwords = 0; inwords < desc->bytespersec / sizeof(short); inwords++ ) {
- ide_rdy( extension );
in = GetPhysHalf(desc->port);
databuf[inwords] = SWAP_W(in);
sync();
Modified: branches/powerpc/reactos/tools/ppc.lost+found/bootcd
URL:
http://svn.reactos.org/svn/reactos/branches/powerpc/reactos/tools/ppc.lost%…
==============================================================================
--- branches/powerpc/reactos/tools/ppc.lost+found/bootcd (original)
+++ branches/powerpc/reactos/tools/ppc.lost+found/bootcd Wed Apr 18 10:55:07 2007
@@ -7,8 +7,9 @@
CD=output-ppc/ppcboot
I=$CD/install
+TOOLS=tools/ppc.lost+found
-tools/ppc.lost+found/link-freeldr
+$TOOLS/link-freeldr
mkdir -p $I
cp freeldr.elf $I/yaboot
@@ -16,5 +17,5 @@
mkisofs -chrp-boot -U -part -hfs -T -r -l -J -A "ReactOS" -sysid PPC \
-V "ReactOS" -volset 1 -volset-size 1 -volset-seqno 1 \
- -hfs-volid "ReactOS" -hfs-bless $I -map hfsmap.lst \
+ -hfs-volid "ReactOS" -hfs-bless $I -map $TOOLS/hfsmap.lst \
-no-desktop -allow-multidot -o ppcboot.iso $CD
Added: branches/powerpc/reactos/tools/ppc.lost+found/hfsmap.lst
URL:
http://svn.reactos.org/svn/reactos/branches/powerpc/reactos/tools/ppc.lost%…
==============================================================================
--- branches/powerpc/reactos/tools/ppc.lost+found/hfsmap.lst (added)
+++ branches/powerpc/reactos/tools/ppc.lost+found/hfsmap.lst Wed Apr 18 10:55:07 2007
@@ -1,0 +1,12 @@
+# ext. xlate creator type comment
+.hqx Ascii 'BnHx' 'TEXT' "BinHex file"
+.sit Raw 'SIT!' 'SITD' "StuffIT Expander"
+.mov Raw 'TVOD' 'MooV' "QuickTime Movie"
+.deb Raw 'Debn' 'bina' "Debian package"
+.bin Raw 'ddsk' 'DDim' "Floppy or ramdisk image"
+.img Raw 'ddsk' 'DDim' "Floppy or ramdisk image"
+.b Raw 'UNIX' 'tbxi' "bootstrap"
+yaboot Raw 'UNIX' 'boot' "bootstrap"
+vmlinux Raw 'UNIX' 'boot' "bootstrap"
+.conf Raw 'UNIX' 'conf' "bootstrap"
+* Ascii '????' '????' "Text file"