a3ec172607
and alpha ports. Uses PROM standalone I/O functions but due to the lack of a lseek function it currently only works with version 5.40 of the firmware. A more portable solution is being worked on. installboot utility requires several changes in order to correctly install the bootstrap code - there is a "volume directory" which contains a list of filenames, start sectors and length. We need to add a "boot" entry of the correct length starting at block 2. The boot file has to be ecoff which means we waste another 0.5k Normally the Mips filesystem has a ~500k partition for this purpose but it should be possible to squeeze it all into the first 7k "BSD Style" (1k is required for 2 different copies of the partition table) Only the bootxx_ffs first stage bootstrap has been tested via bootp() which loads the second stage off disk and then boots the kernel.
65 lines
2.4 KiB
C
65 lines
2.4 KiB
C
/* $NetBSD: callvec.c,v 1.1 2000/09/18 11:40:48 wdk Exp $ */
|
|
|
|
/*
|
|
* Copyright (c) 2000 The NetBSD Foundation, Inc.
|
|
* All rights reserved.
|
|
*
|
|
* This code is derived from software contributed to The NetBSD Foundation
|
|
* by Wayne Knowles
|
|
*
|
|
* Redistribution and use in source and binary forms, with or without
|
|
* modification, are permitted provided that the following conditions
|
|
* are met:
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
* notice, this list of conditions and the following disclaimer.
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
* documentation and/or other materials provided with the distribution.
|
|
* 3. All advertising materials mentioning features or use of this software
|
|
* must display the following acknowledgement:
|
|
* This product includes software developed by the NetBSD
|
|
* Foundation, Inc. and its contributors.
|
|
* 4. Neither the name of The NetBSD Foundation nor the names of its
|
|
* contributors may be used to endorse or promote products derived
|
|
* from this software without specific prior written permission.
|
|
*
|
|
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
|
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
|
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
|
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
* POSSIBILITY OF SUCH DAMAGE.
|
|
*/
|
|
|
|
#include <sys/types.h>
|
|
#include <sys/param.h>
|
|
#include <sys/systm.h>
|
|
#include <sys/mbuf.h>
|
|
|
|
#include <machine/cpu.h>
|
|
#include <machine/prom.h>
|
|
|
|
static struct mips_prom callvec;
|
|
|
|
struct mips_prom *callv;
|
|
|
|
typedef void (*funcp_t) __P((void));
|
|
|
|
void
|
|
prom_init()
|
|
{
|
|
int i;
|
|
funcp_t *fp;
|
|
|
|
fp = (void *)&callvec;
|
|
for (i=0; i < sizeof(struct mips_prom)/sizeof(funcp_t); i++ ) {
|
|
fp[i] = (funcp_t)MIPS_PROM_ENTRY(i);
|
|
}
|
|
callv = &callvec;
|
|
}
|