Remove all CFE-specific code from locore.S. The CFE entrypoint initialization

is now done in platform-specific code.

Approved by: imp (mentor)
This commit is contained in:
neel 2010-01-06 06:42:08 +00:00
parent d6b62ee4c6
commit 2fa2f73b38
3 changed files with 18 additions and 42 deletions

View File

@ -77,12 +77,6 @@
GLOBAL(fenvp)
.space 4 # Assumes mips32? Is that OK?
#endif
#ifdef CFE /* Assumes MIPS32, bad? */
GLOBAL(cfe_handle)
.space 4
GLOBAL(cfe_vector)
.space 4
#endif
GLOBAL(stackspace)
.space NBPG /* Smaller than it should be since it's temp. */
.align 8
@ -175,16 +169,6 @@ VECTOR(_locore, unknown)
#ifdef YAMON
/* Save YAMON boot environment pointer */
sw a2, _C_LABEL(fenvp)
#endif
#ifdef CFE
/*
* Save the CFE context passed to us by the loader.
*/
li t1, 0x43464531
bne a3, t1, no_cfe /* Check for "CFE1" signature */
sw a0, _C_LABEL(cfe_handle)/* Firmware data segment */
sw a2, _C_LABEL(cfe_vector)/* Firmware entry vector */
no_cfe:
#endif
/*

View File

@ -79,11 +79,6 @@ __FBSDID("$FreeBSD$");
#include <dev/cfe/cfe_api.h>
#endif
#ifdef CFE
extern uint32_t cfe_handle;
extern uint32_t cfe_vector;
#endif
extern int *edata;
extern int *end;
@ -183,8 +178,8 @@ platform_trap_exit(void)
}
void
platform_start(__register_t a0 __unused, __register_t a1 __unused,
__register_t a2 __unused, __register_t a3 __unused)
platform_start(__register_t a0, __register_t a1, __register_t a2,
__register_t a3)
{
vm_offset_t kernend;
uint64_t platform_counter_freq;
@ -197,16 +192,17 @@ platform_start(__register_t a0 __unused, __register_t a1 __unused,
/*
* Initialize CFE firmware trampolines before
* we initialize the low-level console.
*
* CFE passes the following values in registers:
* a0: firmware handle
* a2: firmware entry point
* a3: entry point seal
*/
if (cfe_handle != 0)
cfe_init(cfe_handle, cfe_vector);
if (a3 == CFE_EPTSEAL)
cfe_init(a0, a2);
#endif
cninit();
#ifdef CFE
if (cfe_handle == 0)
panic("CFE was not detected by locore.\n");
#endif
mips_init();
# if 0

View File

@ -86,11 +86,6 @@ __FBSDID("$FreeBSD$");
#endif
#endif
#ifdef CFE
extern uint32_t cfe_handle;
extern uint32_t cfe_vector;
#endif
#ifdef CFE_ENV
extern void cfe_env_init(void);
#endif
@ -236,8 +231,8 @@ platform_trap_exit(void)
}
void
platform_start(__register_t a0 __unused, __register_t a1 __unused,
__register_t a2 __unused, __register_t a3 __unused)
platform_start(__register_t a0, __register_t a1, __register_t a2,
__register_t a3)
{
vm_offset_t kernend;
@ -249,16 +244,17 @@ platform_start(__register_t a0 __unused, __register_t a1 __unused,
/*
* Initialize CFE firmware trampolines before
* we initialize the low-level console.
*
* CFE passes the following values in registers:
* a0: firmware handle
* a2: firmware entry point
* a3: entry point seal
*/
if (cfe_handle != 0)
cfe_init(cfe_handle, cfe_vector);
if (a3 == CFE_EPTSEAL)
cfe_init(a0, a2);
#endif
cninit();
#ifdef CFE
if (cfe_handle == 0)
panic("CFE was not detected by locore.\n");
#endif
mips_init();
mips_timer_init_params(sb_cpu_speed(), 0);