]> git.ozlabs.org Git - yaboot.git/blobdiff - second/prom.c
Don't use ELF entry point.
[yaboot.git] / second / prom.c
index 037c7380a3ecff5af548e55a21348fed7e3edf02..25811ea30d146fb30aadff54c2acd0876c780021 100644 (file)
@@ -1,25 +1,27 @@
 /*
-    Routines for talking to the Open Firmware PROM on
-    Power Macintosh computers.
-    Copyright (C) 1999 Benjamin Herrenschmidt
-    Copyright (C) 1999 Marius Vollmer
-    Copyright (C) 1996 Paul Mackerras.
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
+ *  prom.c - Routines for talking to the Open Firmware PROM
+ *
+ *  Copyright (C) 2001, 2002 Ethan Benson
+ *
+ *  Copyright (C) 1999 Benjamin Herrenschmidt
+ *
+ *  Copyright (C) 1999 Marius Vollmer
+ *
+ *  Copyright (C) 1996 Paul Mackerras.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
  */
 
 #include "prom.h"
@@ -414,7 +416,7 @@ prom_puts (prom_handle file, char *s)
 void
 prom_vfprintf (prom_handle file, char *fmt, va_list ap)
 {
-     static char printf_buf[1536];
+     static char printf_buf[2048];
      vsprintf (printf_buf, fmt, ap);
      prom_puts (file, printf_buf);
 }
@@ -422,7 +424,7 @@ prom_vfprintf (prom_handle file, char *fmt, va_list ap)
 void
 prom_vprintf (char *fmt, va_list ap)
 {
-     static char printf_buf[1536];
+     static char printf_buf[2048];
      vsprintf (printf_buf, fmt, ap);
      prom_puts (prom_stdout, printf_buf);
 }
@@ -551,7 +553,9 @@ prom_claim (void *virt, unsigned int size, unsigned int align)
 void
 prom_release(void *virt, unsigned int size)
 {
-//  call_prom ("release", 2, 1, virt, size);
+     call_prom ("release", 2, 0, virt, size);
+#if 0 /* this is bullshit, newworld OF RELEASE method works fine. */
+
      /* release in not enough, it needs also an unmap call. This bit of forth
       * code inspired from Darwin's bootloader but could be replaced by direct
       * calls to the MMU package if needed
@@ -568,6 +572,7 @@ prom_release(void *virt, unsigned int size)
                "\" release\" ^mem "                    // Then free the physical pages
                ,size, virt 
          );
+#endif /* bullshit */
 }
 
 void