You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
(12) |
May
(82) |
Jun
(72) |
Jul
(39) |
Aug
(104) |
Sep
(61) |
Oct
(55) |
Nov
(101) |
Dec
(48) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(52) |
Feb
(67) |
Mar
(18) |
Apr
(16) |
May
(33) |
Jun
(12) |
Jul
(102) |
Aug
(168) |
Sep
(65) |
Oct
(60) |
Nov
(43) |
Dec
(121) |
2002 |
Jan
(69) |
Feb
(32) |
Mar
(90) |
Apr
(59) |
May
(45) |
Jun
(43) |
Jul
(33) |
Aug
(21) |
Sep
(11) |
Oct
(20) |
Nov
(26) |
Dec
(3) |
2003 |
Jan
(12) |
Feb
(18) |
Mar
(11) |
Apr
(11) |
May
(41) |
Jun
(76) |
Jul
(77) |
Aug
(15) |
Sep
(38) |
Oct
(56) |
Nov
(19) |
Dec
(39) |
2004 |
Jan
(17) |
Feb
(52) |
Mar
(36) |
Apr
(34) |
May
(48) |
Jun
(85) |
Jul
(38) |
Aug
(42) |
Sep
(41) |
Oct
(77) |
Nov
(27) |
Dec
(19) |
2005 |
Jan
(32) |
Feb
(35) |
Mar
(29) |
Apr
(8) |
May
(7) |
Jun
(31) |
Jul
(46) |
Aug
(93) |
Sep
(65) |
Oct
(85) |
Nov
(219) |
Dec
(47) |
2006 |
Jan
(170) |
Feb
(103) |
Mar
(49) |
Apr
(43) |
May
(45) |
Jun
(29) |
Jul
(77) |
Aug
(82) |
Sep
(43) |
Oct
(45) |
Nov
(26) |
Dec
(85) |
2007 |
Jan
(42) |
Feb
(48) |
Mar
(64) |
Apr
(31) |
May
(88) |
Jun
(53) |
Jul
(175) |
Aug
(212) |
Sep
(91) |
Oct
(103) |
Nov
(110) |
Dec
(5) |
2008 |
Jan
(20) |
Feb
(11) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
(5) |
Sep
(3) |
Oct
(12) |
Nov
|
Dec
|
From: kaz K. <kk...@rr...> - 2000-05-14 09:32:52
|
NIIBE-san wrote: > I'm using SolutionEngine SH7709A now. The network driver is sometimes > unstable stalling the communication. Waiting much time, it works. > > Without good reason, I've added curses at stnic_block_output, looking >comment of "oaknet.c". Then, it works fine. Hmm... There are many chips which need such magic. Fortunately I'm not experienced with this problem but I agree with the comment of "oaknet.c": "this is better than nothing!" :-) kaz |
From: NIIBE Y. <gn...@ch...> - 2000-05-14 09:07:10
|
Here is the patch against current CVS of GCC. -------------------------- diff --exclude CVS -ruN gcc-core/gcc/config/fp-bit.c gcc-2.95.2+kaz+g/gcc/config/fp-bit.c --- gcc-core/gcc/config/fp-bit.c Sun May 7 22:44:44 2000 +++ gcc-2.95.2+kaz+g/gcc/config/fp-bit.c Mon May 1 16:52:02 2000 @@ -779,6 +779,9 @@ } +#ifdef HAVE_VISIVILITY_HIDDEN +__attribute__ ((hidden)) +#endif FLO_type add (FLO_type arg_a, FLO_type arg_b) { @@ -795,6 +798,9 @@ return pack_d (res); } +#ifdef HAVE_VISIVILITY_HIDDEN +__attribute__ ((hidden)) +#endif FLO_type sub (FLO_type arg_a, FLO_type arg_b) { @@ -985,6 +991,9 @@ return tmp; } +#ifdef HAVE_VISIVILITY_HIDDEN +__attribute__ ((hidden)) +#endif FLO_type multiply (FLO_type arg_a, FLO_type arg_b) { @@ -1092,6 +1101,9 @@ } } +#ifdef HAVE_VISIVILITY_HIDDEN +__attribute__ ((hidden)) +#endif FLO_type divide (FLO_type arg_a, FLO_type arg_b) { @@ -1493,7 +1505,14 @@ This is needed for some 8-bit ports that can't handle well values that are 8-bytes in size, so we just don't support double for them at all. */ +#ifdef HAVE_VISIVILITY_HIDDEN +__attribute__ ((hidden)) +#endif extern DFtype __make_dp (fp_class_type, unsigned int, int, UDItype frac); +#ifdef HAVE_VISIVILITY_HIDDEN +asm(".hidden __make_dp"); +asm(".global __make_dp"); +#endif #if defined(L_sf_to_df) #ifdef HAVE_VISIVILITY_HIDDEN @@ -1515,7 +1534,14 @@ #ifndef FLOAT +#ifdef HAVE_VISIVILITY_HIDDEN +__attribute__ ((hidden)) +#endif extern SFtype __make_fp (fp_class_type, unsigned int, int, USItype); +#ifdef HAVE_VISIVILITY_HIDDEN +asm(".hidden __make_fp"); +asm(".global __make_fp"); +#endif #if defined(L_make_df) #ifdef HAVE_VISIVILITY_HIDDEN diff --exclude CVS -ruN gcc-core/gcc/config/sh/elf.h gcc-2.95.2+kaz+g/gcc/config/sh/elf.h --- gcc-core/gcc/config/sh/elf.h Sun May 7 22:24:17 2000 +++ gcc-2.95.2+kaz+g/gcc/config/sh/elf.h Mon May 1 16:52:02 2000 @@ -42,12 +42,21 @@ /* Be ELF-like. */ #include "svr4.h" +/* For builtin library routins (e.g. __udivsi3), we explicitly declare + the symbol as .globl with .hidden. */ + +#undef ASM_OUTPUT_EXTERNAL_LIBCALL +#define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN) \ + ASM_HIDDEN_GLOBAL_LABEL (FILE, XSTR (FUN, 0)) + /* The prefix to add to user-visible assembler symbols. Note that svr4.h redefined it from the original value (that we want) in sh.h */ +#if 0 #undef USER_LABEL_PREFIX #define USER_LABEL_PREFIX "_" +#endif #undef LOCAL_LABEL_PREFIX #define LOCAL_LABEL_PREFIX "." diff --exclude CVS -ruN gcc-core/gcc/config/sh/lib1funcs-gnu.asm gcc-2.95.2+kaz+g/gcc/config/sh/lib1funcs-gnu.asm --- gcc-core/gcc/config/sh/lib1funcs-gnu.asm Sun May 7 22:26:03 2000 +++ gcc-2.95.2+kaz+g/gcc/config/sh/lib1funcs-gnu.asm Mon May 1 17:02:05 2000 @@ -25,4 +25,6 @@ #define GLOBAL(X) __##X +#define __NOFPU_DIV__ + #include "sh/lib1funcs.asm" diff --exclude CVS -ruN gcc-core/gcc/config/sh/lib1funcs.asm gcc-2.95.2+kaz+g/gcc/config/sh/lib1funcs.asm --- gcc-core/gcc/config/sh/lib1funcs.asm Sun May 7 22:44:45 2000 +++ gcc-2.95.2+kaz+g/gcc/config/sh/lib1funcs.asm Mon May 1 17:02:05 2000 @@ -969,7 +969,7 @@ #ifdef L_sdivsi3 /* __SH4_SINGLE_ONLY__ keeps this part for link compatibility with sh3e code. */ -#if ! defined(__SH4__) && ! defined (__SH4_SINGLE__) +#if (! defined(__SH4__) && ! defined (__SH4_SINGLE__)) || defined(__NOFPU_DIV__) !! !! Steve Chamberlain !! sa...@cy... @@ -1168,7 +1168,7 @@ #ifdef L_udivsi3 /* __SH4_SINGLE_ONLY__ keeps this part for link compatibility with sh3e code. */ -#if ! defined(__SH4__) && ! defined (__SH4_SINGLE__) +#if (! defined(__SH4__) && ! defined (__SH4_SINGLE__)) || defined(__NOFPU_DIV__) !! !! Steve Chamberlain !! sa...@cy... diff --exclude CVS -ruN gcc-core/gcc/config/sh/linux.h gcc-2.95.2+kaz+g/gcc/config/sh/linux.h --- gcc-core/gcc/config/sh/linux.h Sun May 7 22:44:45 2000 +++ gcc-2.95.2+kaz+g/gcc/config/sh/linux.h Wed May 10 15:29:49 2000 @@ -65,6 +65,14 @@ #undef ASM_SPEC #define ASM_SPEC "%{!mb:-little} %{mrelax:-relax}" +#undef CC1_SPEC +#define CC1_SPEC \ + "-musermode" + +#undef CC1PLUS_SPEC +#define CC1PLUS_SPEC \ + "-musermode" + #undef LINK_SPEC #define LINK_SPEC \ "%{!mb:-m shlelf_linux} %{mrelax:-relax} \ @@ -72,7 +80,7 @@ %{!static: \ %{rdynamic:-export-dynamic} \ %{!dynamic-linker:-dynamic-linker /lib/ld.so.1} \ - } \ + %{!rpath:-rpath /lib}} \ %{static:-static}" #undef LIB_SPEC @@ -87,10 +95,71 @@ %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s} \ %{!p:%{profile:gcrt1.o%s} \ %{!profile:crt1.o%s}}}} \ - crti.o%s %{!shared:crtbegin.o%s}" + crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}" #define ENDFILE_SPEC \ - "%{!shared:crtend.o%s} crtn.o%s" + "%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s" + +/* On svr4, we *do* have support for the .init and .fini sections, and we + can put stuff in there to be executed before and after `main'. We let + crtstuff.c and other files know this by defining the following symbols. + The definitions say how to change sections to the .init and .fini + sections. This is the same for all known svr4 assemblers. */ +#define INIT_SECTION_ASM_OP ".section\t.init" +#define FINI_SECTION_ASM_OP ".section\t.fini" + +/* SH constant pool breaks the devices in crtstuff.c to control section + in where code resides. We have to write it as asm code. */ +#ifndef __PIC__ +#define CALL_IN_INIT_SECTION(func) \ + asm (INIT_SECTION_ASM_OP "\n\ + mov.l\t1f,r1\n\ + jsr\t@r1\n\ + nop\n\ + bra\t2f\n\ + nop\n\ + .align\t2\n\ + 1:\t.long\t" #func "\n\ + 2:\n"); + +#define CALL_IN_FINI_SECTION(func) \ + asm (FINI_SECTION_ASM_OP "\n\ + mov.l\t1f,r1\n\ + jsr\t@r1\n\ + nop\n\ + bra\t2f\n\ + nop\n\ + .align\t2\n\ + 1:\t.long\t" #func "\n\ + 2:\n"); +#else +#define CALL_IN_INIT_SECTION(func) \ + asm (INIT_SECTION_ASM_OP "\n\ + mov.l\t1f,r1\n\ + mova\t1f,r0\n\ + add\tr0,r1\n\ + jsr\t@r1\n\ + nop\n\ + bra\t2f\n\ + nop\n\ + .align\t2\n\ + 1:\t.long\t" #func "@PLT\n\ + 2:\n"); + +#define CALL_IN_FINI_SECTION(func) \ + asm (FINI_SECTION_ASM_OP "\n\ + mov.l\t1f,r1\n\ + mova\t1f,r0\n\ + add\tr0,r1\n\ + jsr\t@r1\n\ + nop\n\ + bra\t2f\n\ + nop\n\ + .align\t2\n\ + 1:\t.long\t" #func "@PLT\n\ + 2:\n"); + +#endif /* Make DWARF2 an option, but keep DBX as the default for now. Use -gdwarf-2 to turn on DWARF2. */ diff --exclude CVS -ruN gcc-core/gcc/config/sh/sh.c gcc-2.95.2+kaz+g/gcc/config/sh/sh.c --- gcc-core/gcc/config/sh/sh.c Sun May 7 22:24:17 2000 +++ gcc-2.95.2+kaz+g/gcc/config/sh/sh.c Mon May 1 16:52:02 2000 @@ -388,8 +388,9 @@ entry_name = get_identifier ("__movstrSI12_i4"); sym = gen_rtx (SYMBOL_REF, Pmode, IDENTIFIER_POINTER (entry_name)); + assemble_external_libcall (sym); if (flag_pic) - sym = legitimize_builtin_function_address (sym); + sym = legitimize_function_address (SImode, sym, 0); func_addr_rtx = copy_to_mode_reg (Pmode, sym); force_into (XEXP (operands[0], 0), r4); force_into (XEXP (operands[1], 0), r5); @@ -410,8 +411,9 @@ ? "__movstr_i4_odd" : "__movstr_i4_even"); sym = gen_rtx (SYMBOL_REF, Pmode, IDENTIFIER_POINTER (entry_name)); + assemble_external_libcall (sym); if (flag_pic) - sym = legitimize_builtin_function_address (sym); + sym = legitimize_function_address (SImode, sym, 0); func_addr_rtx = copy_to_mode_reg (Pmode, sym); force_into (XEXP (operands[0], 0), r4); force_into (XEXP (operands[1], 0), r5); @@ -436,8 +438,9 @@ sprintf (entry, "__movstrSI%d", bytes); entry_name = get_identifier (entry); sym = gen_rtx (SYMBOL_REF, Pmode, IDENTIFIER_POINTER (entry_name)); + assemble_external_libcall (sym); if (flag_pic) - sym = legitimize_builtin_function_address (sym); + sym = legitimize_function_address (SImode, sym, 0); func_addr_rtx = copy_to_mode_reg (Pmode, sym); force_into (XEXP (operands[0], 0), r4); force_into (XEXP (operands[1], 0), r5); @@ -459,8 +462,9 @@ entry_name = get_identifier ("__movstr"); sym = gen_rtx (SYMBOL_REF, Pmode, IDENTIFIER_POINTER (entry_name)); + assemble_external_libcall (sym); if (flag_pic) - sym = legitimize_builtin_function_address (sym); + sym = legitimize_function_address (SImode, sym, 0); func_addr_rtx = copy_to_mode_reg (Pmode, sym); force_into (XEXP (operands[0], 0), r4); force_into (XEXP (operands[1], 0), r5); @@ -728,8 +732,8 @@ rtx insn; rtx op; { - struct { rtx lab, reg, op; } this; - char *jump; + struct { rtx lab, reg, op, lab2; } this; + const char *jump; int far; int offset = branch_dest (insn) - insn_addresses[INSN_UID (insn)]; @@ -767,19 +771,29 @@ if (dbr_sequence_length ()) print_slot (final_sequence); - this.reg = gen_rtx (REG, SImode, 13); - output_asm_insn ("mov.l " REGISTER_PREFIX "r13,@-" REGISTER_PREFIX "r15", 0); + this.reg = gen_rtx_REG (SImode, 13); + output_asm_insn ("mov.l " REGISTER_PREFIX "r13,@-" + REGISTER_PREFIX "r15", 0); output_asm_insn (jump, &this.lab); - output_asm_insn ("mov.l @" REGISTER_PREFIX "r15+," REGISTER_PREFIX "r13", 0); + output_asm_insn ("mov.l @" REGISTER_PREFIX "r15+," + REGISTER_PREFIX "r13", 0); + } + if (flag_pic && far) + { + this.lab2 = gen_label_rtx (); + ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L", + CODE_LABEL_NUMBER (this.lab2)); } if (far) output_asm_insn (".align 2", 0); ASM_OUTPUT_INTERNAL_LABEL (asm_out_file, "L", CODE_LABEL_NUMBER (this.lab)); this.op = op; - if (flag_pic) - output_asm_insn (far ? ".long %O2-%O0" : ".word %O2-%O0", &this.lab); + if (flag_pic && far) + output_asm_insn (".long %O2-%O3", &this.lab); + else if (far) + output_asm_insn (".long %O2", &this.lab); else - output_asm_insn (far ? ".long %O2" : ".word %O2-%O0", &this.lab); + output_asm_insn (".word %O2-%O0", &this.lab); return ""; } @@ -1282,8 +1296,9 @@ sprintf (func, "__ashiftrt_r4_%d", value); func_name = get_identifier (func); sym = gen_rtx (SYMBOL_REF, Pmode, IDENTIFIER_POINTER (func_name)); + assemble_external_libcall (sym); if (flag_pic) - sym = legitimize_builtin_function_address (sym); + sym = legitimize_function_address (SImode, sym, 0); emit_move_insn (wrk, sym); emit_insn (gen_ashrsi3_n (GEN_INT (value), wrk)); emit_move_insn (operands[0], gen_rtx (REG, SImode, 4)); @@ -5100,19 +5115,6 @@ } rtx -legitimize_builtin_function_address (orig) - rtx orig; -{ - rtx new; -#if 0 - new = gen_rtx_UNSPEC (VOIDmode, gen_rtvec (1, orig), 13); - return gen_rtx_CONST (VOIDmode, new); -#else - return legitimize_function_address (SImode, orig, 0); -#endif -} - -rtx legitimize_pic_address (orig, mode, reg) rtx orig; enum machine_mode mode; @@ -5303,15 +5305,6 @@ case UNSPEC: if ((XVECLEN (x, 0)) > 3) abort (); - if (XINT (x, 1) == 12) - { - output_pic_addr_const (file, XVECEXP (x, 0, 0)); - fputs ("@PLT", file); - fputs ("+", file); - fputs (".-2-", file); - output_pic_addr_const (file, XVECEXP (x, 0, 2)); - break; - } output_pic_addr_const (file, XVECEXP (x, 0, 0)); switch (XINT (x, 1)) { @@ -5329,6 +5322,12 @@ case 10: case 11: /* _GLOBAL_OFFSET_TABLE_ reference */ + break; + case 12: + fputs ("@PLT", file); + fputs ("+", file); + fputs (".-2-", file); + output_pic_addr_const (file, XVECEXP (x, 0, 2)); break; case 13: break; diff --exclude CVS -ruN gcc-core/gcc/config/sh/sh.h gcc-2.95.2+kaz+g/gcc/config/sh/sh.h --- gcc-core/gcc/config/sh/sh.h Sun May 7 22:24:17 2000 +++ gcc-2.95.2+kaz+g/gcc/config/sh/sh.h Mon May 1 17:02:05 2000 @@ -107,6 +107,7 @@ #define BIGTABLE_BIT (1<<14) #define RELAX_BIT (1<<15) #define HITACHI_BIT (1<<22) +#define NOFPU_DIV_BIT (1<<23) #define USERMODE_BIT (1<<24) #define SMALLPOOLS_BIT (1<<25) #define PREFERGOT_BIT (1<<26) @@ -180,6 +181,9 @@ /* Nonzero if generating code for a little endian SH. */ #define TARGET_LITTLE_ENDIAN (target_flags & LITTLE_ENDIAN_BIT) +/* Nonzero if we should prefer not to use FPU in interger division. */ +#define TARGET_NOFPU_DIV (target_flags & NOFPU_DIV_BIT) + /* Nonzero if we should do everything in userland. */ #define TARGET_USERMODE (target_flags & USERMODE_BIT) @@ -209,6 +213,7 @@ {"isize", ISIZE_BIT}, \ {"l", LITTLE_ENDIAN_BIT}, \ {"no-ieee", -IEEE_BIT}, \ + {"nofpu-idiv", NOFPU_DIV_BIT}, \ {"padstruct", PADSTRUCT_BIT}, \ {"usermode", USERMODE_BIT}, \ {"smallpools",SMALLPOOLS_BIT}, \ @@ -223,7 +228,7 @@ /* This are meant to be redefined in the host dependent files */ #define SUBTARGET_SWITCHES -#define TARGET_DEFAULT (0) +#define TARGET_DEFAULT (SH3_BIT|SH2_BIT|LITTLE_ENDIAN_BIT) #define OPTIMIZATION_OPTIONS(LEVEL,SIZE) \ do { \ @@ -1546,7 +1551,6 @@ } extern struct rtx_def *legitimize_function_address (); -extern struct rtx_def *legitimize_builtin_function_address (); /* Specify the machine mode that this machine uses for the index in the tablejump instruction. */ @@ -2055,6 +2059,15 @@ /* Output a globalising directive for a label. */ #define ASM_GLOBALIZE_LABEL(STREAM,NAME) \ (fprintf ((STREAM), "\t.global\t"), \ + assemble_name ((STREAM), (NAME)), \ + fputc ('\n', (STREAM))) + +/* Output a hidden&global directive for a label. */ +#define ASM_HIDDEN_GLOBAL_LABEL(STREAM,NAME) \ + (fprintf ((STREAM), "\t.global\t"), \ + assemble_name ((STREAM), (NAME)), \ + fputc ('\n', (STREAM)), \ + fprintf ((STREAM), "\t.hidden\t"), \ assemble_name ((STREAM), (NAME)), \ fputc ('\n', (STREAM))) diff --exclude CVS -ruN gcc-core/gcc/config/sh/sh.md gcc-2.95.2+kaz+g/gcc/config/sh/sh.md --- gcc-core/gcc/config/sh/sh.md Sun May 7 22:24:17 2000 +++ gcc-2.95.2+kaz+g/gcc/config/sh/sh.md Mon May 1 17:02:05 2000 @@ -865,7 +865,7 @@ (clobber (reg:SI 1)) (clobber (reg:SI 2)) (use (match_operand:SI 1 "arith_reg_operand" "r"))] - "! TARGET_SH4" + "! (TARGET_SH4 && ! TARGET_NOFPU_DIV)" "jsr @%1%#" [(set_attr "type" "sfunc") (set_attr "needs_delay_slot" "yes")]) @@ -885,7 +885,7 @@ (clobber (reg:SI 5)) (use (reg:PSI 48)) (use (match_operand:SI 1 "arith_reg_operand" "r"))] - "TARGET_SH4 && ! TARGET_FPU_SINGLE" + "(TARGET_SH4 && ! TARGET_NOFPU_DIV) && ! TARGET_FPU_SINGLE" "jsr @%1%#" [(set_attr "type" "sfunc") (set_attr "needs_delay_slot" "yes")]) @@ -904,7 +904,7 @@ (clobber (reg:SI 4)) (clobber (reg:SI 5)) (use (match_operand:SI 1 "arith_reg_operand" "r"))] - "TARGET_HARD_SH4 && TARGET_FPU_SINGLE" + "(TARGET_HARD_SH4 && ! TARGET_NOFPU_DIV) && TARGET_FPU_SINGLE" "jsr @%1%#" [(set_attr "type" "sfunc") (set_attr "needs_delay_slot" "yes")]) @@ -925,11 +925,12 @@ emit_move_insn (gen_rtx (REG, SImode, 4), operands[1]); emit_move_insn (gen_rtx (REG, SImode, 5), operands[2]); - if (TARGET_HARD_SH4) + if (TARGET_HARD_SH4 && ! TARGET_NOFPU_DIV) { sym = gen_rtx_SYMBOL_REF (SImode, \"__udivsi3_i4\"); + assemble_external_libcall (sym); if (flag_pic) - sym = legitimize_builtin_function_address (sym); + sym = legitimize_function_address (SImode, sym, 0); emit_move_insn (operands[3], sym); if (TARGET_FPU_SINGLE) emit_insn (gen_udivsi3_i4_single (operands[0], operands[3])); @@ -939,8 +940,9 @@ else { sym = gen_rtx_SYMBOL_REF (SImode, \"__udivsi3\"); + assemble_external_libcall (sym); if (flag_pic) - sym = legitimize_builtin_function_address (sym); + sym = legitimize_function_address (SImode, sym, 0); emit_move_insn (operands[3], sym); emit_insn (gen_udivsi3_i3 (operands[0], operands[3])); } @@ -957,7 +959,7 @@ (clobber (reg:SI 2)) (clobber (reg:SI 3)) (use (match_operand:SI 1 "arith_reg_operand" "r"))] - "! TARGET_SH4" + "! (TARGET_SH4 && ! TARGET_NOFPU_DIV)" "jsr @%1%#" [(set_attr "type" "sfunc") (set_attr "needs_delay_slot" "yes")]) @@ -974,7 +976,7 @@ (clobber (reg:SI 2)) (use (reg:PSI 48)) (use (match_operand:SI 1 "arith_reg_operand" "r"))] - "TARGET_SH4 && ! TARGET_FPU_SINGLE" + "(TARGET_SH4 && ! TARGET_NOFPU_DIV) && ! TARGET_FPU_SINGLE" "jsr @%1%#" [(set_attr "type" "sfunc") (set_attr "needs_delay_slot" "yes")]) @@ -990,7 +992,7 @@ (clobber (reg:SI 1)) (clobber (reg:SI 2)) (use (match_operand:SI 1 "arith_reg_operand" "r"))] - "TARGET_HARD_SH4 && TARGET_FPU_SINGLE" + "(TARGET_HARD_SH4 && ! TARGET_NOFPU_DIV) && TARGET_FPU_SINGLE" "jsr @%1%#" [(set_attr "type" "sfunc") (set_attr "needs_delay_slot" "yes")]) @@ -1011,11 +1013,12 @@ emit_move_insn (gen_rtx (REG, SImode, 4), operands[1]); emit_move_insn (gen_rtx (REG, SImode, 5), operands[2]); - if (TARGET_HARD_SH4) + if (TARGET_HARD_SH4 && ! TARGET_NOFPU_DIV) { sym = gen_rtx_SYMBOL_REF (SImode, \"__sdivsi3_i4\"); + assemble_external_libcall (sym); if (flag_pic) - sym = legitimize_builtin_function_address (sym); + sym = legitimize_function_address (SImode, sym, 0); emit_move_insn (operands[3], sym); if (TARGET_FPU_SINGLE) emit_insn (gen_divsi3_i4_single (operands[0], operands[3])); @@ -1025,8 +1028,9 @@ else { sym = gen_rtx_SYMBOL_REF (SImode, \"__sdivsi3\"); + assemble_external_libcall (sym); if (flag_pic) - sym = legitimize_builtin_function_address (sym); + sym = legitimize_function_address (SImode, sym, 0); emit_move_insn (operands[3], sym); emit_insn (gen_divsi3_i3 (operands[0], operands[3])); } @@ -1135,8 +1139,10 @@ { /* The address must be set outside the libcall, since it goes into a pseudo. */ - rtx addr = force_reg (SImode, gen_rtx_SYMBOL_REF (SImode, \"__mulsi3\")); + rtx sym = gen_rtx_SYMBOL_REF (SImode, \"__mulsi3\"); + rtx addr = force_reg (SImode, sym); rtx insns = gen_mulsi3_call (operands[0], operands[1], operands[2], addr); + assemble_external_libcall (sym); first = XVECEXP (insns, 0, 0); last = XVECEXP (insns, 0, XVECLEN (insns, 0) - 1); emit_insn (insns); diff --exclude CVS -ruN gcc-core/gcc/config/sh/t-linux gcc-2.95.2+kaz+g/gcc/config/sh/t-linux --- gcc-core/gcc/config/sh/t-linux Sun May 7 23:12:05 2000 +++ gcc-2.95.2+kaz+g/gcc/config/sh/t-linux Mon May 1 16:53:41 2000 @@ -1,4 +1,4 @@ -TARGET_LIBGCC2_CFLAGS=-DHAVE_VISIVILITY_HIDDEN +TARGET_LIBGCC2_CFLAGS=-DHAVE_VISIVILITY_HIDDEN -fpic LIBGCC1 = libgcc1-asm.a CROSS_LIBGCC1 = libgcc1-asm.a LIB1ASMSRC = sh/lib1funcs-gnu.asm @@ -30,3 +30,20 @@ LIBGCC = stmp-multilib INSTALL_LIBGCC = install-multilib + +EXTRA_MULTILIB_PARTS= crtbegin.o crtend.o crtbeginS.o crtendS.o + +# Compile crtbeginS.o and crtendS.o with pic. +CRTSTUFF_T_CFLAGS_S = -fPIC + +tcrtbeginS.o: crtstuff.c $(GCC_PASSES) $(CONFIG_H) \ + defaults.h frame.h gbl-ctors.h + $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \ + -finhibit-size-directive -fno-inline-functions -fno-exceptions $(CRTSTUFF_T_CFLAGS_S) \ + -c $(srcdir)/crtstuff.c -DCRT_BEGIN -o tcrtbeginS$(objext) + +tcrtendS.o: crtstuff.c $(GCC_PASSES) $(CONFIG_H) \ + defaults.h frame.h gbl-ctors.h + $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \ + -finhibit-size-directive -fno-inline-functions -fno-exceptions $(CRTSTUFF_T_CFLAGS_S) \ + -c $(srcdir)/crtstuff.c -DCRT_END -o tcrtendS$(objext) diff --exclude CVS -ruN gcc-core/gcc/config/sh/t-sh gcc-2.95.2+kaz+g/gcc/config/sh/t-sh --- gcc-core/gcc/config/sh/t-sh Sun May 7 22:24:17 2000 +++ gcc-2.95.2+kaz+g/gcc/config/sh/t-sh Mon May 1 16:51:22 2000 @@ -1,13 +1,8 @@ LIBGCC1 = libgcc1-asm.a CROSS_LIBGCC1 = libgcc1-asm.a -ifneq (,$(findstring gnu,$(target))) -LIB1ASMSRC = sh/lib1funcs-gnu.asm -else LIB1ASMSRC = sh/lib1funcs.asm -endif LIB1ASMFUNCS = _ashiftrt _ashiftrt_n _ashiftlt _lshiftrt _movstr \ - _movstr_i4 _mulsi3 _sdivsi3 _sdivsi3_i4 _udivsi3 _udivsi3_i4 _set_fpscr \ - _ic_invalidate + _movstr_i4 _mulsi3 _sdivsi3 _sdivsi3_i4 _udivsi3 _udivsi3_i4 _set_fpscr # These are really part of libgcc1, but this will cause them to be # built correctly, so... diff --exclude CVS -ruN gcc-core/gcc/configure gcc-2.95.2+kaz+g/gcc/configure --- gcc-core/gcc/configure Sun May 7 22:44:44 2000 +++ gcc-2.95.2+kaz+g/gcc/configure Mon May 1 16:55:31 2000 @@ -5312,6 +5312,7 @@ tm_file=sh/linux.h tmake_file="sh/t-linux" xmake_file=x-linux + extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" gas=yes gnu_ld=yes if test x$enable_threads = xyes; then thread_file='posix' diff --exclude CVS -ruN gcc-core/gcc/configure.in gcc-2.95.2+kaz+g/gcc/configure.in --- gcc-core/gcc/configure.in Sun May 7 22:44:44 2000 +++ gcc-2.95.2+kaz+g/gcc/configure.in Mon May 1 16:51:22 2000 @@ -3007,6 +3007,7 @@ tm_file=sh/linux.h tmake_file="sh/t-linux" xmake_file=x-linux + extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o" gas=yes gnu_ld=yes if test x$enable_threads = xyes; then thread_file='posix' diff --exclude CVS -ruN gcc-core/gcc/crtstuff.c gcc-2.95.2+kaz+g/gcc/crtstuff.c --- gcc-core/gcc/crtstuff.c Sun May 7 22:09:28 2000 +++ gcc-2.95.2+kaz+g/gcc/crtstuff.c Mon May 1 16:51:22 2000 @@ -181,6 +181,9 @@ /* Stick a call to __do_global_dtors_aux into the .fini section. */ +#if defined(CALL_IN_FINI_SECTION) +CALL_IN_FINI_SECTION (__do_global_dtors_aux) +#else static void __attribute__ ((__unused__)) fini_dummy (void) { @@ -191,6 +194,7 @@ #endif asm (TEXT_SECTION_ASM_OP); } +#endif /* defined(CALL_IN_FINI_SECTION) */ #ifdef EH_FRAME_SECTION_ASM_OP /* Stick a call to __register_frame_info into the .init section. For some @@ -205,6 +209,9 @@ __register_frame_info (__EH_FRAME_BEGIN__, &object); } +#if defined(CALL_IN_INIT_SECTION) +CALL_IN_INIT_SECTION (frame_dummy) +#else static void __attribute__ ((__unused__)) init_dummy (void) { @@ -215,6 +222,7 @@ #endif asm (TEXT_SECTION_ASM_OP); } +#endif /* defined(CALL_IN_INIT_SECTION) */ #endif /* EH_FRAME_SECTION_ASM_OP */ #else /* OBJECT_FORMAT_ELF */ @@ -370,6 +378,9 @@ /* Stick a call to __do_global_ctors_aux into the .init section. */ +#if defined(CALL_IN_INIT_SECTION) +CALL_IN_INIT_SECTION (__do_global_ctors_aux) +#else static void __attribute__ ((__unused__)) init_dummy (void) { @@ -395,6 +406,7 @@ } #endif } +#endif /* defined(CALL_IN_INIT_SECTION) */ #else /* OBJECT_FORMAT_ELF */ |
From: NIIBE Y. <gn...@ch...> - 2000-05-14 08:40:15
|
Here is the change I've done this week. IDE works on SolutionEngine SH7709A now. Thanks Nozawa-san for the suggestion. And it found out that setting interrupt registers at irq_ipr.c is not good (for SolutionEngine SH7709A). I will remove this soon. Mitch, could you please import the new kernel. Now we see S390 port. -------------------------- 2000-05-14 NIIBE Yutaka <gn...@ch...> * arch/sh/lib/checksum.S (csum_partial): Improved a bit. * include/asm-sh/checksum.h (ip_fast_csum): Improved implementation for both of code size and speed. (csum_fold): Removed last line: "extu.w %0, %0". It's not needed, as it always cast to unsigned short. Caution: the result value as "unsigned int" is different. 2000-05-13 NIIBE Yutaka <gn...@ch...> * arch/sh/kernel/time.c (time_init): Bug fix for SH-3's CPG. Not full implementation yet. * include/asm-sh/smc37c93x.h (GPIO46_INDEX, GPIO47_INDEX): Added. * arch/sh/kernel/setup_se.c (init_smsc): Added setting of nIO{R,W}OP. Suggested by Toshiharu Nozawa <no...@hi...>. * include/asm-sh/unistd.h (_syscall5): Bug fix. * arch/sh/kernel/irq.c (init_irq_proc): Added. Index: arch/sh/kernel/irq.c =================================================================== RCS file: /cvsroot/linuxsh/kernel/arch/sh/kernel/irq.c,v retrieving revision 1.7 diff -u -r1.7 irq.c --- arch/sh/kernel/irq.c 2000/05/03 09:05:50 1.7 +++ arch/sh/kernel/irq.c 2000/05/14 08:24:27 @@ -513,3 +513,10 @@ spin_unlock_irqrestore(&irq_controller_lock,flags); return 0; } + +#if defined(CONFIG_PROC_FS) && defined(CONFIG_SYSCTL) + +void init_irq_proc(void) +{ +} +#endif Index: arch/sh/kernel/irq_ipr.c =================================================================== RCS file: /cvsroot/linuxsh/kernel/arch/sh/kernel/irq_ipr.c,v retrieving revision 1.5 diff -u -r1.5 irq_ipr.c --- arch/sh/kernel/irq_ipr.c 2000/05/03 09:05:50 1.5 +++ arch/sh/kernel/irq_ipr.c 2000/05/14 08:24:27 @@ -134,6 +134,7 @@ * Initialize the Interrupt Controller (INTC) * registers to their power on values */ +#if 0 /* * XXX: I think that this is the job of boot loader. -- gniibe * @@ -145,7 +146,7 @@ ctrl_outb(0, INTC_IRR2); ctrl_outw(0, INTC_ICR0); - ctrl_outw(0, INTC_ICR1); + ctrl_outw(0, INTC_ICR1);/* Really? 0x4000?*/ ctrl_outw(0, INTC_ICR2); ctrl_outw(0, INTC_INTER); ctrl_outw(0, INTC_IPRA); @@ -153,6 +154,7 @@ ctrl_outw(0, INTC_IPRC); ctrl_outw(0, INTC_IPRD); ctrl_outw(0, INTC_IPRE); +#endif /* * Enable external irq (INTC IRQ mode). Index: arch/sh/kernel/setup_se.c =================================================================== RCS file: /cvsroot/linuxsh/kernel/arch/sh/kernel/setup_se.c,v retrieving revision 1.5 diff -u -r1.5 setup_se.c --- arch/sh/kernel/setup_se.c 2000/05/07 23:31:58 1.5 +++ arch/sh/kernel/setup_se.c 2000/05/14 08:24:27 @@ -42,6 +42,11 @@ smsc_config(ACTIVATE_INDEX, 0x01); smsc_config(IRQ_SELECT_INDEX, 14); /* IRQ14 */ + /* AUXIO (GPIO): to use IDE1 */ + smsc_config(CURRENT_LDN_INDEX, LDN_AUXIO); + smsc_config(GPIO46_INDEX, 0x00); /* nIOROP */ + smsc_config(GPIO47_INDEX, 0x00); /* nIOWOP */ + /* COM1 */ smsc_config(CURRENT_LDN_INDEX, LDN_COM1); smsc_config(ACTIVATE_INDEX, 0x01); Index: arch/sh/kernel/time.c =================================================================== RCS file: /cvsroot/linuxsh/kernel/arch/sh/kernel/time.c,v retrieving revision 1.8 diff -u -r1.8 time.c --- arch/sh/kernel/time.c 2000/05/09 00:13:58 1.8 +++ arch/sh/kernel/time.c 2000/05/14 08:24:27 @@ -389,7 +389,7 @@ #if defined(__sh3__) static int ifc_table[] = { 1, 2, 4, 1, 3, 1, 1, 1 }; static int pfc_table[] = { 1, 2, 4, 1, 3, 6, 1, 1 }; - static int sfc_table[] = { 1, 2, 3, 4, 6, 8, 1, 1 }; + static int stc_table[] = { 1, 2, 3, 4, 6, 8, 1, 1 }; #elif defined(__SH4__) static int ifc_table[] = { 1, 2, 3, 4, 6, 8, 1, 1 }; #define bfc_table ifc_table /* Same */ @@ -421,8 +421,8 @@ tmp = (frqcr & 0x2000) >> 11; tmp |= frqcr & 0x0003; pfc = pfc_table[tmp]; - master_clock = cpu_clock * ifc; - bus_clock = master_clock/sfc; + master_clock = cpu_clock; + bus_clock = master_clock/pfc; } #elif defined(__SH4__) { Index: arch/sh/lib/checksum.S =================================================================== RCS file: /cvsroot/linuxsh/kernel/arch/sh/lib/checksum.S,v retrieving revision 1.3 diff -u -r1.3 checksum.S --- arch/sh/lib/checksum.S 2000/05/09 01:59:59 1.3 +++ arch/sh/lib/checksum.S 2000/05/14 08:24:27 @@ -49,98 +49,99 @@ * Fortunately, it is easy to convert 2-byte alignment to 4-byte * alignment for the unrolled loop. */ - mov r5,r1 - mov r4,r0 - tst #2,r0 ! Check alignment. + mov $r5, $r1 + mov $r4, $r0 + tst #2, $r0 ! Check alignment. bt 2f ! Jump if alignment is ok. ! - add #-2,r5 ! Alignment uses up two bytes. - cmp/pz r5 ! + add #-2, $r5 ! Alignment uses up two bytes. + cmp/pz $r5 ! bt/s 1f ! Jump if we had at least two bytes. clrt bra 6f - add #2,r5 ! r5 was < 2. Deal with it. + add #2, $r5 ! $r5 was < 2. Deal with it. 1: - mov.w @r4+,r0 - extu.w r0,r0 - addc r0,r6 + mov.w @$r4+, $r0 + extu.w $r0, $r0 + addc $r0, $r6 bf 2f - add #1,r6 + add #1, $r6 2: - mov #-5,r0 - shld r0,r5 - tst r5,r5 + mov #-5, $r0 + shld $r0, $r5 + tst $r5, $r5 bt/s 4f ! if it's =0, go to 4f clrt + .align 2 3: - mov.l @r4+,r0 - addc r0,r6 - mov.l @r4+,r0 - addc r0,r6 - mov.l @r4+,r0 - addc r0,r6 - mov.l @r4+,r0 - addc r0,r6 - mov.l @r4+,r0 - addc r0,r6 - mov.l @r4+,r0 - addc r0,r6 - mov.l @r4+,r0 - addc r0,r6 - mov.l @r4+,r0 - addc r0,r6 - movt r0 - dt r5 + mov.l @$r4+, $r0 + mov.l @$r4+, $r2 + mov.l @$r4+, $r3 + addc $r0, $r6 + mov.l @$r4+, $r0 + addc $r2, $r6 + mov.l @$r4+, $r2 + addc $r3, $r6 + mov.l @$r4+, $r3 + addc $r0, $r6 + mov.l @$r4+, $r0 + addc $r2, $r6 + mov.l @$r4+, $r2 + addc $r3, $r6 + addc $r0, $r6 + addc $r2, $r6 + movt $r0 + dt $r5 bf/s 3b - cmp/eq #1,r0 - mov #0,r0 - addc r0,r6 + cmp/eq #1, $r0 + ! here, we know $r5==0 + addc $r5, $r6 ! add carry to $r6 4: - mov r1,r5 - mov #0x1c,r0 - and r0,r5 - tst r5,r5 + mov $r1, $r0 + and #0x1c, $r0 + tst $r0, $r0 bt/s 6f - clrt - shlr2 r5 + mov $r0, $r5 + shlr2 $r5 + mov #0, $r2 5: - mov.l @r4+,r0 - addc r0,r6 - movt r0 - dt r5 + addc $r2, $r6 + mov.l @$r4+, $r2 + movt $r0 + dt $r5 bf/s 5b - cmp/eq #1,r0 - mov #0,r0 - addc r0,r6 + cmp/eq #1, $r0 + addc $r2, $r6 + addc $r5, $r6 ! $r5==0 here, so it means add carry-bit 6: - mov r1,r5 - mov #3,r0 - and r0,r5 - tst r5,r5 + mov $r1, $r5 + mov #3, $r0 + and $r0, $r5 + tst $r5, $r5 bt 9f ! if it's =0 go to 9f - mov #2,r1 - cmp/hs r1,r5 + mov #2, $r1 + cmp/hs $r1, $r5 bf 7f - mov.w @r4+,r0 - extu.w r0,r0 - cmp/eq r1,r5 + mov.w @r4+, $r0 + extu.w $r0, $r0 + cmp/eq $r1, $r5 bt/s 8f clrt - shll16 r0 - addc r0,r6 + shll16 $r0 + addc $r0, $r6 7: - mov.b @r4+,r0 - extu.b r0,r0 + mov.b @$r4+, $r0 + extu.b $r0, $r0 #ifndef __LITTLE_ENDIAN__ - shll8 r0 + shll8 $r0 #endif 8: - addc r0,r6 - mov #0,r0 - addc r0,r6 + addc $r0, $r6 + mov #0, $r0 + addc $r0, $r6 9: rts - mov r6,r0 + mov $r6, $r0 /* unsigned int csum_partial_copy_generic (const char *src, char *dst, int len, @@ -315,7 +316,7 @@ mov.l 8000f,r0 jmp @r0 nop - .balign 4 + .align 2 8000: .long 5000b 6002: @@ -325,7 +326,7 @@ mov.l 8001f,r0 jmp @r0 nop - .balign 4 + .align 2 8001: .long 5000b .previous Index: include/asm-sh/checksum.h =================================================================== RCS file: /cvsroot/linuxsh/kernel/include/asm-sh/checksum.h,v retrieving revision 1.3 diff -u -r1.3 checksum.h --- include/asm-sh/checksum.h 2000/05/09 00:14:00 1.3 +++ include/asm-sh/checksum.h 2000/05/14 08:24:29 @@ -79,7 +79,6 @@ "swap.w %0, %1\n\t" "add %1, %0\n\t" "not %0, %0\n\t" - "extu.w %0, %0" : "=r" (sum), "=&r" (__dummy) : "0" (sum)); return sum; @@ -94,31 +93,26 @@ */ static __inline__ unsigned short ip_fast_csum(unsigned char * iph, unsigned int ihl) { - unsigned int sum, __dummy; + unsigned int sum, __dummy0, __dummy1; __asm__ __volatile__( "mov.l @%1+, %0\n\t" - "add #-4, %2\n\t" - "clrt\n\t" - "mov.l @%1+, %3\n\t" - "addc %3, %0\n\t" - "mov.l @%1+, %3\n\t" - "addc %3, %0\n\t" "mov.l @%1+, %3\n\t" - "addc %3, %0\n" + "add #-2, %2\n\t" + "clrt\n\t" "1:\t" - "mov.l @%1+, %3\n\t" "addc %3, %0\n\t" - "movt %3\n\t" + "movt %4\n\t" + "mov.l @%1+, %3\n\t" "dt %2\n\t" "bf/s 1b\n\t" - " cmp/eq #1, %3\n\t" - "mov #0, %3\n\t" + " cmp/eq #1, %4\n\t" "addc %3, %0\n\t" + "addc %2, %0" /* Here %2 is 0, add carry-bit */ /* Since the input registers which are loaded with iph and ihl are modified, we must also specify them as outputs, or gcc will assume they contain their original values. */ - : "=r" (sum), "=r" (iph), "=r" (ihl), "=&z" (__dummy) + : "=r" (sum), "=r" (iph), "=r" (ihl), "=&r" (__dummy0), "=&z" (__dummy1) : "1" (iph), "2" (ihl)); return csum_fold(sum); Index: include/asm-sh/smc37c93x.h =================================================================== RCS file: /cvsroot/linuxsh/kernel/include/asm-sh/smc37c93x.h,v retrieving revision 1.1 diff -u -r1.1 smc37c93x.h --- include/asm-sh/smc37c93x.h 2000/05/03 02:24:42 1.1 +++ include/asm-sh/smc37c93x.h 2000/05/14 08:24:29 @@ -47,6 +47,9 @@ #define IRQ_SELECT_INDEX 0x70 #define DMA_SELECT_INDEX 0x74 +#define GPIO46_INDEX 0xc6 +#define GPIO47_INDEX 0xc7 + /* UART stuff. Only for debugging. */ /* UART Register */ Index: include/asm-sh/unistd.h =================================================================== RCS file: /cvsroot/linuxsh/kernel/include/asm-sh/unistd.h,v retrieving revision 1.4 diff -u -r1.4 unistd.h --- include/asm-sh/unistd.h 2000/04/24 00:25:30 1.4 +++ include/asm-sh/unistd.h 2000/05/14 08:24:29 @@ -314,16 +314,16 @@ #define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \ type name (type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5) \ { \ -register long __sc0 __asm__ ("$r3") = __NR_##name; \ +register long __sc3 __asm__ ("$r3") = __NR_##name; \ register long __sc4 __asm__ ("$r4") = (long) arg1; \ register long __sc5 __asm__ ("$r5") = (long) arg2; \ register long __sc6 __asm__ ("$r6") = (long) arg3; \ register long __sc7 __asm__ ("$r7") = (long) arg4; \ -register long __sc2 __asm__ ("$r0") = (long) arg5; \ +register long __sc0 __asm__ ("$r0") = (long) arg5; \ __asm__ __volatile__ ("trapa #0x15" \ : "=z" (__sc0) \ : "0" (__sc0), "r" (__sc4), "r" (__sc5), "r" (__sc6), "r" (__sc7), \ - "r" (__sc7), "r" (__sc2) \ + "r" (__sc3) \ : "memory" ); \ __syscall_return(type,__sc0); \ } |
From: NIIBE Y. <gn...@ch...> - 2000-05-14 08:35:26
|
Hello Kaz, I'm using SolutionEngine SH7709A now. The network driver is sometimes unstable stalling the communication. Waiting much time, it works. Without good reason, I've added curses at stnic_block_output, looking comment of "oaknet.c". Then, it works fine. I don't know if this is good or not. I don't commit this patch for myself. Mitch, could you please add this for the open patches list? -------------------------- Index: drivers/net/stnic.c =================================================================== RCS file: /cvsroot/linuxsh/kernel/drivers/net/stnic.c,v retrieving revision 1.1 diff -u -r1.1 stnic.c --- drivers/net/stnic.c 2000/05/09 00:13:59 1.1 +++ drivers/net/stnic.c 2000/05/14 08:24:28 @@ -175,7 +175,7 @@ *(vhalf *) PA_83902_RST = 0; udelay (5); if (ei_debug > 1) - printk("8390 reset done (%ld).", jiffies); + printk("8390 reset done (%ld).\n", jiffies); *(vhalf *) PA_83902_RST = ~0; udelay (5); } @@ -253,9 +253,17 @@ stnic_block_output (struct net_device *dev, int length, const unsigned char *buf, int output_page) { - +#if 0 STNIC_WRITE (PG0_RBCR0, 1); STNIC_WRITE (STNIC_CR, CR_RRD | CR_PG0 | CR_STA); +#else /* XXX: I don't know why but this works. -- gniibe */ + STNIC_WRITE (PG0_RBCR0, 0x42); + STNIC_WRITE (PG0_RBCR1, 0x00); + STNIC_WRITE (PG0_RBCR0, 0x42); + STNIC_WRITE (PG0_RBCR1, 0x00); + STNIC_WRITE (STNIC_CR, CR_RRD | CR_PG0 | CR_STA); + STNIC_DELAY (); +#endif STNIC_WRITE (PG0_RSAR0, 0); STNIC_WRITE (PG0_RSAR1, output_page); |
From: Mitch D. <mj...@au...> - 2000-05-11 09:49:40
|
NIIBE Yutaka wrote: > > We should keep in mind that people may need to omit some drivers from > the kernel, in some situation (say, using modules, or let kernel run > on small memory). So, selecting "7707" should not be final selection, > it should not force people to include all the hardware driver. You are right. I think asking this question should *restrict* available choices, rather than insisting on them. For example, I think if the user selects the "7707/7709/etc" CPU family, then the next question is, "Is it a 7707?", "Are you using an HD64461?", etc. (Users of the 7750 CPU family would not see this. Instead, they may see a question about whether they are using a SolutionEngine, and hence want support for the SuperIO chip on that board). If you say no to the 7707, you will not be able to choose the devices which are particular to the 7707. If you say yes, you get the normal (y/n/m) questions for the 7707 on-chip devices. The same applies for whichever companion chip you use - if you say you're not using it, the (y/n/m) question for devices in that chip aren't presented to you. If you say yes, you can answer the (y/n/m) questions for the devices in that chip. What do you think? Regards, Mitch. -- | mailto:mj...@au... | Not the official view of: | | mailto:mj...@al... | Australian Calculator Opn | | Certified Linux Evangelist! | Hewlett Packard Australia | |
From: NIIBE Y. <gn...@ch...> - 2000-05-11 09:07:18
|
Mitch Davis wrote: > The CPU core is the same, so no need for a new CPU type. But > the available peripherals depend very much on what CPU/companion > chip you're using. Being able to select this would be a useful > filter of configurable options. > > Is this what you mean? Yes. Thanks much, for explaining with good wording. We should keep in mind that people may need to omit some drivers from the kernel, in some situation (say, using modules, or let kernel run on small memory). So, selecting "7707" should not be final selection, it should not force people to include all the hardware driver. It would be good if things go like this: (a) Selecting "7707" set some defalults (about CPU core, drivers). (b) After that, people can select which drivers are needed. That is, can override the selection of (a). -- |
From: Mitch D. <mj...@au...> - 2000-05-11 08:40:26
|
NIIBE Yutaka wrote: > > pi...@li... wrote: > > Eventually though, my plan is to migrate some (or all) the > > hardware initialization code in the kernel so that the > > kernel can be standalone. The kernel will be standalone, but will then only work on one type of hardware. We would like to make kernels which work on all boards which have the same CPU core. (Although I don't know if we want to go to the extreme of the people who made Linux kernels which would boot both on Amigas and Ataris... :-) I am familiar with the functioning of a small bootloader that would do the trick nicely. I can't release the source, but it wouldn't take much to rewrite it black-box fashion. This could then be released in source form as a basic template for people to change. Add a HOWTO-for-your-hardware, and I think these problems will be history. > Instead, how about introducing kernel parameter for bootloader passing > to the kernel about CPG, as well as RAM size, command line option and > others? Nice idea. At present, PC bootloaders pass in a number of PC-specific parameters (derived from the BIOS) that the kernel uses. We could pass in values in a similar fashion. Regards, Mitch. -- | mailto:mj...@au... | Not the official view of: | | mailto:mj...@al... | Australian Calculator Opn | | Certified Linux Evangelist! | Hewlett Packard Australia | |
From: Mitch D. <mj...@au...> - 2000-05-11 08:31:06
|
Dear Niibe-san, NIIBE Yutaka wrote: > > pi...@li... wrote: > > > > I was planning to create a "7707 processor" entry, or leave 7709 > > and create a "7707-only peripherals" config entry somewhere else, > > once we start have working drivers. > > Please note that we will be able to use (or it works already? I > haven't tested yet) kernel modules. If we use modules for driver, > there's no difference for "vmlinux" between SH7707's and SH7709's. Yes. This job of loading the 7707 modules can be done by the user-land boot process. (Takes on average 2k more per module, but I guess that's ok). > It's OK for me to have some config option for "short cut". For > example, short-cut "SH7707" which means the combination of: > > CPU Type: > SH7707/SH7709/SH7709A/SH7729 > Enable SH7707 only drivers While the kernel code itself would be the same, I think it's worth having some sort of configuration convenience option, such that by saying you "have a 7707" or "have a certain companion chip", the configuration process only presents you with the (y/n) question for peripherals you actually have. > I think that introducing new CPU type option for SH7707 is not > relevant. The CPU core is the same, so no need for a new CPU type. But the available peripherals depend very much on what CPU/companion chip you're using. Being able to select this would be a useful filter of configurable options. Is this what you mean? Regards, Mitch. -- | mailto:mj...@au... | Not the official view of: | | mailto:mj...@al... | Australian Calculator Opn | | Certified Linux Evangelist! | Hewlett Packard Australia | |
From: Mitch D. <mj...@au...> - 2000-05-11 08:09:33
|
Hello, I would like to flag a small problem with building gcc-core from CVS. When the files were checked in, the timestamps they inherited were based on the checkin order. Unfortunately, there is a generated file that gcc uses which is older than the source file, and so gcc complains about not being able to regenerate the file. The name of the generated file is "c-gperf.h", and the name of the source file is "c-parse.gperf". The short-term hack is to use "touch c-gperf.h" to make the generated file newer than the source file. (And if anyone can suggest a solution involving fixing the problem in the CVS repository, please let me know!) Regards, Mitch. -- | mailto:mj...@au... | Not the official view of: | | mailto:mj...@al... | Australian Calculator Opn | | Certified Linux Evangelist! | Hewlett Packard Australia | |
From: NIIBE Y. <gn...@ch...> - 2000-05-11 07:20:31
|
pi...@li... wrote: > We at Lineo are actually in the process of getting all of the 7707 > peripherals supported by the kernel. That includes the FB for the LCD > display, ADC, DAC, etc ... How great! > I was planning to create a "7707 processor" entry, or leave 7709 > and create a "7707-only peripherals" config entry somewhere else, > once we start have working drivers. Please note that we will be able to use (or it works already? I haven't tested yet) kernel modules. If we use modules for driver, there's no difference for "vmlinux" between SH7707's and SH7709's. It's OK for me to have some config option for "short cut". For example, short-cut "SH7707" which means the combination of: CPU Type: SH7707/SH7709/SH7709A/SH7729 Enable SH7707 only drivers I think that introducing new CPU type option for SH7707 is not relevant. -- |
From: NIIBE Y. <gn...@ch...> - 2000-05-11 07:10:28
|
Hi Pierre, pi...@li... wrote: > Eventually though, my plan is to migrate some (or all) the > hardware initialization code in the kernel so that the kernel can be > standalone. Hence, later on in the boot process, the kernel wouldn't have to > guess the value of the clock multiplier. It would be easy to have the clock > multiplier as a config option, or as a value in arch/sh/kernel/head.S that one > can set with an rdev-like utility. > > Let me know if you think that'd be a good thing. I could do this very soon > (next week) because I'll have an opening in my development schedule. Frankly speaking, I don't think it's a good idea to put all initialization code into the kernel, and to let kernel alone reside the system. It's not flexible system design, I feel. Instead, how about introducing kernel parameter for bootloader passing to the kernel about CPG, as well as RAM size, command line option and others? -- |
From: <pi...@li...> - 2000-05-10 16:43:22
|
Hello Niibe-San NIIBE Yutaka wrote: --8<--8<--SNIP-SNIP--8<--8<-- > There's many ways (mode) to set clock for SuperH. I'm not fully > understand about CPG, and I'm not sure, which is the one we can find > on runtime, which is the one we should provide as config option. > > I think that we should provide better support of CPG to get the > information of module clock, and place it in arch/sh/kernel/time.c. > And use the value in the driver. > > Thought? I agree. The only things I do with the CPG are set the watchdog, then set the internal clock frequency to 4x (CPG_FRQCR <- 0x111) which is why my board with a 7MHz crystal has a bus clock of 30MHz. However, the code that does this is part of the bootloader I've developped for the board I'm working on and which is covered by NDA. The bootloader does a wealth of other things like set the memory controller and the wait-states for the DRAM, set and flush the cache, initialize the debug board ...etc... The reason for this is because the bootloader sits in flash memory and downloads any kernel we want to try on the board, so that we don't have to write a kernel in flash (and wear out the flash) each time we want to test it. Eventually though, my plan is to migrate some (or all) the hardware initialization code in the kernel so that the kernel can be standalone. Hence, later on in the boot process, the kernel wouldn't have to guess the value of the clock multiplier. It would be easy to have the clock multiplier as a config option, or as a value in arch/sh/kernel/head.S that one can set with an rdev-like utility. Let me know if you think that'd be a good thing. I could do this very soon (next week) because I'll have an opening in my development schedule. Take care, -- Pierre-Philippe Coupard <pi...@li...> Software Engineer, Lineo, Inc. 801-426-5001 x 208 -- |
From: <pi...@li...> - 2000-05-10 16:20:39
|
Hello Mitch and Niibe-San, Mitch Davis wrote: > NIIBE Yutaka wrote: > > > > Mitch Davis wrote: > > > I am currently holding onto some work which puts the 7707 in > > > a CONFIG class of its own. > --8<--8<--SNIP-SNIP--8<--8<-- > The 7707 core is the same (I believe) as the 7709. It won't That is correct. > make a difference at runtime. Unlike the other members of the > 77[01]x family, I believe you could make a kernel that runs the > same on both. We at Lineo are actually in the process of getting all of the 7707 peripherals supported by the kernel. That includes the FB for the LCD display, ADC, DAC, etc ... I was planning to create a "7707 processor" entry, or leave 7709 and create a "7707-only peripherals" config entry somewhere else, once we start have working drivers. Which approach do you think is better ? Take care, -- Pierre-Philippe Coupard <pi...@li...> Software Engineer, Lineo, Inc. 801-426-5001 x 208 -- |
From: Mitch D. <mj...@au...> - 2000-05-10 07:07:49
|
NIIBE Yutaka wrote: > > Mitch, Thanks much. > > > gcc-core: > > > > - Imported gcc-core-2.95.2. > > - Applied Kaz's PIC patch from around that time. > > - Applied Niibe's visibility patch from around that time. > > I've just found out that this my patch include bad one. Specifically, > the change of gcc/config/sh/linux.h include old/bogus entry removing > crtbeginS.o/crtendS.o, which we should keep original now (Kaz already > support them). Well spotted. I had a look at the patch at the time I added it, and I was wondering about that. I'm assuming you've already checked out gcc-core. Could you update the files in gcc-core to how you want them to be, then send me the "cvs diff -u" please? Thanks, Mitch. -- | mailto:mj...@au... | Not the official view of: | | mailto:mj...@al... | Australian Calculator Opn | | Certified Linux Evangelist! | Hewlett Packard Australia | |
From: NIIBE Y. <gn...@ch...> - 2000-05-10 06:44:48
|
Mitch, Thanks much. > gcc-core: > > - Imported gcc-core-2.95.2. > - Applied Kaz's PIC patch from around that time. > - Applied Niibe's visibility patch from around that time. I've just found out that this my patch include bad one. Specifically, the change of gcc/config/sh/linux.h include old/bogus entry removing crtbeginS.o/crtendS.o, which we should keep original now (Kaz already support them). -- |
From: Mitch D. <mj...@au...> - 2000-05-10 06:32:14
|
Hello, On Monday night, I imported the source for Linux kernel version 2.3.99pre7-6 into our CVS repository. A "cvs update" will ensure you have these changes. Regards, Mitch. -- | mailto:mj...@au... | Not the official view of: | | mailto:mj...@al... | Australian Calculator Opn | | Certified Linux Evangelist! | Hewlett Packard Australia | |
From: Mitch D. <mj...@au...> - 2000-05-10 06:29:24
|
Hello, This past weekend, I imported binutils, GCC and GDB into CVS. I have not had time to extensively test them, so I invite you to. Please note that the CVS name for GCC is "gcc-core". First, it's unclear about which versions to use, so I have used the versions that Greg and I found successful back in February. Unfortunately that means that the version in CVS won't have the most recent improvements, and we will have to do some updating over the next week or so. Here's a rundown on what I've done. (This is from memory, so I can't recall the version numbers). binutils: - Imported from the Cygnus binutils-000206 snapshot. - Applied the bfd fix. - Applied Kaz's patch from around that time. gcc-core: - Imported gcc-core-2.95.2. - Applied Kaz's PIC patch from around that time. - Applied Niibe's visibility patch from around that time. gdb: - Imported gdb-4.18. - Applied Kaz's gdb-sh patch from around that time. Kaz and Niibe (and others if necessary), here's what I recommend doing, if and when you want the tools in CVS to be updated to what you currently have. - Check out binutils/gcc-core/gdb. - Use "diff -u -r --new-file" then the name of the CVS-controlled dir, then the name of your local dir to produce a diff with the changes in it. - I would suggest using the diff "-x" flag to tell diff to ignore certain files, eg, "diff -x CVS -x '*~'" and so on, until the diff just has source differences. - Hand-edit the diff so it has the changes you want applied to CVS. - Mail it to me. I will then check this into CVS. Hopefully within a week the versions in CVS will be the latest and greatest and we can recommend that people start using them. If you have any questions, comments or suggestions, please don't hesitate to mail me. Regards, Mitch. -- | mailto:mj...@au... | Not the official view of: | | mailto:mj...@al... | Australian Calculator Opn | | Certified Linux Evangelist! | Hewlett Packard Australia | |
From: Mitch D. <mj...@au...> - 2000-05-10 01:36:31
|
NIIBE Yutaka wrote: > > Mitch Davis wrote: > > I am currently holding onto some work which puts the 7707 in > > a CONFIG class of its own. > > My concern is that if it's almost same (with 7709) in terms of > peripherals, it would be good _not_ to have CONFIG class of its own. > Instead, make the class of 7707/7709/7709A/7729, and when needed (and > possible), distingush on runtime. You can find the datasheet for the 7707 here: http://semiconductor.hitachi.com/products/product_abstract.cfm?p_id=178 From a configuration point of view, it would be nice to offer the chance to compile in drivers for the 7707 on-chip peripherals only if they're compiling for a 7707. Otherwise people who don't use the 7707 will be drowned in options they can't use. > Further, if there's good way to fixup the code on runtime, we don't > need to CONFIG class of CPU on compile time, provided it won't > complicate the code much. The 7707 core is the same (I believe) as the 7709. It won't make a difference at runtime. Unlike the other members of the 77[01]x family, I believe you could make a kernel that runs the same on both. Regards, Mitch. -- | mailto:mj...@au... | Not the official view of: | | mailto:mj...@al... | Australian Calculator Opn | | Certified Linux Evangelist! | Hewlett Packard Australia | |
From: NIIBE Y. <gn...@ch...> - 2000-05-10 01:23:02
|
Mitch Davis wrote: > I am currently holding onto some work which puts the 7707 in > a CONFIG class of its own. My concern is that if it's almost same (with 7709) in terms of peripherals, it would be good _not_ to have CONFIG class of its own. Instead, make the class of 7707/7709/7709A/7729, and when needed (and possible), distingush on runtime. Also, if someone will work for SH7702 and SH7718, we will define the CONFIG class of SH7702/SH7708/SH7718. I think that we can distingush SH7702 and SH7708 by the size of cache, SH7708 and SH7718 by the existence of FPU. Further, if there's good way to fixup the code on runtime, we don't need to CONFIG class of CPU on compile time, provided it won't complicate the code much. -- |
From: Mitch D. <mj...@au...> - 2000-05-10 01:05:57
|
NIIBE Yutaka wrote: > > I'm not sure what's 7707 is. The 7707 is slightly slower than the 7709, but what it has is an extraordinary array of on-chip peripherals. If you were going to build a one-chip system, this would be the one you'd pick. > Would it be better to have config option for 7707/7709/7709A? I am currently holding onto some work which puts the 7707 in a CONFIG class of its own. > Is there any footprint (or fingerprint, whatever we say) to > distingush 7707 on runtime? Not sure. But there's no point compiling support for non-7707 on-chip peripherals if it's not a 7707. Regards, Mitch. -- | mailto:mj...@au... | Not the official view of: | | mailto:mj...@al... | Australian Calculator Opn | | Certified Linux Evangelist! | Hewlett Packard Australia | |
From: NIIBE Y. <gn...@ch...> - 2000-05-10 00:22:50
|
pi...@li... wrote: > As some of you know already, I'm working with a 7707-based (little > endian) board from Hypercom, equipped with 16M of RAM and a "debug > sub-board" from Hitachi. This debug board is what I use to download the > kernel and the initrd filesystem to the board (I don't have a working > flash driver yet so I use a ramdisk). Also, the debug board features 8 > LEDs and a 8-digit 7-segment display that one can use to help debugging > without console or debugger. I'm not sure what's 7707 is. It seems for me that it's slower version of 7709. Would it be better to have config option for 7707/7709/7709A? Is there any footprint (or fingerprint, whatever we say) to distingush 7707 on runtime? > So, I thought I might contribute the modifications I have done to the > kernel to support that specific board, as well as other "niceties". The > patch at the end of this message is against the 2.3.99-pre7 kernel that > is in the linuxsh CVS on sourceforge (tagged > "L2_3_99_PRE7-6_AFTER: 1.4"). It provides : Thanks for the patch. For now, I consider about: > - drivers/char/sh_sci.c and drivers/char/sh_sci.h have been modified for > a bus clock of 30Mhz and take the clock source of the SCI into account, > so that it is possible to use the full range of baudrates from 110 bps > to 115200 bps. Also, "serial_console_setup()" now sets the baudrate > before exiting, which is required if the kernel uses the SCI as initial > console. TODO : set the bus clock automagically, or at least have an > config option. Right now, it is hard-coded (yuk). There's many ways (mode) to set clock for SuperH. I'm not fully understand about CPG, and I'm not sure, which is the one we can find on runtime, which is the one we should provide as config option. I think that we should provide better support of CPG to get the information of module clock, and place it in arch/sh/kernel/time.c. And use the value in the driver. Thought? -- |
From: <pi...@li...> - 2000-05-09 18:03:27
|
Hello everybody, First, thanks again to Niibe and Kaz for the modifications to binutils and gcc : now glibc compiles and works flawlessly for me. What a relief ! As some of you know already, I'm working with a 7707-based (little endian) board from Hypercom, equipped with 16M of RAM and a "debug sub-board" from Hitachi. This debug board is what I use to download the kernel and the initrd filesystem to the board (I don't have a working flash driver yet so I use a ramdisk). Also, the debug board features 8 LEDs and a 8-digit 7-segment display that one can use to help debugging without console or debugger. So, I thought I might contribute the modifications I have done to the kernel to support that specific board, as well as other "niceties". The patch at the end of this message is against the 2.3.99-pre7 kernel that is in the linuxsh CVS on sourceforge (tagged "L2_3_99_PRE7-6_AFTER: 1.4"). It provides : - additional code to arch/sh/kernel/head.S to relocate a ramdisk image at a fixed location in memory. This ramdisk is appended to the stripped kernel file and the offset from the start of the file is poked into the header. There is a little shell script called "spit_vmlinux.lin" and an accompanying program called "strtoul.c" (that has to be compiled) to generate the final file. Note that "strtoul.c" outputs 4 bytes in little-endian format. Also note that the last line of "spit_vmlinux.lin" calls a program that I have developped in-house but I can't disclose, so it needs to be commented out. TODO : recode the shell script in C, make it endian-independant and move it to arch/sh/boot - A new config entry in "processor type and features" to specify the amount of RAM on the board (in kB) - A new config entry in "kernel hacking" called "Hitachi debug sub-board LEDs tracing" : when this option is enabled, the kernel will display codes on the 7-segment display on the Hitachi sub-debug board while booting. Then, when the idle task is reached, the 8 LEDs should cycle slowly. The codes are instrumented in arch/sh/kernel/head.S, init/main.c and arch/sh/kernel/process.c. It is very useful if your kernel hangs early and you have no way to debug it or do printk's. - drivers/char/tty_io.c now output "SCI serial driver registered (major 4)" when booting - drivers/char/sh_sci.c and drivers/char/sh_sci.h have been modified for a bus clock of 30Mhz and take the clock source of the SCI into account, so that it is possible to use the full range of baudrates from 110 bps to 115200 bps. Also, "serial_console_setup()" now sets the baudrate before exiting, which is required if the kernel uses the SCI as initial console. TODO : set the bus clock automagically, or at least have an config option. Right now, it is hard-coded (yuk). - the default defconfig (arch/sh/defconfig) is for the Hypercom board I'm working on, i.e. with 16384k of RAM and the "Hitachi debug sub-board LEDs tracing" enabled by default. That's it for now. The Hitachi debug sub-board also features a serial port (completely separate from the SCI/SCIF on the processor) and a parallel port (normally used to transfer bootable images and firmware to the board). If anybody is interested, I can whip up some code to add kernel support for them. Take care ! --- Pierre-Philippe Coupard <pi...@li...> Software Engineer, Lineo, Inc. 801-426-5001 x 208 --- --8<--8<--SNIP-SNIP--8<--8<-- diff -ruN linux-2.3.99_NY/Makefile linux-2.3.99_NY+PPC/Makefile --- linux-2.3.99_NY/Makefile Sat Apr 29 09:46:02 2000 +++ linux-2.3.99_NY+PPC/Makefile Mon May 8 15:17:51 2000 @@ -5,7 +5,8 @@ KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) -ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/) +#PPC ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/) +ARCH := sh CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ else if [ -x /bin/bash ]; then echo /bin/bash; \ diff -ruN linux-2.3.99_NY/arch/sh/config.in linux-2.3.99_NY+PPC/arch/sh/config.in --- linux-2.3.99_NY/arch/sh/config.in Thu May 4 00:32:44 2000 +++ linux-2.3.99_NY+PPC/arch/sh/config.in Mon May 8 16:15:20 2000 @@ -42,6 +42,9 @@ hex 'Physical memory start address' CONFIG_MEMORY_START 08000000 hex 'I/O port offset address' CONFIG_IOPORT_START ba000000 fi +#PPC +int 'Amount of physical memory (kB)' CONFIG_MEMORY_SIZE 16384 +#\PPC endmenu mainmenu_option next_comment @@ -212,5 +215,8 @@ comment 'Kernel hacking' bool 'Magic SysRq key' CONFIG_MAGIC_SYSRQ +#PPC +bool 'Hitachi debug sub-board LEDs tracing' CONFIG_DEBUG_LEDS +#\PPC bool 'GDB Stub kernel debug' CONFIG_DEBUG_KERNEL_WITH_GDB_STUB endmenu diff -ruN linux-2.3.99_NY/arch/sh/defconfig linux-2.3.99_NY+PPC/arch/sh/defconfig --- linux-2.3.99_NY/arch/sh/defconfig Fri Apr 14 13:14:00 2000 +++ linux-2.3.99_NY+PPC/arch/sh/defconfig Mon May 8 16:27:45 2000 @@ -1,5 +1,5 @@ # -# Automatically generated make config: don't edit +# Automatically generated by make menuconfig: don't edit # CONFIG_SUPERH=y CONFIG_UID16=y @@ -7,11 +7,13 @@ # # Code maturity level options # -# CONFIG_EXPERIMENTAL is not set +CONFIG_EXPERIMENTAL=y # # Processor type and features # +CONFIG_SH_GENERIC=y +# CONFIG_SH_SOLUTION_ENGINE is not set CONFIG_CPU_SUBTYPE_SH7708=y # CONFIG_CPU_SUBTYPE_SH7709 is not set # CONFIG_CPU_SUBTYPE_SH7750 is not set @@ -19,11 +21,15 @@ # CONFIG_CPU_SH4 is not set CONFIG_LITTLE_ENDIAN=y CONFIG_MEMORY_START=0c000000 +CONFIG_IOPORT_START=ba000000 +CONFIG_MEMORY_SIZE=16384 # # Loadable module support # -# CONFIG_MODULES is not set +CONFIG_MODULES=y +# CONFIG_MODVERSIONS is not set +# CONFIG_KMOD is not set # # General setup @@ -31,11 +37,11 @@ # CONFIG_ISA is not set # CONFIG_SBUS is not set # CONFIG_NET is not set -CONFIG_CF_ENABLER=y +# CONFIG_CF_ENABLER is not set # CONFIG_PCI is not set # CONFIG_HOTPLUG is not set # CONFIG_PCMCIA is not set -# CONFIG_SYSVIPC is not set +CONFIG_SYSVIPC=y # CONFIG_BSD_PROCESS_ACCT is not set # CONFIG_SYSCTL is not set CONFIG_KCORE_ELF=y @@ -56,12 +62,9 @@ # CONFIG_PARIDE is not set # CONFIG_BLK_CPQ_DA is not set # CONFIG_BLK_DEV_DAC960 is not set - -# -# Additional Block Devices -# -# CONFIG_BLK_DEV_LOOP is not set +CONFIG_BLK_DEV_LOOP=m # CONFIG_BLK_DEV_NBD is not set +# CONFIG_BLK_DEV_LVM is not set # CONFIG_BLK_DEV_MD is not set # CONFIG_MD_LINEAR is not set # CONFIG_MD_STRIPED is not set @@ -71,35 +74,9 @@ # # ATA/IDE/MFM/RLL support # -CONFIG_IDE=y - -# -# IDE, ATA and ATAPI Block devices -# -CONFIG_BLK_DEV_IDE=y - -# -# Please see Documentation/ide.txt for help/info on IDE drives -# -# CONFIG_BLK_DEV_HD_IDE is not set -# CONFIG_BLK_DEV_HD is not set -CONFIG_BLK_DEV_IDEDISK=y -# CONFIG_IDEDISK_MULTI_MODE is not set -# CONFIG_BLK_DEV_IDECS is not set -# CONFIG_BLK_DEV_IDECD is not set -# CONFIG_BLK_DEV_IDETAPE is not set -# CONFIG_BLK_DEV_IDEFLOPPY is not set -# CONFIG_BLK_DEV_IDESCSI is not set - -# -# IDE chipset support/bugfixes -# -# CONFIG_BLK_DEV_CMD640 is not set -# CONFIG_BLK_DEV_CMD640_ENHANCED is not set -# CONFIG_BLK_DEV_ISAPNP is not set -# CONFIG_IDE_CHIPSETS is not set -# CONFIG_IDEDMA_AUTO is not set +# CONFIG_IDE is not set # CONFIG_BLK_DEV_IDE_MODES is not set +# CONFIG_BLK_DEV_HD is not set # # SCSI support @@ -114,10 +91,6 @@ CONFIG_SH_SCI_SERIAL=y # CONFIG_SH_SCIF_SERIAL is not set CONFIG_SERIAL_CONSOLE=y - -# -# Unix 98 PTY support -# # CONFIG_UNIX98_PTYS is not set # @@ -137,6 +110,7 @@ # CONFIG_VFAT_FS is not set # CONFIG_EFS_FS is not set # CONFIG_CRAMFS is not set +# CONFIG_RAMFS is not set # CONFIG_ISO9660_FS is not set # CONFIG_JOLIET is not set # CONFIG_MINIX_FS is not set @@ -175,4 +149,5 @@ # Kernel hacking # # CONFIG_MAGIC_SYSRQ is not set -CONFIG_DEBUG_KERNEL_WITH_GDB_STUB=y +CONFIG_DEBUG_LEDS=y +# CONFIG_DEBUG_KERNEL_WITH_GDB_STUB is not set diff -ruN linux-2.3.99_NY/arch/sh/kernel/Makefile linux-2.3.99_NY+PPC/arch/sh/kernel/Makefile --- linux-2.3.99_NY/arch/sh/kernel/Makefile Tue May 2 20:24:42 2000 +++ linux-2.3.99_NY+PPC/arch/sh/kernel/Makefile Mon May 8 15:13:02 2000 @@ -20,6 +20,12 @@ O_OBJS += cf-enabler.o endif +#PPC +ifdef CONFIG_DEBUG_LEDS +O_OBJS += debug_leds.o +endif +#\PPC + ifdef CONFIG_SH_GENERIC O_OBJS += io_generic.o endif diff -ruN linux-2.3.99_NY/arch/sh/kernel/debug_leds.c linux-2.3.99_NY+PPC/arch/sh/kernel/debug_leds.c --- linux-2.3.99_NY/arch/sh/kernel/debug_leds.c Wed Dec 31 17:00:00 1969 +++ linux-2.3.99_NY+PPC/arch/sh/kernel/debug_leds.c Mon May 8 15:44:27 2000 @@ -0,0 +1,23 @@ +#include "asm/debug_leds.h" + + + +/* Global vars */ +unsigned long LED_hex_val; +unsigned char LED_led_val; + + + + +/* Functions */ +void LED_display_hex_val(void) +{ + (* ((volatile unsigned long * const)(LED_HEX_DISPLAY_ADDR)))=LED_hex_val; +} + + + +void LED_display_led_val(void) +{ + (* ((volatile unsigned long * const)(LED_LED_DISPLAY_ADDR)))=LED_led_val; +} diff -ruN linux-2.3.99_NY/arch/sh/kernel/head.S linux-2.3.99_NY+PPC/arch/sh/kernel/head.S --- linux-2.3.99_NY/arch/sh/kernel/head.S Fri Apr 28 11:58:50 2000 +++ linux-2.3.99_NY+PPC/arch/sh/kernel/head.S Mon May 8 15:10:42 2000 @@ -36,12 +36,70 @@ * */ ENTRY(_stext) +/*PPC*/ +load_LED_addresses: + mov.l ledaddr,r12 + xor r13,r13 + mov.b r13,@r12 /* All leds = OFF */ + mov.l segaddr,r12 + mov.l r13,@r12 /* Displays 0 */ + bra load_LED_addresses_carry_on + nop + .balign 4 +segaddr:.long 0xa8060000 +ledaddr:.long 0xa8040000 + .balign 4 +load_LED_addresses_carry_on: +/*/PPC*/ + +/*PPC*/ add #1,r13 +/*PPC*/ mov.l r13,@r12 /* Display 1 */ + +/*PPC*/ + ! First, relocate the initrd data + mov.l rdata,r0 + add #0x10,r0 + mov.l @r0,r1 ! r1 = where the initrd data is now + add #4,r0 + mov.l @r0,r2 ! r2 = length of the initrd data + mov.l rreloc,r3 ! r3 = where the initrd data is reloc. + xor r4,r4 ! r4 = relocated bytes counter +reloc: mov.l @r1,r0 + mov.l r0,@r3 + add #4,r1 + add #4,r3 + add #4,r4 + cmp/hs r2,r4 + bf/s reloc + nop + +/*PPC*/ add #1,r13 +/*PPC*/ mov.l r13,@r12 /* Display 2 */ + + ! Poke the new address of initrd in the header + mov.l rdata,r0 + add #0x10,r0 + mov.l prreloc,r1 + mov.l r1,@r0 + +/*PPC*/ add #1,r13 +/*PPC*/ mov.l r13,@r12 /* Display 3 */ +/*\PPC*/ + ! Initialize Status Register mov.l 1f, $r0 ! MD=1, RB=0, BL=0, IMASK=0xF ldc $r0, $sr + +/*PPC*/ add #1,r13 +/*PPC*/ mov.l r13,@r12 /* Display 4 */ + ! Initialize global interrupt mask mov #0, $r0 ldc $r0, $r6_bank + +/*PPC*/ add #1,r13 +/*PPC*/ mov.l r13,@r12 /* Display 5 */ + ! mov.l 2f, $r0 mov $r0, $r15 ! Set initial r15 (stack pointer) @@ -50,6 +108,10 @@ sub $r1, $r0 ! ldc $r0, $r7_bank ! ... and init_task ! + +/*PPC*/ add #1,r13 +/*PPC*/ mov.l r13,@r12 /* Display 6 */ + #if defined(__SH4__) ! Initialize fpu mov.l 7f, $r0 @@ -60,6 +122,10 @@ mov.l 6f, $r0 jsr @$r0 nop + +/*PPC*/ add #1,r13 +/*PPC*/ mov.l r13,@r12 /* Display 7 */ + ! Clear BSS area mov.l 3f, $r1 add #4, $r1 @@ -68,6 +134,10 @@ 9: cmp/hs $r2, $r1 bf/s 9b ! while (r1 < r2) mov.l $r0,@-$r2 + +/*PPC*/ add #1,r13 +/*PPC*/ mov.l r13,@r12 /* Display 8 */ + ! Start kernel mov.l 5f, $r0 jmp @$r0 @@ -83,3 +153,9 @@ #if defined(__SH4__) 7: .long SYMBOL_NAME(fpu_init) #endif + +/*PPC*/ +rdata: .long empty_zero_page ! To find the initial ramdisk params +rreloc: .long 0x8c800000 ! Where the initrd ramdisk is relocated +prreloc:.long 0x00800000 ! Same as rreloc, in a paged environment +/*\PPC*/ diff -ruN linux-2.3.99_NY/arch/sh/kernel/process.c linux-2.3.99_NY+PPC/arch/sh/kernel/process.c --- linux-2.3.99_NY/arch/sh/kernel/process.c Fri Apr 28 11:58:50 2000 +++ linux-2.3.99_NY+PPC/arch/sh/kernel/process.c Mon May 8 15:15:03 2000 @@ -42,6 +42,12 @@ #include <linux/irq.h> +/*PPC*/ +#ifdef CONFIG_DEBUG_LEDS +#include "asm/debug_leds.h" +#endif +/*\PPC*/ + static int hlt_counter=0; #define HARD_IDLE_TIMEOUT (HZ / 3) @@ -61,12 +67,39 @@ */ void cpu_idle(void *unused) { +/*PPC*/ +#ifdef CONFIG_DEBUG_LEDS +LED_hex_val=0x200;LED_display_hex_val(); /* Displays 200 */ +LED_led_val=0x0;LED_display_led_val(); /* All leds off */ +#endif +/*\PPC*/ + /* endless idle loop with no priority at all */ +/*PPC*/ +#ifdef CONFIG_DEBUG_LEDS +/*PPC*/ LED_hex_val++;LED_display_hex_val(); /* Displays 201 */ +#endif +/*\PPC*/ init_idle(); +/*PPC*/ +#ifdef CONFIG_DEBUG_LEDS +/*PPC*/ LED_hex_val++;LED_display_hex_val(); /* Displays 202 */ +#endif +/*\PPC*/ current->priority = 0; current->counter = -100; +/*PPC*/ +#ifdef CONFIG_DEBUG_LEDS +/*PPC*/ LED_hex_val++;LED_display_hex_val(); /* Displays 203 */ +#endif +/*\PPC*/ while (1) { +/*PPC*/ +#ifdef CONFIG_DEBUG_LEDS +/*PPC*/ LED_led_val++;LED_display_led_val(); /* leds cycle a byte */ +#endif +/*\PPC*/ while (!current->need_resched) { if (hlt_counter) continue; diff -ruN linux-2.3.99_NY/arch/sh/kernel/setup.c linux-2.3.99_NY+PPC/arch/sh/kernel/setup.c --- linux-2.3.99_NY/arch/sh/kernel/setup.c Fri Apr 28 11:58:50 2000 +++ linux-2.3.99_NY+PPC/arch/sh/kernel/setup.c Mon May 8 16:20:03 2000 @@ -138,7 +138,9 @@ memory_start = (unsigned long)PAGE_OFFSET+__MEMORY_START; /* Default is 4Mbyte. */ - memory_end = (unsigned long)PAGE_OFFSET+0x00400000+__MEMORY_START; +/*PPC memory_end = (unsigned long)PAGE_OFFSET+0x00400000+__MEMORY_START;*/ +/*PPC ... 16Mbyte. */ +/*PPC*/ memory_end = (unsigned long)PAGE_OFFSET+(CONFIG_MEMORY_SIZE<<10)+__MEMORY_START; for (;;) { /* diff -ruN linux-2.3.99_NY/drivers/char/sh-sci.c linux-2.3.99_NY+PPC/drivers/char/sh-sci.c --- linux-2.3.99_NY/drivers/char/sh-sci.c Sun May 7 17:31:59 2000 +++ linux-2.3.99_NY+PPC/drivers/char/sh-sci.c Mon May 8 16:04:21 2000 @@ -115,37 +115,73 @@ static void sci_set_baud(struct sci_port *port) { int t; +/*PPC*/ int cks=0; switch (port->gs.baud) { case 0: t = -1; break; +/*PPC*/ + case 110: + t = BPS_110; + cks = CKS_BPS_110; + break; + case 150: + t = BPS_150; + cks = CKS_BPS_150; + break; + case 300: + t = BPS_300; + cks = CKS_BPS_300; + break; + case 600: + t = BPS_600; + cks = CKS_BPS_600; + break; + case 1200: + t = BPS_1200; + cks = CKS_BPS_1200; + break; +/*\PPC*/ case 2400: t = BPS_2400; +/*PPC*/ cks = CKS_BPS_2400; break; case 4800: t = BPS_4800; +/*PPC*/ cks = CKS_BPS_4800; break; case 9600: t = BPS_9600; +/*PPC*/ cks = CKS_BPS_9600; break; case 19200: t = BPS_19200; +/*PPC*/ cks = CKS_BPS_19200; break; case 38400: t = BPS_38400; +/*PPC*/ cks = CKS_BPS_38400; + break; +/*PPC*/ + case 57600: + t = BPS_57600; + cks = CKS_BPS_57600; break; +/*\PPC*/ default: printk(KERN_INFO "sci: unsupported baud rate: %d, use 115200 instead.\n", port->gs.baud); case 115200: t = BPS_115200; +/*PPC*/ cks = CKS_BPS_115200; break; } if (t > 0) { sci_setsignals (port, 1, -1); if(t >= 256) { - ctrl_out((ctrl_in(SCSMR) & ~3) | 1, SCSMR); +/*PPC ctrl_out((ctrl_in(SCSMR) & ~3) | 1, SCSMR);*/ +/*PPC*/ ctrl_out((ctrl_in(SCSMR) & ~3) | cks, SCSMR); t >>= 2; } ctrl_outb(t, SCBRR); @@ -684,8 +720,10 @@ sci_driver.type = TTY_DRIVER_TYPE_SERIAL; sci_driver.subtype = SERIAL_TYPE_NORMAL; sci_driver.init_termios = tty_std_termios; - sci_driver.init_termios.c_cflag = - B115200 | CS8 | CREAD | HUPCL | CLOCAL | CRTSCTS; +/*PPC sci_driver.init_termios.c_cflag =*/ +/*PPC B115200 | CS8 | CREAD | HUPCL | CLOCAL | CRTSCTS;*/ +/*PPC*/ sci_driver.init_termios.c_cflag = +/*PPC*/ SCI_DEFAULT_SPEED | CS8 | CREAD | HUPCL | CLOCAL; sci_driver.flags = TTY_DRIVER_REAL_RAW; sci_driver.refcount = &sci_refcount; sci_driver.table = sci_table; @@ -772,6 +810,7 @@ #ifdef CONFIG_DEBUG_KERNEL_WITH_GDB_STUB gdb_detach(); #endif +/*PPC*/ printk(KERN_ERR "SCI serial driver registered (major 4)\n"); return 0; /* Return -EIO when not detected */ } @@ -949,7 +988,8 @@ */ static int __init serial_console_setup(struct console *co, char *options) { - int baud = 115200; +/*PPC int baud = 115200;*/ +/*PPC*/ int baud = SCI_DEFAULT_SPEED_VAL; int bits = 8; int parity = 'n'; int cflag = CREAD | HUPCL | CLOCAL; @@ -1005,6 +1045,19 @@ co->cflag = cflag; /* XXX: set baud, char, and parity here. */ +/*PPC*/ + { + struct termios termios; + struct tty_struct tty; + struct sci_port port; + + termios.c_cflag=cflag; + port.gs.baud=baud; + tty.termios=&termios; + port.gs.tty=&tty; + sci_set_termios_cflag(&port); + } +/*\PPC*/ return 0; } diff -ruN linux-2.3.99_NY/drivers/char/sh-sci.h linux-2.3.99_NY+PPC/drivers/char/sh-sci.h --- linux-2.3.99_NY/drivers/char/sh-sci.h Thu May 4 21:46:04 2000 +++ linux-2.3.99_NY+PPC/drivers/char/sh-sci.h Mon May 8 15:57:05 2000 @@ -9,6 +9,9 @@ */ #include <linux/config.h> +/*PPC*/ #define SCI_DEFAULT_SPEED B9600 +/*PPC*/ #define SCI_DEFAULT_SPEED_VAL 9600 + #if defined(CONFIG_SH_SCI_SERIAL) #if defined(__sh3__) #define SCSMR (volatile unsigned char *)0xfffffe80 @@ -28,7 +31,8 @@ #define SCSPTR 0xffe0001c #endif -#define SCSCR_INIT 0x30 /* TIE=0,RIE=0,TE=1,RE=1 */ +/*PPC #define SCSCR_INIT 0x30 *//* TIE=0,RIE=0,TE=1,RE=1 */ +/*PPC*/ #define SCSCR_INIT 0x31 /* TIE=0,RIE=0,TE=1,RE=1,CKE1=0,CKE0=1*/ #define SCI_TD_E 0x80 #define SCI_RD_F 0x40 @@ -198,12 +202,12 @@ * Should we have config option for peripheral clock? * Or we get the value from time.c. */ -#if defined(__sh3__) +/*PPC #if defined(__sh3__) #if defined(CONFIG_CPU_SUBTYPE_SH7709) #define PCLK 33333333 #else -#define PCLK 14745600 /* Isn't it 15MHz? */ -#endif +#define PCLK 14745600 *//* Isn't it 15MHz? */ +/*#endif #elif defined(__SH4__) #define PCLK 33333333 #endif @@ -214,4 +218,33 @@ #define BPS_9600 SCBRR_VALUE(9600) #define BPS_19200 SCBRR_VALUE(19200) #define BPS_38400 SCBRR_VALUE(38400) -#define BPS_115200 SCBRR_VALUE(115200) +#define BPS_115200 SCBRR_VALUE(115200)*/ + +/* PPC : This table is made from the Hitachi 7707 hardware manual, with + additions from Gary Cline (Hypercom) for higher speed baudrates. It assumes + a bus clock of 30Mhz. It also specifies the clock source so that we can use + a greater range of baudrates */ +#define BPS_110 132 +#define CKS_BPS_110 3 +#define BPS_150 97 +#define CKS_BPS_150 2 +#define BPS_300 194 +#define CKS_BPS_300 2 +#define BPS_600 97 +#define CKS_BPS_600 2 +#define BPS_1200 194 +#define CKS_BPS_1200 1 +#define BPS_2400 97 +#define CKS_BPS_2400 1 +#define BPS_4800 194 +#define CKS_BPS_4800 0 +#define BPS_9600 97 +#define CKS_BPS_9600 0 +#define BPS_19200 48 +#define CKS_BPS_19200 0 +#define BPS_38400 23 +#define CKS_BPS_38400 0 +#define BPS_57600 15 +#define CKS_BPS_57600 0 +#define BPS_115200 7 +#define CKS_BPS_115200 0 Only in linux-2.3.99_NY+PPC/include: asm diff -ruN linux-2.3.99_NY/include/asm-sh/debug_leds.h linux-2.3.99_NY+PPC/include/asm-sh/debug_leds.h --- linux-2.3.99_NY/include/asm-sh/debug_leds.h Wed Dec 31 17:00:00 1969 +++ linux-2.3.99_NY+PPC/include/asm-sh/debug_leds.h Mon May 8 15:43:42 2000 @@ -0,0 +1,15 @@ +/* Addresses */ +#define LED_HEX_DISPLAY_ADDR 0xa8060000 +#define LED_LED_DISPLAY_ADDR 0xa8040000 + + + +/* Global vars */ +extern unsigned long LED_hex_val; +extern unsigned char LED_led_val; + + + +/* Function prototypes */ +void LED_display_hex_val(void); +void LED_display_led_val(void); diff -ruN linux-2.3.99_NY/init/main.c linux-2.3.99_NY+PPC/init/main.c --- linux-2.3.99_NY/init/main.c Sat Apr 29 09:46:04 2000 +++ linux-2.3.99_NY+PPC/init/main.c Mon May 8 15:43:01 2000 @@ -67,6 +67,12 @@ #include <asm/smp.h> #endif +/*PPC*/ +#ifdef CONFIG_DEBUG_LEDS +#include "asm/debug_leds.h" +#endif +/*\PPC*/ + /* * Versions of gcc older than that listed below may actually compile * and link okay, but the end product can have subtle run time bugs. @@ -512,19 +518,77 @@ { char * command_line; unsigned long mempages; + +/*PPC*/ +#ifdef CONFIG_DEBUG_LEDS +LED_hex_val=0x100;LED_display_hex_val(); /* Displays 100 */ +#endif +/*\PPC*/ + /* * Interrupts are still disabled. Do necessary setups, then * enable them */ +/*PPC*/ +#ifdef CONFIG_DEBUG_LEDS +/*PPC*/ LED_hex_val++;LED_display_hex_val(); /* Displays 101 */ +#endif +/*\PPC*/ lock_kernel(); +/*PPC*/ +#ifdef CONFIG_DEBUG_LEDS +/*PPC*/ LED_hex_val++;LED_display_hex_val(); /* Displays 102 */ +#endif +/*\PPC*/ printk(linux_banner); +/*PPC*/ +#ifdef CONFIG_DEBUG_LEDS +/*PPC*/ LED_hex_val++;LED_display_hex_val(); /* Displays 103 */ +#endif +/*\PPC*/ setup_arch(&command_line); +/*PPC*/ +#ifdef CONFIG_DEBUG_LEDS +/*PPC*/ LED_hex_val++;LED_display_hex_val(); /* Displays 104 */ +/*PPC*/ LED_hex_val++;LED_display_hex_val(); /* Displays 105 */ +#endif +/*\PPC*/ trap_init(); +/*PPC*/ +#ifdef CONFIG_DEBUG_LEDS +/*PPC*/ LED_hex_val++;LED_display_hex_val(); /* Displays 106 */ +#endif +/*\PPC*/ init_IRQ(); +/*PPC*/ +#ifdef CONFIG_DEBUG_LEDS +/*PPC*/ LED_hex_val++;LED_display_hex_val(); /* Displays 107 */ +#endif +/*\PPC*/ sched_init(); +/*PPC*/ +#ifdef CONFIG_DEBUG_LEDS +/*PPC*/ LED_hex_val++;LED_display_hex_val(); /* Displays 108 */ +#endif +/*\PPC*/ time_init(); +/*PPC*/ +#ifdef CONFIG_DEBUG_LEDS +/*PPC*/ LED_hex_val++;LED_display_hex_val(); /* Displays 109 */ +#endif +/*\PPC*/ softirq_init(); +/*PPC*/ +#ifdef CONFIG_DEBUG_LEDS +/*PPC*/ LED_hex_val++;LED_display_hex_val(); /* Displays 10A */ +#endif +/*\PPC*/ parse_options(command_line); +/*PPC*/ +#ifdef CONFIG_DEBUG_LEDS +/*PPC*/ LED_hex_val++;LED_display_hex_val(); /* Displays 10B */ +#endif +/*\PPC*/ /* * HACK ALERT! This is early. We're enabling the console before @@ -532,9 +596,19 @@ * this. But we do want output early, in case something goes wrong. */ console_init(); +/*PPC*/ +#ifdef CONFIG_DEBUG_LEDS +/*PPC*/ LED_hex_val++;LED_display_hex_val(); /* Displays 10C */ +#endif +/*\PPC*/ #ifdef CONFIG_MODULES init_modules(); #endif +/*PPC*/ +#ifdef CONFIG_DEBUG_LEDS +/*PPC*/ LED_hex_val++;LED_display_hex_val(); /* Displays 10D */ +#endif +/*\PPC*/ if (prof_shift) { unsigned int size; /* only text is profiled */ @@ -544,10 +618,30 @@ size = prof_len * sizeof(unsigned int) + PAGE_SIZE-1; prof_buffer = (unsigned int *) alloc_bootmem(size); } +/*PPC*/ +#ifdef CONFIG_DEBUG_LEDS +/*PPC*/ LED_hex_val++;LED_display_hex_val(); /* Displays 10E */ +#endif +/*\PPC*/ kmem_cache_init(); +/*PPC*/ +#ifdef CONFIG_DEBUG_LEDS +/*PPC*/ LED_hex_val++;LED_display_hex_val(); /* Displays 10F */ +#endif +/*\PPC*/ sti(); +/*PPC*/ +#ifdef CONFIG_DEBUG_LEDS +/*PPC*/ LED_hex_val++;LED_display_hex_val(); /* Displays 110 */ +#endif +/*\PPC*/ calibrate_delay(); +/*PPC*/ +#ifdef CONFIG_DEBUG_LEDS +/*PPC*/ LED_hex_val++;LED_display_hex_val(); /* Displays 111 */ +#endif +/*\PPC*/ #ifdef CONFIG_BLK_DEV_INITRD if (initrd_start && !initrd_below_start_ok && initrd_start < min_low_pfn << PAGE_SHIFT) { @@ -556,46 +650,166 @@ initrd_start = 0; } #endif +/*PPC*/ +#ifdef CONFIG_DEBUG_LEDS +/*PPC*/ LED_hex_val++;LED_display_hex_val(); /* Displays 112 */ +#endif +/*\PPC*/ mem_init(); +/*PPC*/ +#ifdef CONFIG_DEBUG_LEDS +/*PPC*/ LED_hex_val++;LED_display_hex_val(); /* Displays 113 */ +#endif +/*\PPC*/ kmem_cache_sizes_init(); +/*PPC*/ +#ifdef CONFIG_DEBUG_LEDS +/*PPC*/ LED_hex_val++;LED_display_hex_val(); /* Displays 114 */ +#endif +/*\PPC*/ #ifdef CONFIG_3215_CONSOLE con3215_activate(); #endif #ifdef CONFIG_PROC_FS proc_root_init(); #endif +/*PPC*/ +#ifdef CONFIG_DEBUG_LEDS +/*PPC*/ LED_hex_val++;LED_display_hex_val(); /* Displays 115 */ +#endif +/*\PPC*/ mempages = num_physpages; fork_init(mempages); +/*PPC*/ +#ifdef CONFIG_DEBUG_LEDS +/*PPC*/ LED_hex_val++;LED_display_hex_val(); /* Displays 116 */ +#endif +/*\PPC*/ filescache_init(); +/*PPC*/ +#ifdef CONFIG_DEBUG_LEDS +/*PPC*/ LED_hex_val++;LED_display_hex_val(); /* Displays 117 */ +#endif +/*\PPC*/ dcache_init(mempages); +/*PPC*/ +#ifdef CONFIG_DEBUG_LEDS +/*PPC*/ LED_hex_val++;LED_display_hex_val(); /* Displays 118 */ +#endif +/*\PPC*/ vma_init(); +/*PPC*/ +#ifdef CONFIG_DEBUG_LEDS +/*PPC*/ LED_hex_val++;LED_display_hex_val(); /* Displays 119 */ +#endif +/*\PPC*/ buffer_init(mempages); +/*PPC*/ +#ifdef CONFIG_DEBUG_LEDS +/*PPC*/ LED_hex_val++;LED_display_hex_val(); /* Displays 11A */ +#endif +/*\PPC*/ page_cache_init(mempages); +/*PPC*/ +#ifdef CONFIG_DEBUG_LEDS +/*PPC*/ LED_hex_val++;LED_display_hex_val(); /* Displays 11B */ +#endif +/*\PPC*/ kiobuf_setup(); +/*PPC*/ +#ifdef CONFIG_DEBUG_LEDS +/*PPC*/ LED_hex_val++;LED_display_hex_val(); /* Displays 11C */ +#endif +/*\PPC*/ signals_init(); +/*PPC*/ +#ifdef CONFIG_DEBUG_LEDS +/*PPC*/ LED_hex_val++;LED_display_hex_val(); /* Displays 11D */ +#endif +/*\PPC*/ bdev_init(); +/*PPC*/ +#ifdef CONFIG_DEBUG_LEDS +/*PPC*/ LED_hex_val++;LED_display_hex_val(); /* Displays 11E */ +#endif +/*\PPC*/ inode_init(mempages); +/*PPC*/ +#ifdef CONFIG_DEBUG_LEDS +/*PPC*/ LED_hex_val++;LED_display_hex_val(); /* Displays 11F */ +#endif +/*\PPC*/ file_table_init(); +/*PPC*/ +#ifdef CONFIG_DEBUG_LEDS +/*PPC*/ LED_hex_val++;LED_display_hex_val(); /* Displays 120 */ +#endif +/*\PPC*/ #if defined(CONFIG_SYSVIPC) ipc_init(); #endif #if defined(CONFIG_QUOTA) dquot_init_hash(); #endif +/*PPC*/ +#ifdef CONFIG_DEBUG_LEDS +/*PPC*/ LED_hex_val++;LED_display_hex_val(); /* Displays 121 */ +#endif +/*\PPC*/ check_bugs(); +/*PPC*/ +#ifdef CONFIG_DEBUG_LEDS +/*PPC*/ LED_hex_val++;LED_display_hex_val(); /* Displays 122 */ +#endif +/*\PPC*/ printk("POSIX conformance testing by UNIFIX\n"); +/*PPC*/ +#ifdef CONFIG_DEBUG_LEDS +/*PPC*/ LED_hex_val++;LED_display_hex_val(); /* Displays 123 */ +#endif +/*\PPC*/ /* * We count on the initial thread going ok * Like idlers init is an unlocked kernel thread, which will * make syscalls (and thus be locked). */ +/*PPC*/ +#ifdef CONFIG_DEBUG_LEDS +/*PPC*/ LED_hex_val++;LED_display_hex_val(); /* Displays 124 */ +#endif +/*\PPC*/ smp_init(); +/*PPC*/ +#ifdef CONFIG_DEBUG_LEDS +/*PPC*/ LED_hex_val++;LED_display_hex_val(); /* Displays 125 */ +#endif +/*\PPC*/ kernel_thread(init, NULL, CLONE_FS | CLONE_FILES | CLONE_SIGHAND); +/*PPC*/ +#ifdef CONFIG_DEBUG_LEDS +/*PPC*/ LED_hex_val++;LED_display_hex_val(); /* Displays 126 */ +#endif +/*\PPC*/ unlock_kernel(); +/*PPC*/ +#ifdef CONFIG_DEBUG_LEDS +/*PPC*/ LED_hex_val++;LED_display_hex_val(); /* Displays 127 */ +#endif +/*\PPC*/ current->need_resched = 1; +/*PPC*/ +#ifdef CONFIG_DEBUG_LEDS +/*PPC*/ LED_hex_val++;LED_display_hex_val(); /* Displays 128 */ +#endif +/*\PPC*/ cpu_idle(); +/*PPC*/ +#ifdef CONFIG_DEBUG_LEDS +/*PPC*/ LED_hex_val++;LED_display_hex_val(); /* Displays 129 */ +#endif +/*\PPC*/ } #ifdef CONFIG_BLK_DEV_INITRD diff -ruN linux-2.3.99_NY/spit_vmlinux.lin linux-2.3.99_NY+PPC/spit_vmlinux.lin --- linux-2.3.99_NY/spit_vmlinux.lin Wed Dec 31 17:00:00 1969 +++ linux-2.3.99_NY+PPC/spit_vmlinux.lin Mon May 8 15:18:28 2000 @@ -0,0 +1,41 @@ +#!/bin/sh + +ELF_HEADER_SIZE=4096 +#LOAD_ADDRESS=0x8c015000 +#STRT_ADDRESS=0x8c016000 +LOAD_ADDRESS=0x8c001000 +STRT_ADDRESS=0x8c002000 +ROOT_FS_DEV=0x101 #/dev/ram +RAMDISK_FLAGS=0x4000 #Do load the ramdisk +INITRD_FILENAME=./initrd.gz + +#Strip out the ELF header +#PPC dd if=./vmlinux of=./vmlinux.stripped bs=${ELF_HEADER_SIZE} skip=1 +sh-pc-linux-gnu-objcopy -Obinary vmlinux vmlinux.stripped + +#Pad the kernel file so it's 4-bytes aligned +cp ./vmlinux.stripped ./vmlinux.padded +KERNEL_FILE_SIZE=`cat ./vmlinux.padded | wc -c` +let BYTES_MISSING=4-KERNEL_FILE_SIZE%4 +if [ ${BYTES_MISSING} -lt 4 ];then + dd if=/dev/zero bs=1 count=${BYTES_MISSING} >> ./vmlinux.padded + let KERNEL_FILE_SIZE=KERNEL_FILE_SIZE+BYTES_MISSING +fi + +#Calculate the start address of the initrd fs in memory +let INITRD_START=LOAD_ADDRESS+KERNEL_FILE_SIZE +#let INITRD_START=INITRD_START\&0x00ffffff +INITRD_FILE_SIZE=`cat ${INITRD_FILENAME} | wc -c` + +#Poke those values + others in the kernel's header +dd if=./vmlinux.padded of=./vmlinux+initrd bs=1 count=4 +./strtoul ${RAMDISK_FLAGS} >> ./vmlinux+initrd +./strtoul ${ROOT_FS_DEV} >> ./vmlinux+initrd +dd if=./vmlinux.padded bs=1 skip=12 count=4 >> ./vmlinux+initrd +./strtoul ${INITRD_START} >> ./vmlinux+initrd +./strtoul ${INITRD_FILE_SIZE} >> ./vmlinux+initrd +dd if=./vmlinux.padded bs=24 skip=1 >> ./vmlinux+initrd +dd if=${INITRD_FILENAME} >> ./vmlinux+initrd + +#Create the LIN file +../litools/bin2lin ./vmlinux+initrd ./vmlinux.lin ${LOAD_ADDRESS} ${STRT_ADDRESS} diff -ruN linux-2.3.99_NY/strtoul.c linux-2.3.99_NY+PPC/strtoul.c --- linux-2.3.99_NY/strtoul.c Wed Dec 31 17:00:00 1969 +++ linux-2.3.99_NY+PPC/strtoul.c Mon May 8 15:18:35 2000 @@ -0,0 +1,19 @@ +#include <stdio.h> +#include <stdlib.h> + +int main(int argc,char **argv) +{ + unsigned long val; + + if(argc!=2) + return(-1); + + val=strtoul(argv[1],NULL,0); + + printf("%c",(val & 0x000000ff)); + printf("%c",(val & 0x0000ff00) >> 8); + printf("%c",(val & 0x00ff0000) >> 16); + printf("%c",(val & 0xff000000) >> 24); + + return(0); +} --8<--8<--SNIP-SNIP--8<--8<-- |
From: NIIBE Y. <gn...@ch...> - 2000-05-09 05:47:29
|
Mitch Davis wrote: > So there's no 7750 SolutionEngine equivalent of the stub that > uses HIMON commands? (And hence needs no reprogramming of the > board....) As long as I know, there's no such one in GDB supporting SolutionEngine's monitor. > If there's not, that's ok, we will write one by modifying the > existing HIMON one. You mean modifying sh3-rom.c of GDB, don't you? It would be the start point, if you don't use flash ROM of Solution Engine. -- |
From: Mitch D. <mj...@au...> - 2000-05-09 04:42:54
|
NIIBE Yutaka wrote: > > Mitch Davis wrote: > > Can someone advise me on how I can get GDB to talk > > to the SolutionEngine, for loading images, setting memory > > and starting execution please? > > I'm using my GDB stub to learn the programming of SuperH. GDB stub is > not so qute. Kaz uses his own ITRON based monitor, I've heard. > > You can see GDB stub at ftp://ftp.m17n.org/pub/super-h. Dear Niibe-san, Thanks for your speedy response. So there's no 7750 SolutionEngine equivalent of the stub that uses HIMON commands? (And hence needs no reprogramming of the board....) If there's not, that's ok, we will write one by modifying the existing HIMON one. Regards, Mitch. -- | mailto:mj...@au... | Not the official view of: | | mailto:mj...@al... | Australian Calculator Opn | | Certified Linux Evangelist! | Hewlett Packard Australia | |
From: NIIBE Y. <gn...@ch...> - 2000-05-09 03:18:39
|
Mitch Davis wrote: > Can someone advise me on how I can get GDB to talk > to the SolutionEngine, for loading images, setting memory > and starting execution please? I'm using my GDB stub to learn the programming of SuperH. GDB stub is not so qute. Kaz uses his own ITRON based monitor, I've heard. You can see GDB stub at ftp://ftp.m17n.org/pub/super-h. In my case, I have to set MD[2:0] ON-OFF-OFF and specify the clock rate 6:2:1 (CPU 200MHz, Bus 66MHz, Module 33MHz), to stabilize it. In case of Busclock=33MHz, I faced sudden stop/reset of the system, as I've reported. I don't know why. Currently, it works fine for me. To write gdb-stub image to the flash rom, I used Kermit like follows. ---------------------- Kermit > set line /dev/ttyS0 > set speed 115200 > binary > set transmit pause 1 ---------------------- On the monitor (FLash command) Ready> fl a0000000 ---------------------- Kermit to send gdb-stub S-record > transmit gdb-sh-stub/sh-stub.srec ---------------------- You need some "pause" as there's no protocol to control the flow. But I don't recommend so much using GDB stub, as it's not good, no user interface. If you'd like hacking, please try it out. -- |