patch-2.4.6 linux/arch/ppc/boot/prep/misc.c

Next file: linux/arch/ppc/boot/tree/Makefile
Previous file: linux/arch/ppc/boot/prep/Makefile
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.5/linux/arch/ppc/boot/prep/misc.c linux/arch/ppc/boot/prep/misc.c
@@ -1,5 +1,5 @@
 /*
- * BK Id: SCCS/s.misc.c 1.8 05/18/01 06:20:29 patch
+ * BK Id: SCCS/s.misc.c 1.14 06/16/01 20:43:20 trini
  */
 /*
  * misc.c
@@ -13,8 +13,9 @@
 #include <linux/types.h>
 #include "zlib.h"
 #include <asm/residual.h>
-#include <linux/elf.h>
 #include <linux/config.h>
+#include <linux/threads.h>
+#include <linux/elf.h>
 #include <linux/pci_ids.h>
 #include <asm/page.h>
 #include <asm/processor.h>
@@ -102,6 +103,7 @@
 	return;
 }
 
+#ifdef CONFIG_VGA_CONSOLE
 void
 scroll()
 {
@@ -111,6 +113,7 @@
 	for ( i = ( lines - 1 ) * cols * 2; i < lines * cols * 2; i += 2 )
 		vidmem[i] = ' ';
 }
+#endif /* CONFIG_VGA_CONSOLE */
 
 /*
  * This routine is used to control the second processor on the 
@@ -170,7 +173,9 @@
 #if defined(CONFIG_SERIAL_CONSOLE)
 	com_port = serial_init(0);
 #endif /* CONFIG_SERIAL_CONSOLE */
-	vga_init((char)0xC0000000);
+#if defined(CONFIG_VGA_CONSOLE)
+	vga_init((unsigned char *)0xC0000000);
+#endif /* CONFIG_VGA_CONSOLE */
 
 	if (residual)
 	{
@@ -360,11 +365,18 @@
 	while (timer++ < 5*1000) {
 		if (tstc()) {
 			while ((ch = getc()) != '\n' && ch != '\r') {
-				if (ch == '\b') {
+				/* Test for backspace/delete */
+				if (ch == '\b' || ch == '\177') {
 					if (cp != cmd_line) {
 						cp--;
 						puts("\b \b");
 					}
+				/* Test for ^x/^u (and wipe the line) */
+				} else if (ch == '\030' || ch == '\025') {
+					while (cp != cmd_line) {
+						cp--;
+						puts("\b \b");
+					}
 				} else {
 					*cp++ = ch;
 					putc(ch);
@@ -393,7 +405,7 @@
 	{
 		struct bi_record *rec;
 	    
-		rec = (struct bi_record *)PAGE_ALIGN(zimage_size);
+		rec = (struct bi_record *)_ALIGN((unsigned long)(zimage_size)+(1<<20)-1,(1<<20));
 	    
 		rec->tag = BI_FIRST;
 		rec->size = sizeof(struct bi_record);
@@ -406,8 +418,8 @@
 	    
 		rec->tag = BI_MACHTYPE;
 		rec->data[0] = _MACH_prep;
-		rec->data[1] = 1;
-		rec->size = sizeof(struct bi_record) + sizeof(unsigned long);
+		rec->data[1] = 0;
+		rec->size = sizeof(struct bi_record) + 2 * sizeof(unsigned long);
 		rec = (struct bi_record *)((unsigned long)rec + rec->size);
 	    
 		rec->tag = BI_CMD_LINE;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)