std.hpcsh.el -> std.hpcsh (no big-endian WindowsCE)
add shl-elf_.x (for LEADING_UNDERSCORE ELF) bcopy -> memcpy
This commit is contained in:
parent
1a4f57e22c
commit
b92d40fcb6
|
@ -0,0 +1,50 @@
|
|||
/* $NetBSD: shl-_elf.x,v 1.1 2001/07/07 16:35:22 uch Exp $ */
|
||||
|
||||
OUTPUT_FORMAT("elf32-shl-unx")
|
||||
OUTPUT_ARCH(sh)
|
||||
ENTRY(_start)
|
||||
|
||||
MEMORY
|
||||
{
|
||||
ram : o = 0x8c001000, l = 16M
|
||||
}
|
||||
SECTIONS
|
||||
{
|
||||
_trap_base = 0x8c000000;
|
||||
PROVIDE (_trap_base = .);
|
||||
.text :
|
||||
{
|
||||
_ftext = . ;
|
||||
*(.text)
|
||||
*(.rodata)
|
||||
*(.strings)
|
||||
} > ram
|
||||
_etext = . ;
|
||||
PROVIDE (_etext = .);
|
||||
. = ALIGN(8);
|
||||
.data :
|
||||
{
|
||||
_fdata = . ;
|
||||
PROVIDE (_fdata = .);
|
||||
*(.data)
|
||||
CONSTRUCTORS
|
||||
} > ram
|
||||
_edata = . ;
|
||||
PROVIDE (_edata = .);
|
||||
. = ALIGN(8);
|
||||
.bss :
|
||||
{
|
||||
_fbss = . ;
|
||||
PROVIDE (_fbss = .);
|
||||
*(.bss)
|
||||
*(COMMON)
|
||||
} > ram
|
||||
. = ALIGN(4);
|
||||
_end = . ;
|
||||
PROVIDE (_end = .);
|
||||
|
||||
/* Stabs debugging sections. */
|
||||
.stab 0 : { *(.stab) }
|
||||
.stabstr 0 : { *(.stabstr) }
|
||||
}
|
||||
|
|
@ -1,44 +1,45 @@
|
|||
/* $NetBSD: shl-coff.x,v 1.1 2001/03/22 18:35:33 uch Exp $ */
|
||||
/* $NetBSD: shl-coff.x,v 1.2 2001/07/07 16:35:22 uch Exp $ */
|
||||
|
||||
OUTPUT_FORMAT("coff-shl")
|
||||
OUTPUT_ARCH(sh)
|
||||
|
||||
MEMORY
|
||||
{
|
||||
ram : o = 0x8C001000, l = 16M
|
||||
}
|
||||
|
||||
SECTIONS
|
||||
{
|
||||
ROM = 0x80001000;
|
||||
|
||||
_trap_base = 0x8c000000;
|
||||
PROVIDE (_trap_base = .);
|
||||
.text :
|
||||
AT (ROM)
|
||||
{
|
||||
_ftext = . ;
|
||||
*(.text)
|
||||
*(.rodata)
|
||||
*(.strings)
|
||||
_etext = . ;
|
||||
} > ram
|
||||
.tors :
|
||||
AT ( ROM + SIZEOF(.text))
|
||||
{
|
||||
___ctors = . ;
|
||||
*(.ctors)
|
||||
___ctors_end = . ;
|
||||
___dtors = . ;
|
||||
*(.dtors)
|
||||
___dtors_end = . ;
|
||||
} > ram
|
||||
_etext = . ;
|
||||
PROVIDE (_etext = .);
|
||||
. = ALIGN(8);
|
||||
.data :
|
||||
AT ( ROM + SIZEOF(.text) + SIZEOF(.tors))
|
||||
{
|
||||
_fdata = . ;
|
||||
PROVIDE (_fdata = .);
|
||||
*(.data)
|
||||
_edata = . ;
|
||||
} > ram
|
||||
CONSTRUCTORS
|
||||
} > ram
|
||||
_edata = . ;
|
||||
PROVIDE (_edata = .);
|
||||
. = ALIGN(8);
|
||||
.bss :
|
||||
AT ( ROM + SIZEOF(.text) + SIZEOF(.tors) + SIZEOF(.data))
|
||||
{
|
||||
_bss_start = . ;
|
||||
_fbss = . ;
|
||||
PROVIDE (_fbss = .);
|
||||
*(.bss)
|
||||
*(COMMON)
|
||||
_end = . ;
|
||||
} > ram
|
||||
} > ram
|
||||
. = ALIGN(4);
|
||||
_end = . ;
|
||||
PROVIDE (_end = .);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: shl-elf.x,v 1.1 2001/03/22 18:35:34 uch Exp $ */
|
||||
/* $NetBSD: shl-elf.x,v 1.2 2001/07/07 16:35:22 uch Exp $ */
|
||||
|
||||
OUTPUT_FORMAT("elf32-shl-unx")
|
||||
OUTPUT_ARCH(sh)
|
||||
|
@ -10,38 +10,38 @@ MEMORY
|
|||
}
|
||||
SECTIONS
|
||||
{
|
||||
_trap_base = 0x8c000000;
|
||||
PROVIDE (_trap_base = .);
|
||||
trap_base = 0x8c000000;
|
||||
PROVIDE (trap_base = .);
|
||||
.text :
|
||||
{
|
||||
_ftext = . ;
|
||||
ftext = . ;
|
||||
*(.text)
|
||||
*(.rodata)
|
||||
*(.strings)
|
||||
} > ram
|
||||
_etext = . ;
|
||||
PROVIDE (_etext = .);
|
||||
etext = . ;
|
||||
PROVIDE (etext = .);
|
||||
. = ALIGN(8);
|
||||
.data :
|
||||
{
|
||||
_fdata = . ;
|
||||
PROVIDE (_fdata = .);
|
||||
fdata = . ;
|
||||
PROVIDE (fdata = .);
|
||||
*(.data)
|
||||
CONSTRUCTORS
|
||||
} > ram
|
||||
_edata = . ;
|
||||
PROVIDE (_edata = .);
|
||||
edata = . ;
|
||||
PROVIDE (edata = .);
|
||||
. = ALIGN(8);
|
||||
.bss :
|
||||
{
|
||||
_fbss = . ;
|
||||
PROVIDE (_fbss = .);
|
||||
fbss = . ;
|
||||
PROVIDE (fbss = .);
|
||||
*(.bss)
|
||||
*(COMMON)
|
||||
} > ram
|
||||
. = ALIGN(4);
|
||||
_end = . ;
|
||||
PROVIDE (_end = .);
|
||||
end = . ;
|
||||
PROVIDE (end = .);
|
||||
|
||||
/* Stabs debugging sections. */
|
||||
.stab 0 : { *(.stab) }
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: std.hpcsh.el,v 1.3 2001/04/23 11:22:55 uch Exp $
|
||||
# $NetBSD: std.hpcsh,v 1.1 2001/07/07 16:35:22 uch Exp $
|
||||
#
|
||||
# standard, required NetBSD/hpcsh 'options'
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: machdep.c,v 1.10 2001/07/02 17:19:09 uch Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.11 2001/07/07 16:35:22 uch Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2001 The NetBSD Foundation, Inc.
|
||||
|
@ -108,21 +108,11 @@ extern int nfs_mountroot(void);
|
|||
extern int (*mountroot)(void);
|
||||
#endif
|
||||
|
||||
extern char edata[], end[];
|
||||
/* curpcb is defined in locore.s */
|
||||
struct user *proc0paddr;
|
||||
char machine[] = MACHINE;
|
||||
char machine_arch[] = MACHINE_ARCH;
|
||||
|
||||
/* SH-core */
|
||||
#define VBRINIT ((caddr_t)SH3_PHYS_TO_P1SEG(DRAM_BANK0_START))
|
||||
#define Trap100Vec (VBRINIT + 0x100)
|
||||
#define TLBVECTOR (VBRINIT + 0x400)
|
||||
#define Trap600Vec (VBRINIT + 0x600)
|
||||
extern char MonTrap100[], MonTrap100_end[];
|
||||
extern char MonTrap600[], MonTrap600_end[];
|
||||
extern char tlbmisshandler_stub[], tlbmisshandler_stub_end[];
|
||||
|
||||
paddr_t msgbuf_paddr;
|
||||
vaddr_t ram_start = SH3_PHYS_TO_P1SEG(DRAM_BANK0_START);
|
||||
extern int nkpde;
|
||||
|
@ -167,6 +157,11 @@ struct bootinfo *bootinfo;
|
|||
void
|
||||
machine_startup(int argc, char *argv[], struct bootinfo *bi)
|
||||
{
|
||||
extern char trap_base[], edata[], end[];
|
||||
/* exception handler */
|
||||
extern char MonTrap100[], MonTrap100_end[];
|
||||
extern char MonTrap600[], MonTrap600_end[];
|
||||
extern char tlbmisshandler_stub[], tlbmisshandler_stub_end[];
|
||||
static struct bootinfo __bootinfo;
|
||||
vaddr_t proc0_sp;
|
||||
vaddr_t kernend;
|
||||
|
@ -311,11 +306,11 @@ machine_startup(int argc, char *argv[], struct bootinfo *bi)
|
|||
SHREG_TTB = (u_int)pagedir;
|
||||
|
||||
/* install trap handler */
|
||||
bcopy(MonTrap100, Trap100Vec, MonTrap100_end - MonTrap100);
|
||||
bcopy(MonTrap600, Trap600Vec, MonTrap600_end - MonTrap600);
|
||||
bcopy(tlbmisshandler_stub, TLBVECTOR,
|
||||
tlbmisshandler_stub_end - tlbmisshandler_stub);
|
||||
__asm__ __volatile__ ("ldc %0, vbr" :: "r"(VBRINIT));
|
||||
memcpy(trap_base + 0x100, MonTrap100, MonTrap100_end - MonTrap100);
|
||||
memcpy(trap_base + 0x600, MonTrap600, MonTrap600_end - MonTrap600);
|
||||
memcpy(trap_base + 0x400, tlbmisshandler_stub,
|
||||
tlbmisshandler_stub_end - tlbmisshandler_stub);
|
||||
__asm__ __volatile__ ("ldc %0, vbr" :: "r"(trap_base));
|
||||
|
||||
/* enable MMU */
|
||||
#ifdef SH4
|
||||
|
|
Loading…
Reference in New Issue