You can subscribe to this list here.
2001 |
Jan
|
Feb
(4) |
Mar
(47) |
Apr
(27) |
May
(113) |
Jun
|
Jul
|
Aug
(1) |
Sep
(15) |
Oct
(25) |
Nov
|
Dec
(34) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(17) |
Feb
(5) |
Mar
(5) |
Apr
(2) |
May
(16) |
Jun
|
Jul
|
Aug
(15) |
Sep
(28) |
Oct
(78) |
Nov
(39) |
Dec
|
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(4) |
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Karl T. K. <ka...@us...> - 2001-03-25 23:18:54
|
Update of /cvsroot/linuxdc/docs/tools/ht2html In directory usw-pr-cvs1:/tmp/cvs-serv9892/tools/ht2html Modified Files: LinuxDCGenerator.py Log Message: Now works with PHPNuke, provided one uses dummy.php to display Index: LinuxDCGenerator.py [...132 lines suppressed...] |
From: Karl T. K. <ka...@us...> - 2001-03-25 23:18:30
|
Update of /cvsroot/linuxdc/docs/howto In directory usw-pr-cvs1:/tmp/cvs-serv9821/howto Modified Files: install-kernel.ht Log Message: Minor updates to links and formatting Index: install-kernel.ht [...21 lines suppressed...] |
From: Karl T. K. <ka...@us...> - 2001-03-25 23:17:42
|
Update of /cvsroot/linuxdc/docs/faq In directory usw-pr-cvs1:/tmp/cvs-serv9719/faq Added Files: Makefile Removed Files: faq.inc.html Log Message: Moved over to .ht instead of .html for FAQ --- NEW FILE: Makefile --- [...1 lines suppressed...] --- faq.inc.html DELETED --- [...1 lines suppressed...] |
From: Karl T. K. <ka...@us...> - 2001-03-25 23:16:53
|
Update of /cvsroot/linuxdc/docs/faq In directory usw-pr-cvs1:/tmp/cvs-serv9637/faq Added Files: todo.inc.ht faq.inc.ht Log Message: Updated FAQ and added todo list --- NEW FILE: todo.inc.ht --- [...1 lines suppressed...] --- NEW FILE: faq.inc.ht --- [...1 lines suppressed...] |
From: M. R. B. <mr...@us...> - 2001-03-15 05:40:52
|
Update of /cvsroot/linuxdc/linux/include/linux In directory usw-pr-cvs1:/tmp/cvs-serv19846/include/linux Modified Files: pci_ids.h Log Message: Minor cosmetic changes to PCI and BBA Index: pci_ids.h =================================================================== RCS file: /cvsroot/linuxdc/linux/include/linux/pci_ids.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** pci_ids.h 2001/01/09 03:31:23 1.2 --- pci_ids.h 2001/03/15 05:42:55 1.3 *************** *** 979,982 **** --- 979,985 ---- #define PCI_DEVICE_ID_IKON_10117 0x0117 + #define PCI_VENDOR_ID_SEGA 0x11db + #define PCI_DEVICE_ID_SEGA_BBA 0x1234 + #define PCI_VENDOR_ID_ZORAN 0x11de #define PCI_DEVICE_ID_ZORAN_36057 0x6057 |
From: M. R. B. <mr...@us...> - 2001-03-15 05:40:52
|
Update of /cvsroot/linuxdc/linux/drivers/net In directory usw-pr-cvs1:/tmp/cvs-serv19846/drivers/net Modified Files: 8139too.c Log Message: Minor cosmetic changes to PCI and BBA Index: 8139too.c =================================================================== RCS file: /cvsroot/linuxdc/linux/drivers/net/8139too.c,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** 8139too.c 2001/03/14 21:37:19 1.5 --- 8139too.c 2001/03/15 05:42:55 1.6 *************** *** 266,270 **** { "Delta Electronics 8139 10/100BaseTX" }, { "Addtron Technolgy 8139 10/100BaseTX" }, ! { "Sega Broadband Adapter" }, }; --- 266,270 ---- { "Delta Electronics 8139 10/100BaseTX" }, { "Addtron Technolgy 8139 10/100BaseTX" }, ! { "Sega Dreamcast Broadband Adapter" }, }; |
From: M. R. B. <mr...@us...> - 2001-03-15 05:40:52
|
Update of /cvsroot/linuxdc/linux In directory usw-pr-cvs1:/tmp/cvs-serv19846 Modified Files: TODO.dc ChangeLog.dc Log Message: Minor cosmetic changes to PCI and BBA Index: TODO.dc =================================================================== RCS file: /cvsroot/linuxdc/linux/TODO.dc,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** TODO.dc 2001/03/13 10:28:47 1.1 --- TODO.dc 2001/03/15 05:42:55 1.2 *************** *** 1,4 **** --- 1,20 ---- LinuxDC list of things TODO + 2001-03-14: + + - New problem with PCI: Ethernet program loaders such as dcload-ip initalize + the GAPS subsystem to a known state, therefore when the kernel is uploaded + via the BBA it "technically" needs no further GAPS initialization for + the 8139C driver to load sucessfully. However, the latest snapshot of + pci_gaps.c didn't do any init of the PCI bus whatsoever, and attempts + to load the kernel via serial cable or a boot CD (where GAPS hasn't been + initialized yet) will not load the BBA properly. The problem is that + interrupts aren't being sent from GAPS to the SH4's IRQ 11, so the BBA is + able to transmit, but unable to receive. I've have since added Dan Potter's + BBA initialization routine to pci_gaps, thinking that I missed an step + somewhere, but interrupts still aren't being detected by the system. + + 2001-03-13: + - Talk to NIIBE Yutaka <gn...@m1...> about merging our changes into the LinuxSH kernel. This would have the cool side effect of our code going *************** *** 15,18 **** --- 31,42 ---- tested. But overall, the cause of the screwed-up frames needs to be found and fixed. + + [FIXED] The RxConfig Ring Buffer size was statically defined to 32K, even + though I had added a conditional to make it 16K for the DC (the GAPS PCI + interface only has 32K _total_ PCI DMA). Because the 8139C thought this + buffer was 32K it was causing buffer overruns (resulting in broken, + mishapen RX frames everywhere) and networking performance was abysmal. + After adding the correct value to the rtl8139_rx_config constant, there are + no further problems with network performance. - Hmm, the FB driver is SLOW!! I should've known, given all the warnings on Index: ChangeLog.dc =================================================================== RCS file: /cvsroot/linuxdc/linux/ChangeLog.dc,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -r1.8 -r1.9 *** ChangeLog.dc 2001/03/14 21:37:19 1.8 --- ChangeLog.dc 2001/03/15 05:42:55 1.9 *************** *** 1,4 **** --- 1,14 ---- 2001-03-14 M. R. Brown <mr...@li...> + * drivers/pci/pci.ids: Added the device id for the Dreamcast + Broadband Adapter. + * include/linux/pci_ids.h: Added definitions for Sega's vendor id and + the BBA's device id. + * drivers/net/8139too.c: Change the name of the BBA to Dreamcast... + rather than Sega. + + * TODO.dc: Mention the current PCI bug, and the fix for the 8139C Rx + ring buffer size bug. + * drivers/net/8139too.c [rtl8139_rx_config]: Added a shift for RX_BUF_LEN_IDX to make sure the 16k buffer was being selected (this |
From: M. R. B. <mr...@us...> - 2001-03-15 05:40:52
|
Update of /cvsroot/linuxdc/linux/drivers/pci In directory usw-pr-cvs1:/tmp/cvs-serv19846/drivers/pci Modified Files: pci.ids Log Message: Minor cosmetic changes to PCI and BBA Index: pci.ids =================================================================== RCS file: /cvsroot/linuxdc/linux/drivers/pci/pci.ids,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** pci.ids 2001/02/09 16:28:01 1.3 --- pci.ids 2001/03/15 05:42:55 1.4 *************** *** 2612,2615 **** --- 2612,2616 ---- 11da Novell 11db Sega Enterprises Ltd + 1234 Sega Dreamcast Broadband Adapter 11dc Questra Corporation 11dd Crosfield Electronics Limited |
Update of /cvsroot/linuxdc/docs/howto In directory usw-pr-cvs1:/tmp/cvs-serv28873 Modified Files: ChangeLog Added Files: dcload-ip-unabi.diff dcload-serial-unabi.diff mno-fpu-patch.diff sh-binutils-rel+arch.diff sh-gcc-vis+pic+arch.diff sh-glibc-2.2.2-misc.diff Log Message: Patches for binutils, gcc, dcload (IP and serial), and glibc --- NEW FILE --- diff -urN dcload-ip-1.0.0.orig/Makefile.cfg dcload-ip-1.0.0/Makefile.cfg --- dcload-ip-1.0.0.orig/Makefile.cfg Mon Feb 19 01:49:32 2001 +++ dcload-ip-1.0.0/Makefile.cfg Tue Mar 13 20:13:24 2001 @@ -13,10 +13,10 @@ #BFDINCLUDE = /include # sh-elf-stuff -TARGETCC = sh-elf-gcc +TARGETCC = sh4-linux-gcc TARGETCFLAGS = -O2 -ml -m4 # -Wall -TARGETOBJCOPY = sh-elf-objcopy -TARGETLD = sh-elf-ld +TARGETOBJCOPY = sh4-linux-objcopy +TARGETLD = sh4-linux-ld # the ip of your dreamcast - set to 0.0.0.0 if you want to use arp on pc DREAMCAST_IP = 0.0.0.0 @@ -27,4 +27,4 @@ #TOOLINSTALLDIR = /usr/local/dc/bin # uncomment this for cygwin -#EXECUTABLEEXTENSION = .exe \ No newline at end of file +#EXECUTABLEEXTENSION = .exe diff -urN dcload-ip-1.0.0.orig/target-src/1st_read/1st_read.c dcload-ip-1.0.0/target-src/1st_read/1st_read.c --- dcload-ip-1.0.0.orig/target-src/1st_read/1st_read.c Mon Feb 19 00:51:07 2001 +++ dcload-ip-1.0.0/target-src/1st_read/1st_read.c Mon Feb 19 19:20:28 2001 @@ -32,12 +32,12 @@ #define TARGET1 (unsigned int *)0x8c004000 #define TARGET2 (unsigned int *)0x8c00f400 -extern unsigned int binary_dcload_bin_start; -extern unsigned int binary_dcload_bin_size; -extern unsigned int binary_exception_bin_start; -extern unsigned int binary_exception_bin_size; -extern unsigned int binary_title_bin_start; -extern unsigned int binary_title_bin_size; +extern unsigned int _binary_dcload_bin_start; +extern unsigned int _binary_dcload_bin_size; +extern unsigned int _binary_exception_bin_start; +extern unsigned int _binary_exception_bin_size; +extern unsigned int _binary_title_bin_start; +extern unsigned int _binary_title_bin_size; #define DISPMODE (volatile unsigned int *)0xa05f8044 #define DISPADDR1 (volatile unsigned int *)0xa05f8050 @@ -82,7 +82,7 @@ page[0] = (volatile unsigned int *)0xa5000000 + *DISPADDR1/4; page[1] = (volatile unsigned int *)0xa5000000 + *DISPADDR1/4 + 640*480; - memcpy(buffer, &binary_title_bin_start, &binary_title_bin_size); + memcpy(buffer, &_binary_title_bin_start, &_binary_title_bin_size); /* display */ @@ -108,8 +108,8 @@ } memset((volatile unsigned int *)0xa5000000, 0, 8*1024*1024); - memcpy(TARGET1, &binary_dcload_bin_start, &binary_dcload_bin_size); - memcpy(TARGET2, &binary_exception_bin_start, &binary_exception_bin_size); + memcpy(TARGET1, &_binary_dcload_bin_start, &_binary_dcload_bin_size); + memcpy(TARGET2, &_binary_exception_bin_start, &_binary_exception_bin_size); disable_cache(); (*(void (*)()) 0x8c004000) (); diff -urN dcload-ip-1.0.0.orig/target-src/1st_read/Makefile dcload-ip-1.0.0/target-src/1st_read/Makefile --- dcload-ip-1.0.0.orig/target-src/1st_read/Makefile Mon Feb 19 00:56:00 2001 +++ dcload-ip-1.0.0/target-src/1st_read/Makefile Tue Mar 13 19:58:30 2001 @@ -26,10 +26,10 @@ cp $< $@ dcload.o: dcload.bin - $(LD) -A sh -b binary --oformat elf32-shl $< -o $@ -r -EL --no-warn-mismatch + $(LD) -A sh -b binary --oformat elf32-sh-linux $< -o $@ -r -EL --no-warn-mismatch exception.o: exception.bin - $(LD) -A sh -b binary --oformat elf32-shl $< -o $@ -r -EL --no-warn-mismatch + $(LD) -A sh -b binary --oformat elf32-sh-linux $< -o $@ -r -EL --no-warn-mismatch 1st_read.bin: 1st_read $(OBJCOPY) -O binary $<$(EXECUTABLEEXTENSION) $@ @@ -40,7 +40,7 @@ 1st_read.o: 1st_read.c title.o: title.bin - $(LD) -A sh -b binary --oformat elf32-shl $< -o $@ -r -EL --no-warn-mismatch + $(LD) -A sh -b binary --oformat elf32-sh-linux $< -o $@ -r -EL --no-warn-mismatch .PHONY : clean clean: @@ -48,4 +48,4 @@ .PHONY : distclean distclean: clean - rm -f 1st_read.bin \ No newline at end of file + rm -f 1st_read.bin diff -urN dcload-ip-1.0.0.orig/target-src/1st_read/asm.h dcload-ip-1.0.0/target-src/1st_read/asm.h --- dcload-ip-1.0.0.orig/target-src/1st_read/asm.h Fri Sep 15 04:19:00 2000 +++ dcload-ip-1.0.0/target-src/1st_read/asm.h Mon Feb 19 19:15:30 2001 @@ -9,7 +9,7 @@ .text; .align 2; .globl name; name: #define ENTRY(name) \ - _ENTRY(_C_LABEL(name)) + _ENTRY(_ASM_LABEL(name)) #if (defined (__sh2__) || defined (__sh3__) || defined (__SH3E__) \ || defined (__SH4_SINGLE__) || defined (__SH4__)) || defined(__SH4_SINGLE_ONLY__) diff -urN dcload-ip-1.0.0.orig/target-src/1st_read/crt0.S dcload-ip-1.0.0/target-src/1st_read/crt0.S --- dcload-ip-1.0.0.orig/target-src/1st_read/crt0.S Fri Sep 15 04:53:54 2000 +++ dcload-ip-1.0.0/target-src/1st_read/crt0.S Mon Feb 19 19:16:14 2001 @@ -61,7 +61,7 @@ .align 4 set_fpscr_k: - .long ___set_fpscr + .long __set_fpscr stack_k: .long _stack edata_k: @@ -69,14 +69,14 @@ end_k: .long _end main_k: - .long _main + .long main old_stack_k: - .long _old_stack + .long old_stack old_pr_k: - .long _old_pr -_old_stack: + .long old_pr +old_stack: .long 0 -_old_pr: +old_pr: .long 0 setup_cache_k: .long setup_cache diff -urN dcload-ip-1.0.0.orig/target-src/1st_read/dc.x dcload-ip-1.0.0/target-src/1st_read/dc.x --- dcload-ip-1.0.0.orig/target-src/1st_read/dc.x Wed Aug 16 04:30:24 2000 +++ dcload-ip-1.0.0/target-src/1st_read/dc.x Tue Mar 13 19:56:01 2001 @@ -1,7 +1,7 @@ /* Sega Dreamcast linker script */ -OUTPUT_FORMAT("elf32-shl", "elf32-shl", - "elf32-shl") +OUTPUT_FORMAT("elf32-sh-linux", "elf32-sh-linux", + "elf32-sh-linux") OUTPUT_ARCH(sh) ENTRY(start) SEARCH_DIR(/usr/local/dcdev/sh-elf/lib); diff -urN dcload-ip-1.0.0.orig/target-src/1st_read/disable.s dcload-ip-1.0.0/target-src/1st_read/disable.s --- dcload-ip-1.0.0.orig/target-src/1st_read/disable.s Fri Sep 15 04:19:00 2000 +++ dcload-ip-1.0.0/target-src/1st_read/disable.s Mon Feb 19 19:16:30 2001 @@ -1,13 +1,13 @@ .section .text - .global _disable_cache + .global disable_cache -_disable_cache: +disable_cache: mov.l disable_cache_k,r0 mov.l p2_mask,r1 or r1,r0 jmp @r0 nop -disable_cache: +_disable_cache: mov.l ccr_addr,r0 mov.l ccr_data_k,r1 mov.l @r1,r1 @@ -26,7 +26,7 @@ .align 4 disable_cache_k: - .long disable_cache + .long _disable_cache p2_mask: .long 0xa0000000 ccr_addr: diff -urN dcload-ip-1.0.0.orig/target-src/1st_read/video.s dcload-ip-1.0.0/target-src/1st_read/video.s --- dcload-ip-1.0.0.orig/target-src/1st_read/video.s Sun Sep 17 19:04:33 2000 +++ dcload-ip-1.0.0/target-src/1st_read/video.s Mon Feb 19 19:15:17 2001 @@ -2,8 +2,8 @@ ! Video routines from Vide example ! - .globl _draw_string, _clrscr, _init_video, _check_cable - .globl _get_font_address + .globl draw_string, clrscr, init_video, check_cable + .globl get_font_address .text @@ -16,7 +16,7 @@ ! r5 = y ! r6 = string ! r7 = colour -_draw_string: +draw_string: mov.l r14,@-r15 sts pr,r14 mov.l r13,@-r15 @@ -59,7 +59,7 @@ draw_char12: ! First get the address of the ROM font sts pr,r3 - bsr _get_font_address + bsr get_font_address nop lds r3,pr mov r0,r2 @@ -166,7 +166,7 @@ ! Assumes a 640*480 screen with RGB555 or RGB565 pixels ! r4 = pixel colour -_clrscr: +clrscr: mov.l vrambase,r0 mov.l clrcount,r1 clrloop: @@ -196,7 +196,7 @@ ! r4 = cabletype (0=VGA, 2=RGB, 3=Composite) ! r5 = pixel mode (0=RGB555, 1=RGB565, 3=RGB888) -_init_video: +init_video: ! Look up bytes per pixel as shift value mov #3,r1 and r5,r1 @@ -305,7 +305,7 @@ ! 2 = RGB ! 3 = Composite -_check_cable: +check_cable: ! set PORT8 and PORT9 to input mov.l porta,r0 mov.l pctra_clr,r2 @@ -332,7 +332,7 @@ ! Return base address of ROM font ! -_get_font_address: +get_font_address: mov.l syscall_b4,r0 mov.l @r0,r0 jmp @r0 diff -urN dcload-ip-1.0.0.orig/target-src/dcload/Makefile dcload-ip-1.0.0/target-src/dcload/Makefile --- dcload-ip-1.0.0.orig/target-src/dcload/Makefile Mon Feb 19 01:00:59 2001 +++ dcload-ip-1.0.0/target-src/dcload/Makefile Tue Mar 13 19:57:30 2001 @@ -2,7 +2,7 @@ CC = $(TARGETCC) CFLAGS = $(TARGETCFLAGS) -DDREAMCAST_IP=\"$(DREAMCAST_IP)\" -INCLUDE = -I$(LZOPATH) -I../../target-inc +INCLUDE = -I. -I../../target-inc OBJCOPY = $(TARGETOBJCOPY) @@ -33,4 +33,4 @@ .PHONY : distclean distclean: clean - rm -f dcload.bin exception.bin \ No newline at end of file + rm -f dcload.bin exception.bin diff -urN dcload-ip-1.0.0.orig/target-src/dcload/asm.h dcload-ip-1.0.0/target-src/dcload/asm.h --- dcload-ip-1.0.0.orig/target-src/dcload/asm.h Fri Sep 15 04:19:03 2000 +++ dcload-ip-1.0.0/target-src/dcload/asm.h Mon Feb 19 19:07:46 2001 @@ -9,7 +9,7 @@ .text; .align 2; .globl name; name: #define ENTRY(name) \ - _ENTRY(_C_LABEL(name)) + _ENTRY(_ASM_LABEL(name)) #if (defined (__sh2__) || defined (__sh3__) || defined (__SH3E__) \ || defined (__SH4_SINGLE__) || defined (__SH4__)) || defined(__SH4_SINGLE_ONLY__) diff -urN dcload-ip-1.0.0.orig/target-src/dcload/bswap.s dcload-ip-1.0.0/target-src/dcload/bswap.s --- dcload-ip-1.0.0.orig/target-src/dcload/bswap.s Sun Feb 11 20:01:35 2001 +++ dcload-ip-1.0.0/target-src/dcload/bswap.s Mon Feb 19 19:09:34 2001 @@ -1,14 +1,14 @@ - .globl _bswap16, _bswap32 + .globl bswap16, bswap32 .text ! r4 = dest -_bswap16: +bswap16: rts swap.b r4,r0 -_bswap32: +bswap32: swap.b r4,r0 swap.w r0,r4 rts diff -urN dcload-ip-1.0.0.orig/target-src/dcload/cdfs_redir.s dcload-ip-1.0.0/target-src/dcload/cdfs_redir.s --- dcload-ip-1.0.0.orig/target-src/dcload/cdfs_redir.s Fri Sep 22 04:04:19 2000 +++ dcload-ip-1.0.0/target-src/dcload/cdfs_redir.s Mon Feb 19 19:11:26 2001 @@ -1,10 +1,10 @@ .section .text - .global _cdfs_redir_enable - .global _cdfs_redir_disable - .global _cdfs_redir_save + .global cdfs_redir_enable + .global cdfs_redir_disable + .global cdfs_redir_save .align 2 -_cdfs_redir_save: +cdfs_redir_save: mov.l cdfs_saved_k, r0 mov.l @r0, r0 tst r0,r0 @@ -17,7 +17,7 @@ rts nop -_cdfs_redir_disable: +cdfs_redir_disable: mov.l cdfs_saved_k, r0 mov.l @r0, r0 mov.l cdfs_entry_k, r1 @@ -25,7 +25,7 @@ rts nop -_cdfs_redir_enable: +cdfs_redir_enable: mov.l cdfs_entry_k, r0 mov.l cdfs_redir_k, r1 mov.l r1, @r0 @@ -58,17 +58,17 @@ nop gd_first_k: - .long gdGdcReqCmd -gdGdcReqCmd: .long _gdGdcReqCmd +_gdGdcReqCmd: + .long gdGdcReqCmd gdGdcGetCmdStat: - .long _gdGdcGetCmdStat + .long gdGdcGetCmdStat gdGdcExecServer: - .long _gdGdcExecServer + .long gdGdcExecServer gdGdcInitSystem: - .long _gdGdcInitSystem + .long gdGdcInitSystem gdGdcGetDrvStat: - .long _gdGdcGetDrvStat + .long gdGdcGetDrvStat gdGdcG1DmaEnd: .long badsyscall gdGdcReqDmaTrans: @@ -80,4 +80,4 @@ gdGdcReset: .long badsyscall gdGdcChangeDataType: - .long _gdGdcChangeDataType + .long gdGdcChangeDataType diff -urN dcload-ip-1.0.0.orig/target-src/dcload/dcload-crt0.s dcload-ip-1.0.0/target-src/dcload/dcload-crt0.s --- dcload-ip-1.0.0.orig/target-src/dcload/dcload-crt0.s Sun Feb 11 20:38:37 2001 +++ dcload-ip-1.0.0/target-src/dcload/dcload-crt0.s Mon Feb 19 19:14:57 2001 @@ -2,8 +2,8 @@ .section .text .global start - .global _atexit - .global _dcloadsyscall + .global atexit + .global dcloadsyscall start: bra realstart nop @@ -16,20 +16,20 @@ ! normal programs use this call dcloadsyscall_k: - .long _dcloadsyscall + .long dcloadsyscall ! exception handler uses these calls setup_video_k: - .long _setup_video + .long setup_video clrscr_k: - .long _clrscr + .long clrscr draw_string_k: - .long _draw_string + .long draw_string uint_to_string_k: - .long _uint_to_string + .long uint_to_string exc_to_string_k: - .long _exception_code_to_string + .long exception_code_to_string realstart: stc sr,r0 @@ -84,7 +84,7 @@ bra realstart nop -_atexit: +atexit: rts nop @@ -93,15 +93,15 @@ sr_mask: .long 0xefff7fff set_fpscr_k: - .long ___set_fpscr + .long __set_fpscr stack_k: .long _stack edata_k: - .long _edata + .long edata end_k: - .long _end + .long end main_k: - .long _main + .long main setup_cache_k: .long setup_cache start_2_k: @@ -113,7 +113,7 @@ ccr_data: .word 0x090b -_dcloadsyscall: +dcloadsyscall: mov.l dcloadmagic_k,r1 mov.l @r1,r1 mov.l correctmagic,r0 @@ -148,41 +148,41 @@ first_syscall: .long read_k read_k: - .long _read + .long read write_k: - .long _write + .long write open_k: - .long _open + .long open close_k: - .long _close + .long close creat_k: - .long _creat + .long creat link_k: - .long _link + .long link unlink_k: - .long _unlink + .long unlink chdir_k: - .long _chdir + .long chdir chmod_k: - .long _chmod + .long chmod lseek_k: - .long _lseek + .long lseek fstat_k: - .long _fstat + .long fstat time_k: - .long _time + .long time stat_k: - .long _stat + .long stat utime_k: - .long _utime + .long utime assign_wrkmem_k: .long badsyscall exit_k: - .long _dcexit + .long dcexit opendir_k: - .long _opendir + .long opendir closedir_k: - .long _closedir + .long closedir readdir_k: - .long _readdir - \ No newline at end of file + .long readdir + diff -urN dcload-ip-1.0.0.orig/target-src/dcload/dcload.x dcload-ip-1.0.0/target-src/dcload/dcload.x --- dcload-ip-1.0.0.orig/target-src/dcload/dcload.x Sun Feb 11 21:33:39 2001 +++ dcload-ip-1.0.0/target-src/dcload/dcload.x Tue Mar 13 19:55:35 2001 @@ -1,7 +1,7 @@ /* Sega Dreamcast linker script */ -OUTPUT_FORMAT("elf32-shl", "elf32-shl", - "elf32-shl") +OUTPUT_FORMAT("elf32-sh-linux", "elf32-sh-linux", + "elf32-sh-linux") OUTPUT_ARCH(sh) ENTRY(start) SEARCH_DIR(/usr/local/dcdev/sh-elf/lib); diff -urN dcload-ip-1.0.0.orig/target-src/dcload/disable.s dcload-ip-1.0.0/target-src/dcload/disable.s --- dcload-ip-1.0.0.orig/target-src/dcload/disable.s Fri Sep 15 04:19:03 2000 +++ dcload-ip-1.0.0/target-src/dcload/disable.s Mon Feb 19 19:08:43 2001 @@ -1,13 +1,13 @@ .section .text - .global _disable_cache + .global disable_cache -_disable_cache: +disable_cache: mov.l disable_cache_k,r0 mov.l p2_mask,r1 or r1,r0 jmp @r0 nop -disable_cache: +_disable_cache: mov.l ccr_addr,r0 mov.l ccr_data_k,r1 mov.l @r1,r1 @@ -26,7 +26,7 @@ .align 4 disable_cache_k: - .long disable_cache + .long _disable_cache p2_mask: .long 0xa0000000 ccr_addr: diff -urN dcload-ip-1.0.0.orig/target-src/dcload/go.s dcload-ip-1.0.0/target-src/dcload/go.s --- dcload-ip-1.0.0.orig/target-src/dcload/go.s Wed Aug 23 05:41:47 2000 +++ dcload-ip-1.0.0/target-src/dcload/go.s Mon Feb 19 19:07:29 2001 @@ -1,7 +1,7 @@ .section .text - .global _go + .global go -_go: +go: mov.l stack_addr_k,r0 mov.l @r0,r15 mov.l entry_addr_k,r0 @@ -54,4 +54,4 @@ .long fpscr_data fpscr_data: .long 0x40001 - \ No newline at end of file + diff -urN dcload-ip-1.0.0.orig/target-src/dcload/video.s dcload-ip-1.0.0/target-src/dcload/video.s --- dcload-ip-1.0.0.orig/target-src/dcload/video.s Sat Aug 26 05:52:53 2000 +++ dcload-ip-1.0.0/target-src/dcload/video.s Mon Feb 19 19:07:11 2001 @@ -2,8 +2,8 @@ ! Video routines from Vide example ! - .globl _draw_string, _clrscr, _init_video, _check_cable - .globl _get_font_address + .globl draw_string, clrscr, init_video, check_cable + .globl get_font_address .text @@ -16,7 +16,7 @@ ! r5 = y ! r6 = string ! r7 = colour -_draw_string: +draw_string: mov.l r14,@-r15 sts pr,r14 mov.l r13,@-r15 @@ -59,7 +59,7 @@ draw_char12: ! First get the address of the ROM font sts pr,r3 - bsr _get_font_address + bsr get_font_address nop lds r3,pr mov r0,r2 @@ -166,7 +166,7 @@ ! Assumes a 640*480 screen with RGB555 or RGB565 pixels ! r4 = pixel colour -_clrscr: +clrscr: mov.l vrambase,r0 mov.l clrcount,r1 clrloop: @@ -196,7 +196,7 @@ ! r4 = cabletype (0=VGA, 2=RGB, 3=Composite) ! r5 = pixel mode (0=RGB555, 1=RGB565, 3=RGB888) -_init_video: +init_video: ! Look up bytes per pixel as shift value mov #3,r1 and r5,r1 @@ -305,7 +305,7 @@ ! 2 = RGB ! 3 = Composite -_check_cable: +check_cable: ! set PORT8 and PORT9 to input mov.l porta,r0 mov.l pctra_clr,r2 @@ -332,7 +332,7 @@ ! Return base address of ROM font ! -_get_font_address: +get_font_address: mov.l syscall_b4,r0 mov.l @r0,r0 jmp @r0 diff -urN dcload-ip-1.0.0.orig/target-src/quick/1st_read.c dcload-ip-1.0.0/target-src/quick/1st_read.c --- dcload-ip-1.0.0.orig/target-src/quick/1st_read.c Sun Feb 11 20:57:59 2001 +++ dcload-ip-1.0.0/target-src/quick/1st_read.c Tue Mar 13 20:05:16 2001 @@ -24,15 +24,15 @@ extern void disable_cache(void); -extern unsigned int binary_dcload_bin_start; -extern unsigned int binary_dcload_bin_size; -extern unsigned int binary_exception_bin_start; -extern unsigned int binary_exception_bin_size; +extern unsigned int _binary_dcload_bin_start; +extern unsigned int _binary_dcload_bin_size; +extern unsigned int _binary_exception_bin_start; +extern unsigned int _binary_exception_bin_size; int main(void) { - memcpy(TARGET1, &binary_dcload_bin_start, &binary_dcload_bin_size); - memcpy(TARGET2, &binary_exception_bin_start, &binary_exception_bin_size); + memcpy(TARGET1, &_binary_dcload_bin_start, &_binary_dcload_bin_size); + memcpy(TARGET2, &_binary_exception_bin_start, &_binary_exception_bin_size); disable_cache(); (*(void (*)()) 0x8c004000) (); diff -urN dcload-ip-1.0.0.orig/target-src/quick/Makefile dcload-ip-1.0.0/target-src/quick/Makefile --- dcload-ip-1.0.0.orig/target-src/quick/Makefile Mon Feb 19 00:57:30 2001 +++ dcload-ip-1.0.0/target-src/quick/Makefile Tue Mar 13 20:03:02 2001 @@ -3,6 +3,7 @@ CC = $(TARGETCC) CFLAGS = $(TARGETCFLAGS) INCLUDE = -I../../target-inc +LD = $(TARGETLD) OBJCOPY = $(TARGETOBJCOPY) OBJECTS = crt0.o 1st_read.o disable.o memcpy.o dcload.o exception.o @@ -25,10 +26,10 @@ cp $< $@ dcload.o: dcload.bin - sh-elf-ld -A sh -b binary --oformat elf32-shl $< -o $@ -r -EL --no-warn-mismatch + $(LD) -A sh -b binary --oformat elf32-sh-linux $< -o $@ -r -EL --no-warn-mismatch exception.o: exception.bin - sh-elf-ld -A sh -b binary --oformat elf32-shl $< -o $@ -r -EL --no-warn-mismatch + $(LD) -A sh -b binary --oformat elf32-sh-linux $< -o $@ -r -EL --no-warn-mismatch 1st_read.bin: 1st_read $(OBJCOPY) -O binary $<$(EXECUTABLEEXTENSION) $@ @@ -45,4 +46,4 @@ .PHONY : distclean distclean: clean - rm -f 1st_read.bin 1st_read.srec \ No newline at end of file + rm -f 1st_read.bin 1st_read.srec diff -urN dcload-ip-1.0.0.orig/target-src/quick/asm.h dcload-ip-1.0.0/target-src/quick/asm.h --- dcload-ip-1.0.0.orig/target-src/quick/asm.h Fri Sep 15 04:19:00 2000 +++ dcload-ip-1.0.0/target-src/quick/asm.h Tue Mar 13 19:48:55 2001 @@ -9,7 +9,7 @@ .text; .align 2; .globl name; name: #define ENTRY(name) \ - _ENTRY(_C_LABEL(name)) + _ENTRY(_ASM_LABEL(name)) #if (defined (__sh2__) || defined (__sh3__) || defined (__SH3E__) \ || defined (__SH4_SINGLE__) || defined (__SH4__)) || defined(__SH4_SINGLE_ONLY__) diff -urN dcload-ip-1.0.0.orig/target-src/quick/crt0.S dcload-ip-1.0.0/target-src/quick/crt0.S --- dcload-ip-1.0.0.orig/target-src/quick/crt0.S Fri Sep 15 04:53:54 2000 +++ dcload-ip-1.0.0/target-src/quick/crt0.S Tue Mar 13 20:04:17 2001 @@ -61,7 +61,7 @@ .align 4 set_fpscr_k: - .long ___set_fpscr + .long __set_fpscr stack_k: .long _stack edata_k: @@ -69,14 +69,14 @@ end_k: .long _end main_k: - .long _main + .long main old_stack_k: - .long _old_stack + .long old_stack old_pr_k: - .long _old_pr -_old_stack: + .long old_pr +old_stack: .long 0 -_old_pr: +old_pr: .long 0 setup_cache_k: .long setup_cache diff -urN dcload-ip-1.0.0.orig/target-src/quick/dc.x dcload-ip-1.0.0/target-src/quick/dc.x --- dcload-ip-1.0.0.orig/target-src/quick/dc.x Wed Aug 16 04:30:24 2000 +++ dcload-ip-1.0.0/target-src/quick/dc.x Tue Mar 13 19:56:24 2001 @@ -1,7 +1,7 @@ /* Sega Dreamcast linker script */ -OUTPUT_FORMAT("elf32-shl", "elf32-shl", - "elf32-shl") +OUTPUT_FORMAT("elf32-sh-linux", "elf32-sh-linux", + "elf32-sh-linux") OUTPUT_ARCH(sh) ENTRY(start) SEARCH_DIR(/usr/local/dcdev/sh-elf/lib); diff -urN dcload-ip-1.0.0.orig/target-src/quick/disable.s dcload-ip-1.0.0/target-src/quick/disable.s --- dcload-ip-1.0.0.orig/target-src/quick/disable.s Fri Sep 15 04:19:00 2000 +++ dcload-ip-1.0.0/target-src/quick/disable.s Tue Mar 13 19:49:18 2001 @@ -1,13 +1,13 @@ .section .text - .global _disable_cache + .global disable_cache -_disable_cache: +disable_cache: mov.l disable_cache_k,r0 mov.l p2_mask,r1 or r1,r0 jmp @r0 nop -disable_cache: +_disable_cache: mov.l ccr_addr,r0 mov.l ccr_data_k,r1 mov.l @r1,r1 @@ -26,7 +26,7 @@ .align 4 disable_cache_k: - .long disable_cache + .long _disable_cache p2_mask: .long 0xa0000000 ccr_addr: --- NEW FILE --- diff -urN dcload-1.0.2c.orig/Makefile.cfg dcload-1.0.2c/Makefile.cfg --- dcload-1.0.2c.orig/Makefile.cfg Tue Mar 13 20:48:40 2001 +++ dcload-1.0.2c/Makefile.cfg Tue Mar 13 21:09:25 2001 @@ -11,9 +11,9 @@ #BFDINCLUDE = ???? # sh-elf-stuff -TARGETCC = sh-elf-gcc +TARGETCC = sh4-linux-gcc TARGETCFLAGS = -O2 -ml -m4 # -Wall -TARGETOBJCOPY = sh-elf-objcopy +TARGETOBJCOPY = sh4-linux-objcopy # WARNING: 115200 apparently does NOT work for most people #SERIALSPEED = 115200 @@ -27,4 +27,4 @@ #TOOLINSTALLDIR = /usr/local/dc/bin # uncomment this for cygwin -#EXECUTABLEEXTENSION = .exe \ No newline at end of file +#EXECUTABLEEXTENSION = .exe diff -urN dcload-1.0.2c.orig/example-src/crt0.S dcload-1.0.2c/example-src/crt0.S --- dcload-1.0.2c.orig/example-src/crt0.S Sun Sep 17 22:20:05 2000 +++ dcload-1.0.2c/example-src/crt0.S Tue Mar 13 21:07:42 2001 @@ -1,7 +1,7 @@ .section .text .global start - .global ___exit - .global _atexit + .global __exit + .global atexit start: mov.l setup_cache_k,r0 mov.l p2_mask,r1 @@ -58,7 +58,7 @@ jsr @r0 or r0,r0 -___exit: +__exit: mov.l old_pr_k,r14 mov.l @r14,r15 lds r15,pr @@ -67,14 +67,14 @@ rts nop -_atexit: +atexit: rts nop .align 4 #if defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(__SH4_SINGLE_ONLY__) set_fpscr_k: - .long ___set_fpscr + .long __set_fpscr #endif /* defined (__SH3E__) || defined(__SH4_SINGLE__) || defined(__SH4__) || defined(SH4_SINGLE_ONLY) */ stack_k: .long _stack @@ -83,9 +83,9 @@ end_k: .long _end main_k: - .long _main + .long main exit_k: - .long _exit + .long exit old_stack_k: .long _old_stack diff -urN dcload-1.0.2c.orig/example-src/dc.x dcload-1.0.2c/example-src/dc.x --- dcload-1.0.2c.orig/example-src/dc.x Sun Sep 17 22:21:16 2000 +++ dcload-1.0.2c/example-src/dc.x Tue Mar 13 21:06:49 2001 @@ -1,7 +1,7 @@ /* Sega Dreamcast linker script */ -OUTPUT_FORMAT("elf32-shl", "elf32-shl", - "elf32-shl") +OUTPUT_FORMAT("elf32-sh-linux", "elf32-sh-linux", + "elf32-sh-linux") OUTPUT_ARCH(sh) ENTRY(start) SEARCH_DIR(/usr/local/dcdev/sh-elf/lib); diff -urN dcload-1.0.2c.orig/example-src/dcload-syscall.s dcload-1.0.2c/example-src/dcload-syscall.s --- dcload-1.0.2c.orig/example-src/dcload-syscall.s Sun Sep 17 21:58:16 2000 +++ dcload-1.0.2c/example-src/dcload-syscall.s Tue Mar 13 21:08:07 2001 @@ -1,6 +1,6 @@ .section .text - .global _dcloadsyscall -_dcloadsyscall: + .global dcloadsyscall +dcloadsyscall: mov.l dcloadsyscall_k,r0 mov.l @r0,r0 jmp @r0 Binary files dcload-1.0.2c.orig/host-src/misc/bin2inc and dcload-1.0.2c/host-src/misc/bin2inc differ Binary files dcload-1.0.2c.orig/host-src/misc/lzo and dcload-1.0.2c/host-src/misc/lzo differ Binary files dcload-1.0.2c.orig/host-src/tool/dc-tool and dcload-1.0.2c/host-src/tool/dc-tool differ diff -urN dcload-1.0.2c.orig/target-src/1st_read/asm.h dcload-1.0.2c/target-src/1st_read/asm.h --- dcload-1.0.2c.orig/target-src/1st_read/asm.h Fri Sep 15 04:19:00 2000 +++ dcload-1.0.2c/target-src/1st_read/asm.h Tue Mar 13 21:04:38 2001 @@ -9,7 +9,7 @@ .text; .align 2; .globl name; name: #define ENTRY(name) \ - _ENTRY(_C_LABEL(name)) + _ENTRY(_ASM_LABEL(name)) #if (defined (__sh2__) || defined (__sh3__) || defined (__SH3E__) \ || defined (__SH4_SINGLE__) || defined (__SH4__)) || defined(__SH4_SINGLE_ONLY__) diff -urN dcload-1.0.2c.orig/target-src/1st_read/crt0.S dcload-1.0.2c/target-src/1st_read/crt0.S --- dcload-1.0.2c.orig/target-src/1st_read/crt0.S Fri Sep 15 04:53:54 2000 +++ dcload-1.0.2c/target-src/1st_read/crt0.S Tue Mar 13 21:05:14 2001 @@ -1,6 +1,6 @@ .section .text .global start - .global _atexit + .global atexit start: mov.l setup_cache_k,r0 mov.l p2_mask,r1 @@ -55,13 +55,13 @@ mov.l old_stack_k,r14 mov.l @r14,r15 -_atexit: +atexit: rts nop .align 4 set_fpscr_k: - .long ___set_fpscr + .long __set_fpscr stack_k: .long _stack edata_k: @@ -69,7 +69,7 @@ end_k: .long _end main_k: - .long _main + .long main old_stack_k: .long _old_stack old_pr_k: diff -urN dcload-1.0.2c.orig/target-src/1st_read/dc.x dcload-1.0.2c/target-src/1st_read/dc.x --- dcload-1.0.2c.orig/target-src/1st_read/dc.x Wed Aug 16 04:30:24 2000 +++ dcload-1.0.2c/target-src/1st_read/dc.x Tue Mar 13 20:51:59 2001 @@ -1,7 +1,7 @@ /* Sega Dreamcast linker script */ -OUTPUT_FORMAT("elf32-shl", "elf32-shl", - "elf32-shl") +OUTPUT_FORMAT("elf32-sh-linux", "elf32-sh-linux", + "elf32-sh-linux") OUTPUT_ARCH(sh) ENTRY(start) SEARCH_DIR(/usr/local/dcdev/sh-elf/lib); diff -urN dcload-1.0.2c.orig/target-src/1st_read/disable.s dcload-1.0.2c/target-src/1st_read/disable.s --- dcload-1.0.2c.orig/target-src/1st_read/disable.s Fri Sep 15 04:19:00 2000 +++ dcload-1.0.2c/target-src/1st_read/disable.s Tue Mar 13 21:04:38 2001 @@ -1,13 +1,13 @@ .section .text - .global _disable_cache + .global disable_cache -_disable_cache: +disable_cache: mov.l disable_cache_k,r0 mov.l p2_mask,r1 or r1,r0 jmp @r0 nop -disable_cache: +_disable_cache: mov.l ccr_addr,r0 mov.l ccr_data_k,r1 mov.l @r1,r1 @@ -26,7 +26,7 @@ .align 4 disable_cache_k: - .long disable_cache + .long _disable_cache p2_mask: .long 0xa0000000 ccr_addr: diff -urN dcload-1.0.2c.orig/target-src/1st_read/video.s dcload-1.0.2c/target-src/1st_read/video.s --- dcload-1.0.2c.orig/target-src/1st_read/video.s Sun Sep 17 19:04:33 2000 +++ dcload-1.0.2c/target-src/1st_read/video.s Tue Mar 13 21:04:44 2001 @@ -2,8 +2,8 @@ ! Video routines from Vide example ! - .globl _draw_string, _clrscr, _init_video, _check_cable - .globl _get_font_address + .globl draw_string, clrscr, init_video, check_cable + .globl get_font_address .text @@ -16,7 +16,7 @@ ! r5 = y ! r6 = string ! r7 = colour -_draw_string: +draw_string: mov.l r14,@-r15 sts pr,r14 mov.l r13,@-r15 @@ -59,7 +59,7 @@ draw_char12: ! First get the address of the ROM font sts pr,r3 - bsr _get_font_address + bsr get_font_address nop lds r3,pr mov r0,r2 @@ -166,7 +166,7 @@ ! Assumes a 640*480 screen with RGB555 or RGB565 pixels ! r4 = pixel colour -_clrscr: +clrscr: mov.l vrambase,r0 mov.l clrcount,r1 clrloop: @@ -196,7 +196,7 @@ ! r4 = cabletype (0=VGA, 2=RGB, 3=Composite) ! r5 = pixel mode (0=RGB555, 1=RGB565, 3=RGB888) -_init_video: +init_video: ! Look up bytes per pixel as shift value mov #3,r1 and r5,r1 @@ -305,7 +305,7 @@ ! 2 = RGB ! 3 = Composite -_check_cable: +check_cable: ! set PORT8 and PORT9 to input mov.l porta,r0 mov.l pctra_clr,r2 @@ -332,7 +332,7 @@ ! Return base address of ROM font ! -_get_font_address: +get_font_address: mov.l syscall_b4,r0 mov.l @r0,r0 jmp @r0 diff -urN dcload-1.0.2c.orig/target-src/dcload/asm.h dcload-1.0.2c/target-src/dcload/asm.h --- dcload-1.0.2c.orig/target-src/dcload/asm.h Fri Sep 15 04:19:03 2000 +++ dcload-1.0.2c/target-src/dcload/asm.h Tue Mar 13 20:56:22 2001 @@ -9,7 +9,7 @@ .text; .align 2; .globl name; name: #define ENTRY(name) \ - _ENTRY(_C_LABEL(name)) + _ENTRY(_ASM_LABEL(name)) #if (defined (__sh2__) || defined (__sh3__) || defined (__SH3E__) \ || defined (__SH4_SINGLE__) || defined (__SH4__)) || defined(__SH4_SINGLE_ONLY__) diff -urN dcload-1.0.2c.orig/target-src/dcload/cdfs_redir.s dcload-1.0.2c/target-src/dcload/cdfs_redir.s --- dcload-1.0.2c.orig/target-src/dcload/cdfs_redir.s Fri Sep 22 04:04:19 2000 +++ dcload-1.0.2c/target-src/dcload/cdfs_redir.s Tue Mar 13 20:56:01 2001 @@ -1,10 +1,10 @@ .section .text - .global _cdfs_redir_enable - .global _cdfs_redir_disable - .global _cdfs_redir_save + .global cdfs_redir_enable + .global cdfs_redir_disable + .global cdfs_redir_save .align 2 -_cdfs_redir_save: +cdfs_redir_save: mov.l cdfs_saved_k, r0 mov.l @r0, r0 tst r0,r0 @@ -17,7 +17,7 @@ rts nop -_cdfs_redir_disable: +cdfs_redir_disable: mov.l cdfs_saved_k, r0 mov.l @r0, r0 mov.l cdfs_entry_k, r1 @@ -25,7 +25,7 @@ rts nop -_cdfs_redir_enable: +cdfs_redir_enable: mov.l cdfs_entry_k, r0 mov.l cdfs_redir_k, r1 mov.l r1, @r0 @@ -58,26 +58,26 @@ nop gd_first_k: + .long gdGdcReqCmd_k +gdGdcReqCmd_k: .long gdGdcReqCmd -gdGdcReqCmd: - .long _gdGdcReqCmd -gdGdcGetCmdStat: - .long _gdGdcGetCmdStat -gdGdcExecServer: - .long _gdGdcExecServer -gdGdcInitSystem: - .long _gdGdcInitSystem -gdGdcGetDrvStat: - .long _gdGdcGetDrvStat -gdGdcG1DmaEnd: +gdGdcGetCmdStat_k: + .long gdGdcGetCmdStat +gdGdcExecServer_k: + .long gdGdcExecServer +gdGdcInitSystem_k: + .long gdGdcInitSystem +gdGdcGetDrvStat_k: + .long gdGdcGetDrvStat +gdGdcG1DmaEnd_k: .long badsyscall -gdGdcReqDmaTrans: +gdGdcReqDmaTrans_k: .long badsyscall -gdGdcCheckDmaTrans: +gdGdcCheckDmaTrans_k: .long badsyscall -gdGdcReadAbort: +gdGdcReadAbort_k: .long badsyscall -gdGdcReset: +gdGdcReset_k: .long badsyscall -gdGdcChangeDataType: - .long _gdGdcChangeDataType +gdGdcChangeDataType_k: + .long gdGdcChangeDataType diff -urN dcload-1.0.2c.orig/target-src/dcload/dcload-crt0.s dcload-1.0.2c/target-src/dcload/dcload-crt0.s --- dcload-1.0.2c.orig/target-src/dcload/dcload-crt0.s Sun Sep 24 23:39:11 2000 +++ dcload-1.0.2c/target-src/dcload/dcload-crt0.s Tue Mar 13 21:03:59 2001 @@ -2,8 +2,8 @@ .section .text .global start - .global _atexit - .global _dcloadsyscall + .global atexit + .global dcloadsyscall start: bra realstart nop @@ -16,20 +16,20 @@ ! normal programs use this call dcloadsyscall_k: - .long _dcloadsyscall + .long dcloadsyscall ! exception handler uses these calls setup_video_k: - .long _setup_video + .long setup_video clrscr_k: - .long _clrscr + .long clrscr draw_string_k: - .long _draw_string + .long draw_string uint_to_string_k: - .long _uint_to_string + .long uint_to_string exc_to_string_k: - .long _exception_code_to_string + .long exception_code_to_string realstart: stc sr,r0 @@ -84,7 +84,7 @@ bra realstart nop -_atexit: +atexit: rts nop @@ -93,7 +93,7 @@ sr_mask: .long 0xefff7fff set_fpscr_k: - .long ___set_fpscr + .long __set_fpscr stack_k: .long _stack edata_k: @@ -101,7 +101,7 @@ end_k: .long _end main_k: - .long _main + .long main setup_cache_k: .long setup_cache start_2_k: @@ -113,7 +113,7 @@ ccr_data: .word 0x090b -_dcloadsyscall: +dcloadsyscall: mov.l dcloadmagic_k,r1 mov.l @r1,r1 mov.l correctmagic,r0 @@ -148,41 +148,41 @@ first_syscall: .long read_k read_k: - .long _read + .long read write_k: - .long _write + .long write open_k: - .long _open + .long open close_k: - .long _close + .long close creat_k: - .long _creat + .long creat link_k: - .long _link + .long link unlink_k: - .long _unlink + .long unlink chdir_k: - .long _chdir + .long chdir chmod_k: - .long _chmod + .long chmod lseek_k: - .long _lseek + .long lseek fstat_k: - .long _fstat + .long fstat time_k: - .long _time + .long time stat_k: - .long _stat + .long stat utime_k: - .long _utime + .long utime assign_wrkmem_k: - .long _assign_wrkmem + .long assign_wrkmem exit_k: - .long _dcexit + .long dcexit opendir_k: - .long _opendir + .long opendir closedir_k: - .long _closedir + .long closedir readdir_k: - .long _readdir - \ No newline at end of file + .long readdir + diff -urN dcload-1.0.2c.orig/target-src/dcload/dcload.x dcload-1.0.2c/target-src/dcload/dcload.x --- dcload-1.0.2c.orig/target-src/dcload/dcload.x Mon Aug 28 04:37:55 2000 +++ dcload-1.0.2c/target-src/dcload/dcload.x Tue Mar 13 20:49:34 2001 @@ -1,7 +1,7 @@ /* Sega Dreamcast linker script */ -OUTPUT_FORMAT("elf32-shl", "elf32-shl", - "elf32-shl") +OUTPUT_FORMAT("elf32-sh-linux", "elf32-sh-linux", + "elf32-sh-linux") OUTPUT_ARCH(sh) ENTRY(start) SEARCH_DIR(/usr/local/dcdev/sh-elf/lib); diff -urN dcload-1.0.2c.orig/target-src/dcload/disable.s dcload-1.0.2c/target-src/dcload/disable.s --- dcload-1.0.2c.orig/target-src/dcload/disable.s Fri Sep 15 04:19:03 2000 +++ dcload-1.0.2c/target-src/dcload/disable.s Tue Mar 13 20:58:51 2001 @@ -1,13 +1,13 @@ .section .text - .global _disable_cache + .global disable_cache -_disable_cache: +disable_cache: mov.l disable_cache_k,r0 mov.l p2_mask,r1 or r1,r0 jmp @r0 nop -disable_cache: +_disable_cache: mov.l ccr_addr,r0 mov.l ccr_data_k,r1 mov.l @r1,r1 @@ -26,7 +26,7 @@ .align 4 disable_cache_k: - .long disable_cache + .long _disable_cache p2_mask: .long 0xa0000000 ccr_addr: diff -urN dcload-1.0.2c.orig/target-src/dcload/go.s dcload-1.0.2c/target-src/dcload/go.s --- dcload-1.0.2c.orig/target-src/dcload/go.s Wed Aug 23 05:41:47 2000 +++ dcload-1.0.2c/target-src/dcload/go.s Tue Mar 13 21:01:31 2001 @@ -1,7 +1,7 @@ .section .text - .global _go + .global go -_go: +go: mov.l stack_addr_k,r0 mov.l @r0,r15 mov.l entry_addr_k,r0 @@ -54,4 +54,4 @@ .long fpscr_data fpscr_data: .long 0x40001 - \ No newline at end of file + diff -urN dcload-1.0.2c.orig/target-src/dcload/video.s dcload-1.0.2c/target-src/dcload/video.s --- dcload-1.0.2c.orig/target-src/dcload/video.s Sat Aug 26 05:52:53 2000 +++ dcload-1.0.2c/target-src/dcload/video.s Tue Mar 13 20:57:56 2001 @@ -2,8 +2,8 @@ ! Video routines from Vide example ! - .globl _draw_string, _clrscr, _init_video, _check_cable - .globl _get_font_address + .globl draw_string, clrscr, init_video, check_cable + .globl get_font_address .text @@ -16,7 +16,7 @@ ! r5 = y ! r6 = string ! r7 = colour -_draw_string: +draw_string: mov.l r14,@-r15 sts pr,r14 mov.l r13,@-r15 @@ -59,7 +59,7 @@ draw_char12: ! First get the address of the ROM font sts pr,r3 - bsr _get_font_address + bsr get_font_address nop lds r3,pr mov r0,r2 @@ -166,7 +166,7 @@ ! Assumes a 640*480 screen with RGB555 or RGB565 pixels ! r4 = pixel colour -_clrscr: +clrscr: mov.l vrambase,r0 mov.l clrcount,r1 clrloop: @@ -196,7 +196,7 @@ ! r4 = cabletype (0=VGA, 2=RGB, 3=Composite) ! r5 = pixel mode (0=RGB555, 1=RGB565, 3=RGB888) -_init_video: +init_video: ! Look up bytes per pixel as shift value mov #3,r1 and r5,r1 @@ -305,7 +305,7 @@ ! 2 = RGB ! 3 = Composite -_check_cable: +check_cable: ! set PORT8 and PORT9 to input mov.l porta,r0 mov.l pctra_clr,r2 @@ -332,7 +332,7 @@ ! Return base address of ROM font ! -_get_font_address: +get_font_address: mov.l syscall_b4,r0 mov.l @r0,r0 jmp @r0 diff -urN dcload-1.0.2c.orig/target-src/quick/asm.h dcload-1.0.2c/target-src/quick/asm.h --- dcload-1.0.2c.orig/target-src/quick/asm.h Fri Sep 15 04:19:00 2000 +++ dcload-1.0.2c/target-src/quick/asm.h Tue Mar 13 21:05:59 2001 @@ -9,7 +9,7 @@ .text; .align 2; .globl name; name: #define ENTRY(name) \ - _ENTRY(_C_LABEL(name)) + _ENTRY(_ASM_LABEL(name)) #if (defined (__sh2__) || defined (__sh3__) || defined (__SH3E__) \ || defined (__SH4_SINGLE__) || defined (__SH4__)) || defined(__SH4_SINGLE_ONLY__) diff -urN dcload-1.0.2c.orig/target-src/quick/crt0.S dcload-1.0.2c/target-src/quick/crt0.S --- dcload-1.0.2c.orig/target-src/quick/crt0.S Fri Sep 15 04:53:54 2000 +++ dcload-1.0.2c/target-src/quick/crt0.S Tue Mar 13 21:05:52 2001 @@ -1,6 +1,6 @@ .section .text .global start - .global _atexit + .global atexit start: mov.l setup_cache_k,r0 mov.l p2_mask,r1 @@ -55,13 +55,13 @@ mov.l old_stack_k,r14 mov.l @r14,r15 -_atexit: +atexit: rts nop .align 4 set_fpscr_k: - .long ___set_fpscr + .long __set_fpscr stack_k: .long _stack edata_k: @@ -69,7 +69,7 @@ end_k: .long _end main_k: - .long _main + .long main old_stack_k: .long _old_stack old_pr_k: diff -urN dcload-1.0.2c.orig/target-src/quick/dc.x dcload-1.0.2c/target-src/quick/dc.x --- dcload-1.0.2c.orig/target-src/quick/dc.x Wed Aug 16 04:30:24 2000 +++ dcload-1.0.2c/target-src/quick/dc.x Tue Mar 13 20:52:18 2001 @@ -1,7 +1,7 @@ /* Sega Dreamcast linker script */ -OUTPUT_FORMAT("elf32-shl", "elf32-shl", - "elf32-shl") +OUTPUT_FORMAT("elf32-sh-linux", "elf32-sh-linux", + "elf32-sh-linux") OUTPUT_ARCH(sh) ENTRY(start) SEARCH_DIR(/usr/local/dcdev/sh-elf/lib); diff -urN dcload-1.0.2c.orig/target-src/quick/disable.s dcload-1.0.2c/target-src/quick/disable.s --- dcload-1.0.2c.orig/target-src/quick/disable.s Fri Sep 15 04:19:00 2000 +++ dcload-1.0.2c/target-src/quick/disable.s Tue Mar 13 21:06:06 2001 @@ -1,13 +1,13 @@ .section .text - .global _disable_cache + .global disable_cache -_disable_cache: +disable_cache: mov.l disable_cache_k,r0 mov.l p2_mask,r1 or r1,r0 jmp @r0 nop -disable_cache: +_disable_cache: mov.l ccr_addr,r0 mov.l ccr_data_k,r1 mov.l @r1,r1 @@ -26,7 +26,7 @@ .align 4 disable_cache_k: - .long disable_cache + .long _disable_cache p2_mask: .long 0xa0000000 ccr_addr: --- NEW FILE --- diff -urN -x CVS gcc.orig/gcc/config/sh/linux.h gcc/gcc/config/sh/linux.h --- gcc.orig/gcc/config/sh/linux.h Thu Nov 2 17:29:13 2000 +++ gcc/gcc/config/sh/linux.h Tue Feb 20 15:00:58 2001 @@ -45,7 +45,8 @@ %{!mb:-D__LITTLE_ENDIAN__} \ %{m3e:-D__SH3E__} \ %{m4:-D__SH4__} \ - %{!m3e:%{!m4:-D__SH3__ -D__sh3__}} \ + %{m4-nofpu:-D__SH4__ -D__SH4_NOFPU__} \ + %{!m3e:%{!m4:%{!m4-nofpu:-D__SH3__ -D__sh3__}}} \ %{fPIC:-D__PIC__ -D__pic__} \ %{fpic:-D__PIC__ -D__pic__} \ %{posix:-D_POSIX_SOURCE} \ @@ -59,11 +60,11 @@ #undef CC1_SPEC #define CC1_SPEC \ - "-musermode %{!mb:-ml} %{!m3e:%{!m4:-m3}}" + "-musermode %{!mb:-ml} %{!m3e:%{!m4:%{!m4-nofpu:-m3}}}" #undef CC1PLUS_SPEC #define CC1PLUS_SPEC \ - "-musermode %{!mb:-ml} %{!m3e:%{!m4:-m3}}" + "-musermode %{!mb:-ml} %{!m3e:%{!m4:%{!m4-nofpu:-m3}}}" #undef LINK_SPEC #define LINK_SPEC \ @@ -71,7 +72,7 @@ %{shared:-shared} \ %{!static: \ %{rdynamic:-export-dynamic} \ - %{!dynamic-linker:-dynamic-linker /lib/ld.so.1} \ + %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2} \ %{!rpath:-rpath /lib}} \ %{static:-static}" --- NEW FILE --- diff -urN -x CVS binutils.orig/bfd/config.bfd binutils/bfd/config.bfd --- binutils.orig/bfd/config.bfd Thu Feb 22 10:38:45 2001 +++ binutils/bfd/config.bfd Wed Mar 7 00:21:09 2001 @@ -49,6 +49,7 @@ powerpc*) targ_archs="bfd_rs6000_arch bfd_powerpc_arch" ;; s390*) targ_archs=bfd_s390_arch ;; rs6000) targ_archs="bfd_rs6000_arch bfd_powerpc_arch" ;; +sh*) targ_archs=bfd_sh_arch ;; sparc*) targ_archs=bfd_sparc_arch ;; v850*) targ_archs=bfd_v850_arch ;; z8k*) targ_archs=bfd_z8k_arch ;; @@ -742,9 +743,14 @@ ;; #endif - sh-*-linux*) + sh*eb-*-linux*) targ_defvec=bfd_elf32_shblin_vec targ_selvecs=bfd_elf32_shlin_vec + ;; + + sh*-*-linux*) + targ_defvec=bfd_elf32_shlin_vec + targ_selvecs=bfd_elf32_shblin_vec ;; sh-*-elf* | sh-*-rtemself*) diff -urN -x CVS binutils.orig/bfd/elf32-sh.c binutils/bfd/elf32-sh.c --- binutils.orig/bfd/elf32-sh.c Tue Jan 23 05:45:53 2001 +++ binutils/bfd/elf32-sh.c Tue Mar 6 14:01:45 2001 @@ -120,8 +120,8 @@ complain_overflow_signed, /* complain_on_overflow */ sh_elf_ignore_reloc, /* special_function */ "R_SH_REL32", /* name */ - false, /* partial_inplace */ - 0, /* src_mask */ + true, /* partial_inplace */ + 0xffffffff, /* src_mask */ 0xffffffff, /* dst_mask */ true), /* pcrel_offset */ @@ -2937,7 +2937,11 @@ section symbol winds up in the output section. */ sym = local_syms + r_symndx; if (ELF_ST_TYPE (sym->st_info) == STT_SECTION) - goto final_link_relocate; + { + r = _bfd_relocate_contents (howto, input_bfd, relocation, + contents + rel->r_offset); + goto relocation_done; + } continue; } @@ -3108,9 +3112,11 @@ else if (r_type == R_SH_REL32) { BFD_ASSERT (h != NULL && h->dynindx != -1); + addend = bfd_get_32 (input_bfd, + (bfd_byte *) contents + rel->r_offset); relocate = false; outrel.r_info = ELF32_R_INFO (h->dynindx, R_SH_REL32); - outrel.r_addend = rel->r_addend; + outrel.r_addend = addend; } else { @@ -3123,14 +3129,17 @@ { relocate = true; outrel.r_info = ELF32_R_INFO (0, R_SH_RELATIVE); - outrel.r_addend = relocation + rel->r_addend; + outrel.r_addend = 0; } else { BFD_ASSERT (h->dynindx != -1); + addend = bfd_get_32 (input_bfd, + ((bfd_byte *) contents + + rel->r_offset)); relocate = false; outrel.r_info = ELF32_R_INFO (h->dynindx, R_SH_DIR32); - outrel.r_addend = relocation + rel->r_addend; + outrel.r_addend = relocation + addend; } } @@ -3228,7 +3237,7 @@ + sgot->output_offset + off); outrel.r_info = ELF32_R_INFO (0, R_SH_RELATIVE); - outrel.r_addend = relocation; + outrel.r_addend = 0; bfd_elf32_swap_reloca_out (output_bfd, &outrel, (((Elf32_External_Rela *) srelgot->contents) @@ -3328,6 +3337,7 @@ } } + relocation_done: if (r != bfd_reloc_ok) { switch (r) @@ -4094,9 +4104,7 @@ && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)) { rel.r_info = ELF32_R_INFO (0, R_SH_RELATIVE); - rel.r_addend = (h->root.u.def.value - + h->root.u.def.section->output_section->vma - + h->root.u.def.section->output_offset); + rel.r_addend = 0; } else { diff -urN -x CVS binutils.orig/config.sub binutils/config.sub --- binutils.orig/config.sub Fri Feb 9 18:55:46 2001 +++ binutils/config.sub Wed Mar 7 00:08:00 2001 @@ -224,7 +224,7 @@ | hppa64 \ | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \ | alphaev6[78] \ - | we32k | ns16k | clipper | i370 | sh | sh[34] \ + | we32k | ns16k | clipper | i370 | sh | sh[34] | sh[34]eb \ | powerpc | powerpcle \ | 1750a | dsp16xx | pdp10 | pdp11 \ | mips16 | mips64 | mipsel | mips64el \ diff -urN -x CVS binutils.orig/gas/config/tc-sh.c binutils/gas/config/tc-sh.c --- binutils.orig/gas/config/tc-sh.c Fri Feb 9 12:21:42 2001 +++ binutils/gas/config/tc-sh.c Tue Mar 6 23:09:26 2001 @@ -57,7 +57,11 @@ symbolS *GOT_symbol; /* Pre-defined "_GLOBAL_OFFSET_TABLE_" */ #endif +#ifdef TARGET_BYTES_BIG_ENDIAN +int shl = !TARGET_BYTES_BIG_ENDIAN; +#else int shl = 0; +#endif static void little (ignore) @@ -462,7 +466,7 @@ /* Try to parse a reg name. Return the number of chars consumed. */ static int -parse_reg (src, mode, reg) +parse_reg_without_prefix (src, mode, reg) char *src; int *mode; int *reg; @@ -814,6 +818,26 @@ return 0; } +static int +parse_reg (src, mode, reg) + char *src; + int *mode; + int *reg; +{ + int prefix; + + if (src[0] == '$') + { + src++; + prefix = 1; + } + else + prefix = 0; + + return prefix + parse_reg_without_prefix (src, mode, reg); +} + + static symbolS * dot () { @@ -2122,11 +2146,13 @@ { #define OPTION_RELAX (OPTION_MD_BASE) #define OPTION_LITTLE (OPTION_MD_BASE + 1) -#define OPTION_SMALL (OPTION_LITTLE + 1) +#define OPTION_BIG (OPTION_LITTLE + 1) +#define OPTION_SMALL (OPTION_BIG + 1) #define OPTION_DSP (OPTION_SMALL + 1) {"relax", no_argument, NULL, OPTION_RELAX}, {"little", no_argument, NULL, OPTION_LITTLE}, + {"big", no_argument, NULL, OPTION_BIG}, {"small", no_argument, NULL, OPTION_SMALL}, {"dsp", no_argument, NULL, OPTION_DSP}, {NULL, no_argument, NULL, 0} @@ -2149,6 +2175,11 @@ target_big_endian = 0; break; + case OPTION_BIG: + shl = 0; + target_big_endian = 1; + break; + case OPTION_SMALL: sh_small = 1; break; @@ -2171,6 +2202,7 @@ fprintf (stream, _("\ SH options:\n\ -little generate little endian code\n\ +-big generate big endian code\n\ -relax alter jump instructions for long displacements\n\ -small align sections to 4 byte boundaries, not 16\n\ -dsp enable sh-dsp insns, and disable sh3e / sh4 insns.\n")); @@ -2825,6 +2857,12 @@ && fixP->fx_addsy != NULL && S_IS_WEAK (fixP->fx_addsy)) val -= S_GET_VALUE (fixP->fx_addsy); +#if 1 + if (OUTPUT_FLAVOR == bfd_target_elf_flavour + && fixP->fx_r_type == BFD_RELOC_32_PCREL + && fixP->fx_addsy != NULL) + val += fixP->fx_where + fixP->fx_frag->fr_address; +#endif #endif #ifndef BFD_ASSEMBLER diff -urN -x CVS binutils.orig/gas/config/tc-sh.h binutils/gas/config/tc-sh.h --- binutils.orig/gas/config/tc-sh.h Thu Dec 28 04:07:56 2000 +++ binutils/gas/config/tc-sh.h Wed Mar 7 00:04:37 2001 @@ -20,8 +20,6 @@ #define TC_SH -#define TARGET_BYTES_BIG_ENDIAN 0 - #define TARGET_ARCH bfd_arch_sh #if ANSI_PROTOTYPES diff -urN -x CVS binutils.orig/gas/configure binutils/gas/configure --- binutils.orig/gas/configure Tue Feb 27 00:43:54 2001 +++ binutils/gas/configure Tue Mar 6 14:29:06 2001 @@ -2280,6 +2280,8 @@ powerpcle*) cpu_type=ppc endian=little ;; powerpc*) cpu_type=ppc endian=big ;; rs6000*) cpu_type=ppc ;; + sh*eb) cpu_type=sh endian=big ;; + sh*) cpu_type=sh endian=little ;; s390x*) cpu_type=s390 arch=s390x ;; s390*) cpu_type=s390 arch=s390 ;; sparclite*) cpu_type=sparc arch=sparclite ;; diff -urN -x CVS binutils.orig/gas/configure.in binutils/gas/configure.in --- binutils.orig/gas/configure.in Tue Feb 27 00:43:54 2001 +++ binutils/gas/configure.in Tue Mar 6 14:28:21 2001 @@ -142,6 +142,8 @@ powerpcle*) cpu_type=ppc endian=little ;; powerpc*) cpu_type=ppc endian=big ;; rs6000*) cpu_type=ppc ;; + sh*eb) cpu_type=sh endian=big ;; + sh*) cpu_type=sh endian=little ;; s390x*) cpu_type=s390 arch=s390x ;; s390*) cpu_type=s390 arch=s390 ;; sparclite*) cpu_type=sparc arch=sparclite ;; diff -urN -x CVS binutils.orig/ld/configure.tgt binutils/ld/configure.tgt --- binutils.orig/ld/configure.tgt Thu Feb 22 11:24:32 2001 +++ binutils/ld/configure.tgt Tue Mar 6 23:01:13 2001 @@ -209,9 +209,13 @@ targ_emul=h8500 targ_extra_emuls="h8500s h8500b h8500m h8500c" ;; -sh-*-linux*) +sh*eb-*-linux*) targ_emul=shelf_linux targ_extra_emuls=shlelf_linux + ;; +sh*-*-linux*) + targ_emul=shlelf_linux + targ_extra_emuls=shelf_linux ;; sh-*-elf* | sh-*-rtemself*) targ_emul=shelf --- NEW FILE --- diff -urN -x CVS gcc-20001120.orig/config.sub gcc-20001120/config.sub --- gcc-20001120.orig/config.sub Mon Nov 6 13:20:24 2000 +++ gcc-20001120/config.sub Wed Mar 7 00:35:08 2001 @@ -219,7 +219,7 @@ | hppa64 \ | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \ | alphaev6[78] \ - | we32k | ns16k | clipper | i370 | sh | sh[34] \ + | we32k | ns16k | clipper | i370 | sh | sh[34] | sh[34]eb \ | powerpc | powerpcle \ | 1750a | dsp16xx | pdp11 | mips16 | mips64 | mipsel | mips64el \ | mips64orion | mips64orionel | mipstx39 | mipstx39el \ @@ -262,7 +262,7 @@ | alphaev6[78]-* \ | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \ | clipper-* | orion-* \ - | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ + | sparclite-* | pdp11-* | sh-* | sh[34]-* | sh[34]eb-* | powerpc-* | powerpcle-* \ | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \ [...2844 lines suppressed...] + if (! TREE_PUBLIC (decl)) + error_with_decl (decl, "Declaration with symbol visibility of `%s' must be public"); + else if (TREE_ASM_WRITTEN (decl)) + error_with_decl (decl, "Declaration with symbol visibility of `%s' must precede definition"); +#ifdef ASM_LABEL_WITH_VISIBILITY + else + { + const char *name; + + make_decl_rtl (decl, (char *) 0, 1); + name = XSTR (XEXP (DECL_RTL (decl), 0), 0); + ASM_LABEL_WITH_VISIBILITY(asm_out_file, name, + IDENTIFIER_POINTER (visibility)); + } +#endif +} + void init_varasm_once () { --- NEW FILE --- diff -urN -x CVS glibc-2.2.2.orig/linuxthreads_db/thread_dbP.h glibc-2.2.2/linuxthreads_db/thread_dbP.h --- glibc-2.2.2.orig/linuxthreads_db/thread_dbP.h Mon Nov 22 14:52:54 1999 +++ glibc-2.2.2/linuxthreads_db/thread_dbP.h Wed Mar 7 01:47:28 2001 @@ -2,6 +2,7 @@ #ifndef _THREAD_DBP_H #define _THREAD_DBP_H 1 +#include <netinet/in.h> #include <string.h> #include "proc_service.h" #include "thread_db.h" diff -urN -x CVS glibc-2.2.2.orig/scripts/config.sub glibc-2.2.2/scripts/config.sub --- glibc-2.2.2.orig/scripts/config.sub Wed Nov 22 12:59:52 2000 +++ glibc-2.2.2/scripts/config.sub Wed Mar 7 01:48:44 2001 @@ -254,7 +254,7 @@ | alphaev6[78]-* \ | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \ | clipper-* | orion-* \ - | sparclite-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \ + | sparclite-* | pdp11-* | sh-* | sh[34]-* | powerpc-* | powerpcle-* \ | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \ | mips64el-* | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \ @@ -735,6 +735,12 @@ sh) basic_machine=sh-hitachi os=-hms + ;; + sh3eb) + basic_machine=sh3-unknown + ;; + sh4eb) + basic_machine=sh4-unknown ;; sparclite-wrs) basic_machine=sparclite-wrs Index: ChangeLog =================================================================== RCS file: /cvsroot/linuxdc/docs/howto/ChangeLog,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** ChangeLog 2001/03/06 00:32:16 1.1 --- ChangeLog 2001/03/14 22:29:44 1.2 *************** *** 1,2 **** --- 1,8 ---- + 2001-03-14 M. R. Brown <mr...@li...> + + * mno-fpu-patch.diff, sh-binutils-rel+arch.diff, + sh-gcc-vis+pic+arch.diff, sh-glibc-2.2.2-misc.diff: New files. + * dcload-ip-unabi.diff, dcload-serial-unabi.diff + 2001-03-05 M. R. Brown <mr...@0x...> |
From: M. R. B. <mr...@us...> - 2001-03-14 21:35:17
|
Update of /cvsroot/linuxdc/linux/drivers/net In directory usw-pr-cvs1:/tmp/cvs-serv20614/drivers/net Modified Files: 8139too.c Log Message: RX ring buffer fix Index: 8139too.c =================================================================== RCS file: /cvsroot/linuxdc/linux/drivers/net/8139too.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** 8139too.c 2001/03/13 10:28:47 1.4 --- 8139too.c 2001/03/14 21:37:19 1.5 *************** *** 631,635 **** static const unsigned int rtl8139_rx_config = ! RxCfgEarlyRxNone | RxCfgRcv32K | RxNoWrap | (RX_FIFO_THRESH << RxCfgFIFOShift) | (RX_DMA_BURST << RxCfgDMAShift); --- 631,635 ---- static const unsigned int rtl8139_rx_config = ! RxCfgEarlyRxNone | (RX_BUF_LEN_IDX << 11) | RxNoWrap | (RX_FIFO_THRESH << RxCfgFIFOShift) | (RX_DMA_BURST << RxCfgDMAShift); |
From: M. R. B. <mr...@us...> - 2001-03-14 21:35:17
|
Update of /cvsroot/linuxdc/linux In directory usw-pr-cvs1:/tmp/cvs-serv20614 Modified Files: ChangeLog.dc Log Message: RX ring buffer fix Index: ChangeLog.dc =================================================================== RCS file: /cvsroot/linuxdc/linux/ChangeLog.dc,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** ChangeLog.dc 2001/03/13 10:28:47 1.7 --- ChangeLog.dc 2001/03/14 21:37:19 1.8 *************** *** 1,2 **** --- 1,8 ---- + 2001-03-14 M. R. Brown <mr...@li...> + + * drivers/net/8139too.c [rtl8139_rx_config]: Added a shift for + RX_BUF_LEN_IDX to make sure the 16k buffer was being selected (this + was previously hardcoded to 32k giving tons of errors). + 2001-03-13 M. R. Brown <mr...@li...> |
From: M. R. B. <mr...@us...> - 2001-03-13 10:26:50
|
Update of /cvsroot/linuxdc/linux/drivers/net In directory usw-pr-cvs1:/tmp/cvs-serv20485/drivers/net Modified Files: 8139too.c Log Message: PCI is fixed. New TODO.dc file Index: 8139too.c =================================================================== RCS file: /cvsroot/linuxdc/linux/drivers/net/8139too.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** 8139too.c 2001/03/11 11:10:33 1.3 --- 8139too.c 2001/03/13 10:28:47 1.4 *************** *** 199,203 **** --- 199,208 ---- /* Size of the in-memory receive ring. */ + /* Unfortunately, we have only 32K of PCI DMA to play with on the Dreamcast. */ + #ifdef CONFIG_SH_DREAMCAST + #define RX_BUF_LEN_IDX 1 + #else #define RX_BUF_LEN_IDX 2 /* 0==8K, 1==16K, 2==32K, 3==64K */ + #endif #define RX_BUF_LEN (8192 << RX_BUF_LEN_IDX) #define RX_BUF_PAD 16 *************** *** 261,265 **** { "Delta Electronics 8139 10/100BaseTX" }, { "Addtron Technolgy 8139 10/100BaseTX" }, ! { "Sega Broadband Adapter (RealTek RTL8139C)" }, }; --- 266,270 ---- { "Delta Electronics 8139 10/100BaseTX" }, { "Addtron Technolgy 8139 10/100BaseTX" }, ! { "Sega Broadband Adapter" }, }; |
From: M. R. B. <mr...@us...> - 2001-03-13 10:26:49
|
Update of /cvsroot/linuxdc/linux/arch/sh/kernel In directory usw-pr-cvs1:/tmp/cvs-serv20485/arch/sh/kernel Modified Files: pci_gaps.c Log Message: PCI is fixed. New TODO.dc file Index: pci_gaps.c =================================================================== RCS file: /cvsroot/linuxdc/linux/arch/sh/kernel/pci_gaps.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** pci_gaps.c 2001/03/11 11:10:33 1.1 --- pci_gaps.c 2001/03/13 10:28:47 1.2 *************** *** 10,20 **** * Low-level access to the GAPS PCI bridge (found on Sega's Broadband * Adapter). ! */ ! ! /* ! * Much of the GAPS PCI code is adapted from Jason R. Thorpe's and Marcus * Comstedt's NetBSD Dreamcast port at http://www.netbsd.org/Ports/dreamcast/ * * The rest is templated from pci_st40.c by David J. Mckay. */ --- 10,24 ---- * Low-level access to the GAPS PCI bridge (found on Sega's Broadband * Adapter). ! * ! * Some of the GAPS PCI code is adapted from Jason R. Thorpe's and Marcus * Comstedt's NetBSD Dreamcast port at http://www.netbsd.org/Ports/dreamcast/ * * The rest is templated from pci_st40.c by David J. Mckay. + * + * The GAPS (whatever that stands for) PCI "bridge" is unique as it only + * supports one device, Sega's Broadband Adapter (RealTek RTL8139C). It + * also doesn't follow normal PCI conventions, so all resource allocation, + * etc. must be handled in here (e.g. no PCI helper functions). This allows + * for numerous shortcuts in bus and device initialization. */ *************** *** 35,62 **** #include <asm/pci.h> ! #define GAPSPCI_BASE_ADDR 0xa1001400 ! #define GAPSPCI_PCI_ADDR 0xa1001600 ! #define GAPSPCI_DEVICE_ADDR 0x01001700 #define GAPSPCI_DMA_BASE 0x01840000 ! #define GAPSPCI_DMA_SIZE 32768 #define GAPSPCI_INIT_MAGIC 0x5a14a501 ! /* ! * We only support one device. That means that any other "detected" devices ! * are spurious, and we want to act like they never happened. ! * XXX - This is evil hackery, is there a better way to prevent the kernel ! * from scanning all possible slots? ! */ ! #define CHECK_DEVFN do { \ ! if (dev->devfn != 0) return PCIBIOS_DEVICE_NOT_FOUND; \ ! } while (0) static int gapspci_read_config_byte(struct pci_dev *dev,int where,u8 *val) { ! CHECK_DEVFN; ! *val = readb(GAPSPCI_PCI_ADDR + where); ! return PCIBIOS_SUCCESSFUL; } --- 39,68 ---- #include <asm/pci.h> ! #define GAPSPCI_REG_BASE 0xa1001400 /* Accessed from CPU space */ ! #define GAPSPCI_PCI_BASE 0xa1001600 /* '' '' */ ! #define GAPSPCI_DEVICE_BASE 0x01001700 #define GAPSPCI_DMA_BASE 0x01840000 ! #define GAPSPCI_DMA_SIZE 0x8000 ! #define GAPSPCI_DMA_END (GAPSPCI_DMA_BASE + GAPSPCI_DMA_SIZE) #define GAPSPCI_INIT_MAGIC 0x5a14a501 ! #define GAPSPCI_REG_IMR (GAPSPCI_REG_BASE + 0x14) ! #define GAPSPCI_REG_STATUS (GAPSPCI_REG_BASE + 0x18) ! #define GAPSPCI_REG_UNKN_20 (GAPSPCI_REG_BASE + 0x20) ! #define GAPSPCI_REG_UNKN_24 (GAPSPCI_REG_BASE + 0x24) ! #define GAPSPCI_REG_DMASTART (GAPSPCI_REG_BASE + 0x28) ! #define GAPSPCI_REG_DMAEND (GAPSPCI_REG_BASE + 0x2c) ! #define GAPSPCI_REG_UNKN_34 (GAPSPCI_REG_BASE + 0x34) ! ! #define GAPSPCI_IRQ 11 + #define GAPSPCI_REG_IMR 0xa05f6924 + #define GAPSPCI_IRQ_ENA (1<<3) + static int gapspci_read_config_byte(struct pci_dev *dev,int where,u8 *val) { ! *val = readb(GAPSPCI_PCI_BASE + where); return PCIBIOS_SUCCESSFUL; } *************** *** 65,71 **** u16 * val) { ! CHECK_DEVFN; ! *val = readw(GAPSPCI_PCI_ADDR + where); ! return PCIBIOS_SUCCESSFUL; } --- 71,75 ---- u16 * val) { ! *val = readw(GAPSPCI_PCI_BASE + where); return PCIBIOS_SUCCESSFUL; } *************** *** 74,88 **** * Special case: since we only support one device (the BBA), if the kernel * is accessing the BAR we just return the address of the BBA. */ static int gapspci_read_config_dword(struct pci_dev *dev, int where, u32 * val) { - CHECK_DEVFN; if (where == PCI_BASE_ADDRESS_1) { ! *val = GAPSPCI_DEVICE_ADDR; } else { ! *val = readl(GAPSPCI_PCI_ADDR + where); } - return PCIBIOS_SUCCESSFUL; } --- 78,94 ---- * Special case: since we only support one device (the BBA), if the kernel * is accessing the BAR we just return the address of the BBA. + * + * XXX - Technically, since we aren't mapping devices PCI-style, we could + * remove the check for PCI(0x14). But until I'm sure no other obscure spot + * does resource mapping, it'll stay :) */ static int gapspci_read_config_dword(struct pci_dev *dev, int where, u32 * val) { if (where == PCI_BASE_ADDRESS_1) { ! *val = GAPSPCI_DEVICE_BASE; } else { ! *val = readl(GAPSPCI_PCI_BASE + where); } return PCIBIOS_SUCCESSFUL; } *************** *** 91,97 **** u8 val) { ! CHECK_DEVFN; ! writeb(val, GAPSPCI_PCI_ADDR + where); ! return PCIBIOS_SUCCESSFUL; } --- 97,101 ---- u8 val) { ! writeb(val, GAPSPCI_PCI_BASE + where); return PCIBIOS_SUCCESSFUL; } *************** *** 101,107 **** u16 val) { ! CHECK_DEVFN; ! writew(val, GAPSPCI_PCI_ADDR + where); ! return PCIBIOS_SUCCESSFUL; } --- 105,109 ---- u16 val) { ! writew(val, GAPSPCI_PCI_BASE + where); return PCIBIOS_SUCCESSFUL; } *************** *** 110,122 **** * Special case: only one device is supported, so don't allow writes to the * BAR. */ static int gapspci_write_config_dword(struct pci_dev *dev, int where, u32 val) { ! CHECK_DEVFN; ! if (where == PCI_BASE_ADDRESS_1 && val != 0x01000000) { ! ; ! } else { ! writel(val, GAPSPCI_PCI_ADDR + where); } --- 112,123 ---- * Special case: only one device is supported, so don't allow writes to the * BAR. + * + * XXX - See gapspci_read_config_dword. */ static int gapspci_write_config_dword(struct pci_dev *dev, int where, u32 val) { ! if (where != PCI_BASE_ADDRESS_1) { ! writel(val, GAPSPCI_PCI_BASE + where); } *************** *** 134,146 **** - /* Everything hangs off this */ - static struct pci_bus *pci_root_bus; - - - static u8 __init no_swizzle(struct pci_dev *dev, u8 * pin) - { - return PCI_SLOT(dev->devfn); - } - /* * Interrupt handling: reuse the IRQ9 routines from setup_powervr2dc.c. --- 135,138 ---- *************** *** 149,155 **** */ - #define GAPSPCI_REG_IMR 0xa05f6924 - #define GAPSPCI_IRQ_ENA (1<<3) - static inline void disable_gapspci_irq(unsigned int irq) { --- 141,144 ---- *************** *** 162,165 **** --- 151,160 ---- } + /* + * XXX - This doesn't feel "right" (just disabling irq 11). Also, for some + * reason the ethernet driver is having trouble receiving and decoding frames. + * Is there a timing or latency issue going on? This needs to be looked into + * ASAP. + */ static void ack_gapspci_irq(unsigned int irq) { *************** *** 175,179 **** { enable_gapspci_irq(irq); - return 0; } --- 170,173 ---- *************** *** 194,200 **** }; - #define GAPSPCI_IRQ 11 - /* We only support one IRQ */ static int __init map_gapspci_irq(struct pci_dev *dev, u8 slot, u8 pin) { --- 188,195 ---- }; /* We only support one IRQ */ + + static u8 __init no_swizzle(struct pci_dev *dev, u8 * pin) { return 0; } + static int __init map_gapspci_irq(struct pci_dev *dev, u8 slot, u8 pin) { *************** *** 216,243 **** ranges->mem_end -= bus->resource[1]->start; } ! #define GAPSPCI_REG_UNKN_14 (GAPSPCI_BASE_ADDR + 0x14) ! #define GAPSPCI_REG_STATUS (GAPSPCI_BASE_ADDR + 0x18) ! #define GAPSPCI_REG_UNKN_20 (GAPSPCI_BASE_ADDR + 0x20) ! #define GAPSPCI_REG_UNKN_24 (GAPSPCI_BASE_ADDR + 0x24) ! #define GAPSPCI_REG_DMASTART (GAPSPCI_BASE_ADDR + 0x28) ! #define GAPSPCI_REG_DMAEND (GAPSPCI_BASE_ADDR + 0x2c) ! #define GAPSPCI_REG_UNKN_34 (GAPSPCI_BASE_ADDR + 0x34) /* ! * Initialize the GAPS PCI bridge. GAPS initialization code adapted from ! * Dan Potter's BB1 code. */ void __init gaps_init_pci(void) { struct pci_dev *dev; u16 tmp = 10000; ! if (strncmp((const char*)GAPSPCI_BASE_ADDR, "GAPSPCI_BRIDGE_2", 16)) { return; } ! printk("Sega GAPS PCI bridge found at 0x%08x\n", GAPSPCI_BASE_ADDR); /* Bring the GAPS online */ --- 211,263 ---- ranges->mem_end -= bus->resource[1]->start; } + + static struct pci_bus *pci_root_bus; + + /* + * Do a quick setup of the single PCI device. + */ + static struct pci_dev __init *gapspci_setup_device(struct pci_bus *bus) + { + static struct pci_dev *dev, dev0; + u32 tmp; ! /* Here, all defaults are zero and we try to minimize I/O. */ ! memset(&dev0, 0, sizeof(dev0)); ! dev = &dev0; ! dev->bus = bus; ! tmp = readl(GAPSPCI_PCI_BASE + PCI_VENDOR_ID); ! dev->vendor = tmp & 0xffff; ! dev->device = (tmp >> 16) & 0xffff; ! dev->dma_mask = 0xffffffff; ! dev->irq = GAPSPCI_IRQ; ! sprintf(dev->slot_name, "00:00.0"); ! sprintf(dev->name, "PCI device %04x:%04x", dev->vendor, dev->device); ! pci_name_device(dev); ! ! /* Make the device visible */ ! list_add_tail(&dev->global_list, &pci_devices); ! list_add_tail(&dev->bus_list, &bus->devices); + return dev; + } + /* ! * Initialize the GAPS PCI bridge. Note that we manually setup the PCI root ! * bus and the lone device that occupies it. This is to avoid calling kernel ! * PCI helper functions such as pci_scan_bus() that recursively scan for more ! * PCI devices, buses, and bridges than actually exist. */ void __init gaps_init_pci(void) { + struct pci_bus *b; struct pci_dev *dev; u16 tmp = 10000; ! if (strncmp((const char*)GAPSPCI_REG_BASE, "GAPSPCI_BRIDGE_2", 16)) { return; } ! printk("Sega GAPS PCI bridge found at 0x%08x\n", GAPSPCI_REG_BASE); /* Bring the GAPS online */ *************** *** 254,318 **** writel(GAPSPCI_DMA_BASE, GAPSPCI_REG_DMASTART); writel(GAPSPCI_DMA_BASE + GAPSPCI_DMA_SIZE, GAPSPCI_REG_DMAEND); ! writel(1, GAPSPCI_REG_UNKN_14); writel(1, GAPSPCI_REG_UNKN_34); ! writew(0xf900, GAPSPCI_PCI_ADDR + PCI_STATUS); ! writel(0, GAPSPCI_PCI_ADDR + PCI_ROM_ADDRESS); ! writeb(0, GAPSPCI_PCI_ADDR + PCI_INTERRUPT_LINE); ! writeb(0xf0, GAPSPCI_PCI_ADDR + PCI_LATENCY_TIMER); ! tmp = readw(0xa1000004); ! writew(0x0006, GAPSPCI_PCI_ADDR + PCI_COMMAND); ! writel(0x01000000, GAPSPCI_PCI_ADDR + PCI_BASE_ADDRESS_1); ! tmp = readb(GAPSPCI_PCI_ADDR + 0x50); /* ??? - undocumented */ ! irq_desc[GAPSPCI_IRQ].handler = &gapspci_int; ! /* Initialize the bus and scan for devices */ ! pci_root_bus = pci_scan_bus(0, &pci_config_ops, NULL); ! /* Manually assign resources */ ! /* PIO and MMIO mean the same thing here */ ! dev = pci_find_slot(0, PCI_DEVFN(0, 0)); ! dev->resource[0].start = P2SEGADDR(GAPSPCI_DEVICE_ADDR); ! dev->resource[0].end = P2SEGADDR(GAPSPCI_DEVICE_ADDR + 0xff); dev->resource[0].flags = IORESOURCE_IO; ! dev->resource[1].start = P2SEGADDR(GAPSPCI_DEVICE_ADDR); ! dev->resource[1].end = P2SEGADDR(GAPSPCI_DEVICE_ADDR + 0xff); dev->resource[1].flags = IORESOURCE_MEM; pci_fixup_irqs(no_swizzle, map_gapspci_irq); - } int pcibios_enable_device(struct pci_dev *dev) { ! u16 cmd, old_cmd; ! int idx; ! struct resource *r; ! pci_read_config_word(dev, PCI_COMMAND, &cmd); ! old_cmd = cmd; ! for (idx = 0; idx < 6; idx++) { ! r = dev->resource + idx; ! if (!r->start && r->end) { ! printk(KERN_ERR ! "PCI: Device %s not available because" ! " of resource collisions\n", ! dev->slot_name); ! return -EINVAL; ! } ! if (r->flags & IORESOURCE_IO) ! cmd |= PCI_COMMAND_IO; ! if (r->flags & IORESOURCE_MEM) ! cmd |= PCI_COMMAND_MEMORY; ! } ! if (cmd != old_cmd) { ! printk("PCI: enabling device %s (%04x -> %04x)\n", ! dev->slot_name, old_cmd, cmd); ! pci_write_config_word(dev, PCI_COMMAND, cmd); ! } ! return 0; } --- 274,312 ---- writel(GAPSPCI_DMA_BASE, GAPSPCI_REG_DMASTART); writel(GAPSPCI_DMA_BASE + GAPSPCI_DMA_SIZE, GAPSPCI_REG_DMAEND); ! writel(0, GAPSPCI_REG_IMR); writel(1, GAPSPCI_REG_UNKN_34); ! /* Setup the PCI bus within the kernel */ ! b = pci_alloc_primary_bus(0); ! b->ops = &pci_config_ops; ! pci_root_bus = b; ! dev = gapspci_setup_device(b); ! /* This is the only other initialization needed for PCI :) */ ! writel(0x01000000, GAPSPCI_PCI_BASE + PCI_BASE_ADDRESS_1); ! irq_desc[GAPSPCI_IRQ].handler = &gapspci_int; ! /* I/O ranges - these are the same for both PIO and MMIO modes. */ ! dev->resource[0].start = P2SEGADDR(GAPSPCI_DEVICE_BASE); ! dev->resource[0].end = P2SEGADDR(GAPSPCI_DEVICE_BASE + 0xff); dev->resource[0].flags = IORESOURCE_IO; ! dev->resource[1].start = P2SEGADDR(GAPSPCI_DEVICE_BASE); ! dev->resource[1].end = P2SEGADDR(GAPSPCI_DEVICE_BASE + 0xff); dev->resource[1].flags = IORESOURCE_MEM; pci_fixup_irqs(no_swizzle, map_gapspci_irq); } int pcibios_enable_device(struct pci_dev *dev) { + u16 cmd; ! printk("PCI: enabling device %s\n", dev->slot_name); pci_read_config_word(dev, PCI_COMMAND, &cmd); ! pci_write_config_word(dev, PCI_COMMAND, (cmd | PCI_COMMAND_MASTER | ! PCI_COMMAND_IO)); + return 0; } *************** *** 329,346 **** struct resource *res, int resource) { - - unsigned long where, size; - u32 reg; - - printk("PCI: Assigning %3s %08lx to %s\n", - res->flags & IORESOURCE_IO ? "IO" : "MEM", - res->start, dev->name); - - where = PCI_BASE_ADDRESS_0 + resource * 4; - size = res->end - res->start; - - pci_read_config_dword(dev, where, ®); - reg = (reg & size) | (((u32) (res->start - root->start)) & ~size); - pci_write_config_dword(dev, where, reg); } --- 323,326 ---- *************** *** 349,382 **** { printk("PCI: Assigning IRQ %02d to %s\n", irq, dev->name); ! /*pci_write_config_byte(dev, PCI_INTERRUPT_LINE, irq);*/ } /* ! * XXX - GAPS does have 32K of DMA memory, its allocation needs to be ! * implemented here... */ void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size, dma_addr_t * dma_handle) { ! void *ret; ! int gfp = GFP_ATOMIC; ! ! ret = (void *) __get_free_pages(gfp, get_order(size)); ! ! if (ret != NULL) { ! /* Is it neccessary to do the memset? */ ! memset(ret, 0, size); ! *dma_handle = virt_to_bus(ret); } /* We must flush the cache before we pass it on to the device */ flush_cache_all(); ! return P2SEGADDR(ret); } void pci_free_consistent(struct pci_dev *hwdev, size_t size, void *vaddr, dma_addr_t dma_handle) { ! unsigned long p1addr=P1SEGADDR((unsigned long)vaddr); ! ! free_pages(p1addr, get_order(size)); } --- 329,373 ---- { printk("PCI: Assigning IRQ %02d to %s\n", irq, dev->name); ! pci_write_config_byte(dev, PCI_INTERRUPT_LINE, irq); } + + /* + * Another benefit of being lonely is that you can take all of the 32K DMA + * provided by GAPS in one fell swoop - these are only called from the RealTek + * driver's open() and close() routines, so they only need to go up and down + * (currently). + * + * XXX - Will this ever need to change? + */ + + static u32 dma_ptr = GAPSPCI_DMA_BASE; + /* ! * Allocate a single range of PCI DMA and return a pointer to its address in ! * both bus space and CPU space. */ void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size, dma_addr_t * dma_handle) { ! if ((dma_ptr + size) < GAPSPCI_DMA_END) { ! *dma_handle = dma_ptr; ! dma_ptr += size; ! } else { ! dma_handle = NULL; ! return NULL; } + /* We must flush the cache before we pass it on to the device */ flush_cache_all(); ! return (void *) P2SEGADDR(*dma_handle); } + /* + * Free the memory allocated by pci_alloc_consistent(). + */ void pci_free_consistent(struct pci_dev *hwdev, size_t size, void *vaddr, dma_addr_t dma_handle) { ! dma_ptr -= size; } |
From: M. R. B. <mr...@us...> - 2001-03-13 10:26:49
|
Update of /cvsroot/linuxdc/linux In directory usw-pr-cvs1:/tmp/cvs-serv20485 Modified Files: ChangeLog.dc Added Files: TODO.dc Log Message: PCI is fixed. New TODO.dc file --- NEW FILE --- LinuxDC list of things TODO - Talk to NIIBE Yutaka <gn...@m1...> about merging our changes into the LinuxSH kernel. This would have the cool side effect of our code going straight to Linus :). At this point it doesn't make since to set it up where we don't do this. Someone just needs to talk to NIIBE about merging. - Find out why the 8139too driver is dropping/losing/munging received frames (so far transmitted frames seem OK). I'm thinking that either things are coming into fast from the bus, or vice versa (meaning that rx buffers are overlapping or something even more obscure). So ethernet works, but NFS (the intial mount) seems slow, but "small" protocols like BOOTP and ICMP have no trouble whatsoever. Other protocols (I would love ssh) need to be tested. But overall, the cause of the screwed-up frames needs to be found and fixed. - Hmm, the FB driver is SLOW!! I should've known, given all the warnings on dcdev about how not to use the PVR as a framebuffer, but to use the TA for 2D operations, etc. The current impl. is pure mem access, it doesn't even think about store queues or DMA write access. We need to start thinking about acceleration as well as a accel. driver interface (think /dev/pvr as in /dev/opengl on SGIs). This would facilitate a port of Mesa. Index: ChangeLog.dc =================================================================== RCS file: /cvsroot/linuxdc/linux/ChangeLog.dc,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** ChangeLog.dc 2001/03/11 11:34:19 1.6 --- ChangeLog.dc 2001/03/13 10:28:47 1.7 *************** *** 1,2 **** --- 1,13 ---- + 2001-03-13 M. R. Brown <mr...@li...> + + * TODO.dc: New file. + + * arch/sh/kernel/pci_gaps.c (gapspci_setup_device): New fucntion. + Major cleanups and rewrites. + * drivers/net/8139too.c (board_info): Removed the extraneous info on + Sega's identifer. + Added a condition for RX_BUF_LEN_IDX to be 1 (16K buffer) if compiling + for the Dreamcast. + 2001-03-11 M. R. Brown <mr...@0x...> |
From: M. R. B. <mr...@us...> - 2001-03-11 11:32:28
|
Update of /cvsroot/linuxdc/linux In directory usw-pr-cvs1:/tmp/cvs-serv3568 Modified Files: ChangeLog.dc Log Message: Initial PCI and BBA support Index: ChangeLog.dc =================================================================== RCS file: /cvsroot/linuxdc/linux/ChangeLog.dc,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -r1.5 -r1.6 *** ChangeLog.dc 2001/03/05 01:29:23 1.5 --- ChangeLog.dc 2001/03/11 11:34:19 1.6 *************** *** 1,2 **** --- 1,23 ---- + 2001-03-11 M. R. Brown <mr...@0x...> + + * arch/sh/kernel/Makefile (CONFIG_PCI): Added dependancy for pci_gaps.o + for CONFIG_SH_DREAMCAST. + * arch/sh/kernel/io_powervr2dc.c (g2_bus_lock, g2_bus_unlock, ...): + New functions. + Removed comments around original inX/outX routines and enabled them. + * arch/sh/kernel/mach_dreamcast.c: Added new I/O routines and PCI init + routine to the machvec. + Added entries for mv_ioremap, mv_iounmap, and mv_isa_port2addr. + * arch/sh/kernel/pci_gaps.c: New file. + + * drivers/net/8139too.c: Added the SEGA8139 board type. Added PCI + vendor mappings for the Sega Broadband Adapter. + + * include/asm-sh/io_powervr2dc.h: Added prototypes for the new I/O + routines and gaps_init_pci. + Changed generic __readX/__writeX macros to point to custom I/O + routines. + * include/asm-sh/powervr2dc.h: Added PVR2DC_G2_STATUS register def. + 2001-03-04 M. R. Brown <mr...@0x...> |
From: M. R. B. <mr...@us...> - 2001-03-11 11:08:42
|
Update of /cvsroot/linuxdc/linux/drivers/net In directory usw-pr-cvs1:/tmp/cvs-serv31881/drivers/net Modified Files: 8139too.c Log Message: Initial PCI and BBA support Index: 8139too.c =================================================================== RCS file: /cvsroot/linuxdc/linux/drivers/net/8139too.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -r1.2 -r1.3 *** 8139too.c 2001/01/09 03:30:43 1.2 --- 8139too.c 2001/03/11 11:10:33 1.3 *************** *** 247,250 **** --- 247,251 ---- DELTA8139, ADDTRON8139, + SEGA8139, } board_t; *************** *** 260,263 **** --- 261,265 ---- { "Delta Electronics 8139 10/100BaseTX" }, { "Addtron Technolgy 8139 10/100BaseTX" }, + { "Sega Broadband Adapter (RealTek RTL8139C)" }, }; *************** *** 270,273 **** --- 272,276 ---- {0x1500, 0x1360, PCI_ANY_ID, PCI_ANY_ID, 0, 0, DELTA8139 }, {0x4033, 0x1360, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ADDTRON8139 }, + {0x11db, 0x1234, PCI_ANY_ID, PCI_ANY_ID, 0, 0, SEGA8139 }, {0,} }; |
From: M. R. B. <mr...@us...> - 2001-03-11 11:08:42
|
Update of /cvsroot/linuxdc/linux/include/asm-sh In directory usw-pr-cvs1:/tmp/cvs-serv31881/include/asm-sh Modified Files: io_powervr2dc.h powervr2dc.h Log Message: Initial PCI and BBA support Index: io_powervr2dc.h =================================================================== RCS file: /cvsroot/linuxdc/linux/include/asm-sh/io_powervr2dc.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** io_powervr2dc.h 2001/02/21 15:18:50 1.1 --- io_powervr2dc.h 2001/03/11 11:10:33 1.2 *************** *** 18,35 **** #include <linux/types.h> ! /* Not implemented quite yet. */ ! /* ! extern unsigned char powervr2dc_inb(unsigned long port); extern unsigned short powervr2dc_inw(unsigned long port); ! extern unsigned int powervr2dc_inl(unsigned long port); extern void powervr2dc_outb(unsigned char value, unsigned long port); extern void powervr2dc_outw(unsigned short value, unsigned long port); extern void powervr2dc_outl(unsigned int value, unsigned long port); - */ /* The mysterious IRQ9 */ extern int powervr2dc_irq_demux(int irq); #ifdef __WANT_IO_DEF --- 18,43 ---- #include <linux/types.h> ! extern unsigned char powervr2dc_inb(unsigned long port); extern unsigned short powervr2dc_inw(unsigned long port); ! extern unsigned int powervr2dc_inl(unsigned long port); extern void powervr2dc_outb(unsigned char value, unsigned long port); extern void powervr2dc_outw(unsigned short value, unsigned long port); extern void powervr2dc_outl(unsigned int value, unsigned long port); + extern unsigned char powervr2dc_readb(unsigned long addr); + extern unsigned short powervr2dc_readw(unsigned long addr); + extern unsigned int powervr2dc_readl(unsigned long addr); + + extern void powervr2dc_writeb(unsigned char value, unsigned long addr); + extern void powervr2dc_writew(unsigned short value, unsigned long addr); + extern void powervr2dc_writel(unsigned int value, unsigned long addr); + /* The mysterious IRQ9 */ extern int powervr2dc_irq_demux(int irq); + /* This is in the machvec, so it needs to be proto'd here. */ + extern void gaps_init_pci(void); + #ifdef __WANT_IO_DEF *************** *** 55,64 **** # define __outsl generic_outsl ! # define __readb generic_readb ! # define __readw generic_readw ! # define __readl generic_readl ! # define __writeb generic_writeb ! # define __writew generic_writew ! # define __writel generic_writel /* This may change soon... */ --- 63,72 ---- # define __outsl generic_outsl ! # define __readb powervr2dc_readb ! # define __readw powervr2dc_readw ! # define __readl powervr2dc_readl ! # define __writeb powervr2dc_writeb ! # define __writew powervr2dc_writew ! # define __writel powervr2dc_writel /* This may change soon... */ Index: powervr2dc.h =================================================================== RCS file: /cvsroot/linuxdc/linux/include/asm-sh/powervr2dc.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** powervr2dc.h 2001/02/21 15:18:50 1.1 --- powervr2dc.h 2001/03/11 11:10:33 1.2 *************** *** 72,74 **** --- 72,78 ---- #define PVR2DC_REG_VERSION 0xa05f8004 + /* G2 Bus registers */ + + #define PVR2DC_G2_STATUS 0xa05f688c /* Current state of the bus */ + #endif /* __ASM_POWERVR2DC_H */ |
From: M. R. B. <mr...@us...> - 2001-03-11 11:08:42
|
Update of /cvsroot/linuxdc/linux/arch/sh/kernel In directory usw-pr-cvs1:/tmp/cvs-serv31881/arch/sh/kernel Modified Files: Makefile io_powervr2dc.c mach_dreamcast.c Added Files: pci_gaps.c Log Message: Initial PCI and BBA support --- NEW FILE --- /* * linux/arch/sh/kernel/pci_gaps.c * * Copyright (c) 2001 M. R. Brown <mr...@li...> * * This file is part of the LinuxDC project, goto http://linuxdc.org/ for * project details. It may be copied or modified under the terms of the GNU * General Public License. See the file linux/COPYING for more information. * * Low-level access to the GAPS PCI bridge (found on Sega's Broadband * Adapter). */ /* * Much of the GAPS PCI code is adapted from Jason R. Thorpe's and Marcus * Comstedt's NetBSD Dreamcast port at http://www.netbsd.org/Ports/dreamcast/ * * The rest is templated from pci_st40.c by David J. Mckay. */ #include <linux/config.h> #include <linux/kernel.h> #include <linux/smp.h> #include <linux/smp_lock.h> #include <linux/init.h> #include <linux/errno.h> #include <linux/pci.h> #include <linux/irq.h> #include <linux/delay.h> #include <linux/types.h> #include <linux/string.h> #include <asm/addrspace.h> #include <asm/io.h> #include <asm/pci.h> #define GAPSPCI_BASE_ADDR 0xa1001400 #define GAPSPCI_PCI_ADDR 0xa1001600 #define GAPSPCI_DEVICE_ADDR 0x01001700 #define GAPSPCI_DMA_BASE 0x01840000 #define GAPSPCI_DMA_SIZE 32768 #define GAPSPCI_INIT_MAGIC 0x5a14a501 /* * We only support one device. That means that any other "detected" devices * are spurious, and we want to act like they never happened. * XXX - This is evil hackery, is there a better way to prevent the kernel * from scanning all possible slots? */ #define CHECK_DEVFN do { \ if (dev->devfn != 0) return PCIBIOS_DEVICE_NOT_FOUND; \ } while (0) static int gapspci_read_config_byte(struct pci_dev *dev,int where,u8 *val) { CHECK_DEVFN; *val = readb(GAPSPCI_PCI_ADDR + where); return PCIBIOS_SUCCESSFUL; } static int gapspci_read_config_word(struct pci_dev *dev, int where, u16 * val) { CHECK_DEVFN; *val = readw(GAPSPCI_PCI_ADDR + where); return PCIBIOS_SUCCESSFUL; } /* * Special case: since we only support one device (the BBA), if the kernel * is accessing the BAR we just return the address of the BBA. */ static int gapspci_read_config_dword(struct pci_dev *dev, int where, u32 * val) { CHECK_DEVFN; if (where == PCI_BASE_ADDRESS_1) { *val = GAPSPCI_DEVICE_ADDR; } else { *val = readl(GAPSPCI_PCI_ADDR + where); } return PCIBIOS_SUCCESSFUL; } static int gapspci_write_config_byte(struct pci_dev *dev, int where, u8 val) { CHECK_DEVFN; writeb(val, GAPSPCI_PCI_ADDR + where); return PCIBIOS_SUCCESSFUL; } static int gapspci_write_config_word(struct pci_dev *dev, int where, u16 val) { CHECK_DEVFN; writew(val, GAPSPCI_PCI_ADDR + where); return PCIBIOS_SUCCESSFUL; } /* * Special case: only one device is supported, so don't allow writes to the * BAR. */ static int gapspci_write_config_dword(struct pci_dev *dev, int where, u32 val) { CHECK_DEVFN; if (where == PCI_BASE_ADDRESS_1 && val != 0x01000000) { ; } else { writel(val, GAPSPCI_PCI_ADDR + where); } return PCIBIOS_SUCCESSFUL; } static struct pci_ops pci_config_ops = { gapspci_read_config_byte, gapspci_read_config_word, gapspci_read_config_dword, gapspci_write_config_byte, gapspci_write_config_word, gapspci_write_config_dword }; /* Everything hangs off this */ static struct pci_bus *pci_root_bus; static u8 __init no_swizzle(struct pci_dev *dev, u8 * pin) { return PCI_SLOT(dev->devfn); } /* * Interrupt handling: reuse the IRQ9 routines from setup_powervr2dc.c. * Since the GAPS IRQ enable register doesn't map with the others, it's * better to have this here (especially since it's another IRQ). */ #define GAPSPCI_REG_IMR 0xa05f6924 #define GAPSPCI_IRQ_ENA (1<<3) static inline void disable_gapspci_irq(unsigned int irq) { *(volatile unsigned long *)(GAPSPCI_REG_IMR) &= ~GAPSPCI_IRQ_ENA; } static inline void enable_gapspci_irq(unsigned int irq) { *(volatile unsigned long *)(GAPSPCI_REG_IMR) |= GAPSPCI_IRQ_ENA; } static void ack_gapspci_irq(unsigned int irq) { disable_gapspci_irq(irq); } static void end_gapspci_irq(unsigned int irq) { enable_gapspci_irq(irq); } static unsigned int startup_gapspci_irq(unsigned int irq) { enable_gapspci_irq(irq); return 0; } static void shutdown_gapspci_irq(unsigned int irq) { disable_gapspci_irq(irq); } static struct hw_interrupt_type gapspci_int = { typename: "GAPS PCI bridge IRQ", startup: startup_gapspci_irq, shutdown: shutdown_gapspci_irq, enable: enable_gapspci_irq, disable: disable_gapspci_irq, ack: ack_gapspci_irq, end: end_gapspci_irq, }; #define GAPSPCI_IRQ 11 /* We only support one IRQ */ static int __init map_gapspci_irq(struct pci_dev *dev, u8 slot, u8 pin) { switch (slot) { case 0: return GAPSPCI_IRQ; default: return -1; } } void __init pcibios_fixup_pbus_ranges(struct pci_bus *bus, struct pbus_set_ranges_data *ranges) { ranges->io_start -= bus->resource[0]->start; ranges->io_end -= bus->resource[0]->start; ranges->mem_start -= bus->resource[1]->start; ranges->mem_end -= bus->resource[1]->start; } #define GAPSPCI_REG_UNKN_14 (GAPSPCI_BASE_ADDR + 0x14) #define GAPSPCI_REG_STATUS (GAPSPCI_BASE_ADDR + 0x18) #define GAPSPCI_REG_UNKN_20 (GAPSPCI_BASE_ADDR + 0x20) #define GAPSPCI_REG_UNKN_24 (GAPSPCI_BASE_ADDR + 0x24) #define GAPSPCI_REG_DMASTART (GAPSPCI_BASE_ADDR + 0x28) #define GAPSPCI_REG_DMAEND (GAPSPCI_BASE_ADDR + 0x2c) #define GAPSPCI_REG_UNKN_34 (GAPSPCI_BASE_ADDR + 0x34) /* * Initialize the GAPS PCI bridge. GAPS initialization code adapted from * Dan Potter's BB1 code. */ void __init gaps_init_pci(void) { struct pci_dev *dev; u16 tmp = 10000; if (strncmp((const char*)GAPSPCI_BASE_ADDR, "GAPSPCI_BRIDGE_2", 16)) { return; } printk("Sega GAPS PCI bridge found at 0x%08x\n", GAPSPCI_BASE_ADDR); /* Bring the GAPS online */ writel(GAPSPCI_INIT_MAGIC, GAPSPCI_REG_STATUS); while (!(readl(GAPSPCI_REG_STATUS) & 1) && tmp > 0) tmp--; if (!(readl(GAPSPCI_REG_STATUS) & 1)) panic("gaps_init_pci: GAPS not responding!\n"); writel(0x1000000, GAPSPCI_REG_UNKN_20); writel(0x1000000, GAPSPCI_REG_UNKN_24); writel(GAPSPCI_DMA_BASE, GAPSPCI_REG_DMASTART); writel(GAPSPCI_DMA_BASE + GAPSPCI_DMA_SIZE, GAPSPCI_REG_DMAEND); writel(1, GAPSPCI_REG_UNKN_14); writel(1, GAPSPCI_REG_UNKN_34); writew(0xf900, GAPSPCI_PCI_ADDR + PCI_STATUS); writel(0, GAPSPCI_PCI_ADDR + PCI_ROM_ADDRESS); writeb(0, GAPSPCI_PCI_ADDR + PCI_INTERRUPT_LINE); writeb(0xf0, GAPSPCI_PCI_ADDR + PCI_LATENCY_TIMER); tmp = readw(0xa1000004); writew(0x0006, GAPSPCI_PCI_ADDR + PCI_COMMAND); writel(0x01000000, GAPSPCI_PCI_ADDR + PCI_BASE_ADDRESS_1); tmp = readb(GAPSPCI_PCI_ADDR + 0x50); /* ??? - undocumented */ irq_desc[GAPSPCI_IRQ].handler = &gapspci_int; /* Initialize the bus and scan for devices */ pci_root_bus = pci_scan_bus(0, &pci_config_ops, NULL); /* Manually assign resources */ /* PIO and MMIO mean the same thing here */ dev = pci_find_slot(0, PCI_DEVFN(0, 0)); dev->resource[0].start = P2SEGADDR(GAPSPCI_DEVICE_ADDR); dev->resource[0].end = P2SEGADDR(GAPSPCI_DEVICE_ADDR + 0xff); dev->resource[0].flags = IORESOURCE_IO; dev->resource[1].start = P2SEGADDR(GAPSPCI_DEVICE_ADDR); dev->resource[1].end = P2SEGADDR(GAPSPCI_DEVICE_ADDR + 0xff); dev->resource[1].flags = IORESOURCE_MEM; pci_fixup_irqs(no_swizzle, map_gapspci_irq); } int pcibios_enable_device(struct pci_dev *dev) { u16 cmd, old_cmd; int idx; struct resource *r; pci_read_config_word(dev, PCI_COMMAND, &cmd); old_cmd = cmd; for (idx = 0; idx < 6; idx++) { r = dev->resource + idx; if (!r->start && r->end) { printk(KERN_ERR "PCI: Device %s not available because" " of resource collisions\n", dev->slot_name); return -EINVAL; } if (r->flags & IORESOURCE_IO) cmd |= PCI_COMMAND_IO; if (r->flags & IORESOURCE_MEM) cmd |= PCI_COMMAND_MEMORY; } if (cmd != old_cmd) { printk("PCI: enabling device %s (%04x -> %04x)\n", dev->slot_name, old_cmd, cmd); pci_write_config_word(dev, PCI_COMMAND, cmd); } return 0; } void __init pcibios_fixup_bus(struct pci_bus *bus) { } void pcibios_align_resource(void *data, struct resource *res, unsigned long size) { } void __init pcibios_update_resource(struct pci_dev *dev, struct resource *root, struct resource *res, int resource) { unsigned long where, size; u32 reg; printk("PCI: Assigning %3s %08lx to %s\n", res->flags & IORESOURCE_IO ? "IO" : "MEM", res->start, dev->name); where = PCI_BASE_ADDRESS_0 + resource * 4; size = res->end - res->start; pci_read_config_dword(dev, where, ®); reg = (reg & size) | (((u32) (res->start - root->start)) & ~size); pci_write_config_dword(dev, where, reg); } void __init pcibios_update_irq(struct pci_dev *dev, int irq) { printk("PCI: Assigning IRQ %02d to %s\n", irq, dev->name); /*pci_write_config_byte(dev, PCI_INTERRUPT_LINE, irq);*/ } /* * XXX - GAPS does have 32K of DMA memory, its allocation needs to be * implemented here... */ void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size, dma_addr_t * dma_handle) { void *ret; int gfp = GFP_ATOMIC; ret = (void *) __get_free_pages(gfp, get_order(size)); if (ret != NULL) { /* Is it neccessary to do the memset? */ memset(ret, 0, size); *dma_handle = virt_to_bus(ret); } /* We must flush the cache before we pass it on to the device */ flush_cache_all(); return P2SEGADDR(ret); } void pci_free_consistent(struct pci_dev *hwdev, size_t size, void *vaddr, dma_addr_t dma_handle) { unsigned long p1addr=P1SEGADDR((unsigned long)vaddr); free_pages(p1addr, get_order(size)); } Index: Makefile =================================================================== RCS file: /cvsroot/linuxdc/linux/arch/sh/kernel/Makefile,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** Makefile 2001/02/21 15:22:11 1.4 --- Makefile 2001/03/11 11:10:33 1.5 *************** *** 27,30 **** --- 27,31 ---- obj-y += pci-sh.o obj-$(CONFIG_CPU_SUBTYPE_ST40STB1)+= pci_st40.o + obj-$(CONFIG_SH_DREAMCAST) += pci_gaps.o endif Index: io_powervr2dc.c =================================================================== RCS file: /cvsroot/linuxdc/linux/arch/sh/kernel/io_powervr2dc.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** io_powervr2dc.c 2001/02/21 15:22:11 1.1 --- io_powervr2dc.c 2001/03/11 11:10:33 1.2 *************** *** 8,21 **** */ - /* - * Until I get some info on bITmASTER's ISA/IDE interface to the DC's - * expansion port, this file will remain unimplemented. Until then, - * you won't get much use out of ISA code :) - */ - - /* BTW, PCI is coming real soon :) */ - - /* I hope I don't get hanged for this ;) */ - #include <linux/config.h> #include <linux/kernel.h> --- 8,11 ---- *************** *** 27,61 **** /* unsigned char powervr2dc_inb(unsigned long port) { ! BUG(); ! return 0; } unsigned short powervr2dc_inw(unsigned long port) { ! BUG(); ! return 0; } unsigned int powervr2dc_inl(unsigned long port) { ! BUG(); ! return 0; } ! void powervr2dc_outb(unsigned char data, unsigned long port) { ! BUG(); } ! void powervr2dc_outw(unsigned short data, unsigned long port) { ! BUG(); } ! void powervr2dc_outl(unsigned int data, unsigned long port) { ! BUG(); } - */ --- 17,131 ---- /* + * PowerVR2DC I/O routines. These implement G2 bus locking/unlocking for each + * access to I/O memory. We do these for the all I/O operations because PC + * needs them, but some other DC periph. modules (perhaps AICA) may need these + * as well. + * + * If it seems like unnecessary dupication, well, some drivers may only use + * the inX/outX interface, which may be mapped to ISA eventually. Right now + * everything is just direct access. + * + * These routines have been adapted from Marcus Comstedt's NetBSD DC port. + */ + + /* Block until G2 I/O has completed. */ + /* + * XXX - Once we get an implementation of G2 DMA (ref. bITmASTER), + * suspend it here. + */ + static inline void g2_bus_lock(void) + { + cli(); + while (ctrl_inl(PVR2DC_G2_STATUS) & 32) + ; + } + + /* XXX - G2 DMA would be resumed here */ + static inline void g2_bus_unlock(void) + { + sti(); + } + unsigned char powervr2dc_inb(unsigned long port) { ! return readb(port); } unsigned short powervr2dc_inw(unsigned long port) { ! return readw(port); } unsigned int powervr2dc_inl(unsigned long port) + { + return readl(port); + } + + void powervr2dc_outb(unsigned char value, unsigned long port) + { + writeb(value, port); + } + + void powervr2dc_outw(unsigned short value, unsigned long port) + { + writew(value, port); + } + + void powervr2dc_outl(unsigned int value, unsigned long port) + { + writel(value, port); + } + + unsigned char powervr2dc_readb(unsigned long addr) { ! unsigned char ret; ! ! g2_bus_lock(); ! ret = *(volatile unsigned char*)addr; ! g2_bus_unlock(); ! ! return ret; ! } ! ! unsigned short powervr2dc_readw(unsigned long addr) ! { ! unsigned short ret; ! ! g2_bus_lock(); ! ret = *(volatile unsigned short*)addr; ! g2_bus_unlock(); ! ! return ret; ! } ! ! unsigned int powervr2dc_readl(unsigned long addr) ! { ! unsigned long ret; ! ! g2_bus_lock(); ! ret = *(volatile unsigned long*)addr; ! g2_bus_unlock(); ! ! return ret; } ! void powervr2dc_writeb(unsigned char value, unsigned long addr) { ! g2_bus_lock(); ! *(volatile unsigned char*)addr = value; ! g2_bus_unlock(); } ! void powervr2dc_writew(unsigned short value, unsigned long addr) { ! g2_bus_lock(); ! *(volatile unsigned short*)addr = value; ! g2_bus_unlock(); } ! void powervr2dc_writel(unsigned int value, unsigned long addr) { ! g2_bus_lock(); ! *(volatile unsigned long*)addr = value; ! g2_bus_unlock(); } Index: mach_dreamcast.c =================================================================== RCS file: /cvsroot/linuxdc/linux/arch/sh/kernel/mach_dreamcast.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** mach_dreamcast.c 2001/02/21 15:22:11 1.1 --- mach_dreamcast.c 2001/03/11 11:10:33 1.2 *************** *** 26,35 **** mv_nr_irqs: 160, /* PVR2DC_IRQ_BASE + PVR2DC_IRQ_NUM */ ! mv_inb: generic_inb, ! mv_inw: generic_inw, ! mv_inl: generic_inl, ! mv_outb: generic_outb, ! mv_outw: generic_outw, ! mv_outl: generic_outl, mv_inb_p: generic_inb_p, --- 26,35 ---- mv_nr_irqs: 160, /* PVR2DC_IRQ_BASE + PVR2DC_IRQ_NUM */ ! mv_inb: powervr2dc_inb, ! mv_inw: powervr2dc_inw, ! mv_inl: powervr2dc_inl, ! mv_outb: powervr2dc_outb, ! mv_outw: powervr2dc_outw, ! mv_outl: powervr2dc_outl, mv_inb_p: generic_inb_p, *************** *** 47,56 **** mv_outsl: generic_outsl, ! mv_readb: generic_readb, ! mv_readw: generic_readw, ! mv_readl: generic_readl, ! mv_writeb: generic_writeb, ! mv_writew: generic_writew, ! mv_writel: generic_writel, mv_irq_demux: powervr2dc_irq_demux, --- 47,65 ---- mv_outsl: generic_outsl, ! mv_readb: powervr2dc_readb, ! mv_readw: powervr2dc_readw, ! mv_readl: powervr2dc_readl, ! mv_writeb: powervr2dc_writeb, ! mv_writew: powervr2dc_writew, ! mv_writel: powervr2dc_writel, ! ! mv_ioremap: generic_ioremap, ! mv_iounmap: generic_iounmap, ! ! mv_isa_port2addr: generic_isa_port2addr, ! ! #ifdef CONFIG_PCI ! mv_init_pci: gaps_init_pci, ! #endif mv_irq_demux: powervr2dc_irq_demux, |
From: Karl T. K. <ka...@us...> - 2001-03-07 22:42:04
|
Update of /cvsroot/linuxdc/docs/tools/ht2html In directory usw-pr-cvs1:/tmp/cvs-serv7518/tools/ht2html Added Files: .cvsignore Log Message: Reduces visual mess when updating --- NEW FILE --- *.pyc |
From: M. R. B. <mr...@us...> - 2001-03-06 00:30:40
|
Update of /cvsroot/linuxdc/docs/howto In directory usw-pr-cvs1:/tmp/cvs-serv6085 Modified Files: options Makefile.dcload Added Files: ChangeLog Log Message: options and zImage load offset --- NEW FILE --- 2001-03-05 M. R. Brown <mr...@0x...> * options: Changed command-line args to reflect the current state of LinuxDC development. * Makefile.dcload: changed the zImage load address to 8c710000. Index: options =================================================================== RCS file: /cvsroot/linuxdc/docs/howto/options,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** options 2001/03/05 22:33:50 1.1 --- options 2001/03/06 00:32:16 1.2 *************** *** 1 **** ! root=/dev/ram mem=16320k video=pvr2dc:640x480-16 --- 1 ---- ! root=/dev/ram mem=16M video=pvr2dc:640x480-32 Index: Makefile.dcload =================================================================== RCS file: /cvsroot/linuxdc/docs/howto/Makefile.dcload,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** Makefile.dcload 2001/03/05 22:33:50 1.1 --- Makefile.dcload 2001/03/06 00:32:16 1.2 *************** *** 4,8 **** all: options.bin zImage $(DCTOOL) -a 0x8c001100 -u options.bin -t $(TTY) ! $(DCTOOL) -p -a 0x8c210000 -x zImage -t $(TTY) bin: --- 4,8 ---- all: options.bin zImage $(DCTOOL) -a 0x8c001100 -u options.bin -t $(TTY) ! $(DCTOOL) -p -a 0x8c710000 -x zImage -t $(TTY) bin: |
From: Karl T. K. <ka...@us...> - 2001-03-06 00:12:42
|
Update of /cvsroot/linuxdc/docs/howto In directory usw-pr-cvs1:/tmp/cvs-serv31535 Modified Files: Makefile Log Message: Updated Index: Makefile =================================================================== RCS file: /cvsroot/linuxdc/docs/howto/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** Makefile 2001/03/05 01:58:49 1.1 --- Makefile 2001/03/06 00:14:17 1.2 *************** *** 0 **** --- 1,9 ---- + DOCFILES = install-kernel.html install-tools.html + + %.html : %.ht + ../tools/ht2html/ht2html.py -s LinuxDCGenerator $< + + all: $(DOCFILES) + + clean: + rm -f *~ $(DOCFILES) |
From: Karl T. K. <ka...@us...> - 2001-03-06 00:12:19
|
Update of /cvsroot/linuxdc/docs/tools/ht2html In directory usw-pr-cvs1:/tmp/cvs-serv31423 Added Files: Banner.py HTParser.py LinkFixer.py LinuxDCGenerator.py Sidebar.py Skeleton.py Log Message: Added a proper toolset --- NEW FILE --- """Generate a site links table for use in a banner. """ import sys try: from cStringIO import StringIO except IOError: from StringIO import StringIO class Banner: def __init__(self, links, cols=4): """Initialize the Banner instance. This class is intended to be a mixin-class with Skeleton. links must be a list of 2-tuples of the form: (URL, text). If URL is None, then the text is not hyperlinked. These are arranged in a table in order, evenly in the specified number of columns. """ self.__links = links self.__cols = cols rows, leftover = divmod(len(links), self.__cols) if leftover: rows = rows + 1 self.__rows = rows def get_banner(self): stdout = sys.stdout html = StringIO() try: sys.stdout = html self.__start_table() self.__do_table() self.__end_table() finally: sys.stdout = stdout return html.getvalue() def __start_table(self): print '<!-- start of site links table -->' print '<TABLE WIDTH="100%" BORDER=0' print self.get_banner_attributes() print ' COLS=%s ROWS=%s BGCOLOR="%s">' % ( self.__cols, self.__rows, self.get_bgcolor()) print '<TR>' def __end_table(self): print '</TR>' print '</TABLE><!-- end of site links table -->' def __do_table(self): col = 0 for item in self.__links: if len(item) == 3: url, text, extra = item else: url, text = item extra = '' if not url: s = text + extra else: s = '<a href="%s">%s</a>%s' % (url, text, extra) if col >= self.__cols: # break the row print '</TR><TR>' col = 0 print ' <TD BGCOLOR="%s">' % self.get_lightshade() print s print ' </TD>' col = col + 1 # fill rest of row with non-breaking spaces. while col and col < self.__cols: print ' <TD BGCOLOR="%s">' % self.get_lightshade() print ' </TD>' col = col + 1 from Skeleton import _Skeleton class _Banner(_Skeleton, Banner): def __init__(self, links): Banner.__init__(self, links) def get_banner(self): return Banner.get_banner(self) if __name__ == '__main__': t = _Banner([('page1.html', 'First Page'), ('page2.html', 'Second Page'), ('page3.html', 'Third Page'), ('page4.html', 'Fourth Page'), (None, '<b>Fifth Page</b>'), ('page6.html', 'Sixth Page'), ]) print t.makepage() --- NEW FILE --- """HTParser -- parse a www.python.org .ht file. """ import os import string import re import rfc822 from socket import gethostbyaddr, gethostbyname, gethostname from types import StringType class HTParser(rfc822.Message): def __init__(self, filename, default_author=None): self.__filename = filename self.__fp = fp = open(filename) self.__extraheaders = {} rfc822.Message.__init__(self, fp) # # massage some standard headers we require # # title if not self.has_key('title'): parts = string.split(self.__filename, os.sep) self.__extraheaders['title'] = parts[-1] # author if not self.has_key('author'): if default_author is not None: author = default_author else: domainname = None h, a, ip = gethostbyaddr(gethostbyname(gethostname())) for host in [h] + a: i = string.find(host, '.') if i > 0: domainname = host[i+1:] break if domainname: author = 'webmaster@' + domainname else: author = 'MUST SUPPLY AN AUTHOR' self.__extraheaders['author'] = author # public ivar self.sidebar = [] # override so we can access our own internal dictionary if the message # doesn't have it def __getitem__(self, item): try: return rfc822.Message.__getitem__(self, item) except KeyError: return self.__extraheaders[item] # might be using an older rfc822 def get(self, name, default=None): if self.has_key(name): return self.getheader(name) elif self.__extraheaders.has_key(name): return self.__extraheaders[name] else: return default def process_sidebar(self): # first process all link files. Either we hard code the use of # ./links.h or we look for a Links: header. If the header exists, it # must explicitly enumerate links.h linkfiles = self.get('links', 'links.h') for file in string.split(linkfiles): try: fp = open(string.strip(file)) except IOError: continue data = fp.read() fp.close() self.__parse(data) # Other-links header specifies more links in-lined otherlinks = self.get('other-links') if otherlinks: self.__parse(otherlinks) # always have an email address self.sidebar.append('Email Us') author = self.get('author') # guaranteed email = self.get('author-email', author) self.sidebar.append(('mailto:' + email, author)) # regular expressions used in massage() cre = re.compile( r'(<h3>(?P<h3>.*?)</h3>)|' r'(<li>(<a href="?(?P<link>[^<>"]*)"?>(?P<contents>[^<>]*)</a>)?)' r'(?P<extra>[^\n]*)', re.DOTALL | re.IGNORECASE) def __parse(self, text): """Apply various bits of magic to the links in this list. """ start = 0 end = len(text) while 1: mo = self.cre.search(text, start) if not mo: ## if start <> end: ## s = string.strip(text[start:]) ## tags.append(s) break mstart = mo.start(0) ## s = string.strip(text[start:mstart]) ## if s: ## tags.append(s) h3, link, contents, extra = \ mo.group('h3', 'link', 'contents', 'extra') if link is None: link = '' if contents is None: contents = '' if h3: self.sidebar.append(string.strip(h3)) elif extra: l = map(string.strip, (link, contents)) l.append(extra) self.sidebar.append(tuple(l)) else: link = tuple(map(string.strip, (link, contents))) self.sidebar.append(link) start = mo.end(0) --- NEW FILE --- """LinkFixer class. Does two things. Takes as input entry lists as expected by the Sidebar and Banner classes, and returns a massaged list where any current links are boldified and turned into non-links. Also supports global string interpolation over the links using a dictionary. """ import sys import string from types import StringType class LinkFixer: def __init__(self, myurl, rootdir='.', relthis='.', verbose=0): self.__rootdir = rootdir self.__relthis = relthis self.__verbose = verbose self.msg('rootdir=%s, relthis=%s', rootdir, relthis) self.__myurl = self.normalize(myurl) def msg(self, fmt, *args): if self.__verbose: msg = fmt % args if msg[-1] <> '\n': msg = msg + '\n' sys.stdout.write(msg) def normalize(self, url): self.msg('url= %s', url) if url is None: return if url == './': url = 'index.html' elif url[-1] == '/': url = url + 'index.html' absurl = string.join([self.__rootdir, self.__relthis, url], '/') # normalize the path, kind of the way os.path.normpath() does. # urlparse ought to have something like this... parts = [] for p in string.split(absurl, '/'): if p == '.': continue if p == '..' and len(parts) > 0: del parts[-1] parts.append(p) absurl = string.join(parts, '/') self.msg('absurl= %s', absurl) return absurl def massage(self, links, dict=None, aboves=0): """Substitute in situ before massaging. With dict, do a dictionary substitution on only the URLs first. With aboves=1, boldify links if they are above myurl. """ for i in range(len(links)): item = links[i] if type(item) == StringType: continue if len(item) == 3: url, text, extra = item else: url, text = item extra = '' try: url = url % dict except TypeError: pass if url: absurl = self.normalize(url) else: absurl = None self.msg('%s is %s ==? %s', url, absurl, self.__myurl) if url is None: links[i] = (url, text, extra) elif absurl is None: links[i] = (absurl, text, extra) elif absurl == self.__myurl: links[i] = (None, '<b>' + text + '</b>', extra) elif aboves and self.above(absurl, self.__myurl): links[i] = (url, '<b>' + text + '</b>', extra) else: links[i] = (url, text, extra) def above(self, absurl, myurl): """Return true if absurl is above myurl.""" # Only do one level of checking, and don't match on the root, since # that's always going to be above everything else. myurl = self.normalize(myurl) i = string.rfind(myurl, '/') j = string.rfind(absurl, '/') if i > 0 and j > 0 and \ absurl[:j] == myurl[:i] and \ myurl[i+1:] <> 'index.html': return 1 return 0 ## while myurl: ## print ' ', self.normalize(myurl) ## if absurl == self.normalize(myurl + '/'): ## return 1 ## i = string.rfind(myurl, '/') ## if i < 0: ## return 0 ## myurl = myurl[:i] ## return 0 def rootdir(self): return self.__rootdir def relthis(self): return self.__relthis def myurl(self): return self.__myurl --- NEW FILE --- """Generates LinuxDC's style. """ import os from Skeleton import Skeleton from Sidebar import Sidebar, BLANKCELL from Banner import Banner from HTParser import HTParser from LinkFixer import LinkFixer author = "ka...@us..."; sitelinks = [ ('%(rootdir)s/index.html', 'Home'), ('%(rootdir)s/index.html', 'FAQ'), ('%(rootdir)s/index.html', 'Kernel HOWTO'), ('%(rootdir)s/index.html', 'Tools HOWTO') ] BLANKCELL = (None, " ") SEPARATOR = (None, "<hr size=10 noshade>") leftlinks = [ # ('http://linuxdc.sourceforge.net/', '''<center><img border=0 src="%(rootdir)s/images/LinuxPoweredSmall.gif"></center>'''), BLANKCELL, ('None', '<b>%(section)s</b>'), SEPARATOR, ('%(rootdir)s/index.html', 'Kernel installation HOWTO'), ('%(rootdir)s/index.html', 'Toolchain installation HOWTO'), ('%(rootdir)s/index.html', 'Unofficial DC Technical Manual'), ('%(rootdir)s/index.html', 'TODO list'), SEPARATOR ] class LinuxDCGenerator(Skeleton, Sidebar, Banner): def __init__(self, file, rootdir, relthis): self.__body = None root, ext = os.path.splitext(file) html = root + '.html' p = self.__parser = HTParser(file, author) f = self.__linkfixer = LinkFixer(html, rootdir, relthis) p.process_sidebar() # massage our links self.__d = {'rootdir': rootdir, 'section': self.get_section() } self.__linkfixer.massage(p.sidebar, self.__d) # tweak for i in leftlinks: if i[0]: p.sidebar.append((i[0] % self.__d, i[1] % self.__d)) else: p.sidebar.append(i) copyright = self.__parser.get('copyright', '2000-2001') p.sidebar.append((None, '© ' + copyright)) p.sidebar.append((None, 'The LinuxDC Team')) Sidebar.__init__(self, p.sidebar) # # fix up our site links, no relthis because the site links are # relative to the root of my web pages # sitelink_fixer = LinkFixer(f.myurl(), rootdir) sitelink_fixer.massage(sitelinks, self.__d, aboves=1) Banner.__init__(self, sitelinks, cols=2) def get_corner(self): rootdir = self.__linkfixer.rootdir() return ''' <center> <a href="%(rootdir)s/index.html"> <img border=0 src="%(rootdir)s/images/linuxdc.jpg"></a></center>''' \ % self.__d def get_corner_bgcolor(self): return 'black' def get_banner(self): return Banner.get_banner(self) def get_title(self): return self.__parser.get('title') def get_section(self): return self.__parser.get('section') def get_sidebar(self): return Sidebar.get_sidebar(self) def get_banner_attributes(self): return 'CELLSPACING=0 CELLPADDING=0' def get_body(self): if self.__body is None: self.__body = self.__parser.fp.read() return self.__body # python.org color scheme overrides def get_lightshade(self): return '#99ccff' def get_mediumshade(self): return '#3399ff' def get_darkshade(self): return '#003366' --- NEW FILE --- """Sidebar generator. """ import sys from types import StringType try: from cStringIO import StringIO except IOError: from StringIO import StringIO # a useful constant BLANKCELL = (None, ' ') class Sidebar: def __init__(self, links): """Initialize the Sidebar instance. This class is indented to be a mixin-class with Skeleton. links must be a list of elements for the sidebar. Each entry in the list can either be a string, indicating that the entry is a category header, or a 2-tuple of the form: (URL, text) indicating it is taken as a link to include under the category. If the entry is a two tuple, the URL can be None to indicate that there is no link to that text. """ self.links = links def get_sidebar(self): stdout = sys.stdout html = StringIO() try: sys.stdout = html self.__start_table() self.__do_link() self.__finish() finally: sys.stdout = stdout return html.getvalue() def __start_table(self): print '<!-- start of sidebar table -->' print '<TABLE WIDTH="100%" BORDER=0 CELLSPACING=0 CELLPADDING=3' print ' BGCOLOR="%s">' % self.get_bgcolor() def __finish(self): print '</TABLE><!-- end of sidebar table -->' def __do_link(self): done_one = 0 for item in self.links: if type(item) == StringType: # category header if done_one: # get some separation between header and last item print '<TR><TD BGCOLOR="%s"> ' % ( self.get_lightshade()) else: done_one = 1 print '<TR><TD BGCOLOR="%s"><B><FONT COLOR="%s">' % ( self.get_darkshade(), self.get_bgcolor()) print item print '</FONT></B></TD></TR>' else: if len(item) == 3: url, text, extra = item else: url, text = item extra = '' if url is None: s = text else: s = '<A HREF="%s">%s</A>' % (url, text) print '<TR><TD BGCOLOR="%s">' % self.get_lightshade() print '%s%s' % (s, extra) print '</TD></TR>' from Skeleton import _Skeleton from Banner import _Banner class _Sidebar(_Skeleton, _Banner, Sidebar): def __init__(self, sitelinks, toclinks): _Banner.__init__(self, sitelinks) Sidebar.__init__(self, toclinks) def get_sidebar(self): return Sidebar.get_sidebar(self) def get_banner(self): return _Banner.get_banner(self) if __name__ == '__main__': t = _Sidebar( # banner links [('page1.html', 'First Page'), ('page2.html', 'Second Page'), ('page3.html', 'Third Page'), ('page4.html', 'Fourth Page'), (None, '<b>Fifth Page</b>'), ('page6.html', 'Sixth Page'), ], # sidebar links ['Special Topics', ('topics.html', 'Topic Guides'), ('download.html', 'Downloads'), ('windows.html', 'Windows'), ('jpython.html', 'JPython'), ('tkinter.html', 'Tkinter'), ('emacs.html', 'Emacs'), 'See also', ('conferences.html', 'Python Conferences'), ('sitemap.html', 'Site map'), ('mirrors.html', 'Mirror sites'), (None, '<b>What is Python?</b>'), 'Exits', ('starship.html', '(New) Starship'), ('starship.html', 'Old Starship'), ('cnri.html', 'CNRI'), 'Email us', (None, 'For help with Python:'), ('help.html', 'pyt...@py...'), (None, 'For help with Website:'), ('web.html', 'web...@py...'), (None, '<br>'), ('pp.html', '[Python Powered]'), ]) print t.makepage() --- NEW FILE --- """Skeleton class. Should be sub-classed to provide basic generation of able-contained HTML document. """ from ht2html import __version__ import sys import time try: from cStringIO import StringIO except IOError: from StringIO import StringIO class Skeleton: # # for sub-classes to override # def get_banner(self): """Returns HTML for the top banner, or None if no banner. """ return None def get_sidebar(self): """Returns HTML for the left sidebar or None. """ return None def get_banner_width(self): """HTML `width' of banner column as a percentage. Should be a string that does not include the percent sign (e.g. "90"). This affects the column containing both the banner and body text (if they exist). """ return "90" def get_corner(self): """Returns HTML for the upper-left corner or None. Note that if get_banner() and get_sidebar() both return None, then get_corner() is ignored. Also if both get_banner() and get_sidebar() return a string, but get_corner() returns None, the smallest blank corner possible is emitted. """ return None def get_body(self): """Returns HTML for the internal document body. Note that using this method causes the get_sidebar() -- if there is one -- to run the full height of the page. If you don't want this, then make sure get_cont() returns a string. """ return '<b>Intentionally left blank</b>' def get_cont(self): """Returns HTML for the continuation of the body. When this method returns a string, and there is a get_sidebar(), the continuation text appears below the get_sidebar() and get_body() at the full width of the screen. If there is no get_sidebar(), then having a get_cont() is pointless. """ return None def get_title(self): """Return the title of the page. Required.""" return 'Intentionally left blank' def get_meta(self): """Return extra meta-data. Must be a string.""" return '' def get_headers(self): """Return extra header information. Must be a string.""" return '' def get_bgcolor(self): """Return the background color""" return '#ffffff' def get_fgcolor(self): """Return foreground color""" return '#000000' def get_linkcolor(self): """Return link color""" return '#0000bb' def get_vlinkcolor(self): """Return vlink color""" return '#551a8b' def get_alinkcolor(self): """Return alink color""" return '#ff0000' def get_corner_bgcolor(self): """Return the background color for the corner""" return self.get_lightshade() # Barry's prefs def get_lightshade(self): """Return lightest of 3 color scheme shade.""" return '#cdba96' def get_mediumshade(self): """Return middle of 3 color scheme shade.""" return '#cc9966' def get_darkshade(self): """Return darkest of 3 color scheme shade.""" return '#b78900' def get_body_attributes(self): """Return extra attributes for the body start tag.""" return 'TOPMARGIN="0" LEFTMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0"' def get_banner_attributes(self): """Return extra attributes for the TABLE in the banner.""" return 'CELLSPACING=0 CELLPADDING=2' # Call this method def makepage(self): banner = self.get_banner() sidebar = self.get_sidebar() corner = self.get_corner() body = self.get_body() cont = self.get_cont() html = StringIO() stdout = sys.stdout closed = 0 try: sys.stdout = html self.__do_head() self.__start_body() print '<!-- start of page table -->' print '<TABLE WIDTH="100%" BORDER=0 CELLSPACING=0 CELLPADDING=0>' if banner is not None: print '<!-- start of banner row -->' print '<TR>' if corner is not None: self.__do_corner(corner) print '<!-- start of banner -->' print '<TD WIDTH="%s%%" BGCOLOR="%s">' % ( self.get_banner_width(), self.get_lightshade()) print banner print '</TD><!-- end of banner -->' print '</TR><!-- end of banner row -->' # if there is a body but no sidebar, then we'll just close the # table right here and put the body (and any cont) in the full # page. if there is a sidebar but no body, then we still create # the new row and just populate the body cell with a non-breaking # space. Watch out though because we don't want to close the # table twice if sidebar is None: print '</TABLE><!-- end of page table -->' closed = 1 else: print '<TR><!-- start of sidebar/body row -->' self.__do_sidebar(sidebar) if body is not None: if closed: print body else: self.__do_body(body) if not closed: print '</TR><!-- end of sidebar/body row -->' print '</TABLE><!-- end of page table -->' if cont is not None: self.__do_cont(cont) self.__finish_all() finally: sys.stdout = stdout return html.getvalue() def __do_corner(self, corner): print '<!-- start of corner cells -->' print '<TD WIDTH=150 VALIGN=CENTER BGCOLOR="%s">' % ( self.get_corner_bgcolor()) # it is important not to have a newline between the corner text and # the table close tag, otherwise layout is messed up if corner is None: print ' ', else: print corner, print '</TD>' print '<TD WIDTH=15 BGCOLOR="%s"> </TD><!--spacer-->' % ( self.get_lightshade()) print '<!-- end of corner cells -->' def __do_sidebar(self, sidebar): print '<!-- start of sidebar cells -->' print '<TD WIDTH=150 VALIGN=TOP BGCOLOR="%s">' % ( self.get_lightshade()) print sidebar print '</TD>' print '<TD WIDTH=15> </TD><!--spacer-->' print '<!-- end of sidebar cell -->' def __do_body(self, body): print '<!-- start of body cell -->' print '<TD VALIGN=TOP WIDTH="%s%%"><BR>' % ( self.get_banner_width()) print body print '</TD><!-- end of body cell -->' def __do_cont(self, cont): print '<!-- start of continued wide-body text -->' print cont print '<!-- end of continued wide-body text -->' def __do_head(self): """Return the HTML <head> stuff.""" print '''\ <HTML> <!-- THIS PAGE IS AUTOMATICALLY GENERATED. DO NOT EDIT. --> <!-- %(time)s --> <!-- USING HT2HTML %(version)s --> <!-- SEE http://www.python.org/~bwarsaw/software/pyware.html --> <!-- User-specified headers: Title: %(title)s %(headers)s --> <HEAD> <TITLE>%(title)s</TITLE> %(meta)s </HEAD>''' % {'title' : self.get_title(), 'headers': self.get_headers(), 'meta' : self.get_meta(), 'time' : time.ctime(time.time()), 'version': __version__, } def __start_body(self): print '''\ <BODY BGCOLOR="%(bgcolor)s" TEXT="%(fgcolor)s" %(extraattrs)s LINK="%(linkcolor)s" VLINK="%(vlinkcolor)s" ALINK="%(alinkcolor)s">''' % { 'bgcolor' : self.get_bgcolor(), 'fgcolor' : self.get_fgcolor(), 'linkcolor' : self.get_linkcolor(), 'vlinkcolor': self.get_vlinkcolor(), 'alinkcolor': self.get_alinkcolor(), 'extraattrs': self.get_body_attributes(), } def __finish_all(self): print '</BODY></HTML>' # test script class _Skeleton(Skeleton): def get_banner(self): return '<b>The Banner</b>' def get_sidebar(self): return '''<ul><li>Sidebar line 1 <li>Sidebar line 2 <li>Sidebar line 3 </ul>''' def get_corner(self): return '<center><em>CORNER</em></center>' def get_body(self): return 'intentionally left blank ' * 110 def get_cont(self): return 'wide stuff ' * 100 def get_corner_bgcolor(self): return 'yellow' def get_banner_width(self): return "80" if __name__ == '__main__': t = _Skeleton() print t.makepage() |
From: Karl T. K. <ka...@us...> - 2001-03-05 22:33:36
|
Update of /cvsroot/linuxdc/docs/howto In directory usw-pr-cvs1:/tmp/cvs-serv22952 Modified Files: install-kernel.ht install-tools.ht Log Message: Updates to reflect recent events Index: install-kernel.ht =================================================================== RCS file: /cvsroot/linuxdc/docs/howto/install-kernel.ht,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** install-kernel.ht 2001/03/05 01:58:49 1.1 --- install-kernel.ht 2001/03/05 22:35:11 1.2 *************** *** 1,53 **** ! <HTML> ! <!-- THIS PAGE IS AUTOMATICALLY GENERATED. DO NOT EDIT. --> ! <!-- Mon Mar 5 03:28:12 2001 --> ! <!-- USING HT2HTML 1.1 --> ! <!-- SEE http://www.python.org/~bwarsaw/software/pyware.html --> ! <!-- User-specified headers: ! Title: install-kernel.ht ! ! --> ! ! <HEAD> ! <TITLE>install-kernel.ht</TITLE> ! ! </HEAD> ! <BODY BGCOLOR="#ffffff" TEXT="#000000" ! TOPMARGIN="0" LEFTMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0" ! LINK="#0000bb" VLINK="#551a8b" ! ALINK="#ff0000"> ! <!-- start of page table --> ! <TABLE WIDTH="100%" BORDER=0 CELLSPACING=0 CELLPADDING=0> ! <TR><!-- start of sidebar/body row --> ! <!-- start of sidebar cells --> ! <TD WIDTH=150 VALIGN=TOP BGCOLOR="#cdba96"> ! <!-- start of sidebar table --> ! <TABLE WIDTH="100%" BORDER=0 CELLSPACING=0 CELLPADDING=3 ! BGCOLOR="#ffffff"> ! <TR><TD BGCOLOR="#b78900"><B><FONT COLOR="#ffffff"> ! Email Us ! </FONT></B></TD></TR> ! <TR><TD BGCOLOR="#cdba96"> ! <A HREF="mailto:webmaster@local">webmaster@local</A> ! </TD></TR> ! </TABLE><!-- end of sidebar table --> ! ! </TD> ! <TD WIDTH=15> </TD><!--spacer--> ! <!-- end of sidebar cell --> ! <!-- start of body cell --> ! <TD VALIGN=TOP WIDTH="90%"><BR> ! <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> ! <html> ! <head> ! <title>Compiling and installing the Dreamcast Linux kernel</title> ! </head> ! <body bgcolor=white> ! ! </body> ! </html> ! ! </TD><!-- end of body cell --> ! </TR><!-- end of sidebar/body row --> ! </TABLE><!-- end of page table --> ! </BODY></HTML> --- 1,86 ---- ! Title:Compiling and installing the Dreamcast Linux kernel ! Section: Development Section ! ! ! <h4>Getting the sources from CVS</h4> ! ! The kernel sources are easiest obtainable from our anonymous CVS ! hosted at sourceforge.net. Simply do: ! ! <pre>cvs -z9 -d:pserver:ano...@cv...:/cvsroot/linuxdc login</pre> ! ! Hit enter when asked for password. ! ! <pre>cvs -z9 -d:pserver:ano...@cv...:/cvsroot/linuxdc co linux</pre> ! ! <p>Wait for a good while. The source tree is about 120MB, and packed ! on-demand it is probably somewhere around 25MBs to get over the ! line.</p> ! ! ! <h4>Configuring the kernel</h4> ! ! <p>Once the tree is down, copy this <a href="dotconfig">.config file</a> ! as a starting point for your compilation. Put it in the 'linux' ! directory and name it '.config'.</p> ! ! <p>Run 'make menuconfig' then exit and save so that the correct ! symlinks and such are created. There's not anything you should ! alter in the configuarion for now since all DCs are pretty much alike, ! and we don't support the BBA yet</p> ! ! ! <h4>Compiling the sources</h4> ! ! <p>If you have your tools in the path, do:</p> ! ! <pre>make CROSS_COMPILE=sh-linux-gnu- dep zImage</pre> ! ! <p>If not, do, but replace [path-to-tools] with something ! sensible:</p> ! ! <pre>make CROSS_COMPILE=[path-to-tools]/sh-linux-gnu- dep zImage</pre> ! ! ! <h4>Setting kernel boot parameters</h4> ! ! The <a href="options">default options file</a> enables the DC ! framebuffer (that is the DC video/VGA output) as the console. You ! might want to have the output to serial instead, if so, add ! 'console=ttySC1,57600' to the options file. ! ! You should make certain that the final character in the options file ! is a zero byte. This is easiest done by insuring that you have a ! newline at the end of the options file, then issue this command: ! <pre>tr '\n' '\0' < options > options.bin</pre> ! ! To verify, less options.bin and look for a ^@ character at the very ! end of the file. ! ! <h4>Uploading the kernel to DC</h4> ! ! To ease the drudgery here, use this <a href="Makefile.dcload">uploading ! makefile</a> that takes the necessary steps and puts the correct files ! at the correct memory addresses. ! ! Edit the first few lines in the Makefile to point to your tools. ! ! Make certain that options.bin and zImage (from linux/arch/sh/boot/zImage) ! are in the directory you run the Makefile from. ! ! Before running make, you must boot the DC with the dcload CD ! image. Once it has loaded properly, do: ! ! <pre>make</pre> ! ! and wait for the two files to upload. The kernel will be executed once ! it's uploaded. ! ! <h4>Conclusion</h4> ! ! We hope this installation was just as easy as installing a new printer ! filter in your favourite Unix distro. It was certainly our aim. ! ! As the linuxdc kernel and tools stabilise, we'll be looking into ! providing packages and scripts that take on much of the dreary stuff ! in this HOWTO, but until then you have to sit tight. Index: install-tools.ht =================================================================== RCS file: /cvsroot/linuxdc/docs/howto/install-tools.ht,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** install-tools.ht 2001/03/05 01:58:49 1.1 --- install-tools.ht 2001/03/05 22:35:11 1.2 *************** *** 1,3 **** ! <html> <h3 align=center>Compiling and installing the toolchain</h3> --- 1,5 ---- ! Title: Compiling and installing the toolchain ! Section: Developer Section ! <h3 align=center>Compiling and installing the toolchain</h3> *************** *** 84,87 **** on the back. The worst part is over. Scuttle over to the <a href="install-kernel.html"> kernel installing howto</a> to finish up.</p> - </body> - </html> --- 86,87 ---- |
From: Karl T. K. <ka...@us...> - 2001-03-05 22:32:14
|
Update of /cvsroot/linuxdc/docs/howto In directory usw-pr-cvs1:/tmp/cvs-serv22460 Added Files: Makefile.dcload options dotconfig Log Message: Initial import --- NEW FILE --- DCTOOL=/usr/local/apps/dc-tools/bin/dc-tool TTY=/dev/ttyS1 all: options.bin zImage $(DCTOOL) -a 0x8c001100 -u options.bin -t $(TTY) $(DCTOOL) -p -a 0x8c210000 -x zImage -t $(TTY) bin: rm -f options.bin tr '\n' '\0' < options > options.bin zImage: cp ../linux/arch/sh/boot/zImage . --- NEW FILE --- root=/dev/ram mem=16320k video=pvr2dc:640x480-16 --- NEW FILE --- # # Automatically generated by make menuconfig: don't edit # CONFIG_SUPERH=y CONFIG_UID16=y # # Code maturity level options # CONFIG_EXPERIMENTAL=y # # Loadable module support # # CONFIG_MODULES is not set # # Processor type and features # # CONFIG_SH_GENERIC is not set # CONFIG_SH_SOLUTION_ENGINE is not set # CONFIG_SH_7750_OVERDRIVE is not set # CONFIG_SH_STB1_HARP is not set # CONFIG_SH_STB1_OVERDRIVE is not set # CONFIG_SH_HP620 is not set # CONFIG_SH_HP680 is not set # CONFIG_SH_HP690 is not set # CONFIG_SH_CQREEK is not set # CONFIG_SH_DMIDA is not set # CONFIG_SH_EC3104 is not set CONFIG_SH_DREAMCAST=y # CONFIG_SH_CAT68701 is not set # CONFIG_SH_UNKNOWN is not set # CONFIG_SH_RTC is not set # CONFIG_CPU_SUBTYPE_SH7707 is not set # CONFIG_CPU_SUBTYPE_SH7708 is not set # CONFIG_CPU_SUBTYPE_SH7709 is not set CONFIG_CPU_SUBTYPE_SH7750=y # CONFIG_CPU_SUBTYPE_ST40STB1 is not set # CONFIG_CPU_SH3 is not set CONFIG_CPU_SH4=y CONFIG_CPU_LITTLE_ENDIAN=y CONFIG_MEMORY_START=0c000000 # # General setup # CONFIG_ISA=y # CONFIG_EISA is not set # CONFIG_MCA is not set # CONFIG_SBUS is not set # CONFIG_NET is not set # CONFIG_HD64461 is not set # CONFIG_HD64465 is not set # CONFIG_PCI is not set # CONFIG_HOTPLUG is not set # CONFIG_PCMCIA is not set # CONFIG_SYSVIPC is not set # CONFIG_BSD_PROCESS_ACCT is not set # CONFIG_SYSCTL is not set CONFIG_KCORE_ELF=y # CONFIG_KCORE_AOUT is not set CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_MISC is not set # # Parallel port support # # CONFIG_PARPORT is not set # # Memory Technology Devices (MTD) # # CONFIG_MTD is not set # # Block devices # # CONFIG_BLK_DEV_FD is not set # CONFIG_BLK_DEV_XD is not set # CONFIG_PARIDE is not set # CONFIG_BLK_CPQ_DA is not set # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_NBD is not set CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y # # Multi-device support (RAID and LVM) # # CONFIG_MD is not set # CONFIG_BLK_DEV_MD is not set # CONFIG_MD_LINEAR is not set # CONFIG_MD_RAID0 is not set # CONFIG_MD_RAID1 is not set # CONFIG_MD_RAID5 is not set # CONFIG_BLK_DEV_LVM is not set # # ATA/IDE/MFM/RLL support # # CONFIG_IDE is not set # CONFIG_BLK_DEV_IDE_MODES is not set # CONFIG_BLK_DEV_HD is not set # # SCSI support # # CONFIG_SCSI is not set # # Input core support # # CONFIG_INPUT is not set # # Character devices # CONFIG_VT=y CONFIG_VT_CONSOLE=y # CONFIG_SERIAL is not set CONFIG_SH_SCI=y CONFIG_SERIAL_CONSOLE=y # CONFIG_UNIX98_PTYS is not set # CONFIG_PSMOUSE is not set # # File systems # # CONFIG_QUOTA is not set # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set # CONFIG_REISERFS_FS is not set # CONFIG_REISERFS_CHECK is not set # CONFIG_ADFS_FS is not set # CONFIG_ADFS_FS_RW is not set # CONFIG_AFFS_FS is not set # CONFIG_HFS_FS is not set # CONFIG_BFS_FS is not set # CONFIG_FAT_FS is not set # CONFIG_MSDOS_FS is not set # CONFIG_UMSDOS_FS is not set # CONFIG_VFAT_FS is not set # CONFIG_EFS_FS is not set # CONFIG_JFFS_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 # CONFIG_NTFS_FS is not set # CONFIG_NTFS_RW is not set # CONFIG_HPFS_FS is not set CONFIG_PROC_FS=y # CONFIG_DEVFS_FS is not set # CONFIG_DEVFS_MOUNT is not set # CONFIG_DEVFS_DEBUG is not set # CONFIG_DEVPTS_FS is not set # CONFIG_QNX4FS_FS is not set # CONFIG_QNX4FS_RW is not set # CONFIG_ROMFS_FS is not set # CONFIG_EXT2_FS is not set # CONFIG_SYSV_FS is not set # CONFIG_SYSV_FS_WRITE is not set # CONFIG_UDF_FS is not set # CONFIG_UDF_RW is not set # CONFIG_UFS_FS is not set # CONFIG_UFS_FS_WRITE is not set # CONFIG_NCPFS_NLS is not set # CONFIG_SMB_FS is not set # # Partition Types # # CONFIG_PARTITION_ADVANCED is not set CONFIG_MSDOS_PARTITION=y # CONFIG_SMB_NLS is not set # CONFIG_NLS is not set # # Console drivers # # CONFIG_VGA_CONSOLE is not set # CONFIG_VIDEO_SELECT is not set # CONFIG_MDA_CONSOLE is not set # # Frame-buffer support # CONFIG_FB=y CONFIG_DUMMY_CONSOLE=y # CONFIG_FB_CYBER2000 is not set # CONFIG_FB_E1355 is not set CONFIG_FB_PVR2DC=y # CONFIG_FB_VIRTUAL is not set # CONFIG_FBCON_ADVANCED is not set CONFIG_FBCON_CFB16=y CONFIG_FBCON_CFB24=y CONFIG_FBCON_CFB32=y # CONFIG_FBCON_FONTWIDTH8_ONLY is not set # CONFIG_FBCON_FONTS is not set CONFIG_FONT_8x8=y CONFIG_FONT_8x16=y # # Sound # # CONFIG_SOUND is not set # # Kernel hacking # # CONFIG_MAGIC_SYSRQ is not set # CONFIG_SH_STANDARD_BIOS is not set |
From: Karl T. K. <ka...@us...> - 2001-03-05 01:59:03
|
Update of /cvsroot/linuxdc/docs/tools/ht2html In directory usw-pr-cvs1:/tmp/cvs-serv5049 Added Files: README Log Message: Oops --- NEW FILE --- ht2html.py -- The www.python.org Web site generator Contact: Barry Warsaw Email: bw...@py... Download: http://www.python.org/~bwarsaw/software/pyware.html Version: 1.0 INTRODUCTION HTML frames are cool in theory, but horrible in practice. The biggest problem with them is that it totally breaks navigation, especially when you end up at a frame page not through the frameset HTML. Bookmarks are also more difficult when using frames. So the brothers Van Rossum designed the current python.org Web site to use HTML tables, providing much of the benefit of a frames oriented table of contents, without the hassles. Naturally, Guido had to write a Python script to generate the python.org style, which was really cool, except he probably didn't figure that other people would want to generate Web pages using slightly modified versions of that style. Guido's script isn't easily extensible or modifiable, so Andrew Kuchling did another implementation based on Digicool's DocumentTemplate. I couldn't grok Andrew's script -- which says much more about me than his code or DocumentTemplate -- so I did what any self-respecting hacker would do. I reinvented the wheel for the third time. Hey, at least this time I mostly understand how it works. This script is called `ht2html.py' because it generates .html files from .ht template files. The format of these .ht files is essentially normal HTML, with a set of optional RFC822-like headers at the top of the file. These headers specify certain options that ht2html's various classes support. You must include at least one blank line between the last header and the start of the body HTML. More details below. LAYOUTS A Web page is divided into 5 parts: banner, corner, sidebar, body, and continuation. ht2html lets you control which of these parts are included, and you control what goes in each of these parts. Here's a picture: +------------+--------------------------------------------------+ | | | | corner | banner | | | | +------------+--------------------------------------------------+ | | | | sidebar | body | | | | | | | | | | | | | | | | | | | | ... | ... | +------------+--------------------------------------------------+ | | | continuation | | | | | | | | ... | +---------------------------------------------------------------+ Normally the corner, banner, sidebar, and body are each placed into cells of a table. This table is closed just before the continuation. You can omit any of these 5 elements; by default there is no continuation, so you have to do something explicit to include that on the page. Without the continuation, the sidebar will extend to the bottom of the page. If you omit the banner, you do not get a corner. In that case you should put any corner HTML in the first cell of the sidebar (see below for how this works). If you have no sidebar, the table will actually be closed after the banner and both the body and continuation will be outside the table, at the full width of the page. BANNER The banner can contain any HTML you want, but the python.org site uses this area to provide links for top level topic areas that we want to be accessible from any page. We call these "site links". ht2html provides a class called `Banner' which automatically lays out a specified set of links into rows and columns (by default 4) for the banner area. Banner's constructor takes two arguments, a list of links (described below) and the number of columns to use for layout. Links are inserted from left to right, top to bottom, in their own nested table. As many rows as needed are used so that all the links are displayed. The last row may contain some empty cells if the number of links isn't a multiple of columns. Each element of the list argument must be a tuple of the form (URL, LTEXT [, EXTRA]), where URL is either a string or None. If URL is a string, it is used in an anchor tag wrapped around the LTEXT. If the URL is None, then LTEXT is not hyperlinked, but inserted into the cell verbatim. EXTRA is optional and if provided, can be arbitrary HTML, which gets written after the hyperlinked LTEXT. CORNER Again, the corner can contain any HTML, but usually this contains a logo for the site which links to the site's home page. You manage this explicitly though, so you can do anything you want with this area. SIDEBAR Usually the sidebar is used for a table of contents for the subdirectory the page is in. ht2html provides a class called `Sidebar' which manages a table of contents for this area. Sidebar takes one argument in its constructor: a list of links similar to that used by the Banner class. Each element of this list can be either a string or a tuple. If it's a tuple, it has the same semantics as with the Banner class. If the element is a string, then it's interpreted as a table-of-contents section header and it is displayed (non-hyperlinked) in reverse video. BODY This contains the meat of your Web page. You write all this stuff and ht2html just sticks it in the right place in the page's table. The body can contain nested tables, or any other HTML, and this usually ends up looking as you expect (but see PECULIARITIES AND BUGS below). CONTINUATION For long pages, you may not want to have a sidebar that extends to the bottom of the Web page. Maybe part of your text looks better if it extended to the full width of the page. You specify the separation between the body and the continuation text by including a special tag in your .ht file: <!--table-stop--> The tag must look exactly like this (don't put any spaces in the angle brackets). Put this where you'd like the continuation HTML to start. You can't span forms or tables across this tag because ht2html substitutes row and table end tags for this special marker. PECULIARITIES AND BUGS If you have really wide <pre> stuff in the body, the banner can get drawn to wide, at least with Netscape 4.x. The mixin class structure doesn't work as well as I'd like. Writing the style class is more awkward than it should be, but at least there are enough examples for you to go by. USAGE See the docstring for ht2html.py for usage information and more documentation. EXAMPLES This is what you really want -- examples of how to create your own Web site styles. These are done by creating a `generator' class, which customizes not only style elements such as the sidebar colors and the corner icon, but also such elements as the copyright notice and what RFC822-style headers are recognized. Sorry, but there's no really good documentation for how to do this yet, so UTSL. Here are a list of generator classes I've included: PDOGenerator.py -- this is the generator class for the www.python.org site. If you can find a .ht file for a .html file on the site, you can see how this generator works. Not all .ht files are uploaded to the public web site, so hunt around. If you're interested, let me know and I'll try to twiddle some makefiles to get the corresponding .ht files uploaded. BAWGenerator.py -- this is the generator for my personal Web pages at http://www.python.org/~bwarsaw JPyGenerator.py -- this is the generator for the www.jpython.org site. JPyLocalGenerator.py -- this is the generator for the documentation that comes with JPython. The neat thing about this is that I can maintain one set of source .ht files for both the on-line version of the docs <http://www.jpython.org/docs/> and the off-line version that you can access via file: URLs once you've installed JPython. This handles the situation where some links for the off-line version will have to send you out onto the Web. Makes my life much easier! StandardGenerator.py -- not really used anywhere but provides a fallback when no other generator is specified. Also, it shows you how simple a generator can be. |