mtd/docboot doc_bootstub.S,1.1,1.2

dbrown at infradead.org dbrown at infradead.org
Mon Jul 12 15:18:41 EDT 2004


Update of /home/cvs/mtd/docboot
In directory phoenix.infradead.org:/tmp/cvs-serv25711

Modified Files:
	doc_bootstub.S 
Log Message:
Cleanup code a bit, print commandline.


Index: doc_bootstub.S
===================================================================
RCS file: /home/cvs/mtd/docboot/doc_bootstub.S,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- doc_bootstub.S	9 Jul 2004 16:28:02 -0000	1.1
+++ doc_bootstub.S	12 Jul 2004 19:18:38 -0000	1.2
@@ -135,12 +135,9 @@
 	shrw	$4, %ax
 	addw	%ax, gdt_src_mid
 
-	movw	low_sects, %cx
-
 	movw	doc_seg, %ds
 	movw	$BXREG, %bx
 	movw	$SIREG, %si
-	xorw	%di, %di
 
 		/* Reset DiskOnChip */
 	movb	$DOC_MODE_CLR_ERR + DOC_MODE_MDWREN + DOC_MODE_NORMAL, BX_DOCControl
@@ -150,12 +147,29 @@
 	movb	$NAND_CMD_RESET, %al
 	call	doc_cmd
 
+	xorw	%di, %di
 	movw	$0x20, %dx	/* scan from second eraseblock */
 read_setup_sects:
-	pushw	%cx
 	call	doc_readpage
-	popw	%cx
-	loop	read_setup_sects
+	decw	%cs:low_sects
+	jnz	read_setup_sects
+
+#if 0
+		/* Print the kernel version string.  Partially for fun, mostly
+		   to show that we've loaded the low part and are about to
+		   load the high part. */
+	pushw	%ds
+	pushw	%es
+	popw	%ds
+	pushw	%si
+	pushw	%bx
+	movw	kernel_version, %si
+	addw	$0x200, %si
+	call	message
+	popw	%bx
+	popw	%si
+	popw	%ds
+#endif
 
 	movw	$0x8000, %di	/* Go to 32k from setup base */
 read_kernel_sects:
@@ -181,6 +195,8 @@
 	pushw	%cs
 	popw	%ds
 	MSG(done_string)
+	MSG(cmdline)
+	MSG(boot_string)
 
 	pushw	%es
 	popw	%ds	/* Now write parameters into setup segment */
@@ -361,7 +377,8 @@
 
 spl_string:	.string "Installing DiskOnChip bootloader.\n\r"
 loading_string:	.string "Loading kernel... "
-done_string:	.string "done.\n\r"
+done_string:	.string "done.\n\rCommandline: "
+boot_string:	.string "\n\rBooting!\n\r"
 
 	.org CHECKSUM_LOCATION
 checksum:





More information about the linux-mtd-cvs mailing list