mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 14:41:27 +00:00
sparc32: introduce sparc32_start_kernel called from head_32.S
This gives us a C hook before we call start_kernel() Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
This commit is contained in:
parent
30005efc98
commit
4efb55e691
3 changed files with 15 additions and 8 deletions
|
@ -661,16 +661,10 @@ continue_boot:
|
||||||
wr %g3, PSR_ET, %psr
|
wr %g3, PSR_ET, %psr
|
||||||
WRITE_PAUSE
|
WRITE_PAUSE
|
||||||
|
|
||||||
/* First we call prom_init() to set up PROMLIB, then
|
/* Call sparc32_start_kernel(struct linux_romvec *rp) */
|
||||||
* off to start_kernel().
|
|
||||||
*/
|
|
||||||
|
|
||||||
sethi %hi(prom_vector_p), %g5
|
sethi %hi(prom_vector_p), %g5
|
||||||
ld [%g5 + %lo(prom_vector_p)], %o0
|
ld [%g5 + %lo(prom_vector_p)], %o0
|
||||||
call prom_init
|
call sparc32_start_kernel
|
||||||
nop
|
|
||||||
|
|
||||||
call start_kernel
|
|
||||||
nop
|
nop
|
||||||
|
|
||||||
/* We should not get here. */
|
/* We should not get here. */
|
||||||
|
|
|
@ -26,6 +26,9 @@ static inline unsigned long kimage_addr_to_ra(const char *p)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_SPARC32
|
#ifdef CONFIG_SPARC32
|
||||||
|
/* setup_32.c */
|
||||||
|
void sparc32_start_kernel(struct linux_romvec *rp);
|
||||||
|
|
||||||
/* cpu.c */
|
/* cpu.c */
|
||||||
extern void cpu_probe(void);
|
extern void cpu_probe(void);
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
#include <linux/cpu.h>
|
#include <linux/cpu.h>
|
||||||
#include <linux/kdebug.h>
|
#include <linux/kdebug.h>
|
||||||
#include <linux/export.h>
|
#include <linux/export.h>
|
||||||
|
#include <linux/start_kernel.h>
|
||||||
|
|
||||||
#include <asm/io.h>
|
#include <asm/io.h>
|
||||||
#include <asm/processor.h>
|
#include <asm/processor.h>
|
||||||
|
@ -244,6 +245,15 @@ struct tt_entry *sparc_ttable;
|
||||||
|
|
||||||
struct pt_regs fake_swapper_regs;
|
struct pt_regs fake_swapper_regs;
|
||||||
|
|
||||||
|
/* Called from head_32.S - before we have setup anything
|
||||||
|
* in the kernel. Be very careful with what you do here.
|
||||||
|
*/
|
||||||
|
void __init sparc32_start_kernel(struct linux_romvec *rp)
|
||||||
|
{
|
||||||
|
prom_init(rp);
|
||||||
|
start_kernel();
|
||||||
|
}
|
||||||
|
|
||||||
void __init setup_arch(char **cmdline_p)
|
void __init setup_arch(char **cmdline_p)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue