/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <sys/bootconf.h>
#include <stddef.h>
#include "boot_plat.h"
#ifdef DEBUG
extern int debug;
#else
static const int debug = 0;
#endif
extern void closeall(int);
static void
boot_fail(void)
{
prom_panic("bootops is gone, it should not be called");
}
void
setup_bootops(void)
{
if (!memlistpage) /* paranoia runs rampant */
prom_panic("\nMemlistpage not setup yet.");
/*
* The memory list should always be updated last. The prom
* calls which are made to update a memory list may have the
* undesirable affect of claiming physical memory. This may
* happen after the kernel has created its page free list.
* The kernel deals with this by comparing the n and n-1
* snapshots of memory. Updating the memory available list
* last guarantees we will have a current, accurate snapshot.
* See bug #1260786.
*/
dprintf("\nPhysinstalled: ");
dprintf("\nPhysfree: ");
dprintf("\nVirtfree: ");
}
void
install_memlistptrs(void)
{
/* prob only need 1 page for now */
}
/*
* A word of explanation is in order.
* This routine is meant to be called during
* boot_release(), when the kernel is trying
* to ascertain the current state of memory
* so that it can use a memlist to walk itself
* thru kvm_init().
*/
void
{
/* Just take another prom snapshot */
}
/*
* This routine is meant to be called by the
* kernel to shut down all boot and prom activity.
* After this routine is called, PROM or boot IO is no
* longer possible, nor is memory allocation.
*/
void
kern_killboot(void)
{
if (verbosemode) {
dprintf("Entering boot_release()\n");
dprintf("\nPhysinstalled: ");
dprintf("\nPhysfree: ");
dprintf("\nVirtfree: ");
}
if (debug) {
dprintf("Calling quiesce_io()\n");
}
/* close all open devices */
closeall(1);
/*
* Now we take YAPS (yet another Prom snapshot) of
* memory, just for safety sake.
*
* The memory list should always be updated last. The prom
* calls which are made to update a memory list may have the
* undesirable affect of claiming physical memory. This may
* happen after the kernel has created its page free list.
* The kernel deals with this by comparing the n and n-1
* snapshots of memory. Updating the memory available list
* last guarantees we will have a current, accurate snapshot.
* See bug #1260786.
*/
if (verbosemode) {
dprintf("Leaving boot_release()\n");
dprintf("Physinstalled: \n");
if (debug)
dprintf("Physfree:\n");
if (debug)
dprintf("Virtfree: \n");
if (debug)
}
#ifdef DEBUG_MMU
dump_mmu();
#endif
}