You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(35) |
Dec
(2) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(37) |
Feb
(10) |
Mar
|
Apr
(2) |
May
(17) |
Jun
(1) |
Jul
(14) |
Aug
(14) |
Sep
(4) |
Oct
|
Nov
(14) |
Dec
(4) |
2005 |
Jan
(6) |
Feb
|
Mar
|
Apr
(6) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
(92) |
Dec
(12) |
2006 |
Jan
(3) |
Feb
(4) |
Mar
|
Apr
(5) |
May
(3) |
Jun
(15) |
Jul
(3) |
Aug
(1) |
Sep
(29) |
Oct
(1) |
Nov
(6) |
Dec
(5) |
2007 |
Jan
(2) |
Feb
(2) |
Mar
|
Apr
(3) |
May
(14) |
Jun
(2) |
Jul
(16) |
Aug
(73) |
Sep
(12) |
Oct
(9) |
Nov
(27) |
Dec
(3) |
2008 |
Jan
(4) |
Feb
(4) |
Mar
(3) |
Apr
(8) |
May
(23) |
Jun
(4) |
Jul
(1) |
Aug
(3) |
Sep
(7) |
Oct
(5) |
Nov
(1) |
Dec
(1) |
2009 |
Jan
|
Feb
(10) |
Mar
|
Apr
(4) |
May
(4) |
Jun
(10) |
Jul
|
Aug
(1) |
Sep
|
Oct
(7) |
Nov
|
Dec
(1) |
2010 |
Jan
|
Feb
(1) |
Mar
|
Apr
(6) |
May
|
Jun
(3) |
Jul
(11) |
Aug
(1) |
Sep
|
Oct
(15) |
Nov
(1) |
Dec
(5) |
2011 |
Jan
(4) |
Feb
(1) |
Mar
(6) |
Apr
|
May
(22) |
Jun
|
Jul
(8) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
(2) |
2012 |
Jan
|
Feb
(10) |
Mar
(1) |
Apr
(6) |
May
(27) |
Jun
(48) |
Jul
(30) |
Aug
(4) |
Sep
|
Oct
(3) |
Nov
(1) |
Dec
(11) |
2013 |
Jan
(4) |
Feb
(7) |
Mar
(6) |
Apr
(18) |
May
(28) |
Jun
(20) |
Jul
|
Aug
(4) |
Sep
(1) |
Oct
(1) |
Nov
(2) |
Dec
(7) |
2014 |
Jan
(3) |
Feb
(2) |
Mar
(4) |
Apr
(9) |
May
(11) |
Jun
(10) |
Jul
|
Aug
(18) |
Sep
(12) |
Oct
(17) |
Nov
(10) |
Dec
(16) |
2015 |
Jan
(5) |
Feb
(1) |
Mar
(5) |
Apr
(4) |
May
(28) |
Jun
(2) |
Jul
|
Aug
|
Sep
(6) |
Oct
|
Nov
(2) |
Dec
(1) |
2016 |
Jan
(14) |
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
(3) |
Jul
(4) |
Aug
(4) |
Sep
(1) |
Oct
(1) |
Nov
|
Dec
(1) |
2017 |
Jan
(11) |
Feb
|
Mar
(21) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2018 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(2) |
Sep
(4) |
Oct
(4) |
Nov
|
Dec
(1) |
2019 |
Jan
(1) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(13) |
Sep
(4) |
Oct
|
Nov
|
Dec
|
2020 |
Jan
(10) |
Feb
(9) |
Mar
(5) |
Apr
(4) |
May
(3) |
Jun
(18) |
Jul
(4) |
Aug
(2) |
Sep
(20) |
Oct
(2) |
Nov
|
Dec
|
2021 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(1) |
Jun
(2) |
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
(2) |
2022 |
Jan
(1) |
Feb
(2) |
Mar
(2) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(5) |
Sep
|
Oct
(1) |
Nov
|
Dec
(1) |
2023 |
Jan
(10) |
Feb
(7) |
Mar
(29) |
Apr
(31) |
May
(29) |
Jun
(34) |
Jul
(3) |
Aug
(24) |
Sep
(22) |
Oct
(10) |
Nov
(38) |
Dec
(27) |
2024 |
Jan
(15) |
Feb
(8) |
Mar
(4) |
Apr
(20) |
May
(33) |
Jun
(18) |
Jul
(15) |
Aug
(23) |
Sep
(26) |
Oct
(32) |
Nov
(6) |
Dec
(4) |
2025 |
Jan
(7) |
Feb
(1) |
Mar
(1) |
Apr
(4) |
May
(46) |
Jun
(19) |
Jul
(25) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: ljsebald <ljs...@us...> - 2023-05-18 02:10:09
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via a9ae48e55b87757d5c657ed8d7f510e6fe36c9dd (commit) from 0a3274deac86c5d1c303f9d5e2b260a1495eb5d9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit a9ae48e55b87757d5c657ed8d7f510e6fe36c9dd Author: Lawrence Sebald <ljs...@us...> Date: Wed May 17 22:09:32 2023 -0400 Remove g1ata stuff from naomi exports. ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/exports-naomi.txt | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/kernel/arch/dreamcast/exports-naomi.txt b/kernel/arch/dreamcast/exports-naomi.txt index 45f0074..8dd3473 100644 --- a/kernel/arch/dreamcast/exports-naomi.txt +++ b/kernel/arch/dreamcast/exports-naomi.txt @@ -14,24 +14,6 @@ asic_evt_disable_all asic_evt_disable asic_evt_enable -# G1 Bus -g1_dma_in_progress -g1_ata_mutex_lock -g1_ata_mutex_unlock -g1_ata_select_device -g1_ata_read_chs -g1_ata_write_chs -g1_ata_read_lba -g1_ata_read_lba_dma -g1_ata_write_lba -g1_ata_write_lba_dma -g1_ata_flush -g1_ata_lba_mode -g1_ata_blockdev_for_partition -g1_ata_blockdev_for_device -g1_ata_init -g1_ata_shutdown - # G2 Bus g2_read_8 g2_write_8 hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: ljsebald <ljs...@us...> - 2023-05-17 02:29:58
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via 0a3274deac86c5d1c303f9d5e2b260a1495eb5d9 (commit) via dd9c0bfdd15e5786bb1798a50ebc3829c9cf506c (commit) via d3c4ffa95a0d4694399e48783fdb464e099176d2 (commit) via 872cd95b3aa39b7e9476f47fba718c772dee8809 (commit) from faa917378610ff9094acbb234022337e43bab30f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 0a3274deac86c5d1c303f9d5e2b260a1495eb5d9 Merge: dd9c0bf d3c4ffa Author: Lawrence Sebald <ljs...@us...> Date: Tue May 16 22:28:55 2023 -0400 Merge pull request #199 from pcercuei/fix-pcercuei-mess dc: init: Move __kos_init_early_fn to .data section commit dd9c0bfdd15e5786bb1798a50ebc3829c9cf506c Merge: faa9173 872cd95 Author: Lawrence Sebald <ljs...@us...> Date: Tue May 16 22:28:06 2023 -0400 Merge pull request #198 from KallistiOS/objc-chain-fix Fix libobjc building after regression in 'Allow overriding stack size / early init function' PR commit d3c4ffa95a0d4694399e48783fdb464e099176d2 Author: Paul Cercueil <pa...@cr...> Date: Tue May 16 00:23:45 2023 +0200 dc: init: Move __kos_init_early_fn to .data section The __kos_init_early_fn pointer is initialized to NULL, which means that unless specified otherwise, it ends up in the .bss section. However, its value is checked *before* the .bss section is cleared; which means that it might contain a garbage value, and the init code would then branch to a random address in memory. Address this issue by forcing the value to be in the .data section. Signed-off-by: Paul Cercueil <pa...@cr...> commit 872cd95b3aa39b7e9476f47fba718c772dee8809 Author: darc <da...@pr...> Date: Mon May 15 22:40:11 2023 -0500 Fix libobjc building after regression in 'Allow overriding stack size / early init function' PR ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/kernel/init.c | 2 +- kernel/arch/dreamcast/kernel/startup.s | 10 +++- utils/dc-chain/patches/gcc-13.1.0-kos.diff | 42 +++++++-------- utils/dc-chain/patches/gcc-4.7.4-kos.diff | 82 +++++++++++++++--------------- utils/dc-chain/patches/gcc-9.3.0-kos.diff | 38 +++++++------- 5 files changed, 93 insertions(+), 81 deletions(-) diff --git a/kernel/arch/dreamcast/kernel/init.c b/kernel/arch/dreamcast/kernel/init.c index e1e3fae..86badbe 100644 --- a/kernel/arch/dreamcast/kernel/init.c +++ b/kernel/arch/dreamcast/kernel/init.c @@ -32,7 +32,7 @@ extern void _init(void); extern void _fini(void); extern void __verify_newlib_patch(); -void (*__kos_init_early_fn)(void) __attribute__((weak)) = NULL; +void (*__kos_init_early_fn)(void) __attribute__((weak,section(".data"))) = NULL; int main(int argc, char **argv); uint32 _fs_dclsocket_get_ip(void); diff --git a/kernel/arch/dreamcast/kernel/startup.s b/kernel/arch/dreamcast/kernel/startup.s index 5234888..5b1510d 100644 --- a/kernel/arch/dreamcast/kernel/startup.s +++ b/kernel/arch/dreamcast/kernel/startup.s @@ -18,6 +18,9 @@ .globl __arch_old_fpscr .globl __arch_mem_top +.weak _arch_stack_16m +.weak _arch_stack_32m + _start: start: ! Disable interrupts (if they're enabled) @@ -73,6 +76,7 @@ init: mov.l old_stack_addr,r0 mov.l r15,@r0 mov.l new_stack_16m,r15 + mov.l @r15,r15 ! Check if 0xadffffff is a mirror of 0xacffffff, or if unique ! If unique, then memory is 32MB instead of 16MB, and we must @@ -83,6 +87,7 @@ init: mov #0xba,r1 mov.b r1,@-r2 ! Store 0xba to 0xacffffff mov.l new_stack_32m,r1 + mov.l @r1,r1 or r0,r1 mov #0xab,r0 mov.b r0,@-r1 ! Store 0xab in 0xadffffff @@ -91,6 +96,7 @@ init: cmp/eq r0,r1 ! Check if values match bt memchk_done ! If so, mirror - we're done, move on mov.l new_stack_32m,r15 ! If not, unique - set higher stack + mov.l @r15,r15 memchk_done: mov.l mem_top_addr,r0 mov.l r15,@r0 ! Save address of top of memory @@ -205,9 +211,9 @@ __arch_mem_top: mem_top_addr: .long __arch_mem_top new_stack_16m: - .long 0x8d000000 + .long _arch_stack_16m new_stack_32m: - .long 0x8e000000 + .long _arch_stack_32m p2_mask: .long 0xa0000000 setup_cache_addr: diff --git a/utils/dc-chain/patches/gcc-13.1.0-kos.diff b/utils/dc-chain/patches/gcc-13.1.0-kos.diff index 5bf29f6..4df90d5 100644 --- a/utils/dc-chain/patches/gcc-13.1.0-kos.diff +++ b/utils/dc-chain/patches/gcc-13.1.0-kos.diff @@ -1,6 +1,6 @@ diff --color -ruN gcc-13.1.0/gcc/config/sh/sh-c.cc gcc-13.1.0-kos/gcc/config/sh/sh-c.cc ---- gcc-13.1.0/gcc/config/sh/sh-c.cc 2023-04-26 02:09:39.000000000 -0500 -+++ gcc-13.1.0-kos/gcc/config/sh/sh-c.cc 2023-04-29 12:45:52.160038658 -0500 +--- gcc-13.1.0/gcc/config/sh/sh-c.cc 2023-05-15 22:32:33.801167700 -0500 ++++ gcc-13.1.0-kos/gcc/config/sh/sh-c.cc 2023-05-15 22:32:40.133180838 -0500 @@ -141,4 +141,11 @@ cpp_define_formatted (pfile, "__SH_ATOMIC_MODEL_%s__", @@ -14,8 +14,8 @@ diff --color -ruN gcc-13.1.0/gcc/config/sh/sh-c.cc gcc-13.1.0-kos/gcc/config/sh/ + builtin_define ("__KOS_GCC_32MB__"); } diff --color -ruN gcc-13.1.0/gcc/configure gcc-13.1.0-kos/gcc/configure ---- gcc-13.1.0/gcc/configure 2023-04-26 02:11:18.000000000 -0500 -+++ gcc-13.1.0-kos/gcc/configure 2023-04-29 12:45:52.164038684 -0500 +--- gcc-13.1.0/gcc/configure 2023-05-15 22:32:36.862174050 -0500 ++++ gcc-13.1.0-kos/gcc/configure 2023-05-15 22:32:40.135180842 -0500 @@ -13012,7 +13012,7 @@ target_thread_file='single' ;; @@ -26,9 +26,9 @@ diff --color -ruN gcc-13.1.0/gcc/configure gcc-13.1.0-kos/gcc/configure ;; *) diff --color -ruN gcc-13.1.0/libgcc/config/sh/crt1.S gcc-13.1.0-kos/libgcc/config/sh/crt1.S ---- gcc-13.1.0/libgcc/config/sh/crt1.S 2023-04-26 02:09:43.000000000 -0500 -+++ gcc-13.1.0-kos/libgcc/config/sh/crt1.S 2023-04-29 12:46:39.571346358 -0500 -@@ -1,724 +1,233 @@ +--- gcc-13.1.0/libgcc/config/sh/crt1.S 2023-05-15 22:32:32.834165694 -0500 ++++ gcc-13.1.0-kos/libgcc/config/sh/crt1.S 2023-05-15 22:32:50.679202715 -0500 +@@ -1,724 +1,236 @@ -/* Copyright (C) 2000-2023 Free Software Foundation, Inc. - This file was pretty much copied from newlib. +! KallistiOS ##version## @@ -52,7 +52,9 @@ diff --color -ruN gcc-13.1.0/libgcc/config/sh/crt1.S gcc-13.1.0-kos/libgcc/confi +.globl __arch_mem_top -This file is part of GCC. -- ++.weak _arch_stack_16m ++.weak _arch_stack_32m + -GCC is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 3, or (at your option) any @@ -971,7 +973,7 @@ diff --color -ruN gcc-13.1.0/libgcc/config/sh/crt1.S gcc-13.1.0-kos/libgcc/confi + .word 0x092d diff --color -ruN gcc-13.1.0/libgcc/config/sh/fake-kos.S gcc-13.1.0-kos/libgcc/config/sh/fake-kos.S --- gcc-13.1.0/libgcc/config/sh/fake-kos.S 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-13.1.0-kos/libgcc/config/sh/fake-kos.S 2023-04-29 12:45:52.164038684 -0500 ++++ gcc-13.1.0-kos/libgcc/config/sh/fake-kos.S 2023-05-15 22:32:40.135180842 -0500 @@ -0,0 +1,78 @@ +! Weakly linked symbols used to get GCC to hopefully compile itself properly. +! These will be replaced by the real symbols in actual compiled programs. @@ -1053,7 +1055,7 @@ diff --color -ruN gcc-13.1.0/libgcc/config/sh/fake-kos.S gcc-13.1.0-kos/libgcc/c + mov #-1, r0 diff --color -ruN gcc-13.1.0/libgcc/config/sh/gthr-kos.h gcc-13.1.0-kos/libgcc/config/sh/gthr-kos.h --- gcc-13.1.0/libgcc/config/sh/gthr-kos.h 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-13.1.0-kos/libgcc/config/sh/gthr-kos.h 2023-04-29 12:45:52.165038690 -0500 ++++ gcc-13.1.0-kos/libgcc/config/sh/gthr-kos.h 2023-05-15 22:32:40.135180842 -0500 @@ -0,0 +1,401 @@ +/* Copyright (C) 2009, 2010, 2011, 2012, 2020 Lawrence Sebald */ + @@ -1457,8 +1459,8 @@ diff --color -ruN gcc-13.1.0/libgcc/config/sh/gthr-kos.h gcc-13.1.0-kos/libgcc/c + +#endif /* ! GCC_GTHR_KOS_H */ diff --color -ruN gcc-13.1.0/libgcc/config/sh/t-sh gcc-13.1.0-kos/libgcc/config/sh/t-sh ---- gcc-13.1.0/libgcc/config/sh/t-sh 2023-04-26 02:09:43.000000000 -0500 -+++ gcc-13.1.0-kos/libgcc/config/sh/t-sh 2023-04-29 12:45:52.165038690 -0500 +--- gcc-13.1.0/libgcc/config/sh/t-sh 2023-05-15 22:32:32.834165694 -0500 ++++ gcc-13.1.0-kos/libgcc/config/sh/t-sh 2023-05-15 22:32:40.135180842 -0500 @@ -23,6 +23,8 @@ $(LIB1ASMFUNCS_CACHE) LIB1ASMFUNCS_CACHE = _ic_invalidate _ic_invalidate_array @@ -1469,8 +1471,8 @@ diff --color -ruN gcc-13.1.0/libgcc/config/sh/t-sh gcc-13.1.0-kos/libgcc/config/ $(gcc_compile) -c $< diff --color -ruN gcc-13.1.0/libgcc/configure gcc-13.1.0-kos/libgcc/configure ---- gcc-13.1.0/libgcc/configure 2023-04-26 02:09:43.000000000 -0500 -+++ gcc-13.1.0-kos/libgcc/configure 2023-04-29 12:45:52.165038690 -0500 +--- gcc-13.1.0/libgcc/configure 2023-05-15 22:32:32.883165796 -0500 ++++ gcc-13.1.0-kos/libgcc/configure 2023-05-15 22:32:40.136180844 -0500 @@ -5699,6 +5699,7 @@ tpf) thread_header=config/s390/gthr-tpf.h ;; vxworks) thread_header=config/gthr-vxworks.h ;; @@ -1480,8 +1482,8 @@ diff --color -ruN gcc-13.1.0/libgcc/configure gcc-13.1.0-kos/libgcc/configure esac diff --color -ruN gcc-13.1.0/libobjc/configure gcc-13.1.0-kos/libobjc/configure ---- gcc-13.1.0/libobjc/configure 2023-04-26 02:11:18.000000000 -0500 -+++ gcc-13.1.0-kos/libobjc/configure 2023-04-29 12:45:52.167038703 -0500 +--- gcc-13.1.0/libobjc/configure 2023-05-15 22:32:32.887165804 -0500 ++++ gcc-13.1.0-kos/libobjc/configure 2023-05-15 22:32:40.136180844 -0500 @@ -2918,11 +2918,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1495,8 +1497,8 @@ diff --color -ruN gcc-13.1.0/libobjc/configure gcc-13.1.0-kos/libobjc/configure return 0; } diff --color -ruN gcc-13.1.0/libstdc++-v3/config/cpu/sh/atomicity.h gcc-13.1.0-kos/libstdc++-v3/config/cpu/sh/atomicity.h ---- gcc-13.1.0/libstdc++-v3/config/cpu/sh/atomicity.h 2023-04-26 02:09:43.000000000 -0500 -+++ gcc-13.1.0-kos/libstdc++-v3/config/cpu/sh/atomicity.h 2023-04-29 12:45:52.167038703 -0500 +--- gcc-13.1.0/libstdc++-v3/config/cpu/sh/atomicity.h 2023-05-15 22:32:33.215166485 -0500 ++++ gcc-13.1.0-kos/libstdc++-v3/config/cpu/sh/atomicity.h 2023-05-15 22:32:40.137180846 -0500 @@ -22,14 +22,40 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. @@ -1548,8 +1550,8 @@ diff --color -ruN gcc-13.1.0/libstdc++-v3/config/cpu/sh/atomicity.h gcc-13.1.0-k +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --color -ruN gcc-13.1.0/libstdc++-v3/configure gcc-13.1.0-kos/libstdc++-v3/configure ---- gcc-13.1.0/libstdc++-v3/configure 2023-04-26 02:09:43.000000000 -0500 -+++ gcc-13.1.0-kos/libstdc++-v3/configure 2023-04-29 12:45:52.173038742 -0500 +--- gcc-13.1.0/libstdc++-v3/configure 2023-05-15 22:32:33.632167350 -0500 ++++ gcc-13.1.0-kos/libstdc++-v3/configure 2023-05-15 22:32:40.140180852 -0500 @@ -15809,6 +15809,7 @@ tpf) thread_header=config/s390/gthr-tpf.h ;; vxworks) thread_header=config/gthr-vxworks.h ;; diff --git a/utils/dc-chain/patches/gcc-4.7.4-kos.diff b/utils/dc-chain/patches/gcc-4.7.4-kos.diff index 55b5ec0..760f010 100644 --- a/utils/dc-chain/patches/gcc-4.7.4-kos.diff +++ b/utils/dc-chain/patches/gcc-4.7.4-kos.diff @@ -1,6 +1,6 @@ diff --color -ruN gcc-4.7.4/gcc/config/sh/sh.h gcc-4.7.4-kos/gcc/config/sh/sh.h ---- gcc-4.7.4/gcc/config/sh/sh.h 2013-03-25 17:55:56.000000000 -0500 -+++ gcc-4.7.4-kos/gcc/config/sh/sh.h 2023-04-29 12:35:14.894104257 -0500 +--- gcc-4.7.4/gcc/config/sh/sh.h 2023-05-15 22:37:11.104742972 -0500 ++++ gcc-4.7.4-kos/gcc/config/sh/sh.h 2023-05-15 22:37:14.351749707 -0500 @@ -93,6 +93,12 @@ builtin_define ("__FMOVD_ENABLED__"); \ builtin_define (TARGET_LITTLE_ENDIAN \ @@ -15,8 +15,8 @@ diff --color -ruN gcc-4.7.4/gcc/config/sh/sh.h gcc-4.7.4-kos/gcc/config/sh/sh.h /* Value should be nonzero if functions must have frame pointers. diff --color -ruN gcc-4.7.4/gcc/configure gcc-4.7.4-kos/gcc/configure ---- gcc-4.7.4/gcc/configure 2014-02-12 10:43:47.000000000 -0600 -+++ gcc-4.7.4-kos/gcc/configure 2023-04-29 12:35:14.897104275 -0500 +--- gcc-4.7.4/gcc/configure 2023-05-15 22:37:11.074742909 -0500 ++++ gcc-4.7.4-kos/gcc/configure 2023-05-15 22:37:14.352749709 -0500 @@ -11338,7 +11338,7 @@ target_thread_file='single' ;; @@ -27,8 +27,8 @@ diff --color -ruN gcc-4.7.4/gcc/configure gcc-4.7.4-kos/gcc/configure ;; *) diff --color -ruN gcc-4.7.4/gcc/cp/cfns.h gcc-4.7.4-kos/gcc/cp/cfns.h ---- gcc-4.7.4/gcc/cp/cfns.h 2009-04-21 14:03:23.000000000 -0500 -+++ gcc-4.7.4-kos/gcc/cp/cfns.h 2023-04-29 12:35:14.898104281 -0500 +--- gcc-4.7.4/gcc/cp/cfns.h 2023-05-15 22:37:11.076742914 -0500 ++++ gcc-4.7.4-kos/gcc/cp/cfns.h 2023-05-15 22:37:14.353749711 -0500 @@ -53,6 +53,9 @@ static unsigned int hash (const char *, unsigned int); #ifdef __GNUC__ @@ -49,8 +49,8 @@ diff --color -ruN gcc-4.7.4/gcc/cp/cfns.h gcc-4.7.4-kos/gcc/cp/cfns.h switch (hval) { diff --color -ruN gcc-4.7.4/gcc/doc/gcc.texi gcc-4.7.4-kos/gcc/doc/gcc.texi ---- gcc-4.7.4/gcc/doc/gcc.texi 2010-06-09 18:46:33.000000000 -0500 -+++ gcc-4.7.4-kos/gcc/doc/gcc.texi 2023-04-29 12:35:14.898104281 -0500 +--- gcc-4.7.4/gcc/doc/gcc.texi 2023-05-15 22:37:10.038740760 -0500 ++++ gcc-4.7.4-kos/gcc/doc/gcc.texi 2023-05-15 22:37:14.353749711 -0500 @@ -86,9 +86,9 @@ @item GNU Press @tab Website: www.gnupress.org @@ -64,9 +64,9 @@ diff --color -ruN gcc-4.7.4/gcc/doc/gcc.texi gcc-4.7.4-kos/gcc/doc/gcc.texi @tab Tel 617-542-5942 @item Boston, MA 02110-1301 USA diff --color -ruN gcc-4.7.4/libgcc/config/sh/crt1.S gcc-4.7.4-kos/libgcc/config/sh/crt1.S ---- gcc-4.7.4/libgcc/config/sh/crt1.S 2011-11-02 09:33:56.000000000 -0500 -+++ gcc-4.7.4-kos/libgcc/config/sh/crt1.S 2023-04-29 12:35:49.271313212 -0500 -@@ -1,1369 +1,233 @@ +--- gcc-4.7.4/libgcc/config/sh/crt1.S 2023-05-15 22:37:09.929740534 -0500 ++++ gcc-4.7.4-kos/libgcc/config/sh/crt1.S 2023-05-15 22:37:20.022761471 -0500 +@@ -1,1369 +1,236 @@ -/* Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006, 2009, 2011 - Free Software Foundation, Inc. - This file was pretty much copied from newlib. @@ -219,7 +219,26 @@ diff --color -ruN gcc-4.7.4/libgcc/config/sh/crt1.S gcc-4.7.4-kos/libgcc/config/ - -#ifdef MMU_SUPPORT - ! Set up the VM using the MMU and caches -- ++! KallistiOS ##version## ++! ++! startup.s ++! (c)2000-2001 Megan Potter ++! ++! This file must appear FIRST in your linking order, or your program won't ++! work correctly as a raw binary. ++! ++! This is very loosely based on Marcus' crt0.s/startup.s ++! ++ ++.globl start ++.globl _start ++.globl _arch_real_exit ++.globl __arch_old_sr ++.globl __arch_old_vbr ++.globl __arch_old_stack ++.globl __arch_old_fpscr ++.globl __arch_mem_top + - ! .vm_ep is first instruction to execute - ! after VM initialization - pt/l .vm_ep, tr1 @@ -758,27 +777,10 @@ diff --color -ruN gcc-4.7.4/libgcc/config/sh/crt1.S gcc-4.7.4-kos/libgcc/config/ -profiling_enabled: - .long 0 -#endif -- -+! KallistiOS ##version## -+! -+! startup.s -+! (c)2000-2001 Megan Potter -+! -+! This file must appear FIRST in your linking order, or your program won't -+! work correctly as a raw binary. -+! -+! This is very loosely based on Marcus' crt0.s/startup.s -+! -+ -+.globl start -+.globl _start -+.globl _arch_real_exit -+.globl __arch_old_sr -+.globl __arch_old_vbr -+.globl __arch_old_stack -+.globl __arch_old_fpscr -+.globl __arch_mem_top ++.weak _arch_stack_16m ++.weak _arch_stack_32m +- - .section .text - .global start - .import ___rtos_profiler_start_timer @@ -1654,7 +1656,7 @@ diff --color -ruN gcc-4.7.4/libgcc/config/sh/crt1.S gcc-4.7.4-kos/libgcc/config/ + .word 0x092d diff --color -ruN gcc-4.7.4/libgcc/config/sh/fake-kos.S gcc-4.7.4-kos/libgcc/config/sh/fake-kos.S --- gcc-4.7.4/libgcc/config/sh/fake-kos.S 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-4.7.4-kos/libgcc/config/sh/fake-kos.S 2023-04-29 12:35:14.898104281 -0500 ++++ gcc-4.7.4-kos/libgcc/config/sh/fake-kos.S 2023-05-15 22:37:14.353749711 -0500 @@ -0,0 +1,75 @@ +! Weakly linked symbols used to get GCC to hopefully compile itself properly. +! These will be replaced by the real symbols in actual compiled programs. @@ -1734,7 +1736,7 @@ diff --color -ruN gcc-4.7.4/libgcc/config/sh/fake-kos.S gcc-4.7.4-kos/libgcc/con \ No newline at end of file diff --color -ruN gcc-4.7.4/libgcc/config/sh/gthr-kos.h gcc-4.7.4-kos/libgcc/config/sh/gthr-kos.h --- gcc-4.7.4/libgcc/config/sh/gthr-kos.h 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-4.7.4-kos/libgcc/config/sh/gthr-kos.h 2023-04-29 12:35:14.899104287 -0500 ++++ gcc-4.7.4-kos/libgcc/config/sh/gthr-kos.h 2023-05-15 22:37:14.353749711 -0500 @@ -0,0 +1,355 @@ +/* Copyright (C) 2009, 2010, 2011, 2012 Lawrence Sebald */ + @@ -2092,8 +2094,8 @@ diff --color -ruN gcc-4.7.4/libgcc/config/sh/gthr-kos.h gcc-4.7.4-kos/libgcc/con + +#endif /* ! GCC_GTHR_KOS_H */ diff --color -ruN gcc-4.7.4/libgcc/config/sh/t-sh gcc-4.7.4-kos/libgcc/config/sh/t-sh ---- gcc-4.7.4/libgcc/config/sh/t-sh 2011-11-07 11:14:32.000000000 -0600 -+++ gcc-4.7.4-kos/libgcc/config/sh/t-sh 2023-04-29 12:35:14.899104287 -0500 +--- gcc-4.7.4/libgcc/config/sh/t-sh 2023-05-15 22:37:09.929740534 -0500 ++++ gcc-4.7.4-kos/libgcc/config/sh/t-sh 2023-05-15 22:37:14.353749711 -0500 @@ -24,6 +24,8 @@ $(LIB1ASMFUNCS_CACHE) LIB1ASMFUNCS_CACHE = _ic_invalidate _ic_invalidate_array @@ -2104,8 +2106,8 @@ diff --color -ruN gcc-4.7.4/libgcc/config/sh/t-sh gcc-4.7.4-kos/libgcc/config/sh $(gcc_compile) -c $< diff --color -ruN gcc-4.7.4/libgcc/configure gcc-4.7.4-kos/libgcc/configure ---- gcc-4.7.4/libgcc/configure 2012-08-06 09:34:27.000000000 -0500 -+++ gcc-4.7.4-kos/libgcc/configure 2023-04-29 12:35:14.899104287 -0500 +--- gcc-4.7.4/libgcc/configure 2023-05-15 22:37:09.912740499 -0500 ++++ gcc-4.7.4-kos/libgcc/configure 2023-05-15 22:37:14.354749713 -0500 @@ -4480,6 +4480,7 @@ tpf) thread_header=config/s390/gthr-tpf.h ;; vxworks) thread_header=config/gthr-vxworks.h ;; @@ -2115,8 +2117,8 @@ diff --color -ruN gcc-4.7.4/libgcc/configure gcc-4.7.4-kos/libgcc/configure # Substitute configuration variables diff --color -ruN gcc-4.7.4/libstdc++-v3/config/cpu/sh/atomicity.h gcc-4.7.4-kos/libstdc++-v3/config/cpu/sh/atomicity.h ---- gcc-4.7.4/libstdc++-v3/config/cpu/sh/atomicity.h 2011-01-30 16:39:36.000000000 -0600 -+++ gcc-4.7.4-kos/libstdc++-v3/config/cpu/sh/atomicity.h 2023-04-29 12:35:14.899104287 -0500 +--- gcc-4.7.4/libstdc++-v3/config/cpu/sh/atomicity.h 2023-05-15 22:37:11.265743306 -0500 ++++ gcc-4.7.4-kos/libstdc++-v3/config/cpu/sh/atomicity.h 2023-05-15 22:37:14.354749713 -0500 @@ -80,7 +80,12 @@ namespace diff --git a/utils/dc-chain/patches/gcc-9.3.0-kos.diff b/utils/dc-chain/patches/gcc-9.3.0-kos.diff index 1f479f2..222fa78 100644 --- a/utils/dc-chain/patches/gcc-9.3.0-kos.diff +++ b/utils/dc-chain/patches/gcc-9.3.0-kos.diff @@ -1,6 +1,6 @@ diff --color -ruN gcc-9.3.0/gcc/config/sh/sh-c.c gcc-9.3.0-kos/gcc/config/sh/sh-c.c ---- gcc-9.3.0/gcc/config/sh/sh-c.c 2020-03-12 06:07:21.000000000 -0500 -+++ gcc-9.3.0-kos/gcc/config/sh/sh-c.c 2023-04-29 12:41:28.765379932 -0500 +--- gcc-9.3.0/gcc/config/sh/sh-c.c 2023-05-15 22:34:42.320434318 -0500 ++++ gcc-9.3.0-kos/gcc/config/sh/sh-c.c 2023-05-15 22:35:04.507480347 -0500 @@ -141,4 +141,11 @@ cpp_define_formatted (pfile, "__SH_ATOMIC_MODEL_%s__", @@ -14,8 +14,8 @@ diff --color -ruN gcc-9.3.0/gcc/config/sh/sh-c.c gcc-9.3.0-kos/gcc/config/sh/sh- + builtin_define ("__KOS_GCC_32MB__"); } diff --color -ruN gcc-9.3.0/gcc/configure gcc-9.3.0-kos/gcc/configure ---- gcc-9.3.0/gcc/configure 2020-03-12 06:08:30.000000000 -0500 -+++ gcc-9.3.0-kos/gcc/configure 2023-04-29 12:41:28.769379957 -0500 +--- gcc-9.3.0/gcc/configure 2023-05-15 22:34:44.370438571 -0500 ++++ gcc-9.3.0-kos/gcc/configure 2023-05-15 22:35:04.509480351 -0500 @@ -11862,7 +11862,7 @@ target_thread_file='single' ;; @@ -26,9 +26,9 @@ diff --color -ruN gcc-9.3.0/gcc/configure gcc-9.3.0-kos/gcc/configure ;; *) diff --color -ruN gcc-9.3.0/libgcc/config/sh/crt1.S gcc-9.3.0-kos/libgcc/config/sh/crt1.S ---- gcc-9.3.0/libgcc/config/sh/crt1.S 2020-03-12 06:07:23.000000000 -0500 -+++ gcc-9.3.0-kos/libgcc/config/sh/crt1.S 2023-04-29 12:41:39.015442403 -0500 -@@ -1,724 +1,233 @@ +--- gcc-9.3.0/libgcc/config/sh/crt1.S 2023-05-15 22:34:41.988433629 -0500 ++++ gcc-9.3.0-kos/libgcc/config/sh/crt1.S 2023-05-15 22:35:16.055504303 -0500 +@@ -1,724 +1,236 @@ -/* Copyright (C) 2000-2019 Free Software Foundation, Inc. - This file was pretty much copied from newlib. +! KallistiOS ##version## @@ -52,7 +52,9 @@ diff --color -ruN gcc-9.3.0/libgcc/config/sh/crt1.S gcc-9.3.0-kos/libgcc/config/ +.globl __arch_mem_top -This file is part of GCC. -- ++.weak _arch_stack_16m ++.weak _arch_stack_32m + -GCC is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 3, or (at your option) any @@ -971,7 +973,7 @@ diff --color -ruN gcc-9.3.0/libgcc/config/sh/crt1.S gcc-9.3.0-kos/libgcc/config/ + .word 0x092d diff --color -ruN gcc-9.3.0/libgcc/config/sh/fake-kos.S gcc-9.3.0-kos/libgcc/config/sh/fake-kos.S --- gcc-9.3.0/libgcc/config/sh/fake-kos.S 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-9.3.0-kos/libgcc/config/sh/fake-kos.S 2023-04-29 12:41:28.769379957 -0500 ++++ gcc-9.3.0-kos/libgcc/config/sh/fake-kos.S 2023-05-15 22:35:04.510480353 -0500 @@ -0,0 +1,78 @@ +! Weakly linked symbols used to get GCC to hopefully compile itself properly. +! These will be replaced by the real symbols in actual compiled programs. @@ -1053,7 +1055,7 @@ diff --color -ruN gcc-9.3.0/libgcc/config/sh/fake-kos.S gcc-9.3.0-kos/libgcc/con + mov #-1, r0 diff --color -ruN gcc-9.3.0/libgcc/config/sh/gthr-kos.h gcc-9.3.0-kos/libgcc/config/sh/gthr-kos.h --- gcc-9.3.0/libgcc/config/sh/gthr-kos.h 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-9.3.0-kos/libgcc/config/sh/gthr-kos.h 2023-04-29 12:41:28.769379957 -0500 ++++ gcc-9.3.0-kos/libgcc/config/sh/gthr-kos.h 2023-05-15 22:35:04.510480353 -0500 @@ -0,0 +1,401 @@ +/* Copyright (C) 2009, 2010, 2011, 2012, 2020 Lawrence Sebald */ + @@ -1457,8 +1459,8 @@ diff --color -ruN gcc-9.3.0/libgcc/config/sh/gthr-kos.h gcc-9.3.0-kos/libgcc/con + +#endif /* ! GCC_GTHR_KOS_H */ diff --color -ruN gcc-9.3.0/libgcc/config/sh/t-sh gcc-9.3.0-kos/libgcc/config/sh/t-sh ---- gcc-9.3.0/libgcc/config/sh/t-sh 2020-03-12 06:07:23.000000000 -0500 -+++ gcc-9.3.0-kos/libgcc/config/sh/t-sh 2023-04-29 12:41:28.769379957 -0500 +--- gcc-9.3.0/libgcc/config/sh/t-sh 2023-05-15 22:34:41.988433629 -0500 ++++ gcc-9.3.0-kos/libgcc/config/sh/t-sh 2023-05-15 22:35:04.510480353 -0500 @@ -23,6 +23,8 @@ $(LIB1ASMFUNCS_CACHE) LIB1ASMFUNCS_CACHE = _ic_invalidate _ic_invalidate_array @@ -1469,8 +1471,8 @@ diff --color -ruN gcc-9.3.0/libgcc/config/sh/t-sh gcc-9.3.0-kos/libgcc/config/sh $(gcc_compile) -c $< diff --color -ruN gcc-9.3.0/libgcc/configure gcc-9.3.0-kos/libgcc/configure ---- gcc-9.3.0/libgcc/configure 2020-03-12 06:07:23.000000000 -0500 -+++ gcc-9.3.0-kos/libgcc/configure 2023-04-29 12:41:28.770379963 -0500 +--- gcc-9.3.0/libgcc/configure 2023-05-15 22:34:42.023433702 -0500 ++++ gcc-9.3.0-kos/libgcc/configure 2023-05-15 22:35:04.510480353 -0500 @@ -5550,6 +5550,7 @@ tpf) thread_header=config/s390/gthr-tpf.h ;; vxworks) thread_header=config/gthr-vxworks.h ;; @@ -1480,8 +1482,8 @@ diff --color -ruN gcc-9.3.0/libgcc/configure gcc-9.3.0-kos/libgcc/configure diff --color -ruN gcc-9.3.0/libstdc++-v3/config/cpu/sh/atomicity.h gcc-9.3.0-kos/libstdc++-v3/config/cpu/sh/atomicity.h ---- gcc-9.3.0/libstdc++-v3/config/cpu/sh/atomicity.h 2020-03-12 06:07:24.000000000 -0500 -+++ gcc-9.3.0-kos/libstdc++-v3/config/cpu/sh/atomicity.h 2023-04-29 12:41:28.770379963 -0500 +--- gcc-9.3.0/libstdc++-v3/config/cpu/sh/atomicity.h 2023-05-15 22:34:44.682439218 -0500 ++++ gcc-9.3.0-kos/libstdc++-v3/config/cpu/sh/atomicity.h 2023-05-15 22:35:04.510480353 -0500 @@ -22,14 +22,40 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. @@ -1533,8 +1535,8 @@ diff --color -ruN gcc-9.3.0/libstdc++-v3/config/cpu/sh/atomicity.h gcc-9.3.0-kos +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --color -ruN gcc-9.3.0/libstdc++-v3/configure gcc-9.3.0-kos/libstdc++-v3/configure ---- gcc-9.3.0/libstdc++-v3/configure 2020-03-12 06:07:24.000000000 -0500 -+++ gcc-9.3.0-kos/libstdc++-v3/configure 2023-04-29 12:41:28.778380012 -0500 +--- gcc-9.3.0/libstdc++-v3/configure 2023-05-15 22:34:45.058439998 -0500 ++++ gcc-9.3.0-kos/libstdc++-v3/configure 2023-05-15 22:35:04.514480362 -0500 @@ -15629,6 +15629,7 @@ tpf) thread_header=config/s390/gthr-tpf.h ;; vxworks) thread_header=config/gthr-vxworks.h ;; hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: ljsebald <ljs...@us...> - 2023-05-16 03:26:03
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via faa917378610ff9094acbb234022337e43bab30f (commit) via f73d8f314023f70e208a95ddb83ee656e35daf56 (commit) via 57d03c65130a7d58790575848f0f2bd08489797e (commit) via b7f22b8e73a57ebf0a2adb5f3759a0d25701c8e4 (commit) from b73b567c1d592e6b62a2623187d7e8269e2b0483 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit faa917378610ff9094acbb234022337e43bab30f Merge: f73d8f3 57d03c6 Author: Lawrence Sebald <ljs...@us...> Date: Mon May 15 23:22:17 2023 -0400 Merge pull request #197 from KallistiOS/newline Add a newline to the end of all text files without one commit f73d8f314023f70e208a95ddb83ee656e35daf56 Merge: b73b567 b7f22b8 Author: Lawrence Sebald <ljs...@us...> Date: Mon May 15 23:21:13 2023 -0400 Merge pull request #196 from kouta-kun/patch-1 Fix compilation of .S files commit 57d03c65130a7d58790575848f0f2bd08489797e Author: darc <da...@pr...> Date: Mon May 15 21:56:17 2023 -0500 Add a newline to the end of all text files without one commit b7f22b8e73a57ebf0a2adb5f3759a0d25701c8e4 Author: kouta-kun <442...@us...> Date: Mon May 15 21:54:37 2023 -0300 Fix compilation of .S files The change from kos-as to kos-cc was missing the -c parameter to compile object files. ----------------------------------------------------------------------- Summary of changes: Makefile.rules | 2 +- addons/libkosfat/directory.c | 2 +- examples/dreamcast/basic/stackprotector/Makefile | 2 +- examples/dreamcast/basic/threading/recursive_lock/Makefile | 2 +- examples/dreamcast/basic/threading/rwsem/Makefile | 2 +- examples/dreamcast/conio/adventure/globalvars.c | 2 +- examples/dreamcast/keyboard/keytest/keytest.c | 2 +- examples/dreamcast/kgl/basic/elements/pvr-texture.c | 2 +- examples/dreamcast/kgl/basic/gl/pvr-texture.c | 2 +- examples/dreamcast/kgl/basic/scissor/pvr-texture.c | 2 +- examples/dreamcast/kgl/basic/txrenv/pvr-texture.c | 2 +- examples/dreamcast/kgl/basic/zclip_arrays/pvr-texture.c | 2 +- examples/dreamcast/kgl/demos/blur/pvr-texture.c | 2 +- examples/dreamcast/kgl/demos/mipmap/pvr-texture.c | 2 +- examples/dreamcast/kgl/demos/multitexture-arrays/pvr-texture.c | 2 +- examples/dreamcast/kgl/demos/multitexture-elements/pvr-texture.c | 2 +- examples/dreamcast/kgl/demos/specular/pvr-texture.c | 2 +- examples/dreamcast/kgl/nehe/nehe06/pvr-texture.c | 2 +- examples/dreamcast/kgl/nehe/nehe08/pvr-texture.c | 2 +- examples/dreamcast/kgl/nehe/nehe09/pvr-texture.c | 2 +- examples/dreamcast/kgl/nehe/nehe16/pvr-texture.c | 2 +- examples/dreamcast/network/httpd/Makefile | 2 +- examples/dreamcast/vmu/vmu_game/README | 2 +- kernel/net/net_icmp6.c | 2 +- kernel/net/net_ipv6.c | 2 +- kernel/net/net_udp.c | 2 +- utils/cmake/dreamcast.cmake | 2 +- utils/cmake/dreamcast.toolchain.cmake | 2 +- utils/dc-chain/patches/README.md | 2 +- utils/dc-chain/scripts/options.mk | 2 +- utils/makeip/README.md | 2 +- 31 files changed, 31 insertions(+), 31 deletions(-) diff --git a/Makefile.rules b/Makefile.rules index 7551cb3..05280aa 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -37,7 +37,7 @@ endif kos-as $< -o $@ %.o: %.S - kos-cc $< -o $@ + kos-cc -c $< -o $@ subdirs: $(patsubst %, _dir_%, $(SUBDIRS)) diff --git a/addons/libkosfat/directory.c b/addons/libkosfat/directory.c index 0c45e09..4d28270 100644 --- a/addons/libkosfat/directory.c +++ b/addons/libkosfat/directory.c @@ -1399,4 +1399,4 @@ void fat_dentry_print(const fat_dentry_t *ent) { #if __GNUC__ >= 9 #pragma GCC diagnostic pop -#endif \ No newline at end of file +#endif diff --git a/examples/dreamcast/basic/stackprotector/Makefile b/examples/dreamcast/basic/stackprotector/Makefile index b096194..f4056dc 100644 --- a/examples/dreamcast/basic/stackprotector/Makefile +++ b/examples/dreamcast/basic/stackprotector/Makefile @@ -34,4 +34,4 @@ dist: $(TARGET) .PHONY: run dist clean rm-elf -endif \ No newline at end of file +endif diff --git a/examples/dreamcast/basic/threading/recursive_lock/Makefile b/examples/dreamcast/basic/threading/recursive_lock/Makefile index 8a4e0e7..12c4080 100644 --- a/examples/dreamcast/basic/threading/recursive_lock/Makefile +++ b/examples/dreamcast/basic/threading/recursive_lock/Makefile @@ -25,4 +25,4 @@ run: $(TARGET) dist: $(TARGET) rm -f $(OBJS) - $(KOS_STRIP) $(TARGET) \ No newline at end of file + $(KOS_STRIP) $(TARGET) diff --git a/examples/dreamcast/basic/threading/rwsem/Makefile b/examples/dreamcast/basic/threading/rwsem/Makefile index 348362e..2fadfb7 100644 --- a/examples/dreamcast/basic/threading/rwsem/Makefile +++ b/examples/dreamcast/basic/threading/rwsem/Makefile @@ -25,4 +25,4 @@ run: $(TARGET) dist: $(TARGET) rm -f $(OBJS) - $(KOS_STRIP) $(TARGET) \ No newline at end of file + $(KOS_STRIP) $(TARGET) diff --git a/examples/dreamcast/conio/adventure/globalvars.c b/examples/dreamcast/conio/adventure/globalvars.c index 9dd9df1..59ce6c5 100644 --- a/examples/dreamcast/conio/adventure/globalvars.c +++ b/examples/dreamcast/conio/adventure/globalvars.c @@ -61,4 +61,4 @@ int turns, lmwarn, iwest, knfloc, detail, /* various flags & counters */ abbnum, maxdie, numdie, holdng, dkill, foobar, bonus, clock1, clock2, closng, apanic, closed, scorng; -int demo, limit; \ No newline at end of file +int demo, limit; diff --git a/examples/dreamcast/keyboard/keytest/keytest.c b/examples/dreamcast/keyboard/keytest/keytest.c index 0332dc7..ca2f991 100644 --- a/examples/dreamcast/keyboard/keytest/keytest.c +++ b/examples/dreamcast/keyboard/keytest/keytest.c @@ -86,4 +86,4 @@ int main(void) test_phase++; } return 0; -} \ No newline at end of file +} diff --git a/examples/dreamcast/kgl/basic/elements/pvr-texture.c b/examples/dreamcast/kgl/basic/elements/pvr-texture.c index ee186a1..a06714f 100644 --- a/examples/dreamcast/kgl/basic/elements/pvr-texture.c +++ b/examples/dreamcast/kgl/basic/elements/pvr-texture.c @@ -153,4 +153,4 @@ static GLuint PVR_TextureWidth(unsigned char *HDR) { static GLuint PVR_TextureHeight(unsigned char *HDR) { return (GLuint)HDR[PVR_HDR_SIZE - 2] | HDR[PVR_HDR_SIZE - 1] << 8; -} \ No newline at end of file +} diff --git a/examples/dreamcast/kgl/basic/gl/pvr-texture.c b/examples/dreamcast/kgl/basic/gl/pvr-texture.c index ee186a1..a06714f 100644 --- a/examples/dreamcast/kgl/basic/gl/pvr-texture.c +++ b/examples/dreamcast/kgl/basic/gl/pvr-texture.c @@ -153,4 +153,4 @@ static GLuint PVR_TextureWidth(unsigned char *HDR) { static GLuint PVR_TextureHeight(unsigned char *HDR) { return (GLuint)HDR[PVR_HDR_SIZE - 2] | HDR[PVR_HDR_SIZE - 1] << 8; -} \ No newline at end of file +} diff --git a/examples/dreamcast/kgl/basic/scissor/pvr-texture.c b/examples/dreamcast/kgl/basic/scissor/pvr-texture.c index ee186a1..a06714f 100644 --- a/examples/dreamcast/kgl/basic/scissor/pvr-texture.c +++ b/examples/dreamcast/kgl/basic/scissor/pvr-texture.c @@ -153,4 +153,4 @@ static GLuint PVR_TextureWidth(unsigned char *HDR) { static GLuint PVR_TextureHeight(unsigned char *HDR) { return (GLuint)HDR[PVR_HDR_SIZE - 2] | HDR[PVR_HDR_SIZE - 1] << 8; -} \ No newline at end of file +} diff --git a/examples/dreamcast/kgl/basic/txrenv/pvr-texture.c b/examples/dreamcast/kgl/basic/txrenv/pvr-texture.c index ee186a1..a06714f 100644 --- a/examples/dreamcast/kgl/basic/txrenv/pvr-texture.c +++ b/examples/dreamcast/kgl/basic/txrenv/pvr-texture.c @@ -153,4 +153,4 @@ static GLuint PVR_TextureWidth(unsigned char *HDR) { static GLuint PVR_TextureHeight(unsigned char *HDR) { return (GLuint)HDR[PVR_HDR_SIZE - 2] | HDR[PVR_HDR_SIZE - 1] << 8; -} \ No newline at end of file +} diff --git a/examples/dreamcast/kgl/basic/zclip_arrays/pvr-texture.c b/examples/dreamcast/kgl/basic/zclip_arrays/pvr-texture.c index ee186a1..a06714f 100644 --- a/examples/dreamcast/kgl/basic/zclip_arrays/pvr-texture.c +++ b/examples/dreamcast/kgl/basic/zclip_arrays/pvr-texture.c @@ -153,4 +153,4 @@ static GLuint PVR_TextureWidth(unsigned char *HDR) { static GLuint PVR_TextureHeight(unsigned char *HDR) { return (GLuint)HDR[PVR_HDR_SIZE - 2] | HDR[PVR_HDR_SIZE - 1] << 8; -} \ No newline at end of file +} diff --git a/examples/dreamcast/kgl/demos/blur/pvr-texture.c b/examples/dreamcast/kgl/demos/blur/pvr-texture.c index 811fa41..0bd9495 100644 --- a/examples/dreamcast/kgl/demos/blur/pvr-texture.c +++ b/examples/dreamcast/kgl/demos/blur/pvr-texture.c @@ -153,4 +153,4 @@ static GLuint PVR_TextureWidth(unsigned char *HDR) { static GLuint PVR_TextureHeight(unsigned char *HDR) { return (GLuint)HDR[PVR_HDR_SIZE - 2] | HDR[PVR_HDR_SIZE - 1] << 8; -} \ No newline at end of file +} diff --git a/examples/dreamcast/kgl/demos/mipmap/pvr-texture.c b/examples/dreamcast/kgl/demos/mipmap/pvr-texture.c index 811fa41..0bd9495 100644 --- a/examples/dreamcast/kgl/demos/mipmap/pvr-texture.c +++ b/examples/dreamcast/kgl/demos/mipmap/pvr-texture.c @@ -153,4 +153,4 @@ static GLuint PVR_TextureWidth(unsigned char *HDR) { static GLuint PVR_TextureHeight(unsigned char *HDR) { return (GLuint)HDR[PVR_HDR_SIZE - 2] | HDR[PVR_HDR_SIZE - 1] << 8; -} \ No newline at end of file +} diff --git a/examples/dreamcast/kgl/demos/multitexture-arrays/pvr-texture.c b/examples/dreamcast/kgl/demos/multitexture-arrays/pvr-texture.c index 811fa41..0bd9495 100644 --- a/examples/dreamcast/kgl/demos/multitexture-arrays/pvr-texture.c +++ b/examples/dreamcast/kgl/demos/multitexture-arrays/pvr-texture.c @@ -153,4 +153,4 @@ static GLuint PVR_TextureWidth(unsigned char *HDR) { static GLuint PVR_TextureHeight(unsigned char *HDR) { return (GLuint)HDR[PVR_HDR_SIZE - 2] | HDR[PVR_HDR_SIZE - 1] << 8; -} \ No newline at end of file +} diff --git a/examples/dreamcast/kgl/demos/multitexture-elements/pvr-texture.c b/examples/dreamcast/kgl/demos/multitexture-elements/pvr-texture.c index 811fa41..0bd9495 100644 --- a/examples/dreamcast/kgl/demos/multitexture-elements/pvr-texture.c +++ b/examples/dreamcast/kgl/demos/multitexture-elements/pvr-texture.c @@ -153,4 +153,4 @@ static GLuint PVR_TextureWidth(unsigned char *HDR) { static GLuint PVR_TextureHeight(unsigned char *HDR) { return (GLuint)HDR[PVR_HDR_SIZE - 2] | HDR[PVR_HDR_SIZE - 1] << 8; -} \ No newline at end of file +} diff --git a/examples/dreamcast/kgl/demos/specular/pvr-texture.c b/examples/dreamcast/kgl/demos/specular/pvr-texture.c index ee186a1..a06714f 100644 --- a/examples/dreamcast/kgl/demos/specular/pvr-texture.c +++ b/examples/dreamcast/kgl/demos/specular/pvr-texture.c @@ -153,4 +153,4 @@ static GLuint PVR_TextureWidth(unsigned char *HDR) { static GLuint PVR_TextureHeight(unsigned char *HDR) { return (GLuint)HDR[PVR_HDR_SIZE - 2] | HDR[PVR_HDR_SIZE - 1] << 8; -} \ No newline at end of file +} diff --git a/examples/dreamcast/kgl/nehe/nehe06/pvr-texture.c b/examples/dreamcast/kgl/nehe/nehe06/pvr-texture.c index ee186a1..a06714f 100644 --- a/examples/dreamcast/kgl/nehe/nehe06/pvr-texture.c +++ b/examples/dreamcast/kgl/nehe/nehe06/pvr-texture.c @@ -153,4 +153,4 @@ static GLuint PVR_TextureWidth(unsigned char *HDR) { static GLuint PVR_TextureHeight(unsigned char *HDR) { return (GLuint)HDR[PVR_HDR_SIZE - 2] | HDR[PVR_HDR_SIZE - 1] << 8; -} \ No newline at end of file +} diff --git a/examples/dreamcast/kgl/nehe/nehe08/pvr-texture.c b/examples/dreamcast/kgl/nehe/nehe08/pvr-texture.c index ee186a1..a06714f 100644 --- a/examples/dreamcast/kgl/nehe/nehe08/pvr-texture.c +++ b/examples/dreamcast/kgl/nehe/nehe08/pvr-texture.c @@ -153,4 +153,4 @@ static GLuint PVR_TextureWidth(unsigned char *HDR) { static GLuint PVR_TextureHeight(unsigned char *HDR) { return (GLuint)HDR[PVR_HDR_SIZE - 2] | HDR[PVR_HDR_SIZE - 1] << 8; -} \ No newline at end of file +} diff --git a/examples/dreamcast/kgl/nehe/nehe09/pvr-texture.c b/examples/dreamcast/kgl/nehe/nehe09/pvr-texture.c index ee186a1..a06714f 100644 --- a/examples/dreamcast/kgl/nehe/nehe09/pvr-texture.c +++ b/examples/dreamcast/kgl/nehe/nehe09/pvr-texture.c @@ -153,4 +153,4 @@ static GLuint PVR_TextureWidth(unsigned char *HDR) { static GLuint PVR_TextureHeight(unsigned char *HDR) { return (GLuint)HDR[PVR_HDR_SIZE - 2] | HDR[PVR_HDR_SIZE - 1] << 8; -} \ No newline at end of file +} diff --git a/examples/dreamcast/kgl/nehe/nehe16/pvr-texture.c b/examples/dreamcast/kgl/nehe/nehe16/pvr-texture.c index ee186a1..a06714f 100644 --- a/examples/dreamcast/kgl/nehe/nehe16/pvr-texture.c +++ b/examples/dreamcast/kgl/nehe/nehe16/pvr-texture.c @@ -153,4 +153,4 @@ static GLuint PVR_TextureWidth(unsigned char *HDR) { static GLuint PVR_TextureHeight(unsigned char *HDR) { return (GLuint)HDR[PVR_HDR_SIZE - 2] | HDR[PVR_HDR_SIZE - 1] << 8; -} \ No newline at end of file +} diff --git a/examples/dreamcast/network/httpd/Makefile b/examples/dreamcast/network/httpd/Makefile index 0aa2a0b..9630cf8 100644 --- a/examples/dreamcast/network/httpd/Makefile +++ b/examples/dreamcast/network/httpd/Makefile @@ -33,4 +33,4 @@ run: $(TARGET) dist: $(TARGET) rm -f $(OBJS) romdisk.img - $(KOS_STRIP) $(TARGET) \ No newline at end of file + $(KOS_STRIP) $(TARGET) diff --git a/examples/dreamcast/vmu/vmu_game/README b/examples/dreamcast/vmu/vmu_game/README index 181cac6..42b9ea0 100644 --- a/examples/dreamcast/vmu/vmu_game/README +++ b/examples/dreamcast/vmu/vmu_game/README @@ -1,2 +1,2 @@ TETRIS.VMS was programmed by Marcus Comstedt. tetris.s is the source code. -http://mc.pp.se/dc/sw.html \ No newline at end of file +http://mc.pp.se/dc/sw.html diff --git a/kernel/net/net_icmp6.c b/kernel/net/net_icmp6.c index 20e8850..6976c2e 100644 --- a/kernel/net/net_icmp6.c +++ b/kernel/net/net_icmp6.c @@ -810,4 +810,4 @@ int net_icmp6_send_param_prob(netif_t *net, uint8 code, uint32 ptr, #if __GNUC__ >= 9 #pragma GCC diagnostic pop -#endif \ No newline at end of file +#endif diff --git a/kernel/net/net_ipv6.c b/kernel/net/net_ipv6.c index 58b92c0..74606be 100644 --- a/kernel/net/net_ipv6.c +++ b/kernel/net/net_ipv6.c @@ -310,4 +310,4 @@ void net_ipv6_shutdown(void) { #if __GNUC__ >= 9 #pragma GCC diagnostic pop -#endif \ No newline at end of file +#endif diff --git a/kernel/net/net_udp.c b/kernel/net/net_udp.c index 1e05caf..9d728a7 100644 --- a/kernel/net/net_udp.c +++ b/kernel/net/net_udp.c @@ -1550,4 +1550,4 @@ void net_udp_shutdown(void) { #if __GNUC__ >= 9 #pragma GCC diagnostic pop -#endif \ No newline at end of file +#endif diff --git a/utils/cmake/dreamcast.cmake b/utils/cmake/dreamcast.cmake index a6254e5..8095511 100644 --- a/utils/cmake/dreamcast.cmake +++ b/utils/cmake/dreamcast.cmake @@ -60,4 +60,4 @@ function(enable_sh4_math) message(WARN " Must have GCC4.8 or later for -mfsca to be enabled") endif() -endfunction() \ No newline at end of file +endfunction() diff --git a/utils/cmake/dreamcast.toolchain.cmake b/utils/cmake/dreamcast.toolchain.cmake index 8377404..c3dd71f 100644 --- a/utils/cmake/dreamcast.toolchain.cmake +++ b/utils/cmake/dreamcast.toolchain.cmake @@ -124,4 +124,4 @@ LINK_DIRECTORIES( ) add_link_options(-L${KOS_BASE}/lib/dreamcast -L${KOS_BASE}/addons/lib/dreamcast -L${KOS_PORTS}/lib) -LINK_LIBRARIES(-Wl,--start-group -lstdc++ -lkallisti -lc -lgcc -Wl,--end-group m) \ No newline at end of file +LINK_LIBRARIES(-Wl,--start-group -lstdc++ -lkallisti -lc -lgcc -Wl,--end-group m) diff --git a/utils/dc-chain/patches/README.md b/utils/dc-chain/patches/README.md index b080efa..8b07c77 100644 --- a/utils/dc-chain/patches/README.md +++ b/utils/dc-chain/patches/README.md @@ -33,4 +33,4 @@ Generic `newlib` fixups (applied directly after `newlib` is installed): **Note:** For the **MinGW/MSYS** environment, these `newlib` fixups should be manually applied. See the `mingw` directory for details. For all the others platforms, these fixups are applied automatically from the `Makefile`. - \ No newline at end of file + diff --git a/utils/dc-chain/scripts/options.mk b/utils/dc-chain/scripts/options.mk index 8082ea3..986bc57 100644 --- a/utils/dc-chain/scripts/options.mk +++ b/utils/dc-chain/scripts/options.mk @@ -23,4 +23,4 @@ ifeq (1,$(verbose)) to_log = 2>&1 | tee -a $(log) && [ $$PIPESTATUS -eq 0 ] else to_log = >> $(log) 2>&1 -endif \ No newline at end of file +endif diff --git a/utils/makeip/README.md b/utils/makeip/README.md index d11e9aa..04f0f6d 100644 --- a/utils/makeip/README.md +++ b/utils/makeip/README.md @@ -305,4 +305,4 @@ To install the GIMP Plug-In: ## License This project is licensed under the **BSD 2-clause "Simplified" License** - see -the [LICENSE](LICENSE) file for details. \ No newline at end of file +the [LICENSE](LICENSE) file for details. hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: ljsebald <ljs...@us...> - 2023-05-15 13:58:13
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via b73b567c1d592e6b62a2623187d7e8269e2b0483 (commit) via b46d8234374c9ede8a78cefcb5538760651f2bc6 (commit) from 5fe79996c2105112352abf05f29fcb0230105cdb (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit b73b567c1d592e6b62a2623187d7e8269e2b0483 Merge: 5fe7999 b46d823 Author: Lawrence Sebald <ljs...@us...> Date: Mon May 15 09:50:07 2023 -0400 Merge pull request #194 from jpeach/dc-chain-use-mirrors dc-chain: download source archives from mirrors commit b46d8234374c9ede8a78cefcb5538760651f2bc6 Author: James Peach <jp...@ap...> Date: Mon May 15 19:32:10 2023 +1000 dc-chain: download source archives from mirrors Use the GNU mirror hostname to download source archives. In principle, this should give better performance, though they still seems slow to me. Since the mirror works by HTTP redirects, we need to update the curl download command to automatically follow the redirect. Signed-off-by: James Peach <jp...@ap...> ----------------------------------------------------------------------- Summary of changes: utils/dc-chain/download.sh | 2 +- utils/dc-chain/scripts/common.sh | 2 +- utils/dc-chain/scripts/gdb.mk | 2 +- utils/dc-chain/scripts/init.mk | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/utils/dc-chain/download.sh b/utils/dc-chain/download.sh index d7ffe74..12edf2b 100755 --- a/utils/dc-chain/download.sh +++ b/utils/dc-chain/download.sh @@ -97,7 +97,7 @@ fi if [ ! -f ${CONFIG_GUESS} ]; then WEB_DOWNLOAD_OUTPUT_SWITCH="-O" if [ ! -z "${IS_CURL}" ] && [ "${IS_CURL}" != "0" ]; then - WEB_DOWNLOADER="$(echo ${WEB_DOWNLOADER} | cut -c-9)" + WEB_DOWNLOADER="$(echo "${WEB_DOWNLOADER}" | sed '-es/-O//')" WEB_DOWNLOAD_OUTPUT_SWITCH="-o" fi diff --git a/utils/dc-chain/scripts/common.sh b/utils/dc-chain/scripts/common.sh index b999b12..bed1690 100755 --- a/utils/dc-chain/scripts/common.sh +++ b/utils/dc-chain/scripts/common.sh @@ -80,7 +80,7 @@ setup_download_var ARM_GCC # export GNU_MIRROR_URL=mirrors.kernel.org/gnu -export GNU_MIRROR_URL=ftp.gnu.org +export GNU_MIRROR_URL=ftpmirror.gnu.org export SH_BINUTILS_TARBALL_URL=$GNU_MIRROR_URL/gnu/binutils/binutils-$SH_BINUTILS_VER.tar.$SH_BINUTILS_TARBALL_TYPE export SH_GCC_TARBALL_URL=$GNU_MIRROR_URL/gnu/gcc/gcc-$SH_GCC_VER/gcc-$SH_GCC_VER.tar.$SH_GCC_TARBALL_TYPE export NEWLIB_TARBALL_URL=sourceware.org/pub/newlib/newlib-$NEWLIB_VER.tar.$NEWLIB_TARBALL_TYPE diff --git a/utils/dc-chain/scripts/gdb.mk b/utils/dc-chain/scripts/gdb.mk index 4a96981..1b2c337 100644 --- a/utils/dc-chain/scripts/gdb.mk +++ b/utils/dc-chain/scripts/gdb.mk @@ -7,7 +7,7 @@ gdb_name = gdb-$(gdb_ver) gdb_file = $(gdb_name).tar.$(gdb_tarball_type) -gdb_url = $(download_protocol)://ftp.gnu.org/gnu/gdb/$(gdb_file) +gdb_url = $(download_protocol)://ftpmirror.gnu.org/gnu/gdb/$(gdb_file) stamp_gdb_unpack = gdb_unpack.stamp stamp_gdb_patch = gdb_patch.stamp diff --git a/utils/dc-chain/scripts/init.mk b/utils/dc-chain/scripts/init.mk index 3a3c763..5e92e43 100644 --- a/utils/dc-chain/scripts/init.mk +++ b/utils/dc-chain/scripts/init.mk @@ -108,7 +108,7 @@ endif # Web downloaders command-lines wget_cmd=wget -c -curl_cmd=curl -C - -O +curl_cmd=curl --fail --location -C - -O # Determine if we want to apply fixup sh4 newlib do_auto_fixup_sh4_newlib := 1 @@ -148,4 +148,4 @@ ifdef newlib_opt_space ifneq (0,$(newlib_opt_space)) newlib_extra_configure_args += --enable-target-optspace endif -endif \ No newline at end of file +endif hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: ljsebald <ljs...@us...> - 2023-05-15 03:13:31
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via 5fe79996c2105112352abf05f29fcb0230105cdb (commit) via aae6be04820837942e0ddceefb55986d6bccc09f (commit) from 1a25fbf4bc8d06550d34ef96d4ae267e0bd705b5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 5fe79996c2105112352abf05f29fcb0230105cdb Merge: 1a25fbf aae6be0 Author: Lawrence Sebald <ljs...@us...> Date: Sun May 14 23:12:50 2023 -0400 Merge pull request #192 from cepawiel/remove-insight Remove Insight from dc-chain Insight was last updated in 2009, and is currently broken. If anyone wants to volunteer to bring it back, feel free to do so. commit aae6be04820837942e0ddceefb55986d6bccc09f Author: Colton Pawielski <cep...@mt...> Date: Sun May 14 15:24:05 2023 -0500 Remove insight from dc-chain Insight is not building properly and has not had a release since 2009. ----------------------------------------------------------------------- Summary of changes: utils/dc-chain/Makefile | 1 - utils/dc-chain/README.md | 7 ++-- utils/dc-chain/cleanup.sh | 8 ----- utils/dc-chain/config.mk.legacy.sample | 3 -- utils/dc-chain/config.mk.stable.sample | 3 -- utils/dc-chain/config.mk.testing.sample | 3 -- utils/dc-chain/scripts/clean.mk | 2 -- utils/dc-chain/scripts/common.sh | 2 -- utils/dc-chain/scripts/insight.mk | 59 --------------------------------- utils/dc-chain/scripts/phony.mk | 1 - 10 files changed, 2 insertions(+), 87 deletions(-) delete mode 100644 utils/dc-chain/scripts/insight.mk diff --git a/utils/dc-chain/Makefile b/utils/dc-chain/Makefile index 6b216b0..59bc89e 100644 --- a/utils/dc-chain/Makefile +++ b/utils/dc-chain/Makefile @@ -51,7 +51,6 @@ include scripts/gcc-pass2.mk # ---- optional components {{{ include scripts/gdb.mk -include scripts/insight.mk # ---- }}}} diff --git a/utils/dc-chain/README.md b/utils/dc-chain/README.md index db9f27b..37658f5 100644 --- a/utils/dc-chain/README.md +++ b/utils/dc-chain/README.md @@ -29,7 +29,6 @@ Components included in the toolchains built through `dc-chain` are: - **GNU Compiler Collection** (`gcc`, `g++`); - **Newlib** (mainly `libc` plus other libraries); - **GNU Debugger** (`gdb`) - Optional; -- **Insight** (A `gdb` UI based on **X11**) - Optional. **Binutils** and **GCC** are installed for both targets (i.e. `sh-elf` and `arm-eabi`) where **Newlib** and **GNU Debugger** (**GDB**) are needed only @@ -93,7 +92,6 @@ For the `sh-elf` toolchain, they are: - `sh_gcc_ver` - `newlib_ver` - `gdb_ver` -- `insight_ver` For the `arm-eabi` toolchain, they are: @@ -316,9 +314,9 @@ of the problematic step only rather than running the whole process again. Interesting targets (you can `make` any of these): -- `all`: `patch` `build` (patch and build everything, excluding `gdb` and `insight`) +- `all`: `patch` `build` (patch and build everything, excluding `gdb`) - `patch`: `patch-gcc` `patch-newlib` `patch-kos` (should be executed once) -- `build`: `build-sh4` `build-arm` (build everything, excluding `gdb` and `insight`) +- `build`: `build-sh4` `build-arm` (build everything, excluding `gdb`) - `build-sh4`: `build-sh4-binutils` `build-sh4-gcc` (build only `sh-elf` toolchain, excluding `gdb`) - `build-arm`: `build-arm-binutils` `build-arm-gcc` (build only `arm-eabi` toolchain) - `build-sh4-binutils` (build only `binutils` for `sh-elf`) @@ -327,4 +325,3 @@ Interesting targets (you can `make` any of these): - `build-arm-gcc`: `build-arm-gcc-pass1` (build only `arm-eabi-gcc`) - `build-sh4-newlib`: `build-sh4-newlib-only` `fixup-sh4-newlib` (build only `newlib` for `sh-elf`) - `gdb` (build only `sh-elf-gdb`; it's never built automatically) -- `insight` (build only `insight`; it's never built automatically) diff --git a/utils/dc-chain/cleanup.sh b/utils/dc-chain/cleanup.sh index cc885c0..f009094 100755 --- a/utils/dc-chain/cleanup.sh +++ b/utils/dc-chain/cleanup.sh @@ -71,10 +71,6 @@ if [ -z $KEEP_DOWNLOADS ]; then rm -f gdb-$GDB_VER.tar.$GDB_TARBALL_TYPE fi - if [ -f "insight-${INSIGHT_VER}a.tar.$INSIGHT_TARBALL_TYPE" ]; then - rm -f insight-${INSIGHT_VER}a.tar.$INSIGHT_TARBALL_TYPE - fi - echo "Done!" echo "---------------------------------------" fi @@ -95,10 +91,6 @@ if [ -d "gdb-$GDB_VER" ]; then rm -rf gdb-$GDB_VER fi -if [ -d "insight-$INSIGHT_VER" ]; then - rm -rf insight-$INSIGHT_VER -fi - echo "Done!" echo "---------------------------------------" diff --git a/utils/dc-chain/config.mk.legacy.sample b/utils/dc-chain/config.mk.legacy.sample index e097c3c..7b288bd 100644 --- a/utils/dc-chain/config.mk.legacy.sample +++ b/utils/dc-chain/config.mk.legacy.sample @@ -15,21 +15,18 @@ # build-arm-gcc: build-arm-gcc-pass1 # build-sh4-newlib: build-sh4-newlib-only fixup-sh4-newlib # gdb -# insight # Toolchain versions for SH sh_binutils_ver=2.34 sh_gcc_ver=4.7.4 newlib_ver=2.0.0 gdb_ver=9.2 -insight_ver=6.8-1 # Tarball extensions to download for SH sh_binutils_download_type=xz sh_gcc_download_type=bz2 newlib_download_type=gz gdb_tarball_type=xz -insight_tarball_type=bz2 # Toolchain for ARM # The ARM version of binutils/gcc is separated out as the particular CPU diff --git a/utils/dc-chain/config.mk.stable.sample b/utils/dc-chain/config.mk.stable.sample index deb7466..3b3893c 100644 --- a/utils/dc-chain/config.mk.stable.sample +++ b/utils/dc-chain/config.mk.stable.sample @@ -15,21 +15,18 @@ # build-arm-gcc: build-arm-gcc-pass1 # build-sh4-newlib: build-sh4-newlib-only fixup-sh4-newlib # gdb -# insight # Toolchain versions for SH sh_binutils_ver=2.34 sh_gcc_ver=9.3.0 newlib_ver=3.3.0 gdb_ver=9.2 -insight_ver=6.8-1 # Tarball extensions to download for SH sh_binutils_download_type=xz sh_gcc_download_type=xz newlib_download_type=gz gdb_tarball_type=xz -insight_tarball_type=bz2 # Toolchain for ARM # The ARM version of binutils/gcc is separated out as the particular CPU diff --git a/utils/dc-chain/config.mk.testing.sample b/utils/dc-chain/config.mk.testing.sample index 8909b92..7b41b5f 100644 --- a/utils/dc-chain/config.mk.testing.sample +++ b/utils/dc-chain/config.mk.testing.sample @@ -15,21 +15,18 @@ # build-arm-gcc: build-arm-gcc-pass1 # build-sh4-newlib: build-sh4-newlib-only fixup-sh4-newlib # gdb -# insight # Toolchain versions for SH sh_binutils_ver=2.40 sh_gcc_ver=13.1.0 newlib_ver=4.3.0.20230120 gdb_ver=13.1 -insight_ver=6.8-1 # Tarball extensions to download for SH sh_binutils_download_type=xz sh_gcc_download_type=xz newlib_download_type=gz gdb_tarball_type=xz -insight_tarball_type=bz2 # Toolchain for ARM # The ARM version of binutils/gcc is separated out as the particular CPU diff --git a/utils/dc-chain/scripts/clean.mk b/utils/dc-chain/scripts/clean.mk index 5b73b95..1ec8401 100644 --- a/utils/dc-chain/scripts/clean.mk +++ b/utils/dc-chain/scripts/clean.mk @@ -13,7 +13,6 @@ clean_patches_stamp: mv patch-*.stamp $${tmpdir} 2>/dev/null; \ mv $(stamp_gdb_unpack) $${tmpdir} 2>/dev/null; \ mv $(stamp_gdb_patch) $${tmpdir} 2>/dev/null; \ - mv $(stamp_insight_unpack) $${tmpdir} 2>/dev/null; \ rm -f *.stamp; \ mv $${tmpdir}/*.stamp . 2>/dev/null; \ rm -rf $${tmpdir} @@ -27,4 +26,3 @@ clean: clean_patches_stamp -rm -rf build-binutils-$(sh_target)-$(sh_binutils_ver) -rm -rf build-binutils-$(arm_target)-$(arm_binutils_ver) -rm -rf build-$(gdb_name) - -rm -rf build-$(insight_name) diff --git a/utils/dc-chain/scripts/common.sh b/utils/dc-chain/scripts/common.sh index 61694ab..b999b12 100755 --- a/utils/dc-chain/scripts/common.sh +++ b/utils/dc-chain/scripts/common.sh @@ -75,7 +75,6 @@ setup_download_var SH_BINUTILS setup_download_var SH_GCC setup_download_var NEWLIB setup_download_var GDB -setup_download_var INSIGHT setup_download_var ARM_BINUTILS setup_download_var ARM_GCC @@ -86,7 +85,6 @@ export SH_BINUTILS_TARBALL_URL=$GNU_MIRROR_URL/gnu/binutils/binutils-$SH_BINUTIL export SH_GCC_TARBALL_URL=$GNU_MIRROR_URL/gnu/gcc/gcc-$SH_GCC_VER/gcc-$SH_GCC_VER.tar.$SH_GCC_TARBALL_TYPE export NEWLIB_TARBALL_URL=sourceware.org/pub/newlib/newlib-$NEWLIB_VER.tar.$NEWLIB_TARBALL_TYPE export GDB_TARBALL_URL=$GNU_MIRROR_URL/gnu/gdb/gdb-$GDB_VER.tar.$GDB_TARBALL_TYPE -export INSIGHT_TARBALL_URL=$GNU_MIRROR_URL/sourceware/insight/releases/insight-$INSIGHT_VER.tar.$INSIGHT_TARBALL_TYPE export ARM_BINUTILS_TARBALL_URL=$GNU_MIRROR_URL/gnu/binutils/binutils-$ARM_BINUTILS_VER.tar.$ARM_BINUTILS_TARBALL_TYPE export ARM_GCC_TARBALL_URL=$GNU_MIRROR_URL/gnu/gcc/gcc-$ARM_GCC_VER/gcc-$ARM_GCC_VER.tar.$ARM_GCC_TARBALL_TYPE diff --git a/utils/dc-chain/scripts/insight.mk b/utils/dc-chain/scripts/insight.mk deleted file mode 100644 index 9c33508..0000000 --- a/utils/dc-chain/scripts/insight.mk +++ /dev/null @@ -1,59 +0,0 @@ -# Sega Dreamcast Toolchains Maker (dc-chain) -# This file is part of KallistiOS. -# -# Created by Jim Ursetto (2004) -# Initially adapted from Stalin's build script version 0.3. -# - -insight_name = insight-$(insight_ver)a -insight_file = $(insight_name).tar.$(insight_tarball_type) -insight_url = $(download_protocol)://sourceware.org/pub/insight/releases/$(insight_file) - -stamp_insight_unpack = insight_unpack.stamp -stamp_insight_build = insight_build.stamp -stamp_insight_install = insight_install.stamp - -$(insight_file): - @echo "+++ Downloading Insight..." - $(web_downloader) $(insight_url) - -unpack_insight: $(insight_file) $(stamp_insight_unpack) - -$(stamp_insight_unpack): - @echo "+++ Unpacking Insight..." - rm -f $@ - rm -rf $(insight_name) - tar xf $(insight_file) - touch $@ - -build_insight: log = $(logdir)/build-$(insight_name).log -build_insight: logdir -build_insight: unpack_insight $(stamp_insight_build) - -$(stamp_insight_build): - @echo "+++ Building Insight..." - rm -f $@ - > $(log) - rm -rf build-$(insight_name) - mkdir build-$(insight_name) - cd build-$(insight_name); \ - ../$(insight_name)/configure \ - --disable-werror \ - --prefix=$(sh_prefix) \ - --target=$(sh_target) \ - $(static_flag) \ - $(to_log) - $(MAKE) $(makejobs) -C build-$(insight_name) $(to_log) - touch $@ - -install_insight: log = $(logdir)/build-$(insight_name).log -install_insight: logdir -install_insight: build_insight $(stamp_insight_install) - -$(stamp_insight_install): - @echo "+++ Installing Insight..." - rm -f $@ - $(MAKE) -C build-$(insight_name) install DESTDIR=$(DESTDIR) $(to_log) - touch $@ - -insight: install_insight diff --git a/utils/dc-chain/scripts/phony.mk b/utils/dc-chain/scripts/phony.mk index d7ab3b3..7799d80 100644 --- a/utils/dc-chain/scripts/phony.mk +++ b/utils/dc-chain/scripts/phony.mk @@ -11,4 +11,3 @@ .PHONY: build build-sh4 build-arm $(build_sh4_targets) $(build_arm_targets) clean .PHONY: build-binutils build-newlib build-gcc-pass1 build-gcc-pass2 fixup-sh4-newlib .PHONY: gdb install_gdb build_gdb unpack_gdb -.PHONY: insight install_insight build_insight unpack_insight hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: ljsebald <ljs...@us...> - 2023-05-15 03:06:08
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via 1a25fbf4bc8d06550d34ef96d4ae267e0bd705b5 (commit) via 9c9e12f7d222024f68e102cef26096063e7d6c5d (commit) via b16e1b6f60f2494d25df11b3fc621e81f65c7aa7 (commit) via df3afc978152876b51b7007fc1a55a695d89a659 (commit) via 4e734f92c611e97d73474d6497fdc02dcfca0e1c (commit) from e5b95f67866fcef5b54c70ee6f7081cad0b32326 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 1a25fbf4bc8d06550d34ef96d4ae267e0bd705b5 Author: Lawrence Sebald <ljs...@us...> Date: Sun May 14 23:05:44 2023 -0400 Formatting cleanup and adding to CHANGELOG. commit 9c9e12f7d222024f68e102cef26096063e7d6c5d Merge: e5b95f6 b16e1b6 Author: Lawrence Sebald <ljs...@us...> Date: Sun May 14 22:58:12 2023 -0400 Merge pull request #189 from pcercuei/stack-size-and-init Allow overriding stack size / early init function commit b16e1b6f60f2494d25df11b3fc621e81f65c7aa7 Author: Paul Cercueil <pa...@cr...> Date: Wed May 10 23:09:15 2023 +0200 init: Add optional callback set up with KOS_INIT_EARLY() If supplied to the KOS_INIT_EARLY() macro, this function will be called very early in the boot process. This is used in my case to copy data appended to the raw binary to its final location in RAM; the advantage vs. romdisks, is that the data appended to the raw binary will eventually be reused by the .bss section and the heap. Signed-off-by: Paul Cercueil <pa...@cr...> --- v2: Provide and document KOS_INIT_EARLY() macro commit df3afc978152876b51b7007fc1a55a695d89a659 Author: Paul Cercueil <pa...@cr...> Date: Wed May 10 23:07:21 2023 +0200 Set weak aliases for stack address Allow programs to override the stack addresses. This is useful when a program wants to artificially reduce the size of the RAM managed by KOS. Signed-off-by: Paul Cercueil <pa...@cr...> commit 4e734f92c611e97d73474d6497fdc02dcfca0e1c Author: Paul Cercueil <pa...@cr...> Date: Wed May 10 23:05:14 2023 +0200 GCC patch: Source stack address from C Let C code have the responsability of setting the stack addresses for the 16 MiB and 32 MiB stack. KOS can then give the option to set a custom value. Signed-off-by: Paul Cercueil <pa...@cr...> --- v2: Adapt the patch to the other GCC versions. ----------------------------------------------------------------------- Summary of changes: doc/CHANGELOG | 3 ++- kernel/arch/dreamcast/include/arch/arch.h | 14 +++++++++++--- kernel/arch/dreamcast/kernel/init.c | 8 +++++++- kernel/arch/dreamcast/kernel/stack.c | 7 +++++++ utils/dc-chain/patches/gcc-13.1.0-kos.diff | 9 ++++++--- utils/dc-chain/patches/gcc-4.7.4-kos.diff | 9 ++++++--- utils/dc-chain/patches/gcc-9.3.0-kos.diff | 9 ++++++--- 7 files changed, 45 insertions(+), 14 deletions(-) diff --git a/doc/CHANGELOG b/doc/CHANGELOG index c5dc6b4..5f8ff95 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -167,7 +167,8 @@ KallistiOS version 2.1.0 ----------------------------------------------- - DC Cleaned up the register access in video to match pvr [DH] - DC Fixed various shutdown functions to be safer to call in an interrupt [DH] - DC Cleaned up asic functions and corrected potential bugs [DH] -- DC Deprecated coop threading mode. Always use preemptive mode [DH] +- DC Removed cooperative threading mode -- threading is always preemptive [DH] +- DC Added early user init function [PC] KallistiOS version 2.0.0 ----------------------------------------------- - DC Broadband Adapter driver fixes [Megan Potter == MP] diff --git a/kernel/arch/dreamcast/include/arch/arch.h b/kernel/arch/dreamcast/include/arch/arch.h index cda9a34..dd2744c 100644 --- a/kernel/arch/dreamcast/include/arch/arch.h +++ b/kernel/arch/dreamcast/include/arch/arch.h @@ -27,9 +27,9 @@ __BEGIN_DECLS #ifdef __KOS_GCC_32MB__ extern uint32 _arch_mem_top; #else -#pragma message "Outdated toolchain: not patched for 32MB support, limiting KOS"\ - " to 16MB-only behavior to retain maximum compatibility. Please"\ - " update toolchain." +#pragma message "Outdated toolchain: not patched for 32MB support, limiting "\ + "KOS to 16MB-only behavior to retain maximum compatibility. Please "\ + "update your toolchain." #define _arch_mem_top ((uint32) 0x8d000000) #endif @@ -182,6 +182,14 @@ extern void * __kos_romdisk; /** \brief State that you don't want a romdisk. */ #define KOS_INIT_ROMDISK_NONE NULL +/** \brief Register a single function to be called very early in the boot + process, before the BSS section is cleared. + + \param func The function to register. The prototype should be + void func(void) +*/ +#define KOS_INIT_EARLY(func) void (*__kos_init_early_fn)(void) = (func) + /** \defgroup arch_initflags Available flags for initialization These are the flags you can specify with KOS_INIT_FLAGS(). diff --git a/kernel/arch/dreamcast/kernel/init.c b/kernel/arch/dreamcast/kernel/init.c index 40161de..e1e3fae 100644 --- a/kernel/arch/dreamcast/kernel/init.c +++ b/kernel/arch/dreamcast/kernel/init.c @@ -32,6 +32,8 @@ extern void _init(void); extern void _fini(void); extern void __verify_newlib_patch(); +void (*__kos_init_early_fn)(void) __attribute__((weak)) = NULL; + int main(int argc, char **argv); uint32 _fs_dclsocket_get_ip(void); @@ -230,6 +232,10 @@ void arch_main(void) { /* Ensure that UBC is not enabled from a previous session */ ubc_disable_all(); + /* Handle optional callback provided by KOS_INIT_EARLY() */ + if(__kos_init_early_fn) + __kos_init_early_fn(); + /* Clear out the BSS area */ memset(bss_start, 0, bss_end - bss_start); @@ -290,7 +296,7 @@ void arch_shutdown(void) { /* Generic kernel exit point */ void arch_exit(void) { - /* arch_exit always returns EXIT_SUCCESS (0) + /* arch_exit always returns EXIT_SUCCESS (0) if return codes are desired then a call to newlib's exit() should be used in its place */ exit(EXIT_SUCCESS); diff --git a/kernel/arch/dreamcast/kernel/stack.c b/kernel/arch/dreamcast/kernel/stack.c index a8d41f4..0032419 100644 --- a/kernel/arch/dreamcast/kernel/stack.c +++ b/kernel/arch/dreamcast/kernel/stack.c @@ -15,6 +15,13 @@ #include <kos/dbgio.h> #include <arch/arch.h> #include <arch/stack.h> +#include <stdint.h> + +static uintptr_t arch_stack_16m_dft = 0x8d000000; +static uintptr_t arch_stack_32m_dft = 0x8e000000; + +extern uintptr_t arch_stack_16m __attribute__((weak,alias("arch_stack_16m_dft"))); +extern uintptr_t arch_stack_32m __attribute__((weak,alias("arch_stack_32m_dft"))); /* Do a stack trace from the current function; leave off the first n frames (i.e., in assert()). */ diff --git a/utils/dc-chain/patches/gcc-13.1.0-kos.diff b/utils/dc-chain/patches/gcc-13.1.0-kos.diff index 498741f..5bf29f6 100644 --- a/utils/dc-chain/patches/gcc-13.1.0-kos.diff +++ b/utils/dc-chain/patches/gcc-13.1.0-kos.diff @@ -28,7 +28,7 @@ diff --color -ruN gcc-13.1.0/gcc/configure gcc-13.1.0-kos/gcc/configure diff --color -ruN gcc-13.1.0/libgcc/config/sh/crt1.S gcc-13.1.0-kos/libgcc/config/sh/crt1.S --- gcc-13.1.0/libgcc/config/sh/crt1.S 2023-04-26 02:09:43.000000000 -0500 +++ gcc-13.1.0-kos/libgcc/config/sh/crt1.S 2023-04-29 12:46:39.571346358 -0500 -@@ -1,724 +1,230 @@ +@@ -1,724 +1,233 @@ -/* Copyright (C) 2000-2023 Free Software Foundation, Inc. - This file was pretty much copied from newlib. +! KallistiOS ##version## @@ -249,6 +249,7 @@ diff --color -ruN gcc-13.1.0/libgcc/config/sh/crt1.S gcc-13.1.0-kos/libgcc/confi + mov.l old_stack_addr,r0 + mov.l r15,@r0 + mov.l new_stack_16m,r15 ++ mov.l @r15,r15 + + ! Check if 0xadffffff is a mirror of 0xacffffff, or if unique + ! If unique, then memory is 32MB instead of 16MB, and we must @@ -259,6 +260,7 @@ diff --color -ruN gcc-13.1.0/libgcc/config/sh/crt1.S gcc-13.1.0-kos/libgcc/confi + mov #0xba,r1 + mov.b r1,@-r2 ! Store 0xba to 0xacffffff + mov.l new_stack_32m,r1 ++ mov.l @r1,r1 + or r0,r1 + mov #0xab,r0 + mov.b r0,@-r1 ! Store 0xab in 0xadffffff @@ -267,6 +269,7 @@ diff --color -ruN gcc-13.1.0/libgcc/config/sh/crt1.S gcc-13.1.0-kos/libgcc/confi + cmp/eq r0,r1 ! Check if values match + bt memchk_done ! If so, mirror - we're done, move on + mov.l new_stack_32m,r15 ! If not, unique - set higher stack ++ mov.l @r15,r15 +memchk_done: + mov.l mem_top_addr,r0 + mov.l r15,@r0 ! Save address of top of memory @@ -943,9 +946,9 @@ diff --color -ruN gcc-13.1.0/libgcc/config/sh/crt1.S gcc-13.1.0-kos/libgcc/confi +mem_top_addr: + .long __arch_mem_top +new_stack_16m: -+ .long 0x8d000000 ++ .long _arch_stack_16m +new_stack_32m: -+ .long 0x8e000000 ++ .long _arch_stack_32m +p2_mask: + .long 0xa0000000 +setup_cache_addr: diff --git a/utils/dc-chain/patches/gcc-4.7.4-kos.diff b/utils/dc-chain/patches/gcc-4.7.4-kos.diff index bd06bec..55b5ec0 100644 --- a/utils/dc-chain/patches/gcc-4.7.4-kos.diff +++ b/utils/dc-chain/patches/gcc-4.7.4-kos.diff @@ -66,7 +66,7 @@ diff --color -ruN gcc-4.7.4/gcc/doc/gcc.texi gcc-4.7.4-kos/gcc/doc/gcc.texi diff --color -ruN gcc-4.7.4/libgcc/config/sh/crt1.S gcc-4.7.4-kos/libgcc/config/sh/crt1.S --- gcc-4.7.4/libgcc/config/sh/crt1.S 2011-11-02 09:33:56.000000000 -0500 +++ gcc-4.7.4-kos/libgcc/config/sh/crt1.S 2023-04-29 12:35:49.271313212 -0500 -@@ -1,1369 +1,230 @@ +@@ -1,1369 +1,233 @@ -/* Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006, 2009, 2011 - Free Software Foundation, Inc. - This file was pretty much copied from newlib. @@ -929,6 +929,7 @@ diff --color -ruN gcc-4.7.4/libgcc/config/sh/crt1.S gcc-4.7.4-kos/libgcc/config/ + mov.l old_stack_addr,r0 + mov.l r15,@r0 + mov.l new_stack_16m,r15 ++ mov.l @r15,r15 + + ! Check if 0xadffffff is a mirror of 0xacffffff, or if unique + ! If unique, then memory is 32MB instead of 16MB, and we must @@ -939,6 +940,7 @@ diff --color -ruN gcc-4.7.4/libgcc/config/sh/crt1.S gcc-4.7.4-kos/libgcc/config/ + mov #0xba,r1 + mov.b r1,@-r2 ! Store 0xba to 0xacffffff + mov.l new_stack_32m,r1 ++ mov.l @r1,r1 + or r0,r1 + mov #0xab,r0 + mov.b r0,@-r1 ! Store 0xab in 0xadffffff @@ -947,6 +949,7 @@ diff --color -ruN gcc-4.7.4/libgcc/config/sh/crt1.S gcc-4.7.4-kos/libgcc/config/ + cmp/eq r0,r1 ! Check if values match + bt memchk_done ! If so, mirror - we're done, move on + mov.l new_stack_32m,r15 ! If not, unique - set higher stack ++ mov.l @r15,r15 +memchk_done: + mov.l mem_top_addr,r0 + mov.l r15,@r0 ! Save address of top of memory @@ -1626,9 +1629,9 @@ diff --color -ruN gcc-4.7.4/libgcc/config/sh/crt1.S gcc-4.7.4-kos/libgcc/config/ +mem_top_addr: + .long __arch_mem_top +new_stack_16m: -+ .long 0x8d000000 ++ .long _arch_stack_16m +new_stack_32m: -+ .long 0x8e000000 ++ .long _arch_stack_32m +p2_mask: + .long 0xa0000000 +setup_cache_addr: diff --git a/utils/dc-chain/patches/gcc-9.3.0-kos.diff b/utils/dc-chain/patches/gcc-9.3.0-kos.diff index 5572df6..1f479f2 100644 --- a/utils/dc-chain/patches/gcc-9.3.0-kos.diff +++ b/utils/dc-chain/patches/gcc-9.3.0-kos.diff @@ -28,7 +28,7 @@ diff --color -ruN gcc-9.3.0/gcc/configure gcc-9.3.0-kos/gcc/configure diff --color -ruN gcc-9.3.0/libgcc/config/sh/crt1.S gcc-9.3.0-kos/libgcc/config/sh/crt1.S --- gcc-9.3.0/libgcc/config/sh/crt1.S 2020-03-12 06:07:23.000000000 -0500 +++ gcc-9.3.0-kos/libgcc/config/sh/crt1.S 2023-04-29 12:41:39.015442403 -0500 -@@ -1,724 +1,230 @@ +@@ -1,724 +1,233 @@ -/* Copyright (C) 2000-2019 Free Software Foundation, Inc. - This file was pretty much copied from newlib. +! KallistiOS ##version## @@ -249,6 +249,7 @@ diff --color -ruN gcc-9.3.0/libgcc/config/sh/crt1.S gcc-9.3.0-kos/libgcc/config/ + mov.l old_stack_addr,r0 + mov.l r15,@r0 + mov.l new_stack_16m,r15 ++ mov.l @r15,r15 + + ! Check if 0xadffffff is a mirror of 0xacffffff, or if unique + ! If unique, then memory is 32MB instead of 16MB, and we must @@ -259,6 +260,7 @@ diff --color -ruN gcc-9.3.0/libgcc/config/sh/crt1.S gcc-9.3.0-kos/libgcc/config/ + mov #0xba,r1 + mov.b r1,@-r2 ! Store 0xba to 0xacffffff + mov.l new_stack_32m,r1 ++ mov.l @r1,r1 + or r0,r1 + mov #0xab,r0 + mov.b r0,@-r1 ! Store 0xab in 0xadffffff @@ -267,6 +269,7 @@ diff --color -ruN gcc-9.3.0/libgcc/config/sh/crt1.S gcc-9.3.0-kos/libgcc/config/ + cmp/eq r0,r1 ! Check if values match + bt memchk_done ! If so, mirror - we're done, move on + mov.l new_stack_32m,r15 ! If not, unique - set higher stack ++ mov.l @r15,r15 +memchk_done: + mov.l mem_top_addr,r0 + mov.l r15,@r0 ! Save address of top of memory @@ -943,9 +946,9 @@ diff --color -ruN gcc-9.3.0/libgcc/config/sh/crt1.S gcc-9.3.0-kos/libgcc/config/ +mem_top_addr: + .long __arch_mem_top +new_stack_16m: -+ .long 0x8d000000 ++ .long _arch_stack_16m +new_stack_32m: -+ .long 0x8e000000 ++ .long _arch_stack_32m +p2_mask: + .long 0xa0000000 +setup_cache_addr: hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: ljsebald <ljs...@us...> - 2023-05-13 03:23:31
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via e5b95f67866fcef5b54c70ee6f7081cad0b32326 (commit) from 8d462a0dffa909ec27bf02401846c97d8462e42d (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit e5b95f67866fcef5b54c70ee6f7081cad0b32326 Author: Lawrence Sebald <ljs...@us...> Date: Fri May 12 23:23:03 2023 -0400 Update .S rule in Makefile.rules to go through kos-cc, not kos-as. ----------------------------------------------------------------------- Summary of changes: Makefile.rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.rules b/Makefile.rules index 175961f..7551cb3 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -37,7 +37,7 @@ endif kos-as $< -o $@ %.o: %.S - kos-as $< -o $@ + kos-cc $< -o $@ subdirs: $(patsubst %, _dir_%, $(SUBDIRS)) hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: ljsebald <ljs...@us...> - 2023-05-12 12:29:19
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via 8d462a0dffa909ec27bf02401846c97d8462e42d (commit) via d6b9a62693a49489d9cfdb0d45fc1301eb558fed (commit) from fb1d7ec582a6aa8bc0cbfedf0978df121433db8e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 8d462a0dffa909ec27bf02401846c97d8462e42d Merge: fb1d7ec d6b9a62 Author: Lawrence Sebald <ljs...@us...> Date: Fri May 12 07:11:28 2023 -0400 Merge pull request #191 from KallistiOS/trout_parens Fix register macros in asic.c commit d6b9a62693a49489d9cfdb0d45fc1301eb558fed Author: quzar <qu...@co...> Date: Fri May 12 02:15:34 2023 -0400 Correct wrong macro parens. Clean up types. ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/hardware/asic.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/kernel/arch/dreamcast/hardware/asic.c b/kernel/arch/dreamcast/hardware/asic.c index 76e6ceb..c45978c 100644 --- a/kernel/arch/dreamcast/hardware/asic.c +++ b/kernel/arch/dreamcast/hardware/asic.c @@ -100,12 +100,12 @@ #include <dc/asic.h> #include <arch/spinlock.h> -/* XXX These are from g1ata.c and should be replaced by a standardized method */ -#define OUT32(addr, data) *((volatile uint32_t *)addr) = data -#define IN32(addr) *((volatile uint32_t *)addr) +/* XXX These based on g1ata.c and pvr.h and should be replaced by a standardized method */ +#define IN32(addr) (* ( (volatile uint32_t *)(addr) ) ) +#define OUT32(addr, data) IN32(addr) = (data) /* The set of asic regs are spaced by 0x10 with 0x4 between each sub reg */ -#define ASIC_EVT_REG_ADDR(irq, sub) ASIC_IRQD_A + (irq * 0x10) + (sub * 0x4) +#define ASIC_EVT_REG_ADDR(irq, sub) (ASIC_IRQD_A + (irq * 0x10) + (sub * 0x4)) #define ASIC_EVT_REGS 3 #define ASIC_EVT_REG_HNDS 32 @@ -138,7 +138,7 @@ static void handler_irq9(irq_t source, irq_context_t *context) { /* Go through each event register and look for pending events */ for(reg = 0; reg < ASIC_EVT_REGS; reg++) { /* Read the event mask and clear pending */ - uint32 mask = IN32(ASIC_ACK_A + (reg * 0x4)); + uint32_t mask = IN32(ASIC_ACK_A + (reg * 0x4)); OUT32(ASIC_ACK_A + (reg * 0x4), mask); /* Short circuit going through the table if none on this reg */ @@ -189,8 +189,8 @@ void asic_evt_enable(uint16_t code, uint8_t irqlevel) { evtreg = (code >> 8) & 0xff; evt = code & 0xff; - uint32 addr = ASIC_EVT_REG_ADDR(irqlevel, evtreg); - uint32 val = IN32(addr); + uint32_t addr = ASIC_EVT_REG_ADDR(irqlevel, evtreg); + uint32_t val = IN32(addr); OUT32(addr, val | (1 << evt)); } hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: ljsebald <ljs...@us...> - 2023-05-11 16:00:57
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via fb1d7ec582a6aa8bc0cbfedf0978df121433db8e (commit) via 16592c8fb7b650864aecd0c93d7671b049f141bb (commit) via 551e0cded6d88c37365a891c91450975ccfb2565 (commit) from 603a150a673ae86a56bdebee4d9f484868e20fae (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit fb1d7ec582a6aa8bc0cbfedf0978df121433db8e Merge: 603a150 16592c8 Author: Lawrence Sebald <ljs...@us...> Date: Thu May 11 12:00:05 2023 -0400 Merge pull request #188 from KallistiOS/safer_methods Unbounded indexing fix in isp_settings example commit 16592c8fb7b650864aecd0c93d7671b049f141bb Author: quzar <qu...@co...> Date: Thu May 11 08:52:15 2023 -0400 Fix spacing commit 551e0cded6d88c37365a891c91450975ccfb2565 Author: quzar <qu...@co...> Date: Wed May 10 16:03:14 2023 -0400 Check that method is in bounds, if not just output the number instead of the friendly name. ----------------------------------------------------------------------- Summary of changes: examples/dreamcast/network/isp-settings/isp-settings.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/dreamcast/network/isp-settings/isp-settings.c b/examples/dreamcast/network/isp-settings/isp-settings.c index 2b4eec3..4645d92 100644 --- a/examples/dreamcast/network/isp-settings/isp-settings.c +++ b/examples/dreamcast/network/isp-settings/isp-settings.c @@ -26,7 +26,11 @@ int main(int argc, char **argv) { "PPPoE" "Static", }; - printf("Method: %s\n", methods[cfg.method]); + /* Check that cfg.method is set to a known value */ + if(cfg.method < (sizeof(methods) / sizeof(methods[0]))) + printf("Method: %s\n", methods[cfg.method]); + else + printf("Method: unknown(%i)\n", cfg.method); printf("IP: %i.%i.%i.%i\n", cfg.ip[0], cfg.ip[1], cfg.ip[2], cfg.ip[3]); printf("Netmask: %i.%i.%i.%i\n", cfg.nm[0], cfg.nm[1], cfg.nm[2], cfg.nm[3]); printf("Gateway: %i.%i.%i.%i\n", cfg.gw[0], cfg.gw[1], cfg.gw[2], cfg.gw[3]); hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: ljsebald <ljs...@us...> - 2023-05-10 23:14:05
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via 603a150a673ae86a56bdebee4d9f484868e20fae (commit) via 56b6e4317e05ffee5816a35bb712c7b9d735238d (commit) via 3eef17311325a94b06f0d6d32e304195eddd2bc1 (commit) via 0aa542f43737066bc39f96b44d1389451d97a1c5 (commit) via 1674a4449ac3b308ddad0b8f385943fd08bbb07d (commit) via c4af1d4c601aa8ee293c680d9cbc993455813770 (commit) via a16e4de19059e422f9072c46f6a9d956c6e9d8f8 (commit) via 449796f825e0a551d4a2fc4997b04595798e419e (commit) via 71148fda5507d806f1b44b7471fc0c500d11c304 (commit) via dbf71bb2777bb33ac55210ae68ebe4cc8f0d4bce (commit) from ca9b4e16fc8a38ddfb93ba8f194251506bdfd3e4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 603a150a673ae86a56bdebee4d9f484868e20fae Merge: 56b6e43 1674a44 Author: Lawrence Sebald <ljs...@us...> Date: Wed May 10 18:48:01 2023 -0400 Merge pull request #187 from KallistiOS/ifn_bba Clean up BBA Init/Shutdown commit 56b6e4317e05ffee5816a35bb712c7b9d735238d Merge: 3eef173 449796f Author: Lawrence Sebald <ljs...@us...> Date: Wed May 10 18:34:18 2023 -0400 Merge pull request #186 from KallistiOS/dont_call_me_null Ensure the dcload dbgio name gets re-written after being nulled commit 3eef17311325a94b06f0d6d32e304195eddd2bc1 Merge: c4af1d4 0aa542f Author: Lawrence Sebald <ljs...@us...> Date: Wed May 10 18:33:04 2023 -0400 Merge pull request #190 from pcercuei/fix-kos-objcopy gnu_wrappers: Fix kos-objcopy script on non-bash shells commit 0aa542f43737066bc39f96b44d1389451d97a1c5 Author: Paul Cercueil <pa...@cr...> Date: Wed May 10 23:14:45 2023 +0200 gnu_wrappers: Fix kos-objcopy script Whoever wrote that script is a C/C++ programmer. Don't ask me how I know. Signed-off-by: Paul Cercueil <pa...@cr...> commit 1674a4449ac3b308ddad0b8f385943fd08bbb07d Author: quzar <qu...@co...> Date: Wed May 10 13:15:22 2023 -0400 Revert "Revert "Clean up BBA init/shutdown."" This reverts commit c4af1d4c601aa8ee293c680d9cbc993455813770. commit c4af1d4c601aa8ee293c680d9cbc993455813770 Author: quzar <qu...@co...> Date: Wed May 10 13:14:03 2023 -0400 Revert "Clean up BBA init/shutdown." This reverts commit a16e4de19059e422f9072c46f6a9d956c6e9d8f8. commit a16e4de19059e422f9072c46f6a9d956c6e9d8f8 Author: quzar <qu...@co...> Date: Wed May 10 13:10:57 2023 -0400 Clean up BBA init/shutdown. commit 449796f825e0a551d4a2fc4997b04595798e419e Author: quzar <qu...@co...> Date: Wed May 10 01:33:58 2023 -0400 Fix whitespace commit 71148fda5507d806f1b44b7471fc0c500d11c304 Author: quzar <qu...@co...> Date: Wed May 10 01:32:17 2023 -0400 Ensure the dcload dbgio name gets re-written after being nulled commit dbf71bb2777bb33ac55210ae68ebe4cc8f0d4bce Author: Andress Barajas <and...@gm...> Date: Mon May 8 19:01:15 2023 -0700 Fix example warnings (#182) * Fix example warnings * Undo makefile change * Fixed zlib_getlength warning * Fix makefile ----------------------------------------------------------------------- Summary of changes: examples/dreamcast/2ndmix/2ndmix.c | 2 +- examples/dreamcast/basic/exec/exec.c | 2 +- examples/dreamcast/basic/fpu/exc/fpu_exc.c | 2 +- examples/dreamcast/conio/adventure/adventure.c | 4 +-- examples/dreamcast/conio/adventure/crc.c | 2 +- examples/dreamcast/conio/adventure/done.c | 2 +- examples/dreamcast/conio/adventure/init.c | 4 +-- examples/dreamcast/conio/adventure/io.c | 6 ++-- examples/dreamcast/conio/adventure/porthelper.c | 2 +- examples/dreamcast/conio/adventure/save.c | 2 +- examples/dreamcast/conio/adventure/setup.c | 8 ++--- examples/dreamcast/conio/adventure/subr.c | 2 +- examples/dreamcast/conio/adventure/vocab.c | 2 +- examples/dreamcast/conio/adventure/wizard.c | 2 +- examples/dreamcast/conio/wump/wump.c | 10 +++--- examples/dreamcast/cpp/clock/clock.cc | 2 +- examples/dreamcast/cpp/dcplib/fnt_test.cc | 2 +- examples/dreamcast/cpp/gltest/gltest.cpp | 3 +- examples/dreamcast/cpp/modplug_test/example.cpp | 4 +-- examples/dreamcast/kgl/basic/gl/gltest.c | 5 ++- .../dreamcast/kgl/benchmarks/quadmark/quadmark.c | 2 +- .../dreamcast/kgl/benchmarks/trimark/trimark.c | 2 +- .../kgl/benchmarks/tristripmark/tristripmark.c | 2 +- examples/dreamcast/kgl/demos/blur/radial_blur.c | 3 +- examples/dreamcast/kgl/nehe/nehe09/nehe09.c | 2 ++ examples/dreamcast/kgl/nehe/nehe26/nehe26.c | 2 ++ examples/dreamcast/libdream/keyboard/keyboard.c | 2 +- examples/dreamcast/libdream/spu/spu.c | 2 +- examples/dreamcast/libdream/vmu/vmu.c | 4 +-- examples/dreamcast/network/basic/basic.c | 29 ++++++++-------- examples/dreamcast/parallax/rotocube/rotocube.c | 2 +- examples/dreamcast/parallax/serpent_dma/serpent.c | 7 ++-- examples/dreamcast/png/Makefile | 2 +- examples/dreamcast/png/example.c | 2 ++ examples/dreamcast/pvr/pvrmark/pvrmark.c | 2 +- .../dreamcast/pvr/pvrmark_strips/pvrmark_strips.c | 3 +- .../pvrmark_strips_direct/pvrmark_strips_direct.c | 2 +- .../dreamcast/sound/ghettoplay-vorbis/songmenu.c | 36 +++++++++---------- .../dreamcast/sound/ghettoplay-vorbis/texture.c | 2 +- examples/dreamcast/tsunami/genmenu/genmenu.cpp | 4 ++- examples/dreamcast/vmu/vmu_game/vmu_game.c | 1 - kernel/arch/dreamcast/fs/fs_dcload.c | 2 ++ .../dreamcast/hardware/network/broadband_adapter.c | 40 ++++++++++------------ utils/gnu_wrappers/kos-objcopy | 6 ++-- 44 files changed, 116 insertions(+), 113 deletions(-) diff --git a/examples/dreamcast/2ndmix/2ndmix.c b/examples/dreamcast/2ndmix/2ndmix.c index 86b1b57..c5ee77b 100644 --- a/examples/dreamcast/2ndmix/2ndmix.c +++ b/examples/dreamcast/2ndmix/2ndmix.c @@ -739,7 +739,7 @@ void font_init() { image = malloc(FONT_PIC_WIDTH * FONT_PIC_HEIGHT); pcxpal = pcxpall; - if(!load_pcx(FONT_NAME)) { + if(!load_pcx((char *)FONT_NAME)) { printf("Couldn't load PCX of font image\r\n"); return; } diff --git a/examples/dreamcast/basic/exec/exec.c b/examples/dreamcast/basic/exec/exec.c index a78bd62..d976d0f 100644 --- a/examples/dreamcast/basic/exec/exec.c +++ b/examples/dreamcast/basic/exec/exec.c @@ -26,7 +26,7 @@ int main(int argc, char **argv) { assert(subelf); /* Tell exec to replace us */ - printf("sub.bin mapped at %08x, jumping to it!\n\n\n", subelf); + printf("sub.bin mapped at %08x, jumping to it!\n\n\n", (unsigned int)subelf); arch_exec(subelf, fs_total(f)); /* Shouldn't get here */ diff --git a/examples/dreamcast/basic/fpu/exc/fpu_exc.c b/examples/dreamcast/basic/fpu/exc/fpu_exc.c index 52873b1..5cc5256 100644 --- a/examples/dreamcast/basic/fpu/exc/fpu_exc.c +++ b/examples/dreamcast/basic/fpu/exc/fpu_exc.c @@ -24,7 +24,7 @@ int main(int argc, char **argv) { cont_btn_callback(0, CONT_START, (cont_btn_callback_t)arch_exit); fpscr = _get_fpscr(); - printf("fpscr is %08x\n", fpscr); + printf("fpscr is %08x\n", (unsigned int)fpscr); while(d > 0.0) { printf("%f\n", d); diff --git a/examples/dreamcast/conio/adventure/adventure.c b/examples/dreamcast/conio/adventure/adventure.c index 0344541..6951593 100644 --- a/examples/dreamcast/conio/adventure/adventure.c +++ b/examples/dreamcast/conio/adventure/adventure.c @@ -37,7 +37,7 @@ */ #ifndef lint -static const char copyright[] = +static const char copyright[] __attribute__((unused)) = "@(#) Copyright (c) 1991, 1993\n\ The Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ @@ -46,7 +46,7 @@ static const char copyright[] = #if 0 static char sccsid[] = "@(#)adventure.c 8.1 (Berkeley) 6/2/93"; #endif -static const char rcsid[] = +static const char rcsid[] __attribute__((unused)) = "$FreeBSD: src/games/adventure/adventure.c,v 1.9.2.1 2001/03/05 11:43:11 kris Exp $"; #endif /* not lint */ diff --git a/examples/dreamcast/conio/adventure/crc.c b/examples/dreamcast/conio/adventure/crc.c index 5183b0c..8af1ef0 100644 --- a/examples/dreamcast/conio/adventure/crc.c +++ b/examples/dreamcast/conio/adventure/crc.c @@ -39,7 +39,7 @@ static char sccsid[] = "@(#)crc.c 8.1 (Berkeley) 5/31/93"; static char ORIGINAL_sccsid[] = "@(#)crc.c 5.2 (Berkeley) 4/4/91"; #endif -static const char rcsid[] = +static const char rcsid[] __attribute__((unused)) = "$FreeBSD: src/games/adventure/crc.c,v 1.6 1999/12/19 00:21:50 billf Exp $"; #endif /* not lint */ diff --git a/examples/dreamcast/conio/adventure/done.c b/examples/dreamcast/conio/adventure/done.c index 4c81294..57dff9c 100644 --- a/examples/dreamcast/conio/adventure/done.c +++ b/examples/dreamcast/conio/adventure/done.c @@ -40,7 +40,7 @@ #if 0 static char sccsid[] = "@(#)done.c 8.1 (Berkeley) 5/31/93"; #endif -static const char rcsid[] = +static const char rcsid[] __attribute__((unused)) = "$FreeBSD: src/games/adventure/done.c,v 1.7 1999/12/19 00:21:50 billf Exp $"; #endif /* not lint */ diff --git a/examples/dreamcast/conio/adventure/init.c b/examples/dreamcast/conio/adventure/init.c index dc5a466..fb3eed4 100644 --- a/examples/dreamcast/conio/adventure/init.c +++ b/examples/dreamcast/conio/adventure/init.c @@ -40,7 +40,7 @@ #if 0 static char sccsid[] = "@(#)init.c 8.1 (Berkeley) 6/2/93"; #endif -static const char rcsid[] = +static const char rcsid[] __attribute__((unused)) = "$FreeBSD: src/games/adventure/init.c,v 1.9.2.1 2001/03/05 11:43:11 kris Exp $"; #endif /* not lint */ @@ -89,7 +89,7 @@ linkdata() { /* secondary data manipulation */ int i, j; /* array linkages */ - for(i = 1; i <= LOCSIZ; i++) + for(i = 1; i < LOCSIZ; i++) if(ltext[i].seekadr != 0 && travel[i] != 0) if((travel[i]->tverb) == 1) cond[i] = 2; diff --git a/examples/dreamcast/conio/adventure/io.c b/examples/dreamcast/conio/adventure/io.c index 86ba0a8..c366be5 100644 --- a/examples/dreamcast/conio/adventure/io.c +++ b/examples/dreamcast/conio/adventure/io.c @@ -40,7 +40,7 @@ #if 0 static char sccsid[] = "@(#)io.c 8.1 (Berkeley) 5/31/93"; #endif -static const char rcsid[] = +static const char rcsid[] __attribute__((unused)) = "$FreeBSD: src/games/adventure/io.c,v 1.8.2.1 2001/03/05 11:43:11 kris Exp $"; #endif /* not lint */ @@ -619,7 +619,7 @@ int m; /* msg is the number of all the p msgs for this place */ int skip; /* assumes object 1 doesn't have prop 1, obj 2 no prop 2 &c*/ { char *s, nonfirst; - char *numst, ps_save; + char *numst; //, ps_save; struct text *msg; char *tbuf; @@ -638,7 +638,7 @@ int skip; /* assumes object 1 doesn't have prop 1, obj 2 no prop 2 &c*/ for(numst = s; (*s ^= *tape++) != TAB; s++); /* get number */ - ps_save = *s; /* Temporarily trash the string (cringe) */ + //ps_save = *s; /* Temporarily trash the string (cringe) */ *s++ = 0; /* decrypting number within the string */ if(atoi(numst) != 100 * skip && skip >= 0) { diff --git a/examples/dreamcast/conio/adventure/porthelper.c b/examples/dreamcast/conio/adventure/porthelper.c index e532409..0c918df 100644 --- a/examples/dreamcast/conio/adventure/porthelper.c +++ b/examples/dreamcast/conio/adventure/porthelper.c @@ -34,7 +34,7 @@ int getchar() { int putchar(int c) { if(c == '\t') { conio_printf(" "); - return; + return 0; } if(c != '\r' && c != '\n' && (c < 32 || c > 127)) diff --git a/examples/dreamcast/conio/adventure/save.c b/examples/dreamcast/conio/adventure/save.c index 6addc50..badcae4 100644 --- a/examples/dreamcast/conio/adventure/save.c +++ b/examples/dreamcast/conio/adventure/save.c @@ -40,7 +40,7 @@ #if 0 static char sccsid[] = "@(#)save.c 8.1 (Berkeley) 5/31/93"; #endif -static const char rcsid[] = +static const char rcsid[] __attribute__((unused)) = "$FreeBSD: src/games/adventure/save.c,v 1.8 1999/12/19 00:21:51 billf Exp $"; #endif /* not lint */ diff --git a/examples/dreamcast/conio/adventure/setup.c b/examples/dreamcast/conio/adventure/setup.c index 5995845..bf53c6d 100644 --- a/examples/dreamcast/conio/adventure/setup.c +++ b/examples/dreamcast/conio/adventure/setup.c @@ -35,7 +35,7 @@ */ #ifndef lint -static const char copyright[] = +static const char copyright[] __attribute__((unused)) = "@(#) Copyright (c) 1991, 1993\n\ The Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ @@ -44,7 +44,7 @@ static const char copyright[] = #if 0 static char sccsid[] = "@(#)setup.c 8.1 (Berkeley) 5/31/93"; #endif -static const char rcsid[] = +static const char rcsid[] __attribute__((unused)) = "$FreeBSD: src/games/adventure/setup.c,v 1.8.2.1 2001/03/05 11:43:11 kris Exp $"; #endif /* not lint */ @@ -103,7 +103,7 @@ main(int argc, char **argv) { printf("\n\t"); // printf("0x%02lx,", ('\t' ^ random()) & 0xFF); - printf("0x%02lx,", '\t'); + printf("0x%02x,", '\t'); while((c = getc(infile)) == ' ' && c != EOF); @@ -123,7 +123,7 @@ main(int argc, char **argv) { if(count++ % LINE == 0) printf("\n\t"); - printf("0x%02lx,", c); + printf("0x%02x,", c); } puts("\n\t0\n};"); diff --git a/examples/dreamcast/conio/adventure/subr.c b/examples/dreamcast/conio/adventure/subr.c index fc8f127..cba73dd 100644 --- a/examples/dreamcast/conio/adventure/subr.c +++ b/examples/dreamcast/conio/adventure/subr.c @@ -40,7 +40,7 @@ #if 0 static char sccsid[] = "@(#)subr.c 8.1 (Berkeley) 5/31/93"; #endif -static const char rcsid[] = +static const char rcsid[] __attribute__((unused)) = "$FreeBSD: src/games/adventure/subr.c,v 1.7.2.1 2001/03/05 11:43:11 kris Exp $"; #endif /* not lint */ diff --git a/examples/dreamcast/conio/adventure/vocab.c b/examples/dreamcast/conio/adventure/vocab.c index f70a6a7..156a96b 100644 --- a/examples/dreamcast/conio/adventure/vocab.c +++ b/examples/dreamcast/conio/adventure/vocab.c @@ -40,7 +40,7 @@ #if 0 static char sccsid[] = "@(#)vocab.c 8.1 (Berkeley) 5/31/93"; #endif -static const char rcsid[] = +static const char rcsid[] __attribute__((unused)) = "$FreeBSD: src/games/adventure/vocab.c,v 1.9 1999/12/19 00:21:51 billf Exp $"; #endif /* not lint */ diff --git a/examples/dreamcast/conio/adventure/wizard.c b/examples/dreamcast/conio/adventure/wizard.c index a78336d..be84368 100644 --- a/examples/dreamcast/conio/adventure/wizard.c +++ b/examples/dreamcast/conio/adventure/wizard.c @@ -40,7 +40,7 @@ #if 0 static char sccsid[] = "@(#)wizard.c 8.1 (Berkeley) 6/2/93"; #endif -static const char rcsid[] = +static const char rcsid[] __attribute__((unused)) = "$FreeBSD: src/games/adventure/wizard.c,v 1.10.2.1 2001/03/05 11:43:11 kris Exp $"; #endif /* not lint */ diff --git a/examples/dreamcast/conio/wump/wump.c b/examples/dreamcast/conio/wump/wump.c index 1f40226..9881aa3 100644 --- a/examples/dreamcast/conio/wump/wump.c +++ b/examples/dreamcast/conio/wump/wump.c @@ -38,7 +38,7 @@ /* Ported to KOS/libconio by Megan Potter */ #ifndef lint -static const char copyright[] = +static const char copyright[] __attribute__((unused)) = "@(#) Copyright (c) 1989, 1993\n\ The Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ @@ -47,7 +47,7 @@ static const char copyright[] = #if 0 static char sccsid[] = "@(#)wump.c 8.1 (Berkeley) 5/31/93"; #endif -static const char rcsid[] = +static const char rcsid[] __attribute__((unused)) = "$FreeBSD: src/games/wump/wump.c,v 1.13.2.1 2000/08/17 06:24:54 jhb Exp $"; #endif /* not lint */ @@ -159,8 +159,6 @@ main(argc, argv) int argc; char **argv; { - int c; - /* If the user hits start, bail */ cont_btn_callback(0, CONT_START, (cont_btn_callback_t)arch_exit); @@ -168,6 +166,8 @@ char **argv; conio_init(CONIO_TTY_PVR, CONIO_INPUT_LINE); #if 0 /* KOS */ + + int c; /* revoke */ setgid(getgid()); @@ -571,7 +571,7 @@ The arrow is weakly shot and can go no further!\n"); /* each time you shoot, it's more likely the wumpus moves */ static int lastchance = 2; - if(random() % level == EASY ? 12 : 9 < (lastchance += 2)) { + if((((random() % level) == EASY) ? 12 : 9) < (lastchance += 2)) { move_wump(); if(wumpus_loc == player_loc) diff --git a/examples/dreamcast/cpp/clock/clock.cc b/examples/dreamcast/cpp/clock/clock.cc index f96a3ba..fad0dfc 100644 --- a/examples/dreamcast/cpp/clock/clock.cc +++ b/examples/dreamcast/cpp/clock/clock.cc @@ -84,7 +84,7 @@ void drawFrame() { text->end(); y += 50; - sprintf(tmpbuf, "Unix Time: %d", t); + sprintf(tmpbuf, "Unix Time: %lld", t); text->begin(); text->setColor(1, 1, 1); diff --git a/examples/dreamcast/cpp/dcplib/fnt_test.cc b/examples/dreamcast/cpp/dcplib/fnt_test.cc index 0f786dc..206b57a 100644 --- a/examples/dreamcast/cpp/dcplib/fnt_test.cc +++ b/examples/dreamcast/cpp/dcplib/fnt_test.cc @@ -12,7 +12,7 @@ fntRenderer *text; const int MAX_FONTS = 20; -char *font_names[MAX_FONTS] = { +const char *font_names[MAX_FONTS] = { "sorority.txf", /* This is the default */ "charter.txf", "courier-bold.txf", diff --git a/examples/dreamcast/cpp/gltest/gltest.cpp b/examples/dreamcast/cpp/gltest/gltest.cpp index 2353199..49a30b7 100644 --- a/examples/dreamcast/cpp/gltest/gltest.cpp +++ b/examples/dreamcast/cpp/gltest/gltest.cpp @@ -402,8 +402,9 @@ int main(int argc, char **argv) { glutSwapBuffers(); } - for(int i = 0; i < 4; i++) + for(int i = 0; i < 4; i++) { delete cubes[i]; + } glDeleteTextures(1, &texture); diff --git a/examples/dreamcast/cpp/modplug_test/example.cpp b/examples/dreamcast/cpp/modplug_test/example.cpp index 60cdad7..09514d3 100644 --- a/examples/dreamcast/cpp/modplug_test/example.cpp +++ b/examples/dreamcast/cpp/modplug_test/example.cpp @@ -52,7 +52,7 @@ int main(int argc, char **argv) { printf("Memory allocated\n"); - if(fs_read(hnd, mod_buffer, fs_total(hnd)) != fs_total(hnd)) { + if((size_t)fs_read(hnd, mod_buffer, fs_total(hnd)) != fs_total(hnd)) { printf("Read error\n"); free(mod_buffer); return 0; @@ -79,7 +79,7 @@ int main(int argc, char **argv) { printf("Mod loaded\n"); soundfile->SetWaveConfig(44100, 16, 2); - printf("Type: %i\n", soundfile->GetType()); + printf("Type: %li\n", soundfile->GetType()); printf("Title: %s\n", soundfile->GetTitle()); /*fs_close(hnd); diff --git a/examples/dreamcast/kgl/basic/gl/gltest.c b/examples/dreamcast/kgl/basic/gl/gltest.c index 1ab6377..ac05939 100644 --- a/examples/dreamcast/kgl/basic/gl/gltest.c +++ b/examples/dreamcast/kgl/basic/gl/gltest.c @@ -121,7 +121,6 @@ int main(int argc, char **argv) { float r = 0.0f; float dr = 2; float z = -14.0f; - GLuint texture; int trans = 0; pvr_stats_t stats; @@ -142,7 +141,7 @@ int main(int argc, char **argv) { glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); /* Load a texture */ - texture = glTextureLoadPVR("/rd/glass.pvr", 0, 0); + glTextureLoadPVR("/rd/glass.pvr", 0, 0); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_FILTER, GL_FILTER_BILINEAR); glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATEALPHA); @@ -239,7 +238,7 @@ int main(int argc, char **argv) { } pvr_get_stats(&stats); - printf("VBL Count: %d, last_time: %f, frame rate: %f fps\n", + printf("VBL Count: %ld, last_time: %d, frame rate: %f fps\n", stats.vbl_count, stats.frame_last_time, stats.frame_rate); return 0; diff --git a/examples/dreamcast/kgl/benchmarks/quadmark/quadmark.c b/examples/dreamcast/kgl/benchmarks/quadmark/quadmark.c index b2e0885..e1c6978 100644 --- a/examples/dreamcast/kgl/benchmarks/quadmark/quadmark.c +++ b/examples/dreamcast/kgl/benchmarks/quadmark/quadmark.c @@ -39,7 +39,7 @@ void stats() { pvr_stats_t stats; pvr_get_stats(&stats); - dbglog(DBG_DEBUG, "3D Stats: %d VBLs, frame rate ~%f fps\n", + dbglog(DBG_DEBUG, "3D Stats: %ld VBLs, frame rate ~%f fps\n", stats.vbl_count, stats.frame_rate); } diff --git a/examples/dreamcast/kgl/benchmarks/trimark/trimark.c b/examples/dreamcast/kgl/benchmarks/trimark/trimark.c index dcad10c..072cfb2 100644 --- a/examples/dreamcast/kgl/benchmarks/trimark/trimark.c +++ b/examples/dreamcast/kgl/benchmarks/trimark/trimark.c @@ -39,7 +39,7 @@ void stats() { pvr_stats_t stats; pvr_get_stats(&stats); - dbglog(DBG_DEBUG, "3D Stats: %d VBLs, frame rate ~%f fps\n", + dbglog(DBG_DEBUG, "3D Stats: %ld VBLs, frame rate ~%f fps\n", stats.vbl_count, stats.frame_rate); } diff --git a/examples/dreamcast/kgl/benchmarks/tristripmark/tristripmark.c b/examples/dreamcast/kgl/benchmarks/tristripmark/tristripmark.c index f51fef5..729baf4 100644 --- a/examples/dreamcast/kgl/benchmarks/tristripmark/tristripmark.c +++ b/examples/dreamcast/kgl/benchmarks/tristripmark/tristripmark.c @@ -39,7 +39,7 @@ void stats() { pvr_stats_t stats; pvr_get_stats(&stats); - dbglog(DBG_DEBUG, "3D Stats: %d VBLs, frame rate ~%f fps\n", + dbglog(DBG_DEBUG, "3D Stats: %ld VBLs, frame rate ~%f fps\n", stats.vbl_count, stats.frame_rate); } diff --git a/examples/dreamcast/kgl/demos/blur/radial_blur.c b/examples/dreamcast/kgl/demos/blur/radial_blur.c index 57eabfd..b95d866 100644 --- a/examples/dreamcast/kgl/demos/blur/radial_blur.c +++ b/examples/dreamcast/kgl/demos/blur/radial_blur.c @@ -79,8 +79,9 @@ GLubyte InitRenderTexture(GLsizei width, GLsizei height) { RENDER_TEXTURE_ID, 0); /* Verify the Frame Buffer Object is ready */ - if(glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) + if(glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) { return 0; + } /* Un-bind the Frame Buffer Object, to restore the window-frame-buffer */ glBindFramebuffer(GL_FRAMEBUFFER, 0); diff --git a/examples/dreamcast/kgl/nehe/nehe09/nehe09.c b/examples/dreamcast/kgl/nehe/nehe09/nehe09.c index fca8044..578b950 100644 --- a/examples/dreamcast/kgl/nehe/nehe09/nehe09.c +++ b/examples/dreamcast/kgl/nehe/nehe09/nehe09.c @@ -9,6 +9,8 @@ #include <kos.h> +#include <stdlib.h> + #include <GL/gl.h> #include <GL/glu.h> #include <GL/glut.h> diff --git a/examples/dreamcast/kgl/nehe/nehe26/nehe26.c b/examples/dreamcast/kgl/nehe/nehe26/nehe26.c index ffc882b..14b4c96 100644 --- a/examples/dreamcast/kgl/nehe/nehe26/nehe26.c +++ b/examples/dreamcast/kgl/nehe/nehe26/nehe26.c @@ -9,6 +9,8 @@ #include <kos.h> +#include <stdlib.h> + #include <GL/gl.h> #include <GL/glu.h> ...<truncated>... hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: ljsebald <ljs...@us...> - 2023-05-08 02:02:52
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via ca9b4e16fc8a38ddfb93ba8f194251506bdfd3e4 (commit) via e30eedf0ae91e40046cb49e7be93ed85e96f6494 (commit) from 093f4aa637fec80c9c459cfc7a91e5bd8c133843 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit ca9b4e16fc8a38ddfb93ba8f194251506bdfd3e4 Merge: 093f4aa e30eedf Author: Lawrence Sebald <ljs...@us...> Date: Sun May 7 22:01:08 2023 -0400 Merge pull request #183 from sizious/dc-chain-mingw-binutils-2.34-lto-bugfix-patches `dc-chain`: MinGW: Fixed a critical bug in Binutils 2.34 with LTO. commit e30eedf0ae91e40046cb49e7be93ed85e96f6494 Author: SiZiOUS <si...@gm...> Date: Sun May 7 19:09:26 2023 +0200 `dc-chain`: MinGW: Fixed a critical bug in Binutils 2.34 with LTO. At least under Microsoft Windows, an 'Access Violation' exception was triggered when trying to build the KallistiOS library using LTO. It looks like this bug is fixed in newer Binutils releases. Inspired by: https://github.com/jmeubank/tdm-binutils-gdb/blob/tdm-patches-binutils.public/bfd/plugin.c ----------------------------------------------------------------------- Summary of changes: .../patches/i686-pc-mingw32/binutils-2.34.diff | 80 +++++++++++++++++++++- 1 file changed, 78 insertions(+), 2 deletions(-) diff --git a/utils/dc-chain/patches/i686-pc-mingw32/binutils-2.34.diff b/utils/dc-chain/patches/i686-pc-mingw32/binutils-2.34.diff index b33c22f..9700699 100644 --- a/utils/dc-chain/patches/i686-pc-mingw32/binutils-2.34.diff +++ b/utils/dc-chain/patches/i686-pc-mingw32/binutils-2.34.diff @@ -1,6 +1,82 @@ +diff -ruN binutils-2.34/bfd/plugin.c binutils-2.34-mingw/bfd/plugin.c +--- binutils-2.34/bfd/plugin.c 2020-01-18 13:55:47 +0000 ++++ binutils-2.34-mingw/bfd/plugin.c 2023-05-07 16:36:07 +0000 +@@ -237,6 +237,7 @@ + int i; + ld_plugin_onload onload; + enum ld_plugin_status status; ++ int result = 0; + struct plugin_list_entry *plugin_list_iter; + + *has_plugin_p = 0; +@@ -254,9 +255,10 @@ + { + if (plugin_handle == plugin_list_iter->handle) + { +- dlclose (plugin_handle); ++ /* If we have the same plugin_handle, don't call dlclose() as this will ++ we trigger an 'Access Violation' error at least on Windows. */ + if (!plugin_list_iter->claim_file) +- return 0; ++ goto short_circuit; + + register_claim_file (plugin_list_iter->claim_file); + goto have_claim_file; +@@ -265,7 +267,7 @@ + + plugin_list_iter = bfd_malloc (sizeof *plugin_list_iter); + if (plugin_list_iter == NULL) +- return 0; ++ goto short_circuit; + plugin_list_iter->handle = plugin_handle; + plugin_list_iter->claim_file = NULL; + plugin_list_iter->next = plugin_list; +@@ -273,7 +275,7 @@ + + onload = dlsym (plugin_handle, "onload"); + if (!onload) +- return 0; ++ goto short_circuit; + + i = 0; + tv[i].tv_tag = LDPT_MESSAGE; +@@ -291,10 +293,11 @@ + tv[i].tv_tag = LDPT_NULL; + tv[i].tv_u.tv_val = 0; + ++ /* LTO plugin will call handler hooks to set up plugin handlers. */ + status = (*onload)(tv); + + if (status != LDPS_OK) +- return 0; ++ goto short_circuit; + + plugin_list_iter->claim_file = claim_file; + +@@ -304,13 +307,17 @@ + abfd->plugin_format = bfd_plugin_no; + + if (!claim_file) +- return 0; ++ goto short_circuit; + + if (!try_claim (abfd)) +- return 0; ++ goto short_circuit; + + abfd->plugin_format = bfd_plugin_yes; +- return 1; ++ result = 1; ++ ++short_circuit: ++ dlclose (plugin_handle); ++ return result; + } + + /* There may be plugin libraries in lib/bfd-plugins. */ diff -ruN binutils-2.34/libctf/ctf-create.c binutils-2.34-mingw/libctf/ctf-create.c --- binutils-2.34/libctf/ctf-create.c 2020-01-18 13:55:48 +0000 -+++ binutils-2.34-mingw/libctf/ctf-create.c 2020-04-21 18:54:55 +0000 ++++ binutils-2.34-mingw/libctf/ctf-create.c 2023-04-23 11:52:41 +0000 @@ -23,6 +23,11 @@ #include <string.h> #include <zlib.h> @@ -15,7 +91,7 @@ diff -ruN binutils-2.34/libctf/ctf-create.c binutils-2.34-mingw/libctf/ctf-creat #endif diff -ruN binutils-2.34/libctf/ctf-subr.c binutils-2.34-mingw/libctf/ctf-subr.c --- binutils-2.34/libctf/ctf-subr.c 2020-01-18 13:55:48 +0000 -+++ binutils-2.34-mingw/libctf/ctf-subr.c 2020-04-21 18:54:20 +0000 ++++ binutils-2.34-mingw/libctf/ctf-subr.c 2023-04-23 11:52:41 +0000 @@ -26,6 +26,11 @@ #include <string.h> #include <unistd.h> hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: Allura u. <al...@so...> - 2023-05-07 21:46:02
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "UNNAMED PROJECT". The branch, master has been updated via 2d197a40eb0844df1c19a472bc6b039d2a98f09d (commit) from b4ac19d68082ac7f78101145c15ba1fa64ad6023 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 2d197a40eb0844df1c19a472bc6b039d2a98f09d Author: Andress Barajas <and...@gm...> Date: Sun May 7 09:07:42 2023 -0700 Fix -Wnonnull-compare warning for comparing this to NULL ----------------------------------------------------------------------- Summary of changes: include/refcnt.h | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/include/refcnt.h b/include/refcnt.h index b8cb8ff..bd0f11b 100644 --- a/include/refcnt.h +++ b/include/refcnt.h @@ -34,35 +34,19 @@ public: // Add a reference to the object virtual void ref() { -#ifndef NDEBUG - if (this == NULL) { - dbglog(DBG_WARNING, "RefCnt::ref() about to assert for caller=%08lx\n", - arch_get_ret_addr()); - } - assert( this != NULL ); -#endif m_refcnt++; } // Remove a reference to the object; if we hit // zero then delete it virtual void unref() { -#ifndef NDEBUG - if (this == NULL) { - dbglog(DBG_WARNING, "RefCnt::unref() about to assert for caller=%08lx\n", - arch_get_ret_addr()); - } - assert( this != NULL ); -#endif - m_refcnt--; if (m_refcnt < 0) { dbglog(DBG_WARNING, "RefCnt::unref() refcount underflow! this=%08lx, caller=%08lx\n", (uint32)this, arch_get_ret_addr()); assert( false ); - } else { - if (m_refcnt == 0) - delete this; + } else if (m_refcnt == 0) { + delete this; } } hooks/post-receive -- UNNAMED PROJECT |
From: ljsebald <ljs...@us...> - 2023-05-06 14:06:00
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via 093f4aa637fec80c9c459cfc7a91e5bd8c133843 (commit) from 524c0253d1fbf144d64f7f0c422ff35395393d50 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 093f4aa637fec80c9c459cfc7a91e5bd8c133843 Author: Andress Barajas <and...@gm...> Date: Sat May 6 07:04:49 2023 -0700 Updated example makefiles so they follow the same pattern (#181) * Updated example make files so they follow the same pattern * Replaced (KOS_CC) with kos-cc and dist now depends on * Fixed Makefile errors related to kos-cc change ----------------------------------------------------------------------- Summary of changes: examples/dreamcast/2ndmix/Makefile | 28 +++++++++---------- examples/dreamcast/basic/asserthnd/Makefile | 9 +++---- examples/dreamcast/basic/exec/Makefile | 20 +++++++------- examples/dreamcast/basic/fpu/exc/Makefile | 9 +++---- examples/dreamcast/basic/memtest32/Makefile | 7 +++-- examples/dreamcast/basic/mmu/nullptr/Makefile | 9 +++---- examples/dreamcast/basic/mmu/pvrmap/Makefile | 9 +++---- examples/dreamcast/basic/stackprotector/Makefile | 6 ++--- examples/dreamcast/basic/stacktrace/Makefile | 9 +++---- .../dreamcast/basic/threading/general/Makefile | 25 ++++++++--------- examples/dreamcast/basic/threading/once/Makefile | 23 ++++++++-------- .../basic/threading/recursive_lock/Makefile | 23 ++++++++-------- examples/dreamcast/basic/threading/rwsem/Makefile | 23 ++++++++-------- examples/dreamcast/basic/threading/tls/Makefile | 21 +++++++-------- examples/dreamcast/conio/adventure/Makefile | 11 ++++---- examples/dreamcast/conio/basic/Makefile | 25 ++++++++--------- examples/dreamcast/conio/kosh/Makefile | 9 +++---- examples/dreamcast/conio/wump/Makefile | 25 ++++++++--------- examples/dreamcast/cpp/clock/Makefile | 14 +++++----- examples/dreamcast/cpp/dcplib/Makefile | 14 +++++----- examples/dreamcast/cpp/gltest/Makefile | 14 +++++----- examples/dreamcast/cpp/modplug_test/Makefile | 14 +++++----- examples/dreamcast/cpp/out_of_memory/Makefile | 9 ++++--- examples/dreamcast/dreameye/basic/Makefile | 5 ++-- examples/dreamcast/dreameye/sd/Makefile | 6 ++--- examples/dreamcast/g1ata/atatest/Makefile | 10 +++---- examples/dreamcast/hello/Makefile | 8 +++--- examples/dreamcast/keyboard/keytest/Makefile | 6 ++--- examples/dreamcast/kgl/basic/elements/Makefile | 18 +++++-------- examples/dreamcast/kgl/basic/gl/Makefile | 15 +++++------ examples/dreamcast/kgl/basic/scissor/Makefile | 15 +++++------ examples/dreamcast/kgl/basic/txrenv/Makefile | 16 +++++------ examples/dreamcast/kgl/basic/vq/Makefile | 9 +++---- examples/dreamcast/kgl/basic/zclip_arrays/Makefile | 18 +++++-------- .../dreamcast/kgl/benchmarks/quadmark/Makefile | 10 +++---- examples/dreamcast/kgl/benchmarks/trimark/Makefile | 10 +++---- .../dreamcast/kgl/benchmarks/tristripmark/Makefile | 10 +++---- examples/dreamcast/kgl/demos/blur/Makefile | 18 +++++-------- examples/dreamcast/kgl/demos/mipmap/Makefile | 18 +++++-------- .../kgl/demos/multitexture-arrays/Makefile | 18 +++++-------- .../kgl/demos/multitexture-elements/Makefile | 18 +++++-------- examples/dreamcast/kgl/demos/specular/Makefile | 18 +++++-------- examples/dreamcast/kgl/nehe/nehe02/Makefile | 10 +++---- examples/dreamcast/kgl/nehe/nehe05/Makefile | 10 +++---- examples/dreamcast/kgl/nehe/nehe06/Makefile | 18 +++++-------- examples/dreamcast/kgl/nehe/nehe08/Makefile | 18 +++++-------- examples/dreamcast/kgl/nehe/nehe09/Makefile | 18 +++++-------- examples/dreamcast/kgl/nehe/nehe16/Makefile | 15 +++++------ examples/dreamcast/kgl/nehe/nehe26/Makefile | 18 +++++-------- examples/dreamcast/lightgun/basic/Makefile | 16 +++++------ examples/dreamcast/lua/basic/Makefile | 25 ++++++++--------- examples/dreamcast/modem/basic/Makefile | 13 +++++---- .../dreamcast/modem/basic/{example1.c => basic.c} | 2 +- examples/dreamcast/modem/ppp/Makefile | 13 +++++---- examples/dreamcast/modem/ppp/{example1.c => ppp.c} | 2 +- examples/dreamcast/network/basic/Makefile | 9 +++---- examples/dreamcast/network/dns-client/Makefile | 6 ++--- examples/dreamcast/network/httpd/Makefile | 10 +++---- examples/dreamcast/network/isp-settings/Makefile | 8 +++--- examples/dreamcast/network/ping/Makefile | 9 +++---- examples/dreamcast/network/ping6/Makefile | 9 +++---- examples/dreamcast/network/udpecho6/Makefile | 9 +++---- examples/dreamcast/parallax/bubbles/Makefile | 9 +++---- examples/dreamcast/parallax/delay_cube/Makefile | 9 +++---- examples/dreamcast/parallax/font/Makefile | 15 +++++------ examples/dreamcast/parallax/raster_melt/Makefile | 15 +++++------ examples/dreamcast/parallax/rotocube/Makefile | 9 +++---- examples/dreamcast/parallax/serpent_dma/Makefile | 11 ++++---- examples/dreamcast/parallax/sinus/Makefile | 9 +++---- examples/dreamcast/png/Makefile | 31 +++++++++++----------- examples/dreamcast/pvr/bumpmap/Makefile | 10 +++---- examples/dreamcast/pvr/cheap_shadow/Makefile | 6 ++--- examples/dreamcast/pvr/modifier_volume/Makefile | 9 +++---- .../dreamcast/pvr/modifier_volume_tex/Makefile | 13 +++++---- examples/dreamcast/pvr/plasma/Makefile | 9 +++---- examples/dreamcast/pvr/pvrmark/Makefile | 9 +++---- examples/dreamcast/pvr/pvrmark_strips/Makefile | 9 +++---- .../dreamcast/pvr/pvrmark_strips_direct/Makefile | 10 +++---- examples/dreamcast/pvr/texture_render/Makefile | 10 +++---- examples/dreamcast/random/Makefile | 8 +++--- examples/dreamcast/sd/ext2fs/Makefile | 10 +++---- examples/dreamcast/sd/mke2fs/Makefile | 10 +++---- examples/dreamcast/sd/speedtest/Makefile | 10 +++---- examples/dreamcast/sdl/sound/Makefile | 14 ++++++---- examples/dreamcast/sound/cdda/basic_cdda/Makefile | 10 +++---- .../dreamcast/sound/ghettoplay-vorbis/Makefile | 18 ++++++------- examples/dreamcast/sound/hello-mp3/Makefile | 20 +++++++------- examples/dreamcast/sound/hello-ogg/Makefile | 22 ++++++++------- examples/dreamcast/sound/hello-opus/Makefile | 19 ++++++------- examples/dreamcast/tsunami/banner/Makefile | 15 +++++------ examples/dreamcast/tsunami/font/Makefile | 16 +++++------ examples/dreamcast/tsunami/genmenu/Makefile | 14 +++++----- examples/dreamcast/video/bfont/Makefile | 25 ++++++++--------- examples/dreamcast/video/minifont/Makefile | 6 ++--- examples/dreamcast/video/palmenu/Makefile | 6 ++--- examples/dreamcast/vmu/vmu_game/Makefile | 17 +++++------- examples/dreamcast/vmu/vmu_pkg/Makefile | 19 +++++-------- 97 files changed, 595 insertions(+), 697 deletions(-) rename examples/dreamcast/modem/basic/{example1.c => basic.c} (99%) rename examples/dreamcast/modem/ppp/{example1.c => ppp.c} (99%) diff --git a/examples/dreamcast/2ndmix/Makefile b/examples/dreamcast/2ndmix/Makefile index 1e96c9a..3a2be9a 100644 --- a/examples/dreamcast/2ndmix/Makefile +++ b/examples/dreamcast/2ndmix/Makefile @@ -4,27 +4,27 @@ # Copyright (C)2003 Megan Potter # -all: rm-elf 2ndmix.elf +TARGET = 2ndmix.elf +OBJS = 2ndmix.o romdisk.o + +all: rm-elf $(TARGET) KOS_ROMDISK_DIR = romdisk_boot include $(KOS_BASE)/Makefile.rules -OBJS = 2ndmix.o romdisk.o - -clean: - rm -f 2ndmix.elf $(OBJS) +clean: rm-elf + rm -f $(OBJS) rm-elf: - rm -f 2ndmix.elf - rm -f romdisk.img + rm -f $(TARGET) romdisk.* -2ndmix.elf: $(OBJS) - kos-cc -o 2ndmix.elf $(OBJS) +$(TARGET): $(OBJS) + kos-cc -o $(TARGET) $(OBJS) -run: 2ndmix.elf - $(KOS_LOADER) 2ndmix.elf +run: $(TARGET) + $(KOS_LOADER) $(TARGET) -dist: - rm -f $(OBJS) romdisk.* - $(KOS_STRIP) 2ndmix.elf +dist: $(TARGET) + rm -f $(OBJS) romdisk.img + $(KOS_STRIP) $(TARGET) diff --git a/examples/dreamcast/basic/asserthnd/Makefile b/examples/dreamcast/basic/asserthnd/Makefile index b5f5b47..9caf7fa 100644 --- a/examples/dreamcast/basic/asserthnd/Makefile +++ b/examples/dreamcast/basic/asserthnd/Makefile @@ -10,20 +10,19 @@ all: rm-elf $(TARGET) include $(KOS_BASE)/Makefile.rules -clean: - -rm -f $(TARGET) $(OBJS) +clean: rm-elf + -rm -f $(OBJS) rm-elf: -rm -f $(TARGET) $(TARGET): $(OBJS) - $(KOS_CC) $(KOS_CFLAGS) $(KOS_LDFLAGS) -o $(TARGET) $(KOS_START) \ - $(OBJS) $(OBJEXTRA) $(KOS_LIBS) + kos-cc -o $(TARGET) $(OBJS) run: $(TARGET) $(KOS_LOADER) $(TARGET) -dist: +dist: $(TARGET) rm -f $(OBJS) $(KOS_STRIP) $(TARGET) diff --git a/examples/dreamcast/basic/exec/Makefile b/examples/dreamcast/basic/exec/Makefile index 63916cb..407c658 100644 --- a/examples/dreamcast/basic/exec/Makefile +++ b/examples/dreamcast/basic/exec/Makefile @@ -4,7 +4,7 @@ # TARGET = exec.elf -OBJS = exec.o +OBJS = exec.o romdisk.o SUBTARGET = romdisk/sub.bin SUBOBJS = sub.o @@ -13,20 +13,18 @@ all: rm-elf $(TARGET) include $(KOS_BASE)/Makefile.rules -clean: - -rm -f $(TARGET) $(OBJS) $(SUBTARGET) $(SUBOBJS) sub.elf romdisk.* +clean: rm-elf + -rm -f $(OBJS) $(SUBTARGET) $(SUBOBJS) sub.elf rm-elf: -rm -f $(TARGET) romdisk.* -$(TARGET): $(OBJS) romdisk.o - $(KOS_CC) $(KOS_CFLAGS) $(KOS_LDFLAGS) -o $(TARGET) $(KOS_START) \ - $(OBJS) romdisk.o $(OBJEXTRA) $(KOS_LIBS) +$(TARGET): $(OBJS) + kos-cc -o $(TARGET) $(OBJS) $(SUBTARGET): $(SUBOBJS) - $(KOS_CC) $(KOS_CFLAGS) $(KOS_LDFLAGS) -o sub.elf $(KOS_START) \ - $(SUBOBJS) $(OBJEXTRA) $(KOS_LIBS) - $(KOS_OBJCOPY) -O binary -R .stack sub.elf $(SUBTARGET) + kos-cc -o sub.elf $(SUBOBJS) + $(KOS_OBJCOPY) -O binary sub.elf $(SUBTARGET) # You can safely remove the next two targets if you don't use a ROMDISK romdisk.img: $(SUBTARGET) @@ -38,7 +36,7 @@ romdisk.o: romdisk.img run: $(TARGET) $(KOS_LOADER) $(TARGET) -dist: - rm -f $(OBJS) sub.elf sub.o romdisk/sub.bin romdisk.o romdisk.img +dist: $(TARGET) + rm -f $(OBJS) sub.elf sub.o romdisk/sub.bin romdisk.img $(KOS_STRIP) $(TARGET) diff --git a/examples/dreamcast/basic/fpu/exc/Makefile b/examples/dreamcast/basic/fpu/exc/Makefile index 9a88efe..6120b6e 100644 --- a/examples/dreamcast/basic/fpu/exc/Makefile +++ b/examples/dreamcast/basic/fpu/exc/Makefile @@ -10,20 +10,19 @@ all: rm-elf $(TARGET) include $(KOS_BASE)/Makefile.rules -clean: - -rm -f $(TARGET) $(OBJS) +clean: rm-elf + -rm -f $(OBJS) rm-elf: -rm -f $(TARGET) $(TARGET): $(OBJS) - $(KOS_CC) $(KOS_CFLAGS) $(KOS_LDFLAGS) -o $(TARGET) $(KOS_START) \ - $(OBJS) $(OBJEXTRA) $(KOS_LIBS) + kos-cc -o $(TARGET) $(OBJS) run: $(TARGET) $(KOS_LOADER) $(TARGET) -dist: +dist: $(TARGET) rm -f $(OBJS) $(KOS_STRIP) $(TARGET) diff --git a/examples/dreamcast/basic/memtest32/Makefile b/examples/dreamcast/basic/memtest32/Makefile index d488acc..b8cb5bc 100644 --- a/examples/dreamcast/basic/memtest32/Makefile +++ b/examples/dreamcast/basic/memtest32/Makefile @@ -1,13 +1,12 @@ TARGET = memtest32.elf - OBJS = memtest.o main.o all: rm-elf $(TARGET) include $(KOS_BASE)/Makefile.rules -clean: - -rm -f $(TARGET) $(OBJS) +clean: rm-elf + -rm -f $(OBJS) rm-elf: -rm -f $(TARGET) @@ -18,6 +17,6 @@ $(TARGET): $(OBJS) run: $(TARGET) $(KOS_LOADER) $(TARGET) -dist: +dist: $(TARGET) rm -f $(OBJS) $(KOS_STRIP) $(TARGET) diff --git a/examples/dreamcast/basic/mmu/nullptr/Makefile b/examples/dreamcast/basic/mmu/nullptr/Makefile index e77ae8a..b3c41bc 100644 --- a/examples/dreamcast/basic/mmu/nullptr/Makefile +++ b/examples/dreamcast/basic/mmu/nullptr/Makefile @@ -10,20 +10,19 @@ all: rm-elf $(TARGET) include $(KOS_BASE)/Makefile.rules -clean: - -rm -f $(TARGET) $(OBJS) +clean: rm-elf + -rm -f $(OBJS) rm-elf: -rm -f $(TARGET) $(TARGET): $(OBJS) - $(KOS_CC) $(KOS_CFLAGS) $(KOS_LDFLAGS) -o $(TARGET) $(KOS_START) \ - $(OBJS) $(OBJEXTRA) $(KOS_LIBS) + kos-cc -o $(TARGET) $(OBJS) run: $(TARGET) $(KOS_LOADER) $(TARGET) -dist: +dist: $(TARGET) rm -f $(OBJS) $(KOS_STRIP) $(TARGET) diff --git a/examples/dreamcast/basic/mmu/pvrmap/Makefile b/examples/dreamcast/basic/mmu/pvrmap/Makefile index 59e6d13..10315f5 100644 --- a/examples/dreamcast/basic/mmu/pvrmap/Makefile +++ b/examples/dreamcast/basic/mmu/pvrmap/Makefile @@ -10,20 +10,19 @@ all: rm-elf $(TARGET) include $(KOS_BASE)/Makefile.rules -clean: - -rm -f $(TARGET) $(OBJS) +clean: rm-elf + -rm -f $(OBJS) rm-elf: -rm -f $(TARGET) $(TARGET): $(OBJS) - $(KOS_CC) $(KOS_CFLAGS) $(KOS_LDFLAGS) -o $(TARGET) $(KOS_START) \ - $(OBJS) $(OBJEXTRA) $(KOS_LIBS) + kos-cc -o $(TARGET) $(OBJS) run: $(TARGET) $(KOS_LOADER) $(TARGET) -dist: +dist: $(TARGET) rm -f $(OBJS) $(KOS_STRIP) $(TARGET) diff --git a/examples/dreamcast/basic/stackprotector/Makefile b/examples/dreamcast/basic/stackprotector/Makefile index 51fe6da..b096194 100644 --- a/examples/dreamcast/basic/stackprotector/Makefile +++ b/examples/dreamcast/basic/stackprotector/Makefile @@ -15,14 +15,14 @@ all: rm-elf $(TARGET) include $(KOS_BASE)/Makefile.rules -clean: - -rm -f $(TARGET) $(OBJS) +clean: rm-elf + -rm -f $(OBJS) rm-elf: -rm -f $(TARGET) $(TARGET): $(OBJS) - kos-cc -o $@ $^ + kos-cc -o $(TARGET) $(OBJS) run: $(TARGET) $(KOS_LOADER) $(TARGET) diff --git a/examples/dreamcast/basic/stacktrace/Makefile b/examples/dreamcast/basic/stacktrace/Makefile index 3accb3e..649b6a4 100644 --- a/examples/dreamcast/basic/stacktrace/Makefile +++ b/examples/dreamcast/basic/stacktrace/Makefile @@ -10,20 +10,19 @@ all: rm-elf $(TARGET) include $(KOS_BASE)/Makefile.rules -clean: - -rm -f $(TARGET) $(OBJS) +clean: rm-elf + -rm -f $(OBJS) rm-elf: -rm -f $(TARGET) $(TARGET): $(OBJS) - $(KOS_CC) $(KOS_CFLAGS) $(KOS_LDFLAGS) -o $(TARGET) $(KOS_START) \ - $(OBJS) $(OBJEXTRA) $(KOS_LIBS) + kos-cc -o $(TARGET) $(OBJS) run: $(TARGET) $(KOS_LOADER) $(TARGET) -dist: +dist: $(TARGET) rm -f $(OBJS) $(KOS_STRIP) $(TARGET) diff --git a/examples/dreamcast/basic/threading/general/Makefile b/examples/dreamcast/basic/threading/general/Makefile index ae33ed9..360dea0 100644 --- a/examples/dreamcast/basic/threading/general/Makefile +++ b/examples/dreamcast/basic/threading/general/Makefile @@ -4,24 +4,25 @@ # (c)2001 Megan Potter # -all: rm-elf general_threading_test.elf +TARGET = general_threading_test.elf +OBJS = general_threading_test.o -include $(KOS_BASE)/Makefile.rules +all: rm-elf $(TARGET) -OBJS = general_threading_test.o +include $(KOS_BASE)/Makefile.rules -clean: - -rm -f general_threading_test.elf $(OBJS) +clean: rm-elf + -rm -f $(OBJS) rm-elf: - -rm -f general_threading_test.elf + -rm -f $(TARGET) -general_threading_test.elf: $(OBJS) - $(KOS_CC) $(KOS_CFLAGS) $(KOS_LDFLAGS) -o general_threading_test.elf $(KOS_START) $(OBJS) $(DATAOBJS) $(OBJEXTRA) $(KOS_LIBS) +$(TARGET): $(OBJS) + kos-cc -o $(TARGET) $(OBJS) -run: general_threading_test.elf - $(KOS_LOADER) general_threading_test.elf +run: $(TARGET) + $(KOS_LOADER) $(TARGET) -dist: +dist: $(TARGET) -rm -f $(OBJS) - $(KOS_STRIP) general_threading_test.elf + $(KOS_STRIP) $(TARGET) diff --git a/examples/dreamcast/basic/threading/once/Makefile b/examples/dreamcast/basic/threading/once/Makefile index 8047c3b..d80f042 100644 --- a/examples/dreamcast/basic/threading/once/Makefile +++ b/examples/dreamcast/basic/threading/once/Makefile @@ -4,27 +4,26 @@ # Copyright (C) 2009 Lawrence Sebald # -all: rm-elf once_test.elf +TARGET = once_test.elf +OBJS = once_test.o -include $(KOS_BASE)/Makefile.rules +all: rm-elf $(TARGET) -OBJS = once_test.o +include $(KOS_BASE)/Makefile.rules clean: rm-elf -rm -f $(OBJS) rm-elf: - -rm -f once_test.elf - -once_test.elf: $(OBJS) - $(KOS_CC) $(KOS_CFLAGS) $(KOS_LDFLAGS) -o once_test.elf $(KOS_START) \ - $(OBJS) $(DATAOBJS) $(OBJEXTRA) $(KOS_LIBS) + -rm -f $(TARGET) +$(TARGET): $(OBJS) + kos-cc -o $(TARGET) $(OBJS) -run: once_test.elf - $(KOS_LOADER) once_test.elf +run: $(TARGET) + $(KOS_LOADER) $(TARGET) -dist: +dist: $(TARGET) rm -f $(OBJS) - $(KOS_STRIP) once_test.elf + $(KOS_STRIP) $(TARGET) diff --git a/examples/dreamcast/basic/threading/recursive_lock/Makefile b/examples/dreamcast/basic/threading/recursive_lock/Makefile index 912f002..8a4e0e7 100644 --- a/examples/dreamcast/basic/threading/recursive_lock/Makefile +++ b/examples/dreamcast/basic/threading/recursive_lock/Makefile @@ -4,26 +4,25 @@ # Copyright (C) 2008 Lawrence Sebald # -all: rm-elf rlock_test.elf +TARGET = rlock_test.elf +OBJS = rlock_test.o -include $(KOS_BASE)/Makefile.rules +all: rm-elf $(TARGET) -OBJS = rlock_test.o +include $(KOS_BASE)/Makefile.rules clean: rm-elf -rm -f $(OBJS) rm-elf: - -rm -f rlock_test.elf - -rlock_test.elf: $(OBJS) - $(KOS_CC) $(KOS_CFLAGS) $(KOS_LDFLAGS) -o rlock_test.elf $(KOS_START) \ - $(OBJS) $(DATAOBJS) $(OBJEXTRA) $(KOS_LIBS) + -rm -f $(TARGET) +$(TARGET): $(OBJS) + kos-cc -o $(TARGET) $(OBJS) -run: rlock_test.elf - $(KOS_LOADER) rlock_test.elf +run: $(TARGET) ...<truncated>... hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: ljsebald <ljs...@us...> - 2023-05-06 01:03:34
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via 524c0253d1fbf144d64f7f0c422ff35395393d50 (commit) via 22d18073095cea8ba2af989ae641932ad4719f4c (commit) via 5fa0855e03995fbfe3ad2a6b5fc9c5186be596e6 (commit) via f4c4ce60f248f94db44ac0e58113d0c9db0127c7 (commit) via 24476d97b2dda8dc0fd6360d5a6da69da19e2f85 (commit) via cc1893aa6c47ca3ff7511561d7fb19c9d674b425 (commit) via c01e4e625d79dc19fa2f4efdf2f8e040532d8f6a (commit) via 5472ad89c519e60d44376955c5b1de56dc845d0a (commit) via e905eb134c6a7fc7b8aa5400f9f7ca7fbe9bd6e1 (commit) via fed9277f05cf6da2c3e4de473a17c43596cbdc5d (commit) via c40bd953bf64f35e2cae315a044607b8c6821e76 (commit) via 44fc8e81c5577a4b4f1ad2f77f8dee7ff67c6b14 (commit) via 64a0d9bb8fd317db5ab011e3c25f7e835728524c (commit) via 8b92f433fe97420f986e83f8a12491d5f05fca04 (commit) via d4e340b5131509833b313b5cf43b1923ca05d884 (commit) via 406c4a7c88de09f6c9c19e78bb988cbf9546c47c (commit) via c87a57e8b037c2b75cf2c85d9673e17419c21c0e (commit) from cf1ec14e048e907c237df484f4e043ae26affce1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 524c0253d1fbf144d64f7f0c422ff35395393d50 Merge: 5fa0855 22d1807 Author: Lawrence Sebald <ljs...@us...> Date: Fri May 5 21:01:39 2023 -0400 Merge pull request #176 from KallistiOS/hostile_threads Remove Co-Op threading mode commit 22d18073095cea8ba2af989ae641932ad4719f4c Author: quzar <qu...@co...> Date: Fri May 5 20:59:48 2023 -0400 Readd coop define. Update changelog. commit 5fa0855e03995fbfe3ad2a6b5fc9c5186be596e6 Merge: cc1893a f4c4ce6 Author: Lawrence Sebald <ljs...@us...> Date: Fri May 5 20:37:10 2023 -0400 Merge pull request #178 from KallistiOS/ack_to_asics Cleanup of asic.c/h commit f4c4ce60f248f94db44ac0e58113d0c9db0127c7 Author: quzar <qu...@co...> Date: Fri May 5 18:01:40 2023 -0400 Correct whitespace. commit 24476d97b2dda8dc0fd6360d5a6da69da19e2f85 Author: quzar <qu...@co...> Date: Fri May 5 17:51:36 2023 -0400 Readding get/set per comments. Updating debug outputs. commit cc1893aa6c47ca3ff7511561d7fb19c9d674b425 Merge: cf1ec14 c01e4e6 Author: Lawrence Sebald <ljs...@us...> Date: Fri May 5 16:39:07 2023 -0400 Merge pull request #180 from KallistiOS/suppressor Suppress warning about deprecated functions in exports. commit c01e4e625d79dc19fa2f4efdf2f8e040532d8f6a Author: darc <da...@pr...> Date: Fri May 5 14:19:34 2023 -0500 Suppress warning about deprecated functions in exports. commit 5472ad89c519e60d44376955c5b1de56dc845d0a Author: quzar <qu...@co...> Date: Fri May 5 02:45:15 2023 -0400 Swap over to stdint commit e905eb134c6a7fc7b8aa5400f9f7ca7fbe9bd6e1 Author: quzar <qu...@co...> Date: Wed May 3 16:10:20 2023 -0400 Have the init message use dbglog. This is more correct, and fixes extraneous mutex_lock warnings when exiting via an interrupt. commit fed9277f05cf6da2c3e4de473a17c43596cbdc5d Author: quzar <qu...@co...> Date: Wed May 3 14:38:29 2023 -0400 Update exports to remove the unneeded thd change mode commit c40bd953bf64f35e2cae315a044607b8c6821e76 Author: quzar <qu...@co...> Date: Wed May 3 12:09:57 2023 -0400 Rip out coop mode commit 44fc8e81c5577a4b4f1ad2f77f8dee7ff67c6b14 Merge: 64a0d9b 0fd5abe Author: quzar <qu...@co...> Date: Tue May 2 23:12:15 2023 -0400 Merge branch 'master' of https://github.com/KallistiOS/KallistiOS into keep_in_bounds commit 64a0d9bb8fd317db5ab011e3c25f7e835728524c Author: quzar <qu...@co...> Date: Sun Apr 30 22:04:09 2023 -0400 Correct some accidental spacing issues commit 8b92f433fe97420f986e83f8a12491d5f05fca04 Author: quzar <qu...@co...> Date: Sun Apr 30 19:16:54 2023 -0400 Smooth out all of asic.c/h. Make it use more standard methods of interacting with registers, fix the size of the event handler table, prevent out of bounds access, and assert valid codes are being presented (rather than returning an error that is never checked and there could be no recovery from) commit d4e340b5131509833b313b5cf43b1923ca05d884 Merge: 406c4a7 9ed3229 Author: quzar <qu...@co...> Date: Sun Apr 30 18:21:15 2023 -0400 Merge branch 'master' of https://github.com/KallistiOS/KallistiOS into keep_in_bounds commit 406c4a7c88de09f6c9c19e78bb988cbf9546c47c Author: quzar <qu...@co...> Date: Sun Apr 30 02:52:52 2023 -0400 Rewrite asic.h commit c87a57e8b037c2b75cf2c85d9673e17419c21c0e Author: quzar <qu...@co...> Date: Fri Apr 28 13:23:15 2023 -0400 Prevent out of bounds if evt == 0x20 ----------------------------------------------------------------------- Summary of changes: doc/CHANGELOG | 3 + examples/dreamcast/hello/hello.c | 5 +- include/kos/thread.h | 30 +++++----- kernel/arch/dreamcast/hardware/asic.c | 91 ++++++++++++++++--------------- kernel/arch/dreamcast/include/arch/arch.h | 1 + kernel/arch/dreamcast/include/dc/asic.h | 49 +++++++++-------- kernel/arch/dreamcast/kernel/init.c | 9 +-- kernel/thread/thread.c | 42 +++++--------- utils/genexports/genexports.sh | 2 +- 9 files changed, 113 insertions(+), 119 deletions(-) diff --git a/doc/CHANGELOG b/doc/CHANGELOG index 64fce22..c5dc6b4 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -165,6 +165,9 @@ KallistiOS version 2.1.0 ----------------------------------------------- registered with atexit() are called [Colton Pawielski == CP] - *** Cleaned up + documented RTC driver, added support for setting time [FG] - DC Cleaned up the register access in video to match pvr [DH] +- DC Fixed various shutdown functions to be safer to call in an interrupt [DH] +- DC Cleaned up asic functions and corrected potential bugs [DH] +- DC Deprecated coop threading mode. Always use preemptive mode [DH] KallistiOS version 2.0.0 ----------------------------------------------- - DC Broadband Adapter driver fixes [Megan Potter == MP] diff --git a/examples/dreamcast/hello/hello.c b/examples/dreamcast/hello/hello.c index 5e06407..37a23d0 100644 --- a/examples/dreamcast/hello/hello.c +++ b/examples/dreamcast/hello/hello.c @@ -14,9 +14,8 @@ extern uint8 romdisk[]; you need to set any flags you want here. Here are some possibilities: INIT_NONE -- don't do any auto init - INIT_IRQ -- Enable IRQs - INIT_THD_PREEMPT -- Enable pre-emptive threading - INIT_NET -- Enable networking (including sockets) + INIT_IRQ -- Enable IRQs + INIT_NET -- Enable networking (including sockets) INIT_MALLOCSTATS -- Enable a call to malloc_stats() right before shutdown You can OR any or all of those together. If you want to start out with diff --git a/include/kos/thread.h b/include/kos/thread.h index cc81e64..bde3058 100644 --- a/include/kos/thread.h +++ b/include/kos/thread.h @@ -23,10 +23,7 @@ __BEGIN_DECLS \brief Threading support. This file contains the interface to the threading system of KOS. Timer - interrupts are used to reschedule threads within the system while in - preemptive mode. There is also some support for a cooperative threading - mode (where each thread must manually give up its timeslice to swap out - threads). + interrupts are used to reschedule threads within the system. The thread scheduler itself is a relatively simplistic priority scheduler. There is no provision for priorities to erode over time, so keep that in @@ -224,14 +221,13 @@ typedef struct kthread_attr { /** \defgroup thd_modes Threading system modes - The threading system will always be in one of the following modes. This - represents the type of scheduling done by the system (or the special case of - threads not having been initialized yet). + The threading system will always be in one of the following modes. This + represents either pre-emptive scheduling or an un-initialized state. @{ */ #define THD_MODE_NONE -1 /**< \brief Threads not running */ -#define THD_MODE_COOP 0 /**< \brief Cooperative threading mode */ +#define THD_MODE_COOP 0 /**< \brief Cooperative mode (deprecated) */ #define THD_MODE_PREEMPT 1 /**< \brief Preemptive threading mode */ /** @} */ @@ -360,8 +356,8 @@ void thd_exit(void *rv) __noreturn; /** \brief Force a thread reschedule. This function is the thread scheduler, and is generally called from a timer - interrupt, at least in preemptive mode. You will most likely never have a - reason to call this function directly. + interrupt. You will most likely never have a reason to call this function + directly. For most cases, you'll want to set front_of_line to zero, but read the comments in kernel/thread/thread.c for more info, especially if you need to @@ -488,18 +484,22 @@ struct _reent * thd_get_reent(kthread_t *thd); /** \brief Change threading modes. This function changes the current threading mode of the system. + With preemptive threading being the only mode, this is now + deprecated. \param mode One of the \ref thd_modes values. - \return The old mode of the threading system. */ -int thd_set_mode(int mode); +int thd_set_mode(int mode) __attribute__((deprecated)); /** \brief Fetch the current threading mode. + With preemptive threading being the only mode, this is now + deprecated. + \return The current mode of the threading system. */ -int thd_get_mode(void); +int thd_get_mode(void) __attribute__((deprecated)); /** \brief Wait for a thread to exit. @@ -560,12 +560,10 @@ int thd_pslist_queue(int (*pf)(const char *fmt, ...)); This is normally done for you by default when KOS starts. This will also initialize all the various synchronization primitives. - \param mode One of the \ref thd_modes values. - \retval -1 If threads are already initialized. \retval 0 On success. */ -int thd_init(int mode); +int thd_init(void); /** \brief Shutdown the threading system. diff --git a/kernel/arch/dreamcast/hardware/asic.c b/kernel/arch/dreamcast/hardware/asic.c index 58b3273..76e6ceb 100644 --- a/kernel/arch/dreamcast/hardware/asic.c +++ b/kernel/arch/dreamcast/hardware/asic.c @@ -95,51 +95,57 @@ #include <string.h> #include <stdio.h> +#include <assert.h> #include <arch/irq.h> #include <dc/asic.h> #include <arch/spinlock.h> +/* XXX These are from g1ata.c and should be replaced by a standardized method */ +#define OUT32(addr, data) *((volatile uint32_t *)addr) = data +#define IN32(addr) *((volatile uint32_t *)addr) + +/* The set of asic regs are spaced by 0x10 with 0x4 between each sub reg */ +#define ASIC_EVT_REG_ADDR(irq, sub) ASIC_IRQD_A + (irq * 0x10) + (sub * 0x4) + +#define ASIC_EVT_REGS 3 +#define ASIC_EVT_REG_HNDS 32 + /* Exception table -- this table matches each potential G2 event to a function pointer. If the pointer is null, then nothing happens. Otherwise, the function will handle the exception. */ -static asic_evt_handler asic_evt_handlers[0x4][0x20]; +static asic_evt_handler asic_evt_handlers[ASIC_EVT_REGS][ASIC_EVT_REG_HNDS]; /* Set a handler, or remove a handler */ -int asic_evt_set_handler(uint32 code, asic_evt_handler hnd) { - uint32 evtreg, evt; +void asic_evt_set_handler(uint16_t code, asic_evt_handler hnd) { + uint8_t evtreg, evt; evtreg = (code >> 8) & 0xff; evt = code & 0xff; - if(evtreg > 0x4) - return -1; - - if(evt > 0x20) - return -1; + assert((evtreg < ASIC_EVT_REGS) && (evt < ASIC_EVT_REG_HNDS)); asic_evt_handlers[evtreg][evt] = hnd; - - return 0; } /* The ASIC event handler; this is called from the global IRQ handler to handle external IRQ 9. */ static void handler_irq9(irq_t source, irq_context_t *context) { - int reg, i; - vuint32 *asicack = (vuint32*)0xa05f6900; - uint32 mask; + uint8_t reg, i; (void)source; (void)context; /* Go through each event register and look for pending events */ - for(reg = 0; reg < 3; reg++) { + for(reg = 0; reg < ASIC_EVT_REGS; reg++) { /* Read the event mask and clear pending */ - mask = asicack[reg]; - asicack[reg] = mask; + uint32 mask = IN32(ASIC_ACK_A + (reg * 0x4)); + OUT32(ASIC_ACK_A + (reg * 0x4), mask); + + /* Short circuit going through the table if none on this reg */ + if(mask == 0) continue; /* Search for relevant handlers */ - for(i = 0; i < 32; i++) { + for(i = 0; i < ASIC_EVT_REG_HNDS; i++) { if(mask & (1 << i)) { if(asic_evt_handlers[reg][i] != NULL) { asic_evt_handlers[reg][i]((reg << 8) | i); @@ -149,52 +155,52 @@ static void handler_irq9(irq_t source, irq_context_t *context) { } } - /* Disable all G2 events */ void asic_evt_disable_all(void) { - vuint32 * asicen; - int irq, sub; - - for(irq = 0; irq < 3; irq++) { - asicen = (vuint32*)(0xa05f6910 + irq * 0x10); + uint8_t irq, sub; - for(sub = 0; sub < 3; sub++) { - asicen[sub] = 0; + for(irq = 0; irq < ASIC_IRQ_MAX; irq++) { + for(sub = 0; sub < ASIC_EVT_REGS; sub++) { + OUT32(ASIC_EVT_REG_ADDR(irq, sub), 0); } } } /* Disable a particular G2 event */ -void asic_evt_disable(uint32 code, int irqlevel) { - vuint32 *asicen; +void asic_evt_disable(uint16_t code, uint8_t irqlevel) { + assert(irqlevel < ASIC_IRQ_MAX); - /* Did the user choose an IRQ level? If not, give them 9 by default */ - if(irqlevel == ASIC_IRQ_DEFAULT) - irqlevel = ASIC_IRQ9; + uint8_t evtreg, evt; - asicen = (vuint32*)(0xa05f6900 + irqlevel * 0x10); - asicen[((code >> 8) & 0xff)] &= ~(1 << (code & 0xff)); + evtreg = (code >> 8) & 0xff; + evt = code & 0xff; + + uint32_t addr = ASIC_EVT_REG_ADDR(irqlevel, evtreg); + uint32_t val = IN32(addr); + OUT32(addr, val & ~(1 << evt)); } /* Enable a particular G2 event */ -void asic_evt_enable(uint32 code, int irqlevel) { - vuint32 *asicen; +void asic_evt_enable(uint16_t code, uint8_t irqlevel) { + assert(irqlevel < ASIC_IRQ_MAX); - /* Did the user choose an IRQ level? If not, give them 9 by default */ - if(irqlevel == ASIC_IRQ_DEFAULT) - irqlevel = ASIC_IRQ9; + uint8_t evtreg, evt; - asicen = (vuint32*)(0xa05f6900 + irqlevel * 0x10); - asicen[((code >> 8) & 0xff)] |= (1 << (code & 0xff)); + evtreg = (code >> 8) & 0xff; + evt = code & 0xff; + + uint32 addr = ASIC_EVT_REG_ADDR(irqlevel, evtreg); + uint32 val = IN32(addr); + OUT32(addr, val | (1 << evt)); } /* Initialize events */ static void asic_evt_init(void) { /* Clear any pending interrupts and disable all events */ asic_evt_disable_all(); - ASIC_ACK_A = 0xffffffff; - ASIC_ACK_B = 0xffffffff; - ASIC_ACK_C = 0xffffffff; + OUT32(ASIC_ACK_A, 0xffffffff); + OUT32(ASIC_ACK_B, 0xffffffff); + OUT32(ASIC_ACK_C, 0xffffffff); /* Clear out the event table */ memset(asic_evt_handlers, 0, sizeof(asic_evt_handlers)); @@ -221,7 +227,6 @@ void asic_init(void) { asic_evt_init(); } - void asic_shutdown(void) { asic_evt_shutdown(); } diff --git a/kernel/arch/dreamcast/include/arch/arch.h b/kernel/arch/dreamcast/include/arch/arch.h index 1ff111d..cda9a34 100644 --- a/kernel/arch/dreamcast/include/arch/arch.h +++ b/kernel/arch/dreamcast/include/arch/arch.h @@ -193,6 +193,7 @@ extern void * __kos_romdisk; #define INIT_NONE 0x0000 /**< \brief Don't init optional things */ #define INIT_IRQ 0x0001 /**< \brief Enable IRQs at startup */ +/* Preemptive mode is the only mode now. Keeping define for compatability. */ #define INIT_THD_PREEMPT 0x0002 /**< \brief Enable thread preemption */ #define INIT_NET 0x0004 /**< \brief Enable built-in networking */ #define INIT_MALLOCSTATS 0x0008 /**< \brief Enable malloc statistics */ diff --git a/kernel/arch/dreamcast/include/dc/asic.h b/kernel/arch/dreamcast/include/dc/asic.h index 4a8744b..03ae006 100644 --- a/kernel/arch/dreamcast/include/dc/asic.h +++ b/kernel/arch/dreamcast/include/dc/asic.h @@ -24,7 +24,7 @@ #include <sys/cdefs.h> __BEGIN_DECLS -#include <arch/types.h> +#include <stdint.h> /* All event codes are two 8-bit integers; the top integer is the event code register to look in to check the event (and to acknolwedge it). The @@ -109,19 +109,19 @@ __BEGIN_DECLS These are the locations in memory where the ASIC registers sit. @{ */ -#define ASIC_IRQD_A (*(vuint32*)0xa05f6910) /**< \brief IRQD first register */ -#define ASIC_IRQD_B (*(vuint32*)0xa05f6914) /**< \brief IRQD second register */ -#define ASIC_IRQD_C (*(vuint32*)0xa05f6918) /**< \brief IRQD third register */ -#define ASIC_IRQB_A (*(vuint32*)0xa05f6920) /**< \brief IRQB first register */ -#define ASIC_IRQB_B (*(vuint32*)0xa05f6924) /**< \brief IRQB second register */ -#define ASIC_IRQB_C (*(vuint32*)0xa05f6928) /**< \brief IRQB third register */ -#define ASIC_IRQ9_A (*(vuint32*)0xa05f6930) /**< \brief IRQ9 first register */ -#define ASIC_IRQ9_B (*(vuint32*)0xa05f6934) /**< \brief IRQ9 second register */ -#define ASIC_IRQ9_C (*(vuint32*)0xa05f6938) /**< \brief IRQ9 third register */ - -#define ASIC_ACK_A (*(vuint32*)0xa05f6900) /**< \brief IRQD ACK register */ -#define ASIC_ACK_B (*(vuint32*)0xa05f6904) /**< \brief IRQB ACK register */ -#define ASIC_ACK_C (*(vuint32*)0xa05f6908) /**< \brief IRQ9 ACK register */ +#define ASIC_ACK_A 0xa05f6900 /**< \brief IRQD ACK register */ +#define ASIC_ACK_B 0xa05f6904 /**< \brief IRQB ACK register */ +#define ASIC_ACK_C 0xa05f6908 /**< \brief IRQ9 ACK register */ + +#define ASIC_IRQD_A 0xa05f6910 /**< \brief IRQD first register */ +#define ASIC_IRQD_B 0xa05f6914 /**< \brief IRQD second register */ +#define ASIC_IRQD_C 0xa05f6918 /**< \brief IRQD third register */ +#define ASIC_IRQB_A 0xa05f6920 /**< \brief IRQB first register */ +#define ASIC_IRQB_B 0xa05f6924 /**< \brief IRQB second register */ +#define ASIC_IRQB_C 0xa05f6928 /**< \brief IRQB third register */ +#define ASIC_IRQ9_A 0xa05f6930 /**< \brief IRQ9 first register */ +#define ASIC_IRQ9_B 0xa05f6934 /**< \brief IRQ9 second register */ +#define ASIC_IRQ9_C 0xa05f6938 /**< \brief IRQ9 third register */ /** @} */ /** \defgroup asic_irq_lv ASIC IRQ levels @@ -130,10 +130,12 @@ __BEGIN_DECLS be used instead. @{ */ -#define ASIC_IRQ9 1 /**< \brief IRQ level 9 */ -#define ASIC_IRQB 2 /**< \brief IRQ level B (11) */ -#define ASIC_IRQD 3 /**< \brief IRQ level D (13) */ -#define ASIC_IRQ_DEFAULT 0 /**< \brief Pick an IRQ level for me! */ +#define ASIC_IRQ9 0 /**< \brief IRQ level 9 */ +#define ASIC_IRQB 1 /**< \brief IRQ level B (11) */ +#define ASIC_IRQD 2 /**< \brief IRQ level D (13) */ + +#define ASIC_IRQ_MAX 3 /**< \brief Don't take irqs from here up */ +#define ASIC_IRQ_DEFAULT ASIC_IRQ9 /**< \brief Pick an IRQ level for me! */ /** @} */ /** \brief ASIC event handler type. @@ -144,7 +146,7 @@ __BEGIN_DECLS \param code The ASIC event code that generated this event. \see asic_events */ -typedef void (*asic_evt_handler)(uint32 code); +typedef void (*asic_evt_handler)(uint32_t code); /** \brief Set or remove an ASIC handler. @@ -153,10 +155,9 @@ typedef void (*asic_evt_handler)(uint32 code); \param code The ASIC event code to hook (see \ref asic_events). \param handler The function to call when the event happens. - \retval 0 On success. - \retval -1 If an invalid code is specified. + */ -int asic_evt_set_handler(uint32 code, asic_evt_handler handler); +void asic_evt_set_handler(uint16_t code, asic_evt_handler handler); /** \brief Disable all ASIC events. @@ -177,7 +178,7 @@ void asic_evt_disable_all(void); \param irqlevel The IRQ level it was hooked on (see \ref asic_irq_lv). */ -void asic_evt_disable(uint32 code, int irqlevel); +void asic_evt_disable(uint16_t code, uint8_t irqlevel); /** \brief Enable an ASIC event. @@ -191,7 +192,7 @@ void asic_evt_disable(uint32 code, int irqlevel); \param code The ASIC event code to hook (see \ref asic_events). \param irqlevel The IRQ level to hook on (see \ref asic_irq_lv). */ -void asic_evt_enable(uint32 code, int irqlevel); +void asic_evt_enable(uint16_t code, uint8_t irqlevel); /** \brief Init ASIC events. */ void asic_init(void); diff --git a/kernel/arch/dreamcast/kernel/init.c b/kernel/arch/dreamcast/kernel/init.c index ea1fd26..40161de 100644 --- a/kernel/arch/dreamcast/kernel/init.c +++ b/kernel/arch/dreamcast/kernel/init.c @@ -104,10 +104,11 @@ int __attribute__((weak)) arch_auto_init(void) { rtc_init(); /* Threads */ - if(__kos_init_flags & INIT_THD_PREEMPT) - thd_init(THD_MODE_PREEMPT); - else - thd_init(THD_MODE_COOP); + if(!(__kos_init_flags & INIT_THD_PREEMPT)) + dbglog(DBG_WARNING, "Cooperative threading mode is deprecated. KOS is \ + always in pre-emptive threading mode. \n"); + + thd_init(); nmmgr_init(); diff --git a/kernel/thread/thread.c b/kernel/thread/thread.c index a3fda8d..9f81e91 100644 --- a/kernel/thread/thread.c +++ b/kernel/thread/thread.c @@ -25,7 +25,7 @@ /* This module supports thread scheduling in KOS. The timer interrupt is used -to re-schedule the processor HZ times per second in pre-emptive mode. +to re-schedule the processor HZ times per second. This is a fairly simplistic scheduler, though it does employ some standard advanced OS tactics like priority scheduling and semaphores. @@ -53,7 +53,7 @@ static struct ktqueue run_queue; /* The currently executing thread. This thread should not be on any queues. */ kthread_t *thd_current = NULL; -/* Thread mode: cooperative or pre-emptive. */ +/* Thread mode: uninitialized or pre-emptive. */ static int thd_mode = THD_MODE_NONE; /* Reaper semaphore. Counts the number of threads waiting to be reaped. */ @@ -655,7 +655,9 @@ static void thd_timer_hnd(irq_context_t *context) { sleep because it eases the load on the system for the other threads. */ void thd_sleep(int ms) { + /* This should never happen. This should, perhaps, assert. */ if(thd_mode == THD_MODE_NONE) { + dbglog(DBG_WARNING, "thd_sleep called when threading not initialized.\n"); timer_spin_sleep(ms); return; } @@ -813,20 +815,11 @@ struct _reent * thd_get_reent(kthread_t *thd) { /* Change threading modes */ int thd_set_mode(int mode) { - int old = thd_mode; - /* Nothing to change? */ - if(thd_mode == mode) - return thd_mode; + dbglog(DBG_WARNING, "thd_set_mode has no effect. Cooperative threading \ + mode is deprecated. KOS is always in pre-emptive threading mode. \n"); - if(thd_mode == THD_MODE_COOP) { - /* Schedule our first pre-emption wakeup */ - timer_primary_wakeup(1000 / HZ); - } - - thd_mode = mode; - - return old; + return mode; } int thd_get_mode(void) { @@ -878,7 +871,7 @@ int kthread_key_delete(kthread_key_t key) { /* Init/shutdown */ /* Init */ -int thd_init(int mode) { +int thd_init(void) { kthread_t *kern, *reaper; /* Make sure we're not already running */ @@ -886,7 +879,7 @@ int thd_init(int mode) { return -1; /* Setup our mode as appropriate */ - thd_mode = mode; + thd_mode = THD_MODE_PREEMPT; /* Initialize handle counters */ tid_highest = 1; @@ -937,15 +930,10 @@ int thd_init(int mode) { /* Setup our pre-emption handler */ timer_primary_set_callback(thd_timer_hnd); - /* If we're in pre-emptive mode, then schedule the first context switch */ - if(thd_mode == THD_MODE_PREEMPT) { - /* Schedule our first wakeup */ - timer_primary_wakeup(1000 / HZ); + /* Schedule our first wakeup */ + timer_primary_wakeup(1000 / HZ); - printf("thd: pre-emption enabled, HZ=%d\n", HZ); ...<truncated>... hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: darcagn <da...@us...> - 2023-05-05 19:35:48
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via cf1ec14e048e907c237df484f4e043ae26affce1 (commit) via 0deadff7f8878edce03759f4644e0160c137f426 (commit) from 35002554d54d64f6042760fa15cc1be8f84c47a5 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit cf1ec14e048e907c237df484f4e043ae26affce1 Merge: 3500255 0deadff Author: darcagn <da...@pr...> Date: Fri May 5 14:35:31 2023 -0500 Merge pull request #179 from KallistiOS/typos_fix Fixed a few typos commit 0deadff7f8878edce03759f4644e0160c137f426 Author: darc <da...@pr...> Date: Fri May 5 12:32:24 2023 -0500 Fixed a few typos ----------------------------------------------------------------------- Summary of changes: include/kos/cond.h | 2 +- include/kos/sem.h | 2 +- include/sys/socket.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/kos/cond.h b/include/kos/cond.h index 2056ffd..aa50a19 100644 --- a/include/kos/cond.h +++ b/include/kos/cond.h @@ -80,7 +80,7 @@ typedef struct condvar { \par Error Conditions: \em ENOMEM - out of memory */ -condvar_t *cond_create() __depr("Use cond_init or COND_INTIALIZER."); +condvar_t *cond_create() __depr("Use cond_init or COND_INITIALIZER."); /** \brief Initialize a condition variable. diff --git a/include/kos/sem.h b/include/kos/sem.h index d15a6b8..19705a6 100644 --- a/include/kos/sem.h +++ b/include/kos/sem.h @@ -59,7 +59,7 @@ typedef struct semaphore { \em ENOMEM - out of memory \n \em EINVAL - the semaphore's value is invalid (less than 0) */ -semaphore_t *sem_create(int value) __depr("Use sem_init or SEM_INITAILZER."); +semaphore_t *sem_create(int value) __depr("Use sem_init or SEM_INITIALIZER."); /** \brief Initialize a semaphore for use. diff --git a/include/sys/socket.h b/include/sys/socket.h index 2f08d77..6d583ce 100644 --- a/include/sys/socket.h +++ b/include/sys/socket.h @@ -176,7 +176,7 @@ struct sockaddr_storage { /** \brief Protocol family for Internet domain sockets (IPv6). */ #define PF_INET6 AF_INET6 -/** \brief Disable furhter receive operations. */ +/** \brief Disable further receive operations. */ #define SHUT_RD 0x00000001 /** \brief Disable further send operations. */ hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: darcagn <da...@us...> - 2023-05-05 16:32:52
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via 35002554d54d64f6042760fa15cc1be8f84c47a5 (commit) via a579b9915ebce0fc98d8c75064957969ae693cd3 (commit) from 0fd5abe0b3f7dffd4d2a932a09a8d5efbd007e2c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 35002554d54d64f6042760fa15cc1be8f84c47a5 Merge: 0fd5abe a579b99 Author: darcagn <da...@pr...> Date: Fri May 5 11:31:33 2023 -0500 Merge pull request #177 from cepawiel/examples-build-dist Fix dist target for examples commit a579b9915ebce0fc98d8c75064957969ae693cd3 Author: Colton Pawielski <cep...@mt...> Date: Thu May 4 17:58:59 2023 -0500 Fix dist target for examples ----------------------------------------------------------------------- Summary of changes: examples/dreamcast/dreameye/basic/Makefile | 6 +++--- examples/dreamcast/network/httpd/Makefile | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/examples/dreamcast/dreameye/basic/Makefile b/examples/dreamcast/dreameye/basic/Makefile index d43b116..ead1926 100644 --- a/examples/dreamcast/dreameye/basic/Makefile +++ b/examples/dreamcast/dreameye/basic/Makefile @@ -21,9 +21,9 @@ $(TARGET): $(OBJS) $(KOS_CC) $(KOS_CFLAGS) $(KOS_LDFLAGS) -o $(TARGET) $(KOS_START) \ $(OBJS) $(DATAOBJS) $(OBJEXTRA) $(KOS_LIBS) -run: $(TARGET).elf - $(KOS_LOADER) $(TARGET).elf +run: $(TARGET) + $(KOS_LOADER) $(TARGET) dist: rm -f $(OBJS) - $(KOS_STRIP) $(TARGET).elf + $(KOS_STRIP) $(TARGET) diff --git a/examples/dreamcast/network/httpd/Makefile b/examples/dreamcast/network/httpd/Makefile index deade79..83c363d 100644 --- a/examples/dreamcast/network/httpd/Makefile +++ b/examples/dreamcast/network/httpd/Makefile @@ -30,3 +30,7 @@ romdisk.o: romdisk.img run: $(TARGET) dc-tool -n -x $(TARGET) + +dist: + rm -f $(OBJS) + $(KOS_STRIP) $(TARGET) \ No newline at end of file hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: ljsebald <ljs...@us...> - 2023-05-02 23:58:47
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via 0fd5abe0b3f7dffd4d2a932a09a8d5efbd007e2c (commit) via 1a09e0770466fdacdd275100468422f386827553 (commit) from a1da704a9e537e36fbc695b7bf13f6c55b0cc409 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 0fd5abe0b3f7dffd4d2a932a09a8d5efbd007e2c Merge: a1da704 1a09e07 Author: Lawrence Sebald <ljs...@us...> Date: Tue May 2 19:57:58 2023 -0400 Merge pull request #175 from KallistiOS/try_hard Correct exit() during an int giving mutex warnings commit 1a09e0770466fdacdd275100468422f386827553 Author: quzar <qu...@co...> Date: Tue May 2 17:30:51 2023 -0400 Update irq_inside_int to return debug info, set nmmgr, ppp, and fs_pty to use trylock if shutting down in an int, and remove thd_sleep from lan_adapter shutdown. ----------------------------------------------------------------------- Summary of changes: addons/libppp/ppp.c | 6 +++++- kernel/arch/dreamcast/hardware/network/lan_adapter.c | 2 -- kernel/arch/dreamcast/kernel/irq.c | 4 +++- kernel/exports/nmmgr.c | 6 +++++- kernel/fs/fs_pty.c | 7 ++++++- kernel/thread/mutex.c | 6 +++--- kernel/thread/rwsem.c | 6 ++++-- kernel/thread/sem.c | 6 ++++-- kernel/thread/thread.c | 7 ++++--- 9 files changed, 34 insertions(+), 16 deletions(-) diff --git a/addons/libppp/ppp.c b/addons/libppp/ppp.c index 2ede6f2..abaf354 100644 --- a/addons/libppp/ppp.c +++ b/addons/libppp/ppp.c @@ -684,7 +684,11 @@ int ppp_init(void) { int ppp_shutdown(void) { ppp_protocol_t *i, *next; - mutex_lock(&mutex); + /* If we're in an int, it's ok if we can't lock */ + if(irq_inside_int()) + mutex_trylock(&mutex); + else + mutex_lock(&mutex); if(!ppp_state.initted) { mutex_unlock(&mutex); diff --git a/kernel/arch/dreamcast/hardware/network/lan_adapter.c b/kernel/arch/dreamcast/hardware/network/lan_adapter.c index 6c0d82b..73ced6e 100644 --- a/kernel/arch/dreamcast/hardware/network/lan_adapter.c +++ b/kernel/arch/dreamcast/hardware/network/lan_adapter.c @@ -430,9 +430,7 @@ static void la_stop(void) { /* Shut it down for good */ static void la_hw_shutdown(void) { /* Power down chip */ - thd_sleep(2); la_write(DLCR7, la_read(DLCR7) & ~DLCR7_NSTBY); - thd_sleep(2); la_started = LA_NOT_STARTED; diff --git a/kernel/arch/dreamcast/kernel/irq.c b/kernel/arch/dreamcast/kernel/irq.c index 94f0978..bd39cda 100644 --- a/kernel/arch/dreamcast/kernel/irq.c +++ b/kernel/arch/dreamcast/kernel/irq.c @@ -129,7 +129,9 @@ void irq_handle_exception(int code) { arch_panic("double fault"); } - inside_int = 1; + /* Reveal this info about the int to inside_int for better + diagnostics returns if we try to do something in the int. */ + inside_int = ((code&0xf)<<16) | (evt&0xffff); /* If there's a global handler, call it */ if(irq_hnd_global) { diff --git a/kernel/exports/nmmgr.c b/kernel/exports/nmmgr.c index 439f1b4..06e6972 100644 --- a/kernel/exports/nmmgr.c +++ b/kernel/exports/nmmgr.c @@ -68,7 +68,11 @@ int nmmgr_handler_remove(nmmgr_handler_t *hnd) { nmmgr_handler_t *c; int rv = -1; - mutex_lock(&mutex); + /* If we're in an int, lets do the trylock */ + if(irq_inside_int()) + mutex_trylock(&mutex); + else + mutex_lock(&mutex); /* Verify that it's actually in there */ LIST_FOREACH(c, &nmmgr_handlers, list_ent) { diff --git a/kernel/fs/fs_pty.c b/kernel/fs/fs_pty.c index fead293..a4e6aad 100644 --- a/kernel/fs/fs_pty.c +++ b/kernel/fs/fs_pty.c @@ -800,8 +800,13 @@ int fs_pty_shutdown(void) { if(!initted) return 0; + /* If we're in an int, lets do the trylock */ + if(irq_inside_int()) + mutex_trylock(&list_mutex); + else + mutex_lock(&list_mutex); + /* Go through and free all the pty entries */ - mutex_lock(&list_mutex); c = LIST_FIRST(&ptys); while(c != NULL) { diff --git a/kernel/thread/mutex.c b/kernel/thread/mutex.c index c9d0e39..04022bd 100644 --- a/kernel/thread/mutex.c +++ b/kernel/thread/mutex.c @@ -85,9 +85,9 @@ int mutex_lock(mutex_t *m) { int mutex_lock_timed(mutex_t *m, int timeout) { int old, rv = 0; - if(irq_inside_int()) { - dbglog(DBG_WARNING, "%s: called inside interrupt\n", - timeout ? "mutex_lock_timed" : "mutex_lock"); + if((rv = irq_inside_int())) { + dbglog(DBG_WARNING, "%s: called inside an interrupt with code: %x evt: %.4x\n", + timeout ? "mutex_lock_timed" : "mutex_lock", ((rv>>16) & 0xf), (rv & 0xffff)); errno = EPERM; return -1; } diff --git a/kernel/thread/rwsem.c b/kernel/thread/rwsem.c index f865efc..e917f92 100644 --- a/kernel/thread/rwsem.c +++ b/kernel/thread/rwsem.c @@ -67,8 +67,10 @@ int rwsem_destroy(rw_semaphore_t *s) { int rwsem_read_lock_timed(rw_semaphore_t *s, int timeout) { int old, rv = 0; - if(irq_inside_int()) { - dbglog(DBG_WARNING, "rwsem_read_lock_timed: called inside interrupt\n"); + if((rv = irq_inside_int())) { + dbglog(DBG_WARNING, "%s: called inside an interrupt with code: %x evt: %.4x\n", + timeout ? "rwsem_read_lock_timed" : "rwsem_read_lock", + ((rv>>16) & 0xf), (rv & 0xffff)); errno = EPERM; return -1; } diff --git a/kernel/thread/sem.c b/kernel/thread/sem.c index 15e3706..78cae46 100644 --- a/kernel/thread/sem.c +++ b/kernel/thread/sem.c @@ -86,8 +86,10 @@ int sem_wait_timed(semaphore_t *sem, int timeout) { int old, rv = 0; /* Make sure we're not inside an interrupt */ - if(irq_inside_int()) { - dbglog(DBG_WARNING, "sem_wait_timed: called inside interrupt\n"); + if((rv = irq_inside_int())) { + dbglog(DBG_WARNING, "%s: called inside an interrupt with code: %x evt: %.4x\n", + timeout ? "sem_wait_timed" : "sem_wait", + ((rv>>16) & 0xf), (rv & 0xffff)); errno = EPERM; return -1; } diff --git a/kernel/thread/thread.c b/kernel/thread/thread.c index 9f1f6b4..a3fda8d 100644 --- a/kernel/thread/thread.c +++ b/kernel/thread/thread.c @@ -693,9 +693,10 @@ int thd_join(kthread_t * thd, void **value_ptr) { if(thd == NULL) return -1; - if(irq_inside_int()) { - dbglog(DBG_WARNING, "thd_join(%p) called inside an interrupt!\n", - (void *)thd); + if((rv = irq_inside_int())) { + dbglog(DBG_WARNING, "thd_join(%p) called inside an interrupt with code: %x evt: %.4x\n", + (void *)thd, + ((rv>>16) & 0xf), (rv & 0xffff)); return -1; } hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: darcagn <da...@us...> - 2023-05-02 23:43:48
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via a1da704a9e537e36fbc695b7bf13f6c55b0cc409 (commit) via 9fa98141300a40b259e9f00968224734d9f07e8e (commit) via 321fe569ccebe7b6250b537f5640bd06cecf8905 (commit) from a7b55ebbd559c33c378e87eda54fd93dd39f705f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit a1da704a9e537e36fbc695b7bf13f6c55b0cc409 Merge: a7b55eb 9fa9814 Author: Lawrence Sebald <ljs...@us...> Date: Tue May 2 18:49:18 2023 -0400 Merge pull request #174 from cepawiel/arm-toolchain-optional Rename prebuilt stream.drv and copy it to the regular location if an arm tool gain isnât available commit 9fa98141300a40b259e9f00968224734d9f07e8e Author: Colton Pawielski <cep...@mt...> Date: Tue May 2 16:21:49 2023 -0500 Update gitignore commit 321fe569ccebe7b6250b537f5640bd06cecf8905 Author: Colton Pawielski <cep...@mt...> Date: Tue May 2 16:19:47 2023 -0500 Only build arm code if compiler is present This change will detect if the compiler is present to build the ARM sound code and will use the prebuilt binary if not. ----------------------------------------------------------------------- Summary of changes: .gitignore | 1 + kernel/arch/dreamcast/sound/Makefile | 5 +---- kernel/arch/dreamcast/sound/arm/Makefile | 16 +++++++++++++++- .../sound/arm/{stream.drv => stream.drv.prebuilt} | Bin 4 files changed, 17 insertions(+), 5 deletions(-) rename kernel/arch/dreamcast/sound/arm/{stream.drv => stream.drv.prebuilt} (100%) diff --git a/.gitignore b/.gitignore index 8f23fd5..bfc7f1f 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ kernel/stubs/*.c kernel/exports/kernel_exports.c kernel/arch/dreamcast/kernel/arch_exports.c kernel/arch/dreamcast/kernel/banner.h +kernel/arch/dreamcast/sound/arm/stream.drv lib/dreamcast/*.a addons/lib/dreamcast/*.a utils/bincnv/bincnv diff --git a/kernel/arch/dreamcast/sound/Makefile b/kernel/arch/dreamcast/sound/Makefile index 693c140..5a3f98b 100644 --- a/kernel/arch/dreamcast/sound/Makefile +++ b/kernel/arch/dreamcast/sound/Makefile @@ -7,10 +7,7 @@ OBJS = snd_iface.o snd_sfxmgr.o snd_stream.o snd_stream_drv.o snd_mem.o KOS_CFLAGS += -I $(KOS_BASE)/kernel/arch/dreamcast/include/dc/sound -# Only compile this if we have an ARM compiler handy -ifdef DC_ARM_CC - SUBDIRS = arm -endif +SUBDIRS = arm include $(KOS_BASE)/Makefile.prefab diff --git a/kernel/arch/dreamcast/sound/arm/Makefile b/kernel/arch/dreamcast/sound/arm/Makefile index 18466bc..965f71f 100644 --- a/kernel/arch/dreamcast/sound/arm/Makefile +++ b/kernel/arch/dreamcast/sound/arm/Makefile @@ -7,8 +7,22 @@ aica_fw.h: stream.drv echo '};' >> aica_fw.h -rm aica_fw.h.tmp +ARM_CC_IS_AVAILABLE=0 +ifdef DC_ARM_CC + ifneq ("$(wildcard $(DC_ARM_CC))", "") + ARM_CC_IS_AVAILABLE=1 + endif +endif + +ifeq ($(ARM_CC_IS_AVAILABLE), 1) +# Only compile this if we have an ARM compiler handy stream.drv: prog.elf - $(DC_ARM_OBJCOPY) -O binary prog.elf stream.drv + $(DC_ARM_OBJCOPY) -O binary $< $@ +else +# Otherwise use precompiled ARM binary +stream.drv: stream.drv.prebuilt + cp $< $@ +endif prog.elf: crt0.o main.o aica.o $(DC_ARM_CC) -Wl,-Ttext,0x00000000,-Map,prog.map,-N -nostartfiles -nostdlib -e reset -o prog.elf crt0.o main.o aica.o -lgcc diff --git a/kernel/arch/dreamcast/sound/arm/stream.drv b/kernel/arch/dreamcast/sound/arm/stream.drv.prebuilt similarity index 100% rename from kernel/arch/dreamcast/sound/arm/stream.drv rename to kernel/arch/dreamcast/sound/arm/stream.drv.prebuilt hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: ljsebald <ljs...@us...> - 2023-05-01 13:00:07
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via a7b55ebbd559c33c378e87eda54fd93dd39f705f (commit) via 50b9543798b7b72803c5fab642b0ef4b3c1ae228 (commit) from 9ed322903dbb980af65ad920bcdeb815ee469118 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit a7b55ebbd559c33c378e87eda54fd93dd39f705f Merge: 9ed3229 50b9543 Author: Lawrence Sebald <ljs...@us...> Date: Mon May 1 08:58:57 2023 -0400 Merge pull request #171 from KallistiOS/outer_space Correct a number of whitespace issues. commit 50b9543798b7b72803c5fab642b0ef4b3c1ae228 Author: quzar <qu...@co...> Date: Sun Apr 30 22:32:02 2023 -0400 Correct a number of whitespace issue. ----------------------------------------------------------------------- Summary of changes: include/kos/nmmgr.h | 2 +- kernel/arch/dreamcast/fs/fs_dcload.c | 10 ++-- kernel/arch/dreamcast/fs/fs_iso9660.c | 4 +- kernel/arch/dreamcast/fs/vmufs.c | 2 +- kernel/arch/dreamcast/hardware/biosfont.c | 12 ++-- kernel/arch/dreamcast/hardware/cdrom.c | 11 ++-- kernel/arch/dreamcast/hardware/maple/dreameye.c | 4 +- kernel/arch/dreamcast/hardware/maple/keyboard.c | 66 +++++++++++----------- kernel/arch/dreamcast/hardware/maple/purupuru.c | 6 +- kernel/arch/dreamcast/hardware/maple/vmu.c | 2 +- kernel/arch/dreamcast/hardware/modem/mintr.c | 2 +- .../dreamcast/hardware/network/broadband_adapter.c | 8 +-- .../arch/dreamcast/hardware/pvr/pvr_fog_tables.h | 2 +- kernel/arch/dreamcast/hardware/pvr/pvr_mem_core.c | 22 ++++---- kernel/arch/dreamcast/hardware/pvr/pvr_mem_core.h | 8 +-- kernel/arch/dreamcast/hardware/pvr/pvr_prim.c | 2 +- kernel/arch/dreamcast/hardware/scif-spi.c | 9 ++- kernel/arch/dreamcast/hardware/scif.c | 2 +- kernel/arch/dreamcast/include/arch/rtc.h | 4 +- kernel/arch/dreamcast/include/arch/spinlock.h | 6 +- kernel/arch/dreamcast/include/arch/timer.h | 2 +- kernel/arch/dreamcast/include/dc/maple.h | 4 +- .../arch/dreamcast/include/dc/maple/controller.h | 4 +- kernel/arch/dreamcast/include/dc/maple/keyboard.h | 4 +- kernel/arch/dreamcast/include/dc/maple/mouse.h | 2 +- kernel/arch/dreamcast/include/dc/pvr.h | 2 +- kernel/arch/dreamcast/include/dc/video.h | 2 +- kernel/arch/dreamcast/kernel/cache.s | 2 +- kernel/arch/dreamcast/kernel/exec.c | 2 +- kernel/arch/dreamcast/kernel/make_banner.sh | 2 +- kernel/arch/dreamcast/kernel/mmu.c | 4 +- kernel/arch/dreamcast/kernel/rtc.c | 2 +- kernel/arch/dreamcast/kernel/timer.c | 2 +- kernel/arch/dreamcast/sound/arm/crt0.s | 2 +- kernel/arch/dreamcast/sound/snd_sfxmgr.c | 14 ++--- kernel/arch/dreamcast/util/fb_console.c | 2 +- kernel/arch/dreamcast/util/fb_console_naomi.c | 2 +- kernel/fs/elf.c | 2 +- kernel/fs/fs_utils.c | 2 +- kernel/libc/koslib/gethostbyname.c | 3 +- kernel/libc/koslib/malloc.c | 32 +++++------ kernel/libc/koslib/realpath.c | 2 +- kernel/net/net_arp.c | 2 +- kernel/net/net_core.c | 2 +- kernel/thread/rwsem.c | 2 +- kernel/thread/thread.c | 2 +- kernel/thread/tls.c | 2 +- 47 files changed, 147 insertions(+), 142 deletions(-) diff --git a/include/kos/nmmgr.h b/include/kos/nmmgr.h index 2a93922..25d33ae 100644 --- a/include/kos/nmmgr.h +++ b/include/kos/nmmgr.h @@ -128,7 +128,7 @@ int nmmgr_handler_remove(nmmgr_handler_t *hnd); /** \cond */ /* Name manager init */ int nmmgr_init(void); -void nmmgr_shutdown(void); +void nmmgr_shutdown(void); /** \endcond */ __END_DECLS diff --git a/kernel/arch/dreamcast/fs/fs_dcload.c b/kernel/arch/dreamcast/fs/fs_dcload.c index 2f3d87b..2a5a93f 100644 --- a/kernel/arch/dreamcast/fs/fs_dcload.c +++ b/kernel/arch/dreamcast/fs/fs_dcload.c @@ -34,13 +34,13 @@ static spinlock_t mutex = SPINLOCK_INITIALIZER; #define plain_dclsc(...) ({ \ int old = 0, rv; \ - if (!irq_inside_int()) { \ + if(!irq_inside_int()) { \ old = irq_disable(); \ } \ - while ((*(vuint32 *)0xa05f688c) & 0x20) \ + while((*(vuint32 *)0xa05f688c) & 0x20) \ ; \ rv = dcloadsyscall(__VA_ARGS__); \ - if (!irq_inside_int()) \ + if(!irq_inside_int()) \ irq_restore(old); \ rv; \ }) @@ -51,7 +51,7 @@ static void * lwip_dclsc = 0; #define dclsc(...) ({ \ int rv; \ - if (lwip_dclsc) \ + if(lwip_dclsc) \ rv = (*(int (*)()) lwip_dclsc)(__VA_ARGS__); \ else \ rv = plain_dclsc(__VA_ARGS__); \ @@ -534,7 +534,7 @@ int fs_dcload_init(void) { if((dcload_type == DCLOAD_TYPE_IP) && (__kos_init_flags & INIT_NET)) { dbglog(DBG_INFO, "dc-load console+kosnet, will switch to internal ethernet\n"); return -1; - /* if (old_printk) { + /* if(old_printk) { dbgio_set_printk(old_printk); old_printk = 0; } diff --git a/kernel/arch/dreamcast/fs/fs_iso9660.c b/kernel/arch/dreamcast/fs/fs_iso9660.c index 3a6f14a..30659fc 100644 --- a/kernel/arch/dreamcast/fs/fs_iso9660.c +++ b/kernel/arch/dreamcast/fs/fs_iso9660.c @@ -685,7 +685,7 @@ static ssize_t iso_read(void * h, void *buf, size_t bytes) { here commented out in case we could find a better use for it later than speed (i.e., preventing thread context switches). */ - /* if (thissect == 2048 && toread >= 2048) { + /* if(thissect == 2048 && toread >= 2048) { // Round it off to an even sector count thissect = toread / 2048; toread = thissect * 2048; @@ -694,7 +694,7 @@ static ssize_t iso_read(void * h, void *buf, size_t bytes) { thissect); // Do the read - if (cdrom_read_sectors(outbuf, + if(cdrom_read_sectors(outbuf, fh[fd].first_extent + fh[fd].ptr/2048 + 150, thissect) < 0) { diff --git a/kernel/arch/dreamcast/fs/vmufs.c b/kernel/arch/dreamcast/fs/vmufs.c index b0aa048..79127e3 100644 --- a/kernel/arch/dreamcast/fs/vmufs.c +++ b/kernel/arch/dreamcast/fs/vmufs.c @@ -754,7 +754,7 @@ int vmufs_write(maple_device_t * dev, const char * fn, void * inbuf, int insize, /* Write out the data and update our structs */ if((st = vmufs_file_write(dev, &root, fat, dir, &nd, inbuf, insize / 512)) < 0) { - if (st == -2) + if(st == -2) rv = -7; else rv = -4; diff --git a/kernel/arch/dreamcast/hardware/biosfont.c b/kernel/arch/dreamcast/hardware/biosfont.c index 72fb616..cb8325f 100644 --- a/kernel/arch/dreamcast/hardware/biosfont.c +++ b/kernel/arch/dreamcast/hardware/biosfont.c @@ -176,7 +176,7 @@ uint16 *bfont_draw_one_row(uint16 *b, uint16 word, uint8 opaque, uint32 fg, uint uint16 write16 = 0x0000; uint16 oldcolor = *b; - if ((bpp == 4)||(bpp == 8)) { + if((bpp == 4)||(bpp == 8)) { /* For 4 or 8bpp we have to go 2 or 4 pixels at a time to properly write out in all cases. */ uint8 bMask = (bpp==4) ? 0xf : 0xff; uint8 pix = 16/bpp; @@ -217,21 +217,21 @@ unsigned char bfont_draw_ex(uint8 *buffer, uint32 bufwidth, uint32 fg, uint32 bg uint8 y; /* If they're requesting a wide char and in the wrong format, kick this out */ - if (wide && (bfont_code_mode == BFONT_CODE_ISO8859_1)) { + if(wide && (bfont_code_mode == BFONT_CODE_ISO8859_1)) { dbglog(DBG_ERROR, "bfont_draw_ex: can't draw wide in bfont mode %d\n", bfont_code_mode); return 0; } /* Just making sure we can draw the character we want to */ - if (bufwidth < (uint32)(BFONT_THIN_WIDTH*(wide+1))) { + if(bufwidth < (uint32)(BFONT_THIN_WIDTH*(wide+1))) { dbglog(DBG_ERROR, "bfont_draw_ex: buffer is too small to draw into\n"); return 0; } /* Translate the character */ - if (bfont_code_mode == BFONT_CODE_RAW) + if(bfont_code_mode == BFONT_CODE_RAW) ch = get_font_address() + c; - else if (wide && ((bfont_code_mode == BFONT_CODE_EUC) || (bfont_code_mode == BFONT_CODE_SJIS))) + else if(wide && ((bfont_code_mode == BFONT_CODE_EUC) || (bfont_code_mode == BFONT_CODE_SJIS))) ch = bfont_find_char_jp(c); else { if(iskana) @@ -260,7 +260,7 @@ unsigned char bfont_draw_ex(uint8 *buffer, uint32 bufwidth, uint32 fg, uint32 bg } /* Return the horizontal distance covered in bytes */ - if (wide) + if(wide) return (BFONT_WIDE_WIDTH*bpp)/8; else return (BFONT_THIN_WIDTH*bpp)/8; diff --git a/kernel/arch/dreamcast/hardware/cdrom.c b/kernel/arch/dreamcast/hardware/cdrom.c index 58c2317..3beec3c 100644 --- a/kernel/arch/dreamcast/hardware/cdrom.c +++ b/kernel/arch/dreamcast/hardware/cdrom.c @@ -106,7 +106,7 @@ int cdrom_set_sector_size(int size) { int cdrom_exec_cmd(int cmd, void *param) { int status[4] = {0}; int f, n; - + mutex_lock(&_g1_ata_mutex); /* Make sure to select the GD-ROM drive. */ @@ -122,8 +122,9 @@ int cdrom_exec_cmd(int cmd, void *param) { if(n == PROCESSING) thd_pass(); } - while(n == PROCESSING); - + while(n == PROCESSING) + ; + mutex_unlock(&_g1_ata_mutex); if(n == COMPLETED) @@ -278,7 +279,7 @@ int cdrom_reinit_ex(int sector_part, int cdxa, int sector_size) { r = cdrom_change_datatype(sector_part, cdxa, sector_size); mutex_unlock(&_g1_ata_mutex); - + return r; } @@ -324,7 +325,7 @@ int cdrom_read_sectors_ex(void *buffer, int sector, int cnt, int mode) { */ if(mode == CDROM_READ_DMA) rv = cdrom_exec_cmd(CMD_DMAREAD, ¶ms); - else if (mode == CDROM_READ_PIO) + else if(mode == CDROM_READ_PIO) rv = cdrom_exec_cmd(CMD_PIOREAD, ¶ms); mutex_unlock(&_g1_ata_mutex); diff --git a/kernel/arch/dreamcast/hardware/maple/dreameye.c b/kernel/arch/dreamcast/hardware/maple/dreameye.c index b3697ed..c6f9846 100644 --- a/kernel/arch/dreamcast/hardware/maple/dreameye.c +++ b/kernel/arch/dreamcast/hardware/maple/dreameye.c @@ -126,7 +126,7 @@ int dreameye_get_image_count(maple_device_t *dev, int block) { /* Wait for the Dreameye to accept it */ if(genwait_wait(&dev->frame, "dreameye_get_image_count", 500, NULL) < 0) { - if(dev->frame.state != MAPLE_FRAME_VACANT) { + if(dev->frame.state != MAPLE_FRAME_VACANT) { /* Something went wrong... */ dev->frame.state = MAPLE_FRAME_VACANT; dbglog(DBG_ERROR, "dreameye_get_image_count: timeout to unit " @@ -239,7 +239,7 @@ static int dreameye_get_transfer_count(maple_device_t *dev, uint8 img) { /* Wait for the Dreameye to accept it */ if(genwait_wait(&dev->frame, "dreameye_get_transfer_count", 500, NULL) < 0) { - if(dev->frame.state != MAPLE_FRAME_VACANT) { + if(dev->frame.state != MAPLE_FRAME_VACANT) { /* Something went wrong... */ dev->frame.state = MAPLE_FRAME_VACANT; dbglog(DBG_ERROR, "dreameye_get_transfer_count: timeout to unit " diff --git a/kernel/arch/dreamcast/hardware/maple/keyboard.c b/kernel/arch/dreamcast/hardware/maple/keyboard.c index a91d907..a78746f 100644 --- a/kernel/arch/dreamcast/hardware/maple/keyboard.c +++ b/kernel/arch/dreamcast/hardware/maple/keyboard.c @@ -467,55 +467,55 @@ static void kbd_check_poll(maple_frame_t *frm) { for(i = 0; i < MAX_PRESSED_KEYS; i++) { /* Once we get to a 'none', the rest will be 'none' */ - if (cond->keys[i] == KBD_KEY_NONE){ - /* This could be used to indicate how many keys are pressed by setting it to ~i or i+1 - or similar. This could be useful, but would make it a weird exception. */ - /* If the first key in the key array is none, there are no non-modifer keys pressed at all. */ - if (i==0)state->matrix[KBD_KEY_NONE] = KEY_STATE_PRESSED; - break; - } + if(cond->keys[i] == KBD_KEY_NONE) { + /* This could be used to indicate how many keys are pressed by setting it to ~i or i+1 + or similar. This could be useful, but would make it a weird exception. */ + /* If the first key in the key array is none, there are no non-modifer keys pressed at all. */ + if(i==0) state->matrix[KBD_KEY_NONE] = KEY_STATE_PRESSED; + break; + } /* Between None and A are error indicators. This would be a good place to do... something. If an error occurs the whole array will be error.*/ - else if (cond->keys[i]>KBD_KEY_NONE && cond->keys[i]<KBD_KEY_A) { + else if(cond->keys[i]>KBD_KEY_NONE && cond->keys[i]<KBD_KEY_A) { state->matrix[cond->keys[i]] = KEY_STATE_PRESSED; break; } /* The rest of the keys are treated normally */ else { /* If the key hadn't been pressed. */ - if (state->matrix[cond->keys[i]] == KEY_STATE_NONE){ - state->matrix[cond->keys[i]] = KEY_STATE_PRESSED; - kbd_enqueue(state, cond->keys[i], mods); - state->kbd_repeat_key = cond->keys[i]; - state->kbd_repeat_timer = timer_ms_gettime64() + kbd_repeat_start; - } - /* If the key was already being pressed and was our one allowed repeating key, then... */ - else if (state->matrix[cond->keys[i]] == KEY_STATE_WAS_PRESSED){ - state->matrix[cond->keys[i]] = KEY_STATE_PRESSED; - if (state->kbd_repeat_key == cond->keys[i]){ - uint64 time = timer_ms_gettime64(); - /* We have passed the prescribed amount of time, and will repeat the key */ - if(time >= (state->kbd_repeat_timer)){ - kbd_enqueue(state, cond->keys[i], mods); - state->kbd_repeat_timer = time + kbd_repeat_interval; - } - } - } - else assert_msg(0, "invalid key matrix array detected"); + if(state->matrix[cond->keys[i]] == KEY_STATE_NONE) { + state->matrix[cond->keys[i]] = KEY_STATE_PRESSED; + kbd_enqueue(state, cond->keys[i], mods); + state->kbd_repeat_key = cond->keys[i]; + state->kbd_repeat_timer = timer_ms_gettime64() + kbd_repeat_start; + } + /* If the key was already being pressed and was our one allowed repeating key, then... */ + else if(state->matrix[cond->keys[i]] == KEY_STATE_WAS_PRESSED) { + state->matrix[cond->keys[i]] = KEY_STATE_PRESSED; + if(state->kbd_repeat_key == cond->keys[i]) { + uint64 time = timer_ms_gettime64(); + /* We have passed the prescribed amount of time, and will repeat the key */ + if(time >= (state->kbd_repeat_timer)) { + kbd_enqueue(state, cond->keys[i], mods); + state->kbd_repeat_timer = time + kbd_repeat_interval; + } + } + } + else assert_msg(0, "invalid key matrix array detected"); } } /* Now normalize the key matrix */ /* If it was determined no keys are pressed, wipe the matrix */ - if (state->matrix[KBD_KEY_NONE] == KEY_STATE_PRESSED) + if(state->matrix[KBD_KEY_NONE] == KEY_STATE_PRESSED) memset (state->matrix, KEY_STATE_NONE, MAX_KBD_KEYS); /* Otherwise, walk through the whole matrix */ else { for(i = 0; i < MAX_KBD_KEYS; i++) { - if (state->matrix[i] == KEY_STATE_NONE) continue; + if(state->matrix[i] == KEY_STATE_NONE) continue; - else if (state->matrix[i] == KEY_STATE_WAS_PRESSED) state->matrix[i] = KEY_STATE_NONE; + else if(state->matrix[i] == KEY_STATE_WAS_PRESSED) state->matrix[i] = KEY_STATE_NONE; - else if (state->matrix[i] == KEY_STATE_PRESSED) state->matrix[i] = KEY_STATE_WAS_PRESSED; + else if(state->matrix[i] == KEY_STATE_PRESSED) state->matrix[i] = KEY_STATE_WAS_PRESSED; else assert_msg(0, "invalid key matrix array detected"); } } @@ -588,8 +588,8 @@ static int kbd_attach(maple_driver_t *drv, maple_device_t *dev) { /* Retrieve the region data */ state->region = dev->info.function_data[d] & 0xFF; - if (state->region > KBD_NUM_KEYMAPS) - /* Unrecognized keyboards will appear as US keyboards... */ + /* Unrecognized keyboards will appear as US keyboards... */ + if(state->region > KBD_NUM_KEYMAPS) state->region = KBD_REGION_US; /* Make sure all the queue variables are set up properly... */ diff --git a/kernel/arch/dreamcast/hardware/maple/purupuru.c b/kernel/arch/dreamcast/hardware/maple/purupuru.c index c2a07f3..4725fb9 100644 --- a/kernel/arch/dreamcast/hardware/maple/purupuru.c +++ b/kernel/arch/dreamcast/hardware/maple/purupuru.c @@ -14,7 +14,7 @@ /* Be warned, not all purus are created equal, in fact, most of them act different for just about everything you feed to them. */ -static void purupuru_rumble_cb(maple_frame_t *frame) { +static void purupuru_rumble_cb(maple_frame_t *frame) { /* Unlock the frame */ maple_frame_unlock(frame); @@ -46,7 +46,7 @@ int purupuru_rumble_raw(maple_device_t *dev, uint32 effect) { /* Wait for the purupuru to accept it */ if(genwait_wait(&dev->frame, "purupuru_rumble_raw", 500, NULL) < 0) { - if(dev->frame.state != MAPLE_FRAME_VACANT) { + if(dev->frame.state != MAPLE_FRAME_VACANT) { /* Something went wrong.... */ dev->frame.state = MAPLE_FRAME_VACANT; dbglog(DBG_ERROR, "purupuru_rumble_raw: timeout to unit %c%c\n", @@ -87,7 +87,7 @@ int purupuru_rumble(maple_device_t *dev, purupuru_effect_t *effect) { /* Wait for the purupuru to accept it */ if(genwait_wait(&dev->frame, "purupuru_rumble", 500, NULL) < 0) { - if(dev->frame.state != MAPLE_FRAME_VACANT) { + if(dev->frame.state != MAPLE_FRAME_VACANT) { /* Something went wrong.... */ dev->frame.state = MAPLE_FRAME_VACANT; dbglog(DBG_ERROR, "purupuru_rumble: timeout to unit %c%c\n", diff --git a/kernel/arch/dreamcast/hardware/maple/vmu.c b/kernel/arch/dreamcast/hardware/maple/vmu.c index 4c533b9..302b431 100644 --- a/kernel/arch/dreamcast/hardware/maple/vmu.c +++ b/kernel/arch/dreamcast/hardware/maple/vmu.c @@ -155,7 +155,7 @@ int vmu_beep_raw(maple_device_t * dev, uint32 beep) { /* Wait for the timer to accept it */ if(genwait_wait(&dev->frame, "vmu_beep_raw", 500, NULL) < 0) { - if(dev->frame.state != MAPLE_FRAME_VACANT) { + if(dev->frame.state != MAPLE_FRAME_VACANT) { /* Something went wrong.... */ dev->frame.state = MAPLE_FRAME_VACANT; dbglog(DBG_ERROR, "vmu_beep_raw: timeout to unit %c%c, beep: %lu\n", diff --git a/kernel/arch/dreamcast/hardware/modem/mintr.c b/kernel/arch/dreamcast/hardware/modem/mintr.c index f9258b4..2568931 100644 --- a/kernel/arch/dreamcast/hardware/modem/mintr.c +++ b/kernel/arch/dreamcast/hardware/modem/mintr.c @@ -609,7 +609,7 @@ void modemIntShutdown(void) { #define dspSetClear8(addr, mask, clear)\ {\ data = dspRead8(addr);\ - if (!(clear))\ + if(!(clear))\ data |= mask;\ else\ data &= ~mask;\ diff --git a/kernel/arch/dreamcast/hardware/network/broadband_adapter.c b/kernel/arch/dreamcast/hardware/network/broadband_adapter.c index c348a10..8ce5227 100644 --- a/kernel/arch/dreamcast/hardware/network/broadband_adapter.c +++ b/kernel/arch/dreamcast/hardware/network/broadband_adapter.c @@ -423,9 +423,9 @@ static void g2_read_block_8(uint8 *dst, uint8 *src, int len) { G2_LOCK(old1, old2); /* This is in case dst is not multiple of 4, which never happens here */ - /* while ( (((uint32)dst)&3) ) { */ + /* while( (((uint32)dst)&3) ) { */ /* *dst++ = *src++; */ - /* if (!--len) */ + /* if(!--len) */ /* return; */ /* } */ @@ -637,7 +637,7 @@ static int bba_tx(const uint8 * pkt, int len, int wait) /* int i; - printf("Transmitting packet:\r\n"); for (i=0; i<len; i++) { printf("%02x ", pkt[i]); if (i + printf("Transmitting packet:\r\n"); for(i=0; i<len; i++) { printf("%02x ", pkt[i]); if(i && !(i % 16)) printf("\r\n"); } printf("\r\n"); */ @@ -783,7 +783,7 @@ static void bba_rx(void) { break; } - /* if ( ( ( g2_read_16(NIC(RT_RXBUFHEAD)) - ring_offset ) & (RX_BUFFER_LEN-1)) < */ + /* if( ( ( g2_read_16(NIC(RT_RXBUFHEAD)) - ring_offset ) & (RX_BUFFER_LEN-1)) < */ /* ( (rx_size+4+3) & (RX_BUFFER_LEN-3-1) )) { */ /* //dbglog(DBG_KDEBUG, "bba: oops\n"); */ /* break; */ diff --git a/kernel/arch/dreamcast/hardware/pvr/pvr_fog_tables.h b/kernel/arch/dreamcast/hardware/pvr/pvr_fog_tables.h index db91152..aa0c605 100644 --- a/kernel/arch/dreamcast/hardware/pvr/pvr_fog_tables.h +++ b/kernel/arch/dreamcast/hardware/pvr/pvr_fog_tables.h @@ -179,7 +179,7 @@ int main () { float value, f = 0.0F; int i = 0; printf("static float exp_table[FOG_EXP_TABLE_SIZE] = {\n\t"); - for ( ; i < FOG_EXP_TABLE_SIZE ; i++, f += FOG_INCR) { + for( ; i < FOG_EXP_TABLE_SIZE ; i++, f += FOG_INCR) { value = (float) exp(-f); printf("%01.8f, %s", value, ((i+1)%4)?" ":"\n\t"); } diff --git a/kernel/arch/dreamcast/hardware/pvr/pvr_mem_core.c b/kernel/arch/dreamcast/hardware/pvr/pvr_mem_core.c index 7bc361b..fcc449b 100644 --- a/kernel/arch/dreamcast/hardware/pvr/pvr_mem_core.c +++ b/kernel/arch/dreamcast/hardware/pvr/pvr_mem_core.c @@ -350,7 +350,7 @@ int public_pvr_mALLOPt(int p, int v) { INTERNAL_SIZE_T* mzp = (INTERNAL_SIZE_T*)(charp); \ unsigned long mctmp = (nbytes)/sizeof(INTERNAL_SIZE_T); \ long mcn; \ - if (mctmp < 8) mcn = 0; else { mcn = (mctmp-1)/8; mctmp %= 8; } \ + if(mctmp < 8) mcn = 0; else { mcn = (mctmp-1)/8; mctmp %= 8; } \ switch (mctmp) { \ case 0: for(;;) { *mzp++ = 0; \ case 7: *mzp++ = 0; \ @@ -612,7 +612,7 @@ nextchunk-> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ /* Same, except also perform argument check */ #define checked_request2size(req, sz) \ - if (REQUEST_OUT_OF_RANGE(req)) { \ + if(REQUEST_OUT_OF_RANGE(req)) { \ MALLOC_FAILURE_ACTION; \ return 0; \ } \ @@ -1221,7 +1221,7 @@ static void do_check_inuse_chunk(p) mchunkptr p; Since more things can be checked with free chunks than inuse ones, if an inuse chunk borders them and debug is on, it's worth doing them. */ - if(!prev_inuse(p)) { + if(!prev_inuse(p)) { /* Note that we cannot even look at prev unless it is not inuse */ mchunkptr prv = prev_chunk(p); assert(next_chunk(prv) == p); @@ -2095,7 +2095,7 @@ Void_t* mALLOc(bytes) size_t bytes; unlink(victim, bck, fwd); /* Exhaust */ - if(remainder_size < MINSIZE) { + if(remainder_size < MINSIZE) { set_inuse_bit_at_offset(victim, size); check_malloced_chunk(victim, nb); return chunk2mem(victim); @@ -3446,13 +3446,13 @@ void pvr_int_mem_reset(void) { void *ptr = 0; static void *sbrk_top = 0; - if (size > 0) + if(size > 0) { - if (size < MINIMUM_MORECORE_SIZE) + if(size < MINIMUM_MORECORE_SIZE) size = MINIMUM_MORECORE_SIZE; - if (CurrentExecutionLevel() == kTaskLevel) + if(CurrentExecutionLevel() == kTaskLevel) ptr = PoolAllocateResident(size + RM_PAGE_SIZE, 0); - if (ptr == 0) + if(ptr == 0) { return (void *) MORECORE_FAILURE; ...<truncated>... hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: ljsebald <ljs...@us...> - 2023-04-30 20:56:10
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via 9ed322903dbb980af65ad920bcdeb815ee469118 (commit) via 2ff2f3b903526c64529c8b2c90808f4882ce112c (commit) via 596f2bcb7907730334d16a44cba629944b008824 (commit) from e0f308d1ce1219306aa7d5fa83295aaf27ef16d1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 9ed322903dbb980af65ad920bcdeb815ee469118 Merge: e0f308d 2ff2f3b Author: Lawrence Sebald <ljs...@us...> Date: Sun Apr 30 16:49:24 2023 -0400 Merge pull request #170 from cepawiel/dcload-exit-return-code Add exit code as argument to dcload exit syscall commit 2ff2f3b903526c64529c8b2c90808f4882ce112c Merge: 596f2bc e0f308d Author: Lawrence Sebald <ljs...@us...> Date: Sun Apr 30 16:49:05 2023 -0400 Merge branch 'master' into dcload-exit-return-code commit 596f2bcb7907730334d16a44cba629944b008824 Author: Colton Pawielski <cep...@mt...> Date: Sat Apr 29 12:53:59 2023 -0500 Add exit code as argument to dcload exit syscall Currently this is not supported in dcload, but was tested with lxdream-nitro as it has support for a return code being passed in the r5 register. ----------------------------------------------------------------------- Summary of changes: kernel/arch/dreamcast/include/arch/arch.h | 4 +- kernel/arch/dreamcast/kernel/init.c | 12 +++--- kernel/arch/dreamcast/kernel/startup.s | 5 +++ utils/dc-chain/patches/gcc-13.1.0-kos.diff | 43 +++++++++++--------- utils/dc-chain/patches/gcc-4.7.4-kos.diff | 63 ++++++++++++++++-------------- utils/dc-chain/patches/gcc-9.3.0-kos.diff | 39 ++++++++++-------- 6 files changed, 93 insertions(+), 73 deletions(-) diff --git a/kernel/arch/dreamcast/include/arch/arch.h b/kernel/arch/dreamcast/include/arch/arch.h index 24727ec..1ff111d 100644 --- a/kernel/arch/dreamcast/include/arch/arch.h +++ b/kernel/arch/dreamcast/include/arch/arch.h @@ -110,7 +110,7 @@ void arch_exit(void) __noreturn; /** \brief Kernel "return" point. \note This function will never return! */ -void arch_return(void) __noreturn; +void arch_return(int ret_code) __noreturn; /** \brief Kernel "abort" point. \note This function will never return! @@ -211,7 +211,7 @@ extern void * __kos_romdisk; \note This function will never return! */ -void arch_real_exit(void) __noreturn; +void arch_real_exit(int ret_code) __noreturn; /** \brief Initialize bare-bones hardware systems. diff --git a/kernel/arch/dreamcast/kernel/init.c b/kernel/arch/dreamcast/kernel/init.c index b789320..ea1fd26 100644 --- a/kernel/arch/dreamcast/kernel/init.c +++ b/kernel/arch/dreamcast/kernel/init.c @@ -289,10 +289,10 @@ void arch_shutdown(void) { /* Generic kernel exit point */ void arch_exit(void) { - /* arch_exit always returns 0 + /* arch_exit always returns EXIT_SUCCESS (0) if return codes are desired then a call to newlib's exit() should be used in its place */ - exit(0); + exit(EXIT_SUCCESS); } /* Return point from newlib's _exit() (configurable) */ @@ -307,7 +307,7 @@ void arch_exit_handler(int ret_code) { dbglog(DBG_CRITICAL, "arch: arch_exit_path has invalid value!\n"); __fallthrough; case ARCH_EXIT_RETURN: - arch_return(); + arch_return(ret_code); break; case ARCH_EXIT_MENU: arch_menu(); @@ -319,9 +319,9 @@ void arch_exit_handler(int ret_code) { } /* Called to shut down the system and return to the debug handler (if any) */ -void arch_return(void) { +void arch_return(int ret_code) { /* Jump back to the boot loader */ - arch_real_exit(); + arch_real_exit(ret_code); } /* Called to jump back to the BIOS menu; assumes a normal shutdown is possible */ @@ -356,7 +356,7 @@ void arch_abort(void) { /* Turn off any IRQs */ irq_disable(); - arch_real_exit(); + arch_real_exit(EXIT_FAILURE); } /* Called to reboot the system; assume the system is in peril and don't diff --git a/kernel/arch/dreamcast/kernel/startup.s b/kernel/arch/dreamcast/kernel/startup.s index 867ca11..5234888 100644 --- a/kernel/arch/dreamcast/kernel/startup.s +++ b/kernel/arch/dreamcast/kernel/startup.s @@ -123,6 +123,9 @@ memchk_done: ! Program can return here (not likely) or jump here directly ! from anywhere in it to go straight back to the monitor _arch_real_exit: + ! Save exit code parameter to r8 + mov r4, r8 + ! Reset SR mov.l old_sr,r0 ldc r0,sr @@ -155,6 +158,8 @@ _arch_real_exit: mov.l dcload_syscall,r0 mov.l @r0,r0 + ! Move saved exit code to be used as exit syscall parameter + mov r8, r5 jsr @r0 mov #15,r4 diff --git a/utils/dc-chain/patches/gcc-13.1.0-kos.diff b/utils/dc-chain/patches/gcc-13.1.0-kos.diff index 492adbb..498741f 100644 --- a/utils/dc-chain/patches/gcc-13.1.0-kos.diff +++ b/utils/dc-chain/patches/gcc-13.1.0-kos.diff @@ -1,6 +1,6 @@ diff --color -ruN gcc-13.1.0/gcc/config/sh/sh-c.cc gcc-13.1.0-kos/gcc/config/sh/sh-c.cc ---- gcc-13.1.0/gcc/config/sh/sh-c.cc 2023-04-06 09:48:44.072087370 -0500 -+++ gcc-13.1.0-kos/gcc/config/sh/sh-c.cc 2023-04-06 09:47:57.478945692 -0500 +--- gcc-13.1.0/gcc/config/sh/sh-c.cc 2023-04-26 02:09:39.000000000 -0500 ++++ gcc-13.1.0-kos/gcc/config/sh/sh-c.cc 2023-04-29 12:45:52.160038658 -0500 @@ -141,4 +141,11 @@ cpp_define_formatted (pfile, "__SH_ATOMIC_MODEL_%s__", @@ -14,8 +14,8 @@ diff --color -ruN gcc-13.1.0/gcc/config/sh/sh-c.cc gcc-13.1.0-kos/gcc/config/sh/ + builtin_define ("__KOS_GCC_32MB__"); } diff --color -ruN gcc-13.1.0/gcc/configure gcc-13.1.0-kos/gcc/configure ---- gcc-13.1.0/gcc/configure 2023-04-06 09:48:35.600061609 -0500 -+++ gcc-13.1.0-kos/gcc/configure 2023-04-06 09:47:57.480945699 -0500 +--- gcc-13.1.0/gcc/configure 2023-04-26 02:11:18.000000000 -0500 ++++ gcc-13.1.0-kos/gcc/configure 2023-04-29 12:45:52.164038684 -0500 @@ -13012,7 +13012,7 @@ target_thread_file='single' ;; @@ -26,9 +26,9 @@ diff --color -ruN gcc-13.1.0/gcc/configure gcc-13.1.0-kos/gcc/configure ;; *) diff --color -ruN gcc-13.1.0/libgcc/config/sh/crt1.S gcc-13.1.0-kos/libgcc/config/sh/crt1.S ---- gcc-13.1.0/libgcc/config/sh/crt1.S 2023-04-06 09:48:33.091053980 -0500 -+++ gcc-13.1.0-kos/libgcc/config/sh/crt1.S 2023-04-06 09:47:57.481945701 -0500 -@@ -1,724 +1,225 @@ +--- gcc-13.1.0/libgcc/config/sh/crt1.S 2023-04-26 02:09:43.000000000 -0500 ++++ gcc-13.1.0-kos/libgcc/config/sh/crt1.S 2023-04-29 12:46:39.571346358 -0500 +@@ -1,724 +1,230 @@ -/* Copyright (C) 2000-2023 Free Software Foundation, Inc. - This file was pretty much copied from newlib. +! KallistiOS ##version## @@ -431,6 +431,9 @@ diff --color -ruN gcc-13.1.0/libgcc/config/sh/crt1.S gcc-13.1.0-kos/libgcc/confi + ! Program can return here (not likely) or jump here directly + ! from anywhere in it to go straight back to the monitor +_arch_real_exit: ++ ! Save exit code parameter to r8 ++ mov r4, r8 ++ + ! Reset SR + mov.l old_sr,r0 + ldc r0,sr @@ -722,6 +725,8 @@ diff --color -ruN gcc-13.1.0/libgcc/config/sh/crt1.S gcc-13.1.0-kos/libgcc/confi - mov r14,r15 - mov.l @r15+,r14 - rts ++ ! Move saved exit code to be used as exit syscall parameter ++ mov r8, r5 + jsr @r0 + mov #15,r4 + @@ -963,7 +968,7 @@ diff --color -ruN gcc-13.1.0/libgcc/config/sh/crt1.S gcc-13.1.0-kos/libgcc/confi + .word 0x092d diff --color -ruN gcc-13.1.0/libgcc/config/sh/fake-kos.S gcc-13.1.0-kos/libgcc/config/sh/fake-kos.S --- gcc-13.1.0/libgcc/config/sh/fake-kos.S 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-13.1.0-kos/libgcc/config/sh/fake-kos.S 2023-04-06 09:47:57.481945701 -0500 ++++ gcc-13.1.0-kos/libgcc/config/sh/fake-kos.S 2023-04-29 12:45:52.164038684 -0500 @@ -0,0 +1,78 @@ +! Weakly linked symbols used to get GCC to hopefully compile itself properly. +! These will be replaced by the real symbols in actual compiled programs. @@ -1045,7 +1050,7 @@ diff --color -ruN gcc-13.1.0/libgcc/config/sh/fake-kos.S gcc-13.1.0-kos/libgcc/c + mov #-1, r0 diff --color -ruN gcc-13.1.0/libgcc/config/sh/gthr-kos.h gcc-13.1.0-kos/libgcc/config/sh/gthr-kos.h --- gcc-13.1.0/libgcc/config/sh/gthr-kos.h 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-13.1.0-kos/libgcc/config/sh/gthr-kos.h 2023-04-06 09:47:57.481945701 -0500 ++++ gcc-13.1.0-kos/libgcc/config/sh/gthr-kos.h 2023-04-29 12:45:52.165038690 -0500 @@ -0,0 +1,401 @@ +/* Copyright (C) 2009, 2010, 2011, 2012, 2020 Lawrence Sebald */ + @@ -1449,8 +1454,8 @@ diff --color -ruN gcc-13.1.0/libgcc/config/sh/gthr-kos.h gcc-13.1.0-kos/libgcc/c + +#endif /* ! GCC_GTHR_KOS_H */ diff --color -ruN gcc-13.1.0/libgcc/config/sh/t-sh gcc-13.1.0-kos/libgcc/config/sh/t-sh ---- gcc-13.1.0/libgcc/config/sh/t-sh 2023-04-06 09:48:33.092053982 -0500 -+++ gcc-13.1.0-kos/libgcc/config/sh/t-sh 2023-04-06 09:47:57.481945701 -0500 +--- gcc-13.1.0/libgcc/config/sh/t-sh 2023-04-26 02:09:43.000000000 -0500 ++++ gcc-13.1.0-kos/libgcc/config/sh/t-sh 2023-04-29 12:45:52.165038690 -0500 @@ -23,6 +23,8 @@ $(LIB1ASMFUNCS_CACHE) LIB1ASMFUNCS_CACHE = _ic_invalidate _ic_invalidate_array @@ -1461,8 +1466,8 @@ diff --color -ruN gcc-13.1.0/libgcc/config/sh/t-sh gcc-13.1.0-kos/libgcc/config/ $(gcc_compile) -c $< diff --color -ruN gcc-13.1.0/libgcc/configure gcc-13.1.0-kos/libgcc/configure ---- gcc-13.1.0/libgcc/configure 2023-04-06 09:48:33.102054013 -0500 -+++ gcc-13.1.0-kos/libgcc/configure 2023-04-06 09:47:57.482945704 -0500 +--- gcc-13.1.0/libgcc/configure 2023-04-26 02:09:43.000000000 -0500 ++++ gcc-13.1.0-kos/libgcc/configure 2023-04-29 12:45:52.165038690 -0500 @@ -5699,6 +5699,7 @@ tpf) thread_header=config/s390/gthr-tpf.h ;; vxworks) thread_header=config/gthr-vxworks.h ;; @@ -1472,8 +1477,8 @@ diff --color -ruN gcc-13.1.0/libgcc/configure gcc-13.1.0-kos/libgcc/configure esac diff --color -ruN gcc-13.1.0/libobjc/configure gcc-13.1.0-kos/libobjc/configure ---- gcc-13.1.0/libobjc/configure 2023-04-06 09:48:33.989056710 -0500 -+++ gcc-13.1.0-kos/libobjc/configure 2023-04-06 09:47:57.483945708 -0500 +--- gcc-13.1.0/libobjc/configure 2023-04-26 02:11:18.000000000 -0500 ++++ gcc-13.1.0-kos/libobjc/configure 2023-04-29 12:45:52.167038703 -0500 @@ -2918,11 +2918,9 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -1487,8 +1492,8 @@ diff --color -ruN gcc-13.1.0/libobjc/configure gcc-13.1.0-kos/libobjc/configure return 0; } diff --color -ruN gcc-13.1.0/libstdc++-v3/config/cpu/sh/atomicity.h gcc-13.1.0-kos/libstdc++-v3/config/cpu/sh/atomicity.h ---- gcc-13.1.0/libstdc++-v3/config/cpu/sh/atomicity.h 2023-04-06 09:48:34.226057431 -0500 -+++ gcc-13.1.0-kos/libstdc++-v3/config/cpu/sh/atomicity.h 2023-04-06 09:47:57.483945708 -0500 +--- gcc-13.1.0/libstdc++-v3/config/cpu/sh/atomicity.h 2023-04-26 02:09:43.000000000 -0500 ++++ gcc-13.1.0-kos/libstdc++-v3/config/cpu/sh/atomicity.h 2023-04-29 12:45:52.167038703 -0500 @@ -22,14 +22,40 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. @@ -1540,8 +1545,8 @@ diff --color -ruN gcc-13.1.0/libstdc++-v3/config/cpu/sh/atomicity.h gcc-13.1.0-k +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --color -ruN gcc-13.1.0/libstdc++-v3/configure gcc-13.1.0-kos/libstdc++-v3/configure ---- gcc-13.1.0/libstdc++-v3/configure 2023-04-06 09:48:34.243057483 -0500 -+++ gcc-13.1.0-kos/libstdc++-v3/configure 2023-04-06 09:47:57.487945720 -0500 +--- gcc-13.1.0/libstdc++-v3/configure 2023-04-26 02:09:43.000000000 -0500 ++++ gcc-13.1.0-kos/libstdc++-v3/configure 2023-04-29 12:45:52.173038742 -0500 @@ -15809,6 +15809,7 @@ tpf) thread_header=config/s390/gthr-tpf.h ;; vxworks) thread_header=config/gthr-vxworks.h ;; diff --git a/utils/dc-chain/patches/gcc-4.7.4-kos.diff b/utils/dc-chain/patches/gcc-4.7.4-kos.diff index a93615a..bd06bec 100644 --- a/utils/dc-chain/patches/gcc-4.7.4-kos.diff +++ b/utils/dc-chain/patches/gcc-4.7.4-kos.diff @@ -1,6 +1,6 @@ -diff --color -ruN --no-dereference gcc-4.7.4/gcc/config/sh/sh.h gcc-4.7.4-kos/gcc/config/sh/sh.h ---- gcc-4.7.4/gcc/config/sh/sh.h 2023-01-02 13:58:37.404216244 -0600 -+++ gcc-4.7.4-kos/gcc/config/sh/sh.h 2023-01-02 14:01:27.796461128 -0600 +diff --color -ruN gcc-4.7.4/gcc/config/sh/sh.h gcc-4.7.4-kos/gcc/config/sh/sh.h +--- gcc-4.7.4/gcc/config/sh/sh.h 2013-03-25 17:55:56.000000000 -0500 ++++ gcc-4.7.4-kos/gcc/config/sh/sh.h 2023-04-29 12:35:14.894104257 -0500 @@ -93,6 +93,12 @@ builtin_define ("__FMOVD_ENABLED__"); \ builtin_define (TARGET_LITTLE_ENDIAN \ @@ -14,9 +14,9 @@ diff --color -ruN --no-dereference gcc-4.7.4/gcc/config/sh/sh.h gcc-4.7.4-kos/gc } while (0) /* Value should be nonzero if functions must have frame pointers. -diff --color -ruN --no-dereference gcc-4.7.4/gcc/configure gcc-4.7.4-kos/gcc/configure ---- gcc-4.7.4/gcc/configure 2023-01-02 13:58:36.285214636 -0600 -+++ gcc-4.7.4-kos/gcc/configure 2023-01-02 13:58:54.491240801 -0600 +diff --color -ruN gcc-4.7.4/gcc/configure gcc-4.7.4-kos/gcc/configure +--- gcc-4.7.4/gcc/configure 2014-02-12 10:43:47.000000000 -0600 ++++ gcc-4.7.4-kos/gcc/configure 2023-04-29 12:35:14.897104275 -0500 @@ -11338,7 +11338,7 @@ target_thread_file='single' ;; @@ -26,9 +26,9 @@ diff --color -ruN --no-dereference gcc-4.7.4/gcc/configure gcc-4.7.4-kos/gcc/con target_thread_file=${enable_threads} ;; *) -diff --color -ruN --no-dereference gcc-4.7.4/gcc/cp/cfns.h gcc-4.7.4-kos/gcc/cp/cfns.h ---- gcc-4.7.4/gcc/cp/cfns.h 2023-01-02 13:58:37.377216206 -0600 -+++ gcc-4.7.4-kos/gcc/cp/cfns.h 2023-01-02 13:58:54.491240801 -0600 +diff --color -ruN gcc-4.7.4/gcc/cp/cfns.h gcc-4.7.4-kos/gcc/cp/cfns.h +--- gcc-4.7.4/gcc/cp/cfns.h 2009-04-21 14:03:23.000000000 -0500 ++++ gcc-4.7.4-kos/gcc/cp/cfns.h 2023-04-29 12:35:14.898104281 -0500 @@ -53,6 +53,9 @@ static unsigned int hash (const char *, unsigned int); #ifdef __GNUC__ @@ -48,9 +48,9 @@ diff --color -ruN --no-dereference gcc-4.7.4/gcc/cp/cfns.h gcc-4.7.4-kos/gcc/cp/ switch (hval) { -diff --color -ruN --no-dereference gcc-4.7.4/gcc/doc/gcc.texi gcc-4.7.4-kos/gcc/doc/gcc.texi ---- gcc-4.7.4/gcc/doc/gcc.texi 2023-01-02 13:58:36.278214626 -0600 -+++ gcc-4.7.4-kos/gcc/doc/gcc.texi 2023-01-02 13:58:54.491240801 -0600 +diff --color -ruN gcc-4.7.4/gcc/doc/gcc.texi gcc-4.7.4-kos/gcc/doc/gcc.texi +--- gcc-4.7.4/gcc/doc/gcc.texi 2010-06-09 18:46:33.000000000 -0500 ++++ gcc-4.7.4-kos/gcc/doc/gcc.texi 2023-04-29 12:35:14.898104281 -0500 @@ -86,9 +86,9 @@ @item GNU Press @tab Website: www.gnupress.org @@ -63,10 +63,10 @@ diff --color -ruN --no-dereference gcc-4.7.4/gcc/doc/gcc.texi gcc-4.7.4-kos/gcc/ @item 51 Franklin Street, Fifth Floor @tab Tel 617-542-5942 @item Boston, MA 02110-1301 USA -diff --color -ruN --no-dereference gcc-4.7.4/libgcc/config/sh/crt1.S gcc-4.7.4-kos/libgcc/config/sh/crt1.S ---- gcc-4.7.4/libgcc/config/sh/crt1.S 2023-01-02 13:58:36.183214490 -0600 -+++ gcc-4.7.4-kos/libgcc/config/sh/crt1.S 2023-01-02 13:59:37.563302704 -0600 -@@ -1,1369 +1,225 @@ +diff --color -ruN gcc-4.7.4/libgcc/config/sh/crt1.S gcc-4.7.4-kos/libgcc/config/sh/crt1.S +--- gcc-4.7.4/libgcc/config/sh/crt1.S 2011-11-02 09:33:56.000000000 -0500 ++++ gcc-4.7.4-kos/libgcc/config/sh/crt1.S 2023-04-29 12:35:49.271313212 -0500 +@@ -1,1369 +1,230 @@ -/* Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006, 2009, 2011 - Free Software Foundation, Inc. - This file was pretty much copied from newlib. @@ -1111,6 +1111,9 @@ diff --color -ruN --no-dereference gcc-4.7.4/libgcc/config/sh/crt1.S gcc-4.7.4-k + ! Program can return here (not likely) or jump here directly + ! from anywhere in it to go straight back to the monitor +_arch_real_exit: ++ ! Save exit code parameter to r8 ++ mov r4, r8 ++ + ! Reset SR + mov.l old_sr,r0 + ldc r0,sr @@ -1404,6 +1407,8 @@ diff --color -ruN --no-dereference gcc-4.7.4/libgcc/config/sh/crt1.S gcc-4.7.4-k - mov r14,r15 - mov.l @r15+,r14 - rts ++ ! Move saved exit code to be used as exit syscall parameter ++ mov r8, r5 + jsr @r0 + mov #15,r4 + @@ -1644,9 +1649,9 @@ diff --color -ruN --no-dereference gcc-4.7.4/libgcc/config/sh/crt1.S gcc-4.7.4-k + .word 0x090d +ccr_data_ocram: + .word 0x092d -diff --color -ruN --no-dereference gcc-4.7.4/libgcc/config/sh/fake-kos.S gcc-4.7.4-kos/libgcc/config/sh/fake-kos.S +diff --color -ruN gcc-4.7.4/libgcc/config/sh/fake-kos.S gcc-4.7.4-kos/libgcc/config/sh/fake-kos.S --- gcc-4.7.4/libgcc/config/sh/fake-kos.S 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-4.7.4-kos/libgcc/config/sh/fake-kos.S 2023-01-02 13:58:54.492240803 -0600 ++++ gcc-4.7.4-kos/libgcc/config/sh/fake-kos.S 2023-04-29 12:35:14.898104281 -0500 @@ -0,0 +1,75 @@ +! Weakly linked symbols used to get GCC to hopefully compile itself properly. +! These will be replaced by the real symbols in actual compiled programs. @@ -1724,9 +1729,9 @@ diff --color -ruN --no-dereference gcc-4.7.4/libgcc/config/sh/fake-kos.S gcc-4.7 + mov #-1, r0 + \ No newline at end of file -diff --color -ruN --no-dereference gcc-4.7.4/libgcc/config/sh/gthr-kos.h gcc-4.7.4-kos/libgcc/config/sh/gthr-kos.h +diff --color -ruN gcc-4.7.4/libgcc/config/sh/gthr-kos.h gcc-4.7.4-kos/libgcc/config/sh/gthr-kos.h --- gcc-4.7.4/libgcc/config/sh/gthr-kos.h 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-4.7.4-kos/libgcc/config/sh/gthr-kos.h 2023-01-02 13:58:54.492240803 -0600 ++++ gcc-4.7.4-kos/libgcc/config/sh/gthr-kos.h 2023-04-29 12:35:14.899104287 -0500 @@ -0,0 +1,355 @@ +/* Copyright (C) 2009, 2010, 2011, 2012 Lawrence Sebald */ + @@ -2083,9 +2088,9 @@ diff --color -ruN --no-dereference gcc-4.7.4/libgcc/config/sh/gthr-kos.h gcc-4.7 +#endif /* _LIBOBJC */ + +#endif /* ! GCC_GTHR_KOS_H */ -diff --color -ruN --no-dereference gcc-4.7.4/libgcc/config/sh/t-sh gcc-4.7.4-kos/libgcc/config/sh/t-sh ---- gcc-4.7.4/libgcc/config/sh/t-sh 2023-01-02 13:58:36.183214490 -0600 -+++ gcc-4.7.4-kos/libgcc/config/sh/t-sh 2023-01-02 13:58:54.492240803 -0600 +diff --color -ruN gcc-4.7.4/libgcc/config/sh/t-sh gcc-4.7.4-kos/libgcc/config/sh/t-sh +--- gcc-4.7.4/libgcc/config/sh/t-sh 2011-11-07 11:14:32.000000000 -0600 ++++ gcc-4.7.4-kos/libgcc/config/sh/t-sh 2023-04-29 12:35:14.899104287 -0500 @@ -24,6 +24,8 @@ $(LIB1ASMFUNCS_CACHE) LIB1ASMFUNCS_CACHE = _ic_invalidate _ic_invalidate_array @@ -2095,9 +2100,9 @@ diff --color -ruN --no-dereference gcc-4.7.4/libgcc/config/sh/t-sh gcc-4.7.4-kos crt1.o: $(srcdir)/config/sh/crt1.S $(gcc_compile) -c $< -diff --color -ruN --no-dereference gcc-4.7.4/libgcc/configure gcc-4.7.4-kos/libgcc/configure ---- gcc-4.7.4/libgcc/configure 2023-01-02 13:58:36.168214468 -0600 -+++ gcc-4.7.4-kos/libgcc/configure 2023-01-02 13:58:54.492240803 -0600 +diff --color -ruN gcc-4.7.4/libgcc/configure gcc-4.7.4-kos/libgcc/configure +--- gcc-4.7.4/libgcc/configure 2012-08-06 09:34:27.000000000 -0500 ++++ gcc-4.7.4-kos/libgcc/configure 2023-04-29 12:35:14.899104287 -0500 @@ -4480,6 +4480,7 @@ tpf) thread_header=config/s390/gthr-tpf.h ;; vxworks) thread_header=config/gthr-vxworks.h ;; @@ -2106,9 +2111,9 @@ diff --color -ruN --no-dereference gcc-4.7.4/libgcc/configure gcc-4.7.4-kos/libg esac # Substitute configuration variables -diff --color -ruN --no-dereference gcc-4.7.4/libstdc++-v3/config/cpu/sh/atomicity.h gcc-4.7.4-kos/libstdc++-v3/config/cpu/sh/atomicity.h ---- gcc-4.7.4/libstdc++-v3/config/cpu/sh/atomicity.h 2023-01-02 13:58:35.186213057 -0600 -+++ gcc-4.7.4-kos/libstdc++-v3/config/cpu/sh/atomicity.h 2023-01-02 13:58:54.493240804 -0600 +diff --color -ruN gcc-4.7.4/libstdc++-v3/config/cpu/sh/atomicity.h gcc-4.7.4-kos/libstdc++-v3/config/cpu/sh/atomicity.h +--- gcc-4.7.4/libstdc++-v3/config/cpu/sh/atomicity.h 2011-01-30 16:39:36.000000000 -0600 ++++ gcc-4.7.4-kos/libstdc++-v3/config/cpu/sh/atomicity.h 2023-04-29 12:35:14.899104287 -0500 @@ -80,7 +80,12 @@ namespace diff --git a/utils/dc-chain/patches/gcc-9.3.0-kos.diff b/utils/dc-chain/patches/gcc-9.3.0-kos.diff index 0d53d9e..5572df6 100644 --- a/utils/dc-chain/patches/gcc-9.3.0-kos.diff +++ b/utils/dc-chain/patches/gcc-9.3.0-kos.diff @@ -1,6 +1,6 @@ diff --color -ruN gcc-9.3.0/gcc/config/sh/sh-c.c gcc-9.3.0-kos/gcc/config/sh/sh-c.c ---- gcc-9.3.0/gcc/config/sh/sh-c.c 2023-01-02 13:49:34.172435526 -0600 -+++ gcc-9.3.0-kos/gcc/config/sh/sh-c.c 2023-01-02 13:53:48.671801287 -0600 +--- gcc-9.3.0/gcc/config/sh/sh-c.c 2020-03-12 06:07:21.000000000 -0500 ++++ gcc-9.3.0-kos/gcc/config/sh/sh-c.c 2023-04-29 12:41:28.765379932 -0500 @@ -141,4 +141,11 @@ cpp_define_formatted (pfile, "__SH_ATOMIC_MODEL_%s__", @@ -14,8 +14,8 @@ diff --color -ruN gcc-9.3.0/gcc/config/sh/sh-c.c gcc-9.3.0-kos/gcc/config/sh/sh- + builtin_define ("__KOS_GCC_32MB__"); } diff --color -ruN gcc-9.3.0/gcc/configure gcc-9.3.0-kos/gcc/configure ---- gcc-9.3.0/gcc/configure 2023-01-02 13:49:36.017438178 -0600 -+++ gcc-9.3.0-kos/gcc/configure 2023-01-02 13:51:59.907644974 -0600 +--- gcc-9.3.0/gcc/configure 2020-03-12 06:08:30.000000000 -0500 ++++ gcc-9.3.0-kos/gcc/configure 2023-04-29 12:41:28.769379957 -0500 @@ -11862,7 +11862,7 @@ target_thread_file='single' ;; @@ -26,9 +26,9 @@ diff --color -ruN gcc-9.3.0/gcc/configure gcc-9.3.0-kos/gcc/configure ;; *) diff --color -ruN gcc-9.3.0/libgcc/config/sh/crt1.S gcc-9.3.0-kos/libgcc/config/sh/crt1.S ---- gcc-9.3.0/libgcc/config/sh/crt1.S 2023-01-02 13:49:33.499434559 -0600 -+++ gcc-9.3.0-kos/libgcc/config/sh/crt1.S 2023-01-02 13:52:08.879657868 -0600 -@@ -1,724 +1,225 @@ +--- gcc-9.3.0/libgcc/config/sh/crt1.S 2020-03-12 06:07:23.000000000 -0500 ++++ gcc-9.3.0-kos/libgcc/config/sh/crt1.S 2023-04-29 12:41:39.015442403 -0500 +@@ -1,724 +1,230 @@ -/* Copyright (C) 2000-2019 Free Software Foundation, Inc. - This file was pretty much copied from newlib. +! KallistiOS ##version## @@ -431,6 +431,9 @@ diff --color -ruN gcc-9.3.0/libgcc/config/sh/crt1.S gcc-9.3.0-kos/libgcc/config/ + ! Program can return here (not likely) or jump here directly + ! from anywhere in it to go straight back to the monitor +_arch_real_exit: ++ ! Save exit code parameter to r8 ++ mov r4, r8 ++ + ! Reset SR + mov.l old_sr,r0 + ldc r0,sr @@ -722,6 +725,8 @@ diff --color -ruN gcc-9.3.0/libgcc/config/sh/crt1.S gcc-9.3.0-kos/libgcc/config/ - mov r14,r15 - mov.l @r15+,r14 - rts ++ ! Move saved exit code to be used as exit syscall parameter ++ mov r8, r5 + jsr @r0 + mov #15,r4 + @@ -963,7 +968,7 @@ diff --color -ruN gcc-9.3.0/libgcc/config/sh/crt1.S gcc-9.3.0-kos/libgcc/config/ + .word 0x092d diff --color -ruN gcc-9.3.0/libgcc/config/sh/fake-kos.S gcc-9.3.0-kos/libgcc/config/sh/fake-kos.S --- gcc-9.3.0/libgcc/config/sh/fake-kos.S 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-9.3.0-kos/libgcc/config/sh/fake-kos.S 2023-01-02 13:51:59.907644974 -0600 ++++ gcc-9.3.0-kos/libgcc/config/sh/fake-kos.S 2023-04-29 12:41:28.769379957 -0500 @@ -0,0 +1,78 @@ +! Weakly linked symbols used to get GCC to hopefully compile itself properly. +! These will be replaced by the real symbols in actual compiled programs. @@ -1045,7 +1050,7 @@ diff --color -ruN gcc-9.3.0/libgcc/config/sh/fake-kos.S gcc-9.3.0-kos/libgcc/con + mov #-1, r0 diff --color -ruN gcc-9.3.0/libgcc/config/sh/gthr-kos.h gcc-9.3.0-kos/libgcc/config/sh/gthr-kos.h --- gcc-9.3.0/libgcc/config/sh/gthr-kos.h 1969-12-31 18:00:00.000000000 -0600 -+++ gcc-9.3.0-kos/libgcc/config/sh/gthr-kos.h 2023-01-02 13:51:59.907644974 -0600 ++++ gcc-9.3.0-kos/libgcc/config/sh/gthr-kos.h 2023-04-29 12:41:28.769379957 -0500 @@ -0,0 +1,401 @@ +/* Copyright (C) 2009, 2010, 2011, 2012, 2020 Lawrence Sebald */ + @@ -1449,8 +1454,8 @@ diff --color -ruN gcc-9.3.0/libgcc/config/sh/gthr-kos.h gcc-9.3.0-kos/libgcc/con + +#endif /* ! GCC_GTHR_KOS_H */ diff --color -ruN gcc-9.3.0/libgcc/config/sh/t-sh gcc-9.3.0-kos/libgcc/config/sh/t-sh ---- gcc-9.3.0/libgcc/config/sh/t-sh 2023-01-02 13:49:33.500434561 -0600 -+++ gcc-9.3.0-kos/libgcc/config/sh/t-sh 2023-01-02 13:51:59.907644974 -0600 +--- gcc-9.3.0/libgcc/config/sh/t-sh 2020-03-12 06:07:23.000000000 -0500 ++++ gcc-9.3.0-kos/libgcc/config/sh/t-sh 2023-04-29 12:41:28.769379957 -0500 @@ -23,6 +23,8 @@ $(LIB1ASMFUNCS_CACHE) LIB1ASMFUNCS_CACHE = _ic_invalidate _ic_invalidate_array @@ -1461,8 +1466,8 @@ diff --color -ruN gcc-9.3.0/libgcc/config/sh/t-sh gcc-9.3.0-kos/libgcc/config/sh $(gcc_compile) -c $< diff --color -ruN gcc-9.3.0/libgcc/configure gcc-9.3.0-kos/libgcc/configure ---- gcc-9.3.0/libgcc/configure 2023-01-02 13:49:33.533434608 -0600 -+++ gcc-9.3.0-kos/libgcc/configure 2023-01-02 13:51:59.908644975 -0600 +--- gcc-9.3.0/libgcc/configure 2020-03-12 06:07:23.000000000 -0500 ++++ gcc-9.3.0-kos/libgcc/configure 2023-04-29 12:41:28.770379963 -0500 @@ -5550,6 +5550,7 @@ tpf) thread_header=config/s390/gthr-tpf.h ;; vxworks) thread_header=config/gthr-vxworks.h ;; @@ -1472,8 +1477,8 @@ diff --color -ruN gcc-9.3.0/libgcc/configure gcc-9.3.0-kos/libgcc/configure diff --color -ruN gcc-9.3.0/libstdc++-v3/config/cpu/sh/atomicity.h gcc-9.3.0-kos/libstdc++-v3/config/cpu/sh/atomicity.h ---- gcc-9.3.0/libstdc++-v3/config/cpu/sh/atomicity.h 2023-01-02 13:49:33.731434893 -0600 -+++ gcc-9.3.0-kos/libstdc++-v3/config/cpu/sh/atomicity.h 2023-01-02 13:51:59.915644985 -0600 +--- gcc-9.3.0/libstdc++-v3/config/cpu/sh/atomicity.h 2020-03-12 06:07:24.000000000 -0500 ++++ gcc-9.3.0-kos/libstdc++-v3/config/cpu/sh/atomicity.h 2023-04-29 12:41:28.770379963 -0500 @@ -22,14 +22,40 @@ // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see // <http://www.gnu.org/licenses/>. @@ -1525,8 +1530,8 @@ diff --color -ruN gcc-9.3.0/libstdc++-v3/config/cpu/sh/atomicity.h gcc-9.3.0-kos +_GLIBCXX_END_NAMESPACE_VERSION +} // namespace diff --color -ruN gcc-9.3.0/libstdc++-v3/configure gcc-9.3.0-kos/libstdc++-v3/configure ---- gcc-9.3.0/libstdc++-v3/configure 2023-01-02 13:49:34.054435357 -0600 -+++ gcc-9.3.0-kos/libstdc++-v3/configure 2023-01-02 13:51:59.918644989 -0600 +--- gcc-9.3.0/libstdc++-v3/configure 2020-03-12 06:07:24.000000000 -0500 ++++ gcc-9.3.0-kos/libstdc++-v3/configure 2023-04-29 12:41:28.778380012 -0500 @@ -15629,6 +15629,7 @@ tpf) thread_header=config/s390/gthr-tpf.h ;; vxworks) thread_header=config/gthr-vxworks.h ;; hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: ljsebald <ljs...@us...> - 2023-04-30 20:46:36
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via e0f308d1ce1219306aa7d5fa83295aaf27ef16d1 (commit) via d43edb3c9176ffad56611653e66dbfeeb3136940 (commit) via 3bae131488278d97dcbc8333c2ad2d9d73dba3b3 (commit) via 6aa6b5411be8c47ccf7168f1c09a1e5163386aa4 (commit) via d4a3a198c624dc069d36bfe21a3a60e04c6a7ea5 (commit) via 6d409295a070b6d0c35d723d69f0232c718583b4 (commit) via cd8fc5b41b63d27f942c99ad8d1ef090ab1a9f5e (commit) via 08b65bc8830ec588356b698d7fbd9b0c565ea579 (commit) from a83e96263e7b105266eeb1ba728bf79f9959f72a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit e0f308d1ce1219306aa7d5fa83295aaf27ef16d1 Merge: a83e962 d43edb3 Author: Lawrence Sebald <ljs...@us...> Date: Sun Apr 30 16:45:59 2023 -0400 Merge pull request #168 from KallistiOS/enter_the_void Ensure (void) instead of () for argument-less function declarations commit d43edb3c9176ffad56611653e66dbfeeb3136940 Author: quzar <qu...@co...> Date: Sun Apr 30 14:15:41 2023 -0400 Replace attribute unused for (void)param commit 3bae131488278d97dcbc8333c2ad2d9d73dba3b3 Merge: 6aa6b54 a83e962 Author: quzar <qu...@co...> Date: Sun Apr 30 02:53:05 2023 -0400 Merge branch 'master' of https://github.com/KallistiOS/KallistiOS into enter_the_void commit 6aa6b5411be8c47ccf7168f1c09a1e5163386aa4 Author: quzar <qu...@co...> Date: Fri Apr 28 11:15:18 2023 -0400 Correcting last warning created by these updated argument lists commit d4a3a198c624dc069d36bfe21a3a60e04c6a7ea5 Author: quzar <qu...@co...> Date: Fri Apr 28 11:10:26 2023 -0400 Flagging arguments as unused in these stub functions to avoid warnings commit 6d409295a070b6d0c35d723d69f0232c718583b4 Author: quzar <qu...@co...> Date: Fri Apr 28 02:59:25 2023 -0400 Had set these aside and forgot to commit them commit cd8fc5b41b63d27f942c99ad8d1ef090ab1a9f5e Author: quzar <qu...@co...> Date: Fri Apr 28 01:01:14 2023 -0400 void all around the rest of the codebase, fixing some related issues commit 08b65bc8830ec588356b698d7fbd9b0c565ea579 Author: quzar <qu...@co...> Date: Thu Apr 27 22:30:20 2023 -0400 Ensuring no functions have empty declarations ----------------------------------------------------------------------- Summary of changes: include/kos/dbgio.h | 22 +++++----- include/kos/exports.h | 2 +- include/kos/fs.h | 6 +-- include/kos/fs_dev.h | 4 +- include/kos/fs_ramdisk.h | 4 +- include/kos/fs_romdisk.h | 4 +- include/kos/genwait.h | 6 +-- include/kos/library.h | 8 ++-- include/kos/mutex.h | 2 +- include/kos/nmmgr.h | 6 +-- include/kos/recursive_lock.h | 2 +- include/kos/rwsem.h | 2 +- include/kos/thread.h | 8 ++-- include/kos/tls.h | 6 +-- include/malloc.h | 6 +-- kernel/arch/dreamcast/fs/fs_dcload.c | 13 +++--- kernel/arch/dreamcast/fs/fs_dclsocket.c | 16 +++---- kernel/arch/dreamcast/fs/fs_iso9660.c | 16 +++---- kernel/arch/dreamcast/fs/fs_vmu.c | 4 +- kernel/arch/dreamcast/fs/vmufs.c | 8 ++-- kernel/arch/dreamcast/hardware/asic.c | 10 ++--- kernel/arch/dreamcast/hardware/biosfont.c | 2 +- kernel/arch/dreamcast/hardware/cdrom.c | 20 ++++----- kernel/arch/dreamcast/hardware/flashrom.c | 2 +- kernel/arch/dreamcast/hardware/g2bus.c | 2 +- kernel/arch/dreamcast/hardware/hardware.c | 6 +-- kernel/arch/dreamcast/hardware/maple/controller.c | 4 +- kernel/arch/dreamcast/hardware/maple/dreameye.c | 4 +- kernel/arch/dreamcast/hardware/maple/keyboard.c | 6 +-- kernel/arch/dreamcast/hardware/maple/maple_enum.c | 2 +- .../dreamcast/hardware/maple/maple_init_shutdown.c | 10 ++--- kernel/arch/dreamcast/hardware/maple/maple_irq.c | 4 +- kernel/arch/dreamcast/hardware/maple/maple_queue.c | 2 +- kernel/arch/dreamcast/hardware/maple/maple_utils.c | 10 ++--- kernel/arch/dreamcast/hardware/maple/mouse.c | 4 +- kernel/arch/dreamcast/hardware/maple/purupuru.c | 4 +- kernel/arch/dreamcast/hardware/maple/sip.c | 4 +- kernel/arch/dreamcast/hardware/maple/vmu.c | 4 +- .../dreamcast/hardware/network/broadband_adapter.c | 28 ++++++------ .../arch/dreamcast/hardware/network/lan_adapter.c | 22 +++++----- kernel/arch/dreamcast/hardware/pvr/pvr_dma.c | 6 +-- .../dreamcast/hardware/pvr/pvr_init_shutdown.c | 4 +- kernel/arch/dreamcast/hardware/pvr/pvr_internal.h | 6 +-- kernel/arch/dreamcast/hardware/pvr/pvr_mem.c | 10 ++--- kernel/arch/dreamcast/hardware/pvr/pvr_mem_core.c | 12 +++--- kernel/arch/dreamcast/hardware/pvr/pvr_misc.c | 10 ++--- kernel/arch/dreamcast/hardware/pvr/pvr_scene.c | 10 ++--- kernel/arch/dreamcast/hardware/scif.c | 20 ++++----- kernel/arch/dreamcast/hardware/spu.c | 12 +++--- kernel/arch/dreamcast/hardware/spudma.c | 4 +- kernel/arch/dreamcast/hardware/vblank.c | 4 +- kernel/arch/dreamcast/include/arch/arch.h | 12 +++--- kernel/arch/dreamcast/include/arch/gdb.h | 4 +- kernel/arch/dreamcast/include/arch/irq.h | 16 +++---- kernel/arch/dreamcast/include/arch/mmu.h | 8 ++-- kernel/arch/dreamcast/include/arch/timer.h | 18 ++++---- kernel/arch/dreamcast/include/dc/asic.h | 6 +-- kernel/arch/dreamcast/include/dc/cdrom.h | 12 +++--- kernel/arch/dreamcast/include/dc/flashrom.h | 2 +- kernel/arch/dreamcast/include/dc/fs_dcload.h | 8 ++-- kernel/arch/dreamcast/include/dc/fs_dclsocket.h | 6 +-- kernel/arch/dreamcast/include/dc/fs_iso9660.h | 6 +-- kernel/arch/dreamcast/include/dc/fs_vmu.h | 4 +- kernel/arch/dreamcast/include/dc/g2bus.h | 2 +- kernel/arch/dreamcast/include/dc/maple.h | 20 ++++----- .../arch/dreamcast/include/dc/maple/controller.h | 4 +- kernel/arch/dreamcast/include/dc/maple/dreameye.h | 4 +- kernel/arch/dreamcast/include/dc/maple/keyboard.h | 4 +- kernel/arch/dreamcast/include/dc/maple/mouse.h | 4 +- kernel/arch/dreamcast/include/dc/maple/purupuru.h | 4 +- kernel/arch/dreamcast/include/dc/maple/sip.h | 4 +- kernel/arch/dreamcast/include/dc/maple/vmu.h | 4 +- kernel/arch/dreamcast/include/dc/matrix.h | 2 +- .../dreamcast/include/dc/net/broadband_adapter.h | 4 +- kernel/arch/dreamcast/include/dc/net/lan_adapter.h | 4 +- kernel/arch/dreamcast/include/dc/pvr.h | 26 ++++++------ kernel/arch/dreamcast/include/dc/scif.h | 10 ++--- kernel/arch/dreamcast/include/dc/sound/sfxmgr.h | 6 +-- kernel/arch/dreamcast/include/dc/sound/sound.h | 14 +++--- kernel/arch/dreamcast/include/dc/sound/stream.h | 4 +- kernel/arch/dreamcast/include/dc/spu.h | 16 +++---- kernel/arch/dreamcast/include/dc/ubc.h | 4 +- kernel/arch/dreamcast/include/dc/vblank.h | 4 +- kernel/arch/dreamcast/include/dc/vmufs.h | 8 ++-- kernel/arch/dreamcast/kernel/gdb_stub.c | 47 +++++++-------------- kernel/arch/dreamcast/kernel/init.c | 6 +-- kernel/arch/dreamcast/kernel/irq.c | 12 +++--- kernel/arch/dreamcast/kernel/mm.c | 2 +- kernel/arch/dreamcast/kernel/mmu.c | 10 ++--- kernel/arch/dreamcast/kernel/ser_console.c | 6 +-- kernel/arch/dreamcast/kernel/timer.c | 22 +++++----- kernel/arch/dreamcast/sound/arm/aica.c | 2 +- kernel/arch/dreamcast/sound/arm/aica.h | 2 +- kernel/arch/dreamcast/sound/arm/main.c | 4 +- kernel/arch/dreamcast/sound/arm/stream.drv | Bin 3332 -> 3244 bytes kernel/arch/dreamcast/sound/snd_iface.c | 10 ++--- kernel/arch/dreamcast/sound/snd_mem.c | 4 +- kernel/arch/dreamcast/sound/snd_sfxmgr.c | 6 +-- kernel/arch/dreamcast/sound/snd_stream.c | 4 +- kernel/arch/dreamcast/util/fb_console.c | 10 ++--- kernel/arch/dreamcast/util/fb_console_naomi.c | 10 ++--- kernel/debug/dbgio.c | 22 +++++----- kernel/exports/exports.c | 2 +- kernel/exports/library.c | 6 +-- kernel/exports/nmmgr.c | 6 +-- kernel/fs/fs.c | 10 ++--- kernel/fs/fs_dev.c | 4 +- kernel/fs/fs_pty.c | 6 +-- kernel/fs/fs_ramdisk.c | 4 +- kernel/fs/fs_romdisk.c | 4 +- kernel/libc/koslib/abort.c | 2 +- kernel/libc/koslib/malloc.c | 16 +++---- kernel/libc/koslib/scandir.c | 12 +++++- kernel/libc/koslib/seekdir.c | 7 ++- kernel/libc/koslib/telldir.c | 6 ++- kernel/mm/malloc_debug.c | 2 +- kernel/net/net_dhcp.c | 4 +- kernel/net/net_ipv4_frag.c | 4 +- kernel/net/net_thd.c | 4 +- kernel/thread/cond.c | 2 +- kernel/thread/genwait.c | 8 ++-- kernel/thread/mutex.c | 2 +- kernel/thread/recursive_lock.c | 2 +- kernel/thread/rwsem.c | 2 +- kernel/thread/thread.c | 10 ++--- kernel/thread/tls.c | 6 +-- 126 files changed, 481 insertions(+), 476 deletions(-) diff --git a/include/kos/dbgio.h b/include/kos/dbgio.h index 4c116eb..b226847 100644 --- a/include/kos/dbgio.h +++ b/include/kos/dbgio.h @@ -42,19 +42,19 @@ typedef struct dbgio_handler { \retval 1 If the device is available and useable \retval 0 If the device is unavailable */ - int (*detected)(); + int (*detected)(void); /** \brief Initialize this debug interface with default parameters. \retval 0 On success \retval -1 On failure */ - int (*init)(); + int (*init)(void); /** \brief Shutdown this debug interface. \retval 0 On success \retval -1 On failure */ - int (*shutdown)(); + int (*shutdown)(void); /** \brief Set either polled or IRQ usage for this interface. \param mode 1 for IRQ-based usage, 0 for polled I/O @@ -67,7 +67,7 @@ typedef struct dbgio_handler { \retval 0 On success \retval -1 On failure (set errno as appropriate) */ - int (*read)(); + int (*read)(void); /** \brief Write one character to the console. \param c The character to write @@ -82,7 +82,7 @@ typedef struct dbgio_handler { \retval 0 On success \retval -1 On error (set errno as appropriate) */ - int (*flush)(); + int (*flush)(void); /** \brief Write an entire buffer of data to the console. \param data The buffer to write @@ -129,7 +129,7 @@ int dbgio_dev_select(const char * name); \return The name of the current dbgio interface (or NULL if no device is selected) */ -const char * dbgio_dev_get(); +const char * dbgio_dev_get(void); /** \brief Initialize the dbgio console. @@ -141,7 +141,7 @@ const char * dbgio_dev_get(); \par Error Conditions: \em ENODEV - No devices could be detected/initialized */ -int dbgio_init(); +int dbgio_init(void); /** \brief Set IRQ usage. @@ -168,7 +168,7 @@ int dbgio_set_irq_usage(int mode); \retval 0 On success \retval -1 On error (errno should be set as appropriate) */ -int dbgio_read(); +int dbgio_read(void); /** \brief Write one character to the console. \param c The character to write @@ -183,7 +183,7 @@ int dbgio_write(int c); \retval 0 On success \retval -1 On error (errno should be set as appropriate) */ -int dbgio_flush(); +int dbgio_flush(void); /** \brief Write an entire buffer of data to the console. \param data The buffer to write @@ -218,10 +218,10 @@ int dbgio_write_buffer_xlat(const uint8 *data, int len); int dbgio_write_str(const char *str); /** \brief Disable debug I/O globally. */ -void dbgio_disable(); +void dbgio_disable(void); /** \brief Enable debug I/O globally. */ -void dbgio_enable(); +void dbgio_enable(void); /** \brief Built-in debug I/O printf function. \param fmt A printf() style format string diff --git a/include/kos/exports.h b/include/kos/exports.h index bfdc21d..f5f816a 100644 --- a/include/kos/exports.h +++ b/include/kos/exports.h @@ -59,7 +59,7 @@ typedef struct symtab_handler { \retval 0 On success \retval -1 On error */ -int export_init(); +int export_init(void); /** \brief Look up a symbol by name. \param name The symbol to look up diff --git a/include/kos/fs.h b/include/kos/fs.h index b83aed1..b8700fd 100644 --- a/include/kos/fs.h +++ b/include/kos/fs.h @@ -645,7 +645,7 @@ void *fs_get_handle(file_t fd); /** \brief Get the current working directory of the running thread. \return The current working directory. */ -const char *fs_getwd(); +const char *fs_getwd(void); /* Couple of util functions */ @@ -700,14 +700,14 @@ ssize_t fs_path_append(char *dst, const char *src, size_t len); \retval 0 On success. */ -int fs_init(); +int fs_init(void); /** \brief Shut down the virtual filesystem. This is done for you by the normal shutdown procedure of KOS. There should not really be any reason for you to call this function yourself. */ -void fs_shutdown(); +void fs_shutdown(void); __END_DECLS diff --git a/include/kos/fs_dev.h b/include/kos/fs_dev.h index effbe8f..5c2d505 100644 --- a/include/kos/fs_dev.h +++ b/include/kos/fs_dev.h @@ -31,8 +31,8 @@ __BEGIN_DECLS /* \cond */ /* Initialization */ -int fs_dev_init(); -int fs_dev_shutdown(); +int fs_dev_init(void); +int fs_dev_shutdown(void); /* \endcond */ __END_DECLS diff --git a/include/kos/fs_ramdisk.h b/include/kos/fs_ramdisk.h index 7da5449..cd68699 100644 --- a/include/kos/fs_ramdisk.h +++ b/include/kos/fs_ramdisk.h @@ -30,8 +30,8 @@ __BEGIN_DECLS #include <kos/fs.h> /** \cond */ -int fs_ramdisk_init(); -int fs_ramdisk_shutdown(); +int fs_ramdisk_init(void); +int fs_ramdisk_shutdown(void); /** \endcond */ /** \brief Attach a block of memory as a file in the ramdisk. diff --git a/include/kos/fs_romdisk.h b/include/kos/fs_romdisk.h index ba5c84e..fd586e2 100644 --- a/include/kos/fs_romdisk.h +++ b/include/kos/fs_romdisk.h @@ -33,10 +33,10 @@ __BEGIN_DECLS /** \cond */ /* Initialize the file system */ -int fs_romdisk_init(); +int fs_romdisk_init(void); /* De-init the file system; also unmounts any mounted images. */ -int fs_romdisk_shutdown(); +int fs_romdisk_shutdown(void); /** \endcond */ /* NOTE: the mount/unmount are _not_ thread safe as regards doing multiple diff --git a/include/kos/genwait.h b/include/kos/genwait.h index 69482c7..720f0d7 100644 --- a/include/kos/genwait.h +++ b/include/kos/genwait.h @@ -142,14 +142,14 @@ void genwait_check_timeouts(uint64 now); \return The next timeout time in milliseconds since boot, or 0 if there are no pending genwait_wait() calls */ -uint64 genwait_next_timeout(); +uint64 genwait_next_timeout(void); /** \cond */ /* Initialize the genwait system */ -int genwait_init(); +int genwait_init(void); /* Shut down the genwait system */ -void genwait_shutdown(); +void genwait_shutdown(void); /** \endcond */ diff --git a/include/kos/library.h b/include/kos/library.h index 1c2eb5e..3e4efba 100644 --- a/include/kos/library.h +++ b/include/kos/library.h @@ -98,7 +98,7 @@ typedef struct klibrary { \return The library's symbolic name */ - const char * (*lib_get_name)(); + const char * (*lib_get_name)(void); /** \brief Retrieve the library's version. @@ -108,7 +108,7 @@ typedef struct klibrary { \return The library's version number */ - uint32(*lib_get_version)(); + uint32(*lib_get_version)(void); /** \brief Open a library. @@ -263,10 +263,10 @@ uint32 library_get_version(klibrary_t * lib); /** \cond */ /* Init */ -int library_init(); +int library_init(void); /* Shutdown */ -void library_shutdown(); +void library_shutdown(void); /** \endcond */ __END_DECLS diff --git a/include/kos/mutex.h b/include/kos/mutex.h index 50f5ca5..088f894 100644 --- a/include/kos/mutex.h +++ b/include/kos/mutex.h @@ -107,7 +107,7 @@ typedef struct kos_mutex { be used in any future code, and may be removed in the future. You should instead use mutex_init(). */ -mutex_t *mutex_create() __depr("Use mutex_init or an initializer."); +mutex_t *mutex_create(void) __depr("Use mutex_init or an initializer."); /** \brief Initialize a new mutex. diff --git a/include/kos/nmmgr.h b/include/kos/nmmgr.h index 7d65e9f..2a93922 100644 --- a/include/kos/nmmgr.h +++ b/include/kos/nmmgr.h @@ -104,7 +104,7 @@ nmmgr_handler_t * nmmgr_lookup(const char *name); \return The head of the name handler list */ -nmmgr_list_t * nmmgr_get_list(); +nmmgr_list_t * nmmgr_get_list(void); /** \brief Add a name handler. @@ -127,8 +127,8 @@ int nmmgr_handler_remove(nmmgr_handler_t *hnd); /** \cond */ /* Name manager init */ -int nmmgr_init(); -void nmmgr_shutdown(); +int nmmgr_init(void); +void nmmgr_shutdown(void); /** \endcond */ __END_DECLS diff --git a/include/kos/recursive_lock.h b/include/kos/recursive_lock.h index f7aa8f7..e22d982 100644 --- a/include/kos/recursive_lock.h +++ b/include/kos/recursive_lock.h @@ -45,7 +45,7 @@ typedef mutex_t recursive_lock_t; \return The created lock, or NULL on failure (errno will be set to ENOMEM to indicate that the system appears to be out of memory). */ -recursive_lock_t *rlock_create() __depr("Use mutexes instead."); +recursive_lock_t *rlock_create(void) __depr("Use mutexes instead."); /** \brief Destroy a recursive lock. diff --git a/include/kos/rwsem.h b/include/kos/rwsem.h index b01621b..dea6925 100644 --- a/include/kos/rwsem.h +++ b/include/kos/rwsem.h @@ -70,7 +70,7 @@ typedef struct rw_semaphore { \par Error Conditions: \em ENOMEM - out of memory */ -rw_semaphore_t *rwsem_create() __depr("Use rwsem_init or RWSEM_INITIALIZER."); +rw_semaphore_t *rwsem_create(void) __depr("Use rwsem_init or RWSEM_INITIALIZER."); /** \brief Initialize a reader/writer semaphore. diff --git a/include/kos/thread.h b/include/kos/thread.h index bbcc61f..cc81e64 100644 --- a/include/kos/thread.h +++ b/include/kos/thread.h @@ -269,7 +269,7 @@ int thd_block_now(irq_context_t * mycxt); \return The IRQ context of the thread selected. */ -irq_context_t * thd_choose_new(); +irq_context_t * thd_choose_new(void); /** \brief Given a thread ID, locates the thread structure. \param tid The thread ID to retrieve. @@ -387,7 +387,7 @@ void thd_schedule_next(kthread_t *thd); This function manually yields the current thread's timeslice to the system, forcing a reschedule to occur. */ -void thd_pass(); +void thd_pass(void); /** \brief Sleep for a given number of milliseconds. @@ -417,7 +417,7 @@ int thd_set_prio(kthread_t *thd, prio_t prio); /** \brief Retrieve the current thread's kthread struct. \return The current thread's structure. */ -kthread_t *thd_get_current(); +kthread_t *thd_get_current(void); /** \brief Retrieve the thread's label. \param thd The thread to retrieve from. @@ -572,7 +572,7 @@ int thd_init(int mode); This is done for you by the normal shutdown procedure of KOS. This will also shutdown all the various synchronization primitives. */ -void thd_shutdown(); +void thd_shutdown(void); __END_DECLS diff --git a/include/kos/tls.h b/include/kos/tls.h index cf06476..8203df1 100644 --- a/include/kos/tls.h +++ b/include/kos/tls.h @@ -57,7 +57,7 @@ LIST_HEAD(kthread_tls_kv_list, kthread_tls_kv); /* Retrieve the next key value (i.e, what key the next kthread_key_create will use). This function is not meant for external use (although it won't really hurt anything for you to call it). */ -kthread_key_t kthread_key_next(); +kthread_key_t kthread_key_next(void); /** \endcond */ /** \brief Create a new thread-local storage key. @@ -122,8 +122,8 @@ int kthread_key_delete(kthread_key_t key); void kthread_key_delete_destructor(kthread_key_t key); /* Initialization and shutdown. Once again, internal use only. */ -int kthread_tls_init(); -void kthread_tls_shutdown(); +int kthread_tls_init(void); +void kthread_tls_shutdown(void); /** \endcond */ __END_DECLS diff --git a/include/malloc.h b/include/malloc.h index 98a6ff3..a40d0ea 100644 --- a/include/malloc.h +++ b/include/malloc.h @@ -212,7 +212,7 @@ int mallopt(int, int); /** \brief Debug function */ -void malloc_stats(); +void malloc_stats(void); /** \brief Determine if it is safe to call malloc() in an IRQ context. @@ -224,7 +224,7 @@ void malloc_stats(); \retval 1 If it is safe to call malloc() in the current IRQ. \retval 0 Otherwise. ...<truncated>... hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: darcagn <da...@us...> - 2023-04-28 21:02:48
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via a83e96263e7b105266eeb1ba728bf79f9959f72a (commit) via 6e9cbbc6111e5e4a651e234d8de45c9baa5b57a7 (commit) via 935a98aa7b79e79223535c2315aa71116ef2d19c (commit) via d6bc1d0cc21d39443d80e49d2e80b4a45fb5651a (commit) via 0642766c0278f98760c9c9848f8ec298ec03ea91 (commit) via d9ec73628f6efe63cf83701ec758c8737c9fb181 (commit) via b5af5f44c2e1e56a271577a8dc69fdbc67e43057 (commit) via f1fda77ef1de02915bba73229b90e32d5d5ba8fe (commit) from da96be23126fe46b384d19e33b677c9d55e0b3e3 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit a83e96263e7b105266eeb1ba728bf79f9959f72a Merge: 935a98a 6e9cbbc Author: darcagn <da...@pr...> Date: Fri Apr 28 16:00:51 2023 -0500 Merge pull request #169 from KallistiOS/rtc_4.7_quickfix Fixed missing header from rtc.c commit 6e9cbbc6111e5e4a651e234d8de45c9baa5b57a7 Author: Falco Girgis <gyr...@gm...> Date: Fri Apr 28 16:54:32 2023 -0400 Fixed missing header from rtc.c - stdint.h was missing, but it only manifested on GCC-4.7.4. commit 935a98aa7b79e79223535c2315aa71116ef2d19c Merge: da96be2 d6bc1d0 Author: Lawrence Sebald <ljs...@us...> Date: Thu Apr 27 22:10:08 2023 -0400 Merge pull request #40 from Dreamcast-Projects/controller_cbs Controller Attach/Detach Callbacks commit d6bc1d0cc21d39443d80e49d2e80b4a45fb5651a Merge: 0642766 51dbc8f Author: Andress Barajas <and...@gm...> Date: Wed Apr 5 20:20:11 2023 -0700 Merge branch 'KallistiOS:master' into controller_cbs commit 0642766c0278f98760c9c9848f8ec298ec03ea91 Merge: d9ec736 4084632 Author: Andress Barajas <and...@gm...> Date: Mon Feb 27 08:02:32 2023 -0800 Merge branch 'KallistiOS:master' into controller_cbs commit d9ec73628f6efe63cf83701ec758c8737c9fb181 Merge: b5af5f4 205e8af Author: Andress Barajas <and...@gm...> Date: Thu Jan 5 22:07:58 2023 -0800 Merge branch 'KallistiOS:master' into controller_cbs commit b5af5f44c2e1e56a271577a8dc69fdbc67e43057 Author: Andress Barajas <and...@gm...> Date: Mon Jun 29 23:39:42 2020 -0700 Missed newline at end of file commit f1fda77ef1de02915bba73229b90e32d5d5ba8fe Author: Andress Barajas <and...@gm...> Date: Mon Jun 29 23:36:21 2020 -0700 Added maple attach/detach callbacks ----------------------------------------------------------------------- Summary of changes: .../arch/dreamcast/hardware/maple/maple_driver.c | 28 +++++++++++++++ kernel/arch/dreamcast/include/dc/maple.h | 40 +++++++++++++++++++++- kernel/arch/dreamcast/kernel/rtc.c | 1 + 3 files changed, 68 insertions(+), 1 deletion(-) diff --git a/kernel/arch/dreamcast/hardware/maple/maple_driver.c b/kernel/arch/dreamcast/hardware/maple/maple_driver.c index 398d910..4bb4406 100644 --- a/kernel/arch/dreamcast/hardware/maple/maple_driver.c +++ b/kernel/arch/dreamcast/hardware/maple/maple_driver.c @@ -8,6 +8,22 @@ #include <stdlib.h> #include <dc/maple.h> +static maple_attach_callback_t attach_callback = NULL; +static uint32 attach_callback_functions = 0; + +static maple_detach_callback_t detach_callback = NULL; +static uint32 detach_callback_functions = 0; + +void maple_attach_callback(uint32 functions, maple_attach_callback_t cb) { + attach_callback_functions = functions; + attach_callback = cb; +} + +void maple_detach_callback(uint32 functions, maple_detach_callback_t cb) { + detach_callback_functions = functions; + detach_callback = cb; +} + /* Register a maple device driver; do this before maple_init() */ int maple_driver_reg(maple_driver_t *driver) { /* Insert it into the device list */ @@ -63,6 +79,12 @@ int maple_driver_attach(maple_frame_t *det) { dev->status_valid = 0; dev->valid = 1; + if(!(attach_callback_functions) || (dev->info.functions & attach_callback_functions)) { + if(attach_callback) { + attach_callback(dev); + } + } + return 0; } @@ -81,6 +103,12 @@ int maple_driver_detach(int p, int u) { dev->valid = 0; dev->status_valid = 0; + if(!(detach_callback_functions) || (dev->info.functions & detach_callback_functions)) { + if(detach_callback) { + detach_callback(dev); + } + } + return 0; } diff --git a/kernel/arch/dreamcast/include/dc/maple.h b/kernel/arch/dreamcast/include/dc/maple.h index 8e1ddfc..45e99f4 100644 --- a/kernel/arch/dreamcast/include/dc/maple.h +++ b/kernel/arch/dreamcast/include/dc/maple.h @@ -262,7 +262,7 @@ typedef struct maple_device { /** \brief Internal representation of a Maple port. - each maple port can contain up to 6 devices, the first one of which is + Each maple port can contain up to 6 devices, the first one of which is always the port itself. \headerfile dc/maple.h @@ -637,6 +637,44 @@ int maple_driver_detach(int p, int u); */ int maple_driver_foreach(maple_driver_t *drv, int (*callback)(maple_device_t *)); +/** \brief Maple attach callback type. + + Functions of this type can be set with maple_attach_callback() to respond + automatically to the attachment of a maple device that supports specified + functions. +*/ +typedef void (*maple_attach_callback_t)(maple_device_t *dev); + +/** \brief Set an automatic maple attach callback. + + This function sets a callback function to be called when the specified + maple device that supports functions has been attached. + + \param functions The functions maple device must support. Set to + 0 to support all maple devices. + \param cb The callback to call when the maple is attached. +*/ +void maple_attach_callback(uint32 functions, maple_attach_callback_t cb); + +/** \brief Maple detach callback type. + + Functions of this type can be set with maple_detach_callback() to respond + automatically to the detachment of a maple device that supports specified + functions. +*/ +typedef void (*maple_detach_callback_t)(maple_device_t *dev); + +/** \brief Set an automatic maple detach callback. + + This function sets a callback function to be called when the specified + maple device that supports functions has been detached. + + \param functions The functions maple device must support. Set to + 0 to support all maple devices. + \param cb The callback to call when the maple is detached. +*/ +void maple_detach_callback(uint32 functions, maple_detach_callback_t cb); + /**************************************************************************/ /* maple_irq.c */ diff --git a/kernel/arch/dreamcast/kernel/rtc.c b/kernel/arch/dreamcast/kernel/rtc.c index 75bd6e0..dd48747 100644 --- a/kernel/arch/dreamcast/kernel/rtc.c +++ b/kernel/arch/dreamcast/kernel/rtc.c @@ -27,6 +27,7 @@ #include <arch/rtc.h> #include <arch/timer.h> #include <dc/g2bus.h> +#include <stdint.h> #define RTC_UNIX_EPOCH_DELTA 631152000 /* Twenty years in seconds */ #define RTC_RETRY_COUNT 3 /* # of times to repeat on bad access */ hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: ljsebald <ljs...@us...> - 2023-04-28 01:42:49
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via da96be23126fe46b384d19e33b677c9d55e0b3e3 (commit) via eb8b8c45de47b3a4a3c43eee63067f636f97c172 (commit) via 912a068353ee69b16aa2f62a51ae8bec339eb384 (commit) via 07b665c06a191a28aec955d68ca50e354fdfe81b (commit) via cd95c2e8afafe319bb68c81c790b3ce1e16aba14 (commit) via c41e6f00d11ee6542a110c08278d2e48cccef695 (commit) via 456155013224068dec2345ac3a0683b040857a9f (commit) via 1f4a1316b286d73dce43f4be4ab089cf5a3d8586 (commit) via b208e0d416ae7cba8de2bc4a0aa11bbff85922e6 (commit) via 6ac19ff6b4abe20b01168f7832b530750f9711f0 (commit) via d56548a0739ec256716f92eb5fcb5a27dd3971e3 (commit) via af54e1ba71668cd0fe8ae8b2612f8f634d3f242a (commit) via b0f3864c2897efd073b1f7221382db037b68184a (commit) via e8e078c2463b31c0eed586dcde2421fdec8880a6 (commit) via 6ecc84a865f9e47cc3b8ae9ccbbce9359380463a (commit) from b82f0b383dd1fb6a88f81e2a3bb2c9e65201c855 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit da96be23126fe46b384d19e33b677c9d55e0b3e3 Merge: b82f0b3 eb8b8c4 Author: Lawrence Sebald <ljs...@us...> Date: Thu Apr 27 21:42:20 2023 -0400 Merge pull request #150 from KallistiOS/quzar_video_cleanup Cleanup of register access in video.c commit eb8b8c45de47b3a4a3c43eee63067f636f97c172 Merge: 912a068 b82f0b3 Author: Lawrence Sebald <ljs...@us...> Date: Thu Apr 27 21:41:47 2023 -0400 Merge branch 'master' into quzar_video_cleanup commit 912a068353ee69b16aa2f62a51ae8bec339eb384 Author: quzar <qu...@co...> Date: Thu Apr 27 15:23:32 2023 -0400 Provide spacing in pvr_regs group to better visualize gaps in the address space commit 07b665c06a191a28aec955d68ca50e354fdfe81b Author: quzar <qu...@co...> Date: Thu Apr 27 14:57:33 2023 -0400 Add changelog entry commit cd95c2e8afafe319bb68c81c790b3ce1e16aba14 Author: quzar <qu...@co...> Date: Wed Apr 26 09:21:07 2023 -0400 Correct typo'd reg name commit c41e6f00d11ee6542a110c08278d2e48cccef695 Author: quzar <qu...@co...> Date: Tue Apr 25 14:17:30 2023 -0400 Also envoidenate empty function arguments commit 456155013224068dec2345ac3a0683b040857a9f Author: root <ro...@DC...> Date: Sat Apr 22 11:41:37 2023 -0400 Fix incorrect typing on vid mode bpp commit 1f4a1316b286d73dce43f4be4ab089cf5a3d8586 Author: root <ro...@DC...> Date: Wed Apr 12 15:34:46 2023 -0400 Revert accidental stream.drv commit commit b208e0d416ae7cba8de2bc4a0aa11bbff85922e6 Author: quzar <qu...@co...> Date: Mon Apr 3 18:26:37 2023 -0400 Update the third pixel mode based on information from DC-SWAT commit 6ac19ff6b4abe20b01168f7832b530750f9711f0 Author: quzar <qu...@co...> Date: Mon Apr 3 02:47:38 2023 -0400 Undo mistaken change to filtering base in vid_set_start commit d56548a0739ec256716f92eb5fcb5a27dd3971e3 Author: quzar <qu...@co...> Date: Mon Apr 3 02:46:16 2023 -0400 Undo mistaken change to filtering base in vid_set_start commit af54e1ba71668cd0fe8ae8b2612f8f634d3f242a Author: quzar <qu...@co...> Date: Mon Apr 3 01:10:53 2023 -0400 Use PVR_RAM_BASE define for references to it. commit b0f3864c2897efd073b1f7221382db037b68184a Author: quzar <qu...@co...> Date: Mon Apr 3 00:39:42 2023 -0400 Rewrite all register interface in video.c to use pvr.h's established method. This includes defining new register defines which are based on the notes in video.c commit e8e078c2463b31c0eed586dcde2421fdec8880a6 Author: quzar <qu...@co...> Date: Mon Apr 3 00:39:16 2023 -0400 Fix missing index for vid_pmode_bpp. commit 6ecc84a865f9e47cc3b8ae9ccbbce9359380463a Author: quzar <qu...@co...> Date: Sun Apr 2 22:59:31 2023 -0400 First basic cleanup. Sent PM bpp array to global and cleaned up its use. Init FB console using the setting function instead of directly editing vars. ----------------------------------------------------------------------- Summary of changes: doc/CHANGELOG | 1 + kernel/arch/dreamcast/hardware/video.c | 93 ++++++++++++++------------- kernel/arch/dreamcast/include/dc/pvr.h | 26 ++++++++ kernel/arch/dreamcast/include/dc/video.h | 18 ++++-- kernel/arch/dreamcast/util/fb_console.c | 15 ++--- kernel/arch/dreamcast/util/fb_console_naomi.c | 15 ++--- 6 files changed, 97 insertions(+), 71 deletions(-) diff --git a/doc/CHANGELOG b/doc/CHANGELOG index ea86f75..64fce22 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -164,6 +164,7 @@ KallistiOS version 2.1.0 ----------------------------------------------- - DC Fixed calling newlib's exit after returning from main so functions registered with atexit() are called [Colton Pawielski == CP] - *** Cleaned up + documented RTC driver, added support for setting time [FG] +- DC Cleaned up the register access in video to match pvr [DH] KallistiOS version 2.0.0 ----------------------------------------------- - DC Broadband Adapter driver fixes [Megan Potter == MP] diff --git a/kernel/arch/dreamcast/hardware/video.c b/kernel/arch/dreamcast/hardware/video.c index 95726ca..a655f1b 100644 --- a/kernel/arch/dreamcast/hardware/video.c +++ b/kernel/arch/dreamcast/hardware/video.c @@ -7,6 +7,7 @@ */ #include <dc/video.h> +#include <dc/pvr.h> #include <dc/sq.h> #include <string.h> #include <stdio.h> @@ -407,7 +408,6 @@ vid_mode_t vid_builtin[DM_MODE_COUNT] = { }; /*-----------------------------------------------------------------------------*/ -static vuint32 *regs = (uint32*)0xA05F8000; static vid_mode_t currmode = { 0 }; vid_mode_t *vid_mode = 0; uint16 *vram_s; @@ -426,7 +426,7 @@ uint32 *vram_l; [This is the old KOS function by Megan.] */ -int vid_check_cable() { +int vid_check_cable(void) { #ifndef _arch_sub_naomi vuint32 * porta = (vuint32 *)0xff80002c; @@ -499,7 +499,6 @@ void vid_set_mode(int dm, int pm) { /*-----------------------------------------------------------------------------*/ void vid_set_mode_ex(vid_mode_t *mode) { - static uint8 bpp[4] = { 2, 2, 0, 4 }; uint16 ct; uint32 data; @@ -518,8 +517,8 @@ void vid_set_mode_ex(vid_mode_t *mode) { } /* Blank screen and reset display enable (looks nicer) */ - regs[0x3A] |= 8; /* Blank */ - regs[0x11] &= ~1; /* Display disable */ + PVR_SET(PVR_VIDEO_CFG, PVR_GET(PVR_VIDEO_CFG) | 8); /* Blank */ + PVR_SET(PVR_FB_CFG_1, PVR_GET(PVR_FB_CFG_1) & ~1); /* Display disable */ /* Clear interlace flag if VGA (this maybe should be in here?) */ if(ct == CT_VGA) { @@ -546,30 +545,30 @@ void vid_set_mode_ex(vid_mode_t *mode) { data |= 2; } - regs[0x11] = data; + PVR_SET(PVR_FB_CFG_1, data); /* Linestride */ - regs[0x13] = (mode->width * bpp[mode->pm]) / 8; + PVR_SET(PVR_RENDER_MODULO, (mode->width * vid_pmode_bpp[mode->pm]) / 8); /* Display size */ - data = ((mode->width * bpp[mode->pm]) / 4) - 1; + data = ((mode->width * vid_pmode_bpp[mode->pm]) / 4) - 1; if(ct == CT_VGA || (!(mode->flags & VID_INTERLACE))) { data |= (1 << 20) | ((mode->height - 1) << 10); } else { - data |= (((mode->width * bpp[mode->pm] >> 2) + 1) << 20) + data |= (((mode->width * vid_pmode_bpp[mode->pm] >> 2) + 1) << 20) | (((mode->height / 2) - 1) << 10); } - regs[0x17] = data; + PVR_SET(PVR_FB_SIZE, data); /* vblank irq */ if(ct == CT_VGA) { - regs[0x33] = (mode->scanint1 << 16) | (mode->scanint2 << 1); + PVR_SET(PVR_VPOS_IRQ, (mode->scanint1 << 16) | (mode->scanint2 << 1)); } else { - regs[0x33] = (mode->scanint1 << 16) | mode->scanint2; + PVR_SET(PVR_VPOS_IRQ, (mode->scanint1 << 16) | mode->scanint2); } /* Interlace stuff */ @@ -586,25 +585,25 @@ void vid_set_mode_ex(vid_mode_t *mode) { } } - regs[0x34] = data; + PVR_SET(PVR_IL_CFG, data); /* Border window */ - regs[0x35] = (mode->borderx1 << 16) | mode->borderx2; - regs[0x37] = (mode->bordery1 << 16) | mode->bordery2; + PVR_SET(PVR_BORDER_X, (mode->borderx1 << 16) | mode->borderx2); + PVR_SET(PVR_BORDER_Y, (mode->bordery1 << 16) | mode->bordery2); /* Scanlines and clocks. */ - regs[0x36] = (mode->scanlines << 16) | mode->clocks; + PVR_SET(PVR_SCAN_CLK, (mode->scanlines << 16) | mode->clocks); /* Horizontal pixel doubling */ if(mode->flags & VID_PIXELDOUBLE) { - regs[0x3A] |= 0x100; + PVR_SET(PVR_VIDEO_CFG, PVR_GET(PVR_VIDEO_CFG) | 0x100); } else { - regs[0x3A] &= ~0x100; + PVR_SET(PVR_VIDEO_CFG, PVR_GET(PVR_VIDEO_CFG) & ~0x100); } /* Bitmap window */ - regs[0x3B] = mode->bitmapx; + PVR_SET(PVR_BITMAP_X, mode->bitmapx); data = mode->bitmapy; if(mode->flags & VID_PAL) { @@ -612,7 +611,7 @@ void vid_set_mode_ex(vid_mode_t *mode) { } data = (data << 16) | mode->bitmapy; - regs[0x3C] = data; + PVR_SET(PVR_BITMAP_Y, data); /* Everything is ok */ memcpy(&currmode, mode, sizeof(vid_mode_t)); @@ -627,25 +626,23 @@ void vid_set_mode_ex(vid_mode_t *mode) { ((ct & 3) << 8); /* Re-enable the display */ - regs[0x3A] &= ~8; - regs[0x11] |= 1; + PVR_SET(PVR_VIDEO_CFG, PVR_GET(PVR_VIDEO_CFG) & ~8); + PVR_SET(PVR_FB_CFG_1, PVR_GET(PVR_FB_CFG_1) | 1); } /*-----------------------------------------------------------------------------*/ void vid_set_start(uint32 base) { - static uint8 bpp[4] = { 2, 2, 0, 4 }; - /* Set vram base of current framebuffer */ base &= 0x007FFFFF; - regs[0x14] = base; + PVR_SET(PVR_FB_ADDR, base); /* These are nice to have. */ - vram_s = (uint16*)(0xA5000000 | base); - vram_l = (uint32*)(0xA5000000 | base); + vram_s = (uint16*)(PVR_RAM_BASE | base); + vram_l = (uint32*)(PVR_RAM_BASE | base); /* Set odd-field if interlaced. */ if(vid_mode->flags & VID_INTERLACE) { - regs[0x15] = base + (currmode.width * bpp[currmode.pm]); + PVR_SET(PVR_FB_IL_ADDR, base + (vid_mode->width * vid_pmode_bpp[vid_mode->pm])); } } @@ -673,16 +670,16 @@ void vid_flip(int fb) { /* Set the vram_* pointers as expected */ base = vid_mode->fb_base[(vid_mode->fb_curr + 1) & (vid_mode->fb_count - 1)]; - vram_s = (uint16*)(0xA5000000 | base); - vram_l = (uint32*)(0xA5000000 | base); + vram_s = (uint16*)(PVR_RAM_BASE | base); + vram_l = (uint32*)(PVR_RAM_BASE | base); } /*-----------------------------------------------------------------------------*/ uint32 vid_border_color(int r, int g, int b) { - uint32 obc = regs[0x0040 / 4]; - regs[0x0040 / 4] = ((r & 0xFF) << 16) | + uint32 obc = PVR_GET(PVR_BORDER_COLOR); + PVR_SET(PVR_BORDER_COLOR, ((r & 0xFF) << 16) | ((g & 0xFF) << 8) | - (b & 0xFF); + (b & 0xFF)); return obc; } @@ -700,17 +697,25 @@ void vid_clear(int r, int g, int b) { pixel16 = ((r >> 3) << 10) | ((g >> 3) << 5) | ((b >> 3) << 0); - sq_set16(vram_s, pixel16, (vid_mode->width * vid_mode->height) * 2); + sq_set16(vram_s, pixel16, (vid_mode->width * vid_mode->height) * vid_pmode_bpp[PM_RGB555]); break; case PM_RGB565: pixel16 = ((r >> 3) << 11) | ((g >> 2) << 5) | ((b >> 3) << 0); - sq_set16(vram_s, pixel16, (vid_mode->width * vid_mode->height) * 2); + sq_set16(vram_s, pixel16, (vid_mode->width * vid_mode->height) * vid_pmode_bpp[PM_RGB565]); + break; + case PM_RGB888P: + /* Need to come up with some way to fill this quickly. */ + dbglog(DBG_WARNING, "vid_clear: PM_RGB888P not supported, clearing with 0\n"); + sq_set32(vram_l, 0, (vid_mode->width * vid_mode->height) * vid_pmode_bpp[PM_RGB888P]); break; - case PM_RGB888: + case PM_RGB0888: pixel32 = (r << 16) | (g << 8) | (b << 0); - sq_set32(vram_l, pixel32, (vid_mode->width * vid_mode->height) * 4); + sq_set32(vram_l, pixel32, (vid_mode->width * vid_mode->height) * vid_pmode_bpp[PM_RGB0888]); + break; + default: + dbglog(DBG_ERROR, "vid_clear: Invalid Pixel Mode: %i\n", vid_mode->pm); break; } } @@ -720,10 +725,10 @@ void vid_clear(int r, int g, int b) { [This is the old KOS function by Megan.] */ -void vid_empty() { +void vid_empty(void) { /* We'll use the actual base address here since the vram_* pointers can now move around */ - sq_clr((uint32 *)0xa5000000, 8 * 1024 * 1024); + sq_clr((uint32 *)PVR_RAM_BASE, 8 * 1024 * 1024); } /*-----------------------------------------------------------------------------*/ @@ -735,13 +740,11 @@ void vid_empty() { [This is the old KOS function by Megan.] */ -void vid_waitvbl() { - vuint32 *vbl = regs + 0x010c / 4; - - while(!(*vbl & 0x01ff)) +void vid_waitvbl(void) { + while(!(PVR_GET(PVR_SYNC_STATUS) & 0x01ff)) ; - while(*vbl & 0x01ff) + while(PVR_GET(PVR_SYNC_STATUS) & 0x01ff) ; } @@ -754,7 +757,7 @@ void vid_init(int disp_mode, int pixel_mode) { } /*-----------------------------------------------------------------------------*/ -void vid_shutdown() { +void vid_shutdown(void) { /* Play nice with loaders, like KOS used to do. */ vid_init(DM_640x480, PM_RGB565); } diff --git a/kernel/arch/dreamcast/include/dc/pvr.h b/kernel/arch/dreamcast/include/dc/pvr.h index 2f23022..8f30749 100644 --- a/kernel/arch/dreamcast/include/dc/pvr.h +++ b/kernel/arch/dreamcast/include/dc/pvr.h @@ -987,18 +987,28 @@ Striplength set to 2 */ #define PVR_ID 0x0000 /**< \brief Chip ID */ #define PVR_REVISION 0x0004 /**< \brief Chip revision */ #define PVR_RESET 0x0008 /**< \brief Reset pins */ + #define PVR_ISP_START 0x0014 /**< \brief Start the ISP/TSP */ #define PVR_UNK_0018 0x0018 /**< \brief ?? */ + #define PVR_ISP_VERTBUF_ADDR 0x0020 /**< \brief Vertex buffer address for scene rendering */ + #define PVR_ISP_TILEMAT_ADDR 0x002c /**< \brief Tile matrix address for scene rendering */ #define PVR_SPANSORT_CFG 0x0030 /**< \brief ?? -- write 0x101 for now */ + +#define PVR_BORDER_COLOR 0x0040 /**< \brief Border Color in RGB888 */ #define PVR_FB_CFG_1 0x0044 /**< \brief Framebuffer config 1 */ #define PVR_FB_CFG_2 0x0048 /**< \brief Framebuffer config 2 */ #define PVR_RENDER_MODULO 0x004c /**< \brief Render modulo */ +#define PVR_FB_ADDR 0x0050 /**< \brief Framebuffer start address */ +#define PVR_FB_IL_ADDR 0x0054 /**< \brief Framebuffer odd-field start address for interlace */ + +#define PVR_FB_SIZE 0x005c /**< \brief Framebuffer display size */ #define PVR_RENDER_ADDR 0x0060 /**< \brief Render output address */ #define PVR_RENDER_ADDR_2 0x0064 /**< \brief Output for strip-buffering */ #define PVR_PCLIP_X 0x0068 /**< \brief Horizontal clipping area */ #define PVR_PCLIP_Y 0x006c /**< \brief Vertical clipping area */ + #define PVR_CHEAP_SHADOW 0x0074 /**< \brief Cheap shadow control */ #define PVR_OBJECT_CLIP 0x0078 /**< \brief Distance for polygon culling */ #define PVR_UNK_007C 0x007c /**< \brief ?? -- write 0x0027df77 for now */ @@ -1006,9 +1016,13 @@ Striplength set to 2 */ #define PVR_TEXTURE_CLIP 0x0084 /**< \brief Distance for texture clipping */ #define PVR_BGPLANE_Z 0x0088 /**< \brief Distance for background plane */ #define PVR_BGPLANE_CFG 0x008c /**< \brief Background plane config */ + #define PVR_UNK_0098 0x0098 /**< \brief ?? -- write 0x00800408 for now */ + #define PVR_UNK_00A0 0x00a0 /**< \brief ?? -- write 0x20 for now */ + #define PVR_UNK_00A8 0x00a8 /**< \brief ?? -- write 0x15d1c951 for now */ + #define PVR_FOG_TABLE_COLOR 0x00b0 /**< \brief Table fog color */ #define PVR_FOG_VERTEX_COLOR 0x00b4 /**< \brief Vertex fog color */ #define PVR_FOG_DENSITY 0x00b8 /**< \brief Fog density coefficient */ @@ -1017,14 +1031,23 @@ Striplength set to 2 */ #define PVR_GUN_POS 0x00c4 /**< \brief Light gun position */ #define PVR_UNK_00C8 0x00c8 /**< \brief ?? -- write same as border H in 00d4 << 16 */ #define PVR_VPOS_IRQ 0x00cc /**< \brief Vertical position IRQ */ +#define PVR_IL_CFG 0x00d0 /**< \brief Interlacing config */ +#define PVR_BORDER_X 0x00d4 /**< \brief Window border X position */ +#define PVR_SCAN_CLK 0x00d8 /**< \brief Clock and scanline values */ +#define PVR_BORDER_Y 0x00dc /**< \brief Window border Y position */ + #define PVR_TEXTURE_MODULO 0x00e4 /**< \brief Output texture width modulo */ #define PVR_VIDEO_CFG 0x00e8 /**< \brief Misc video config */ +#define PVR_BITMAP_X 0x00ec /**< \brief Bitmap window X position */ +#define PVR_BITMAP_Y 0x00f0 /**< \brief Bitmap window Y position */ #define PVR_SCALER_CFG 0x00f4 /**< \brief Smoothing scaler */ + #define PVR_PALETTE_CFG 0x0108 /**< \brief Palette format */ #define PVR_SYNC_STATUS 0x010c /**< \brief V/H blank status */ #define PVR_UNK_0110 0x0110 /**< \brief ?? -- write 0x93f39 for now */ #define PVR_UNK_0114 0x0114 /**< \brief ?? -- write 0x200000 for now */ #define PVR_UNK_0118 0x0118 /**< \brief ?? -- write 0x8040 for now */ + #define PVR_TA_OPB_START 0x0124 /**< \brief Object Pointer Buffer start for TA usage */ #define PVR_TA_VERTBUF_START 0x0128 /**< \brief Vertex buffer start for TA usage */ #define PVR_TA_OPB_END 0x012c /**< \brief OPB end for TA usage */ @@ -1036,9 +1059,12 @@ Striplength set to 2 */ #define PVR_TA_INIT 0x0144 /**< \brief Initialize vertex reg. params */ #define PVR_YUV_ADDR 0x0148 /**< \brief YUV conversion destination */ #define PVR_YUV_CFG_1 0x014c /**< \brief YUV configuration */ + #define PVR_UNK_0160 0x0160 /**< \brief ?? */ #define PVR_TA_OPB_INIT 0x0164 /**< \brief Object pointer buffer position init */ + #define PVR_FOG_TABLE_BASE 0x0200 /**< \brief Base of the fog table */ + #define PVR_PALETTE_TABLE_BASE 0x1000 /**< \brief Base of the palette table */ /** @} */ diff --git a/kernel/arch/dreamcast/include/dc/video.h b/kernel/arch/dreamcast/include/dc/video.h index 2f4dc3a..efbd618 100644 --- a/kernel/arch/dreamcast/include/dc/video.h +++ b/kernel/arch/dreamcast/include/dc/video.h @@ -47,9 +47,14 @@ __BEGIN_DECLS */ #define PM_RGB555 0 /**< \brief RGB555 pixel mode (15-bit) */ #define PM_RGB565 1 /**< \brief RGB565 pixel mode (16-bit) */ -#define PM_RGB888 3 /**< \brief RGB888 pixel mode (24-bit) */ +#define PM_RGB888P 2 /**< \brief RBG888 packed pixel mode (24-bit) */ +#define PM_RGB0888 3 /**< \brief RGB0888 pixel mode (32-bit) */ +#define PM_RGB888 PM_RGB0888 /**< \brief Backwards compatibility support */ /** @} */ +/** \brief vid_pmode_bpp Video pixel mode depths */ +static const uint8 vid_pmode_bpp[4] = {2, 2, 3, 4}; + /** \brief Generic display modes */ enum { DM_GENERIC_FIRST = 0x1000, /**< \brief First valid generic mode */ @@ -181,7 +186,7 @@ extern uint32 *vram_l; \retval CT_RGB If a RGB/SCART cable is connected. \retval CT_COMPOSITE If a composite cable or RF switch is connected. */ -int vid_check_cable(); +int vid_check_cable(void); /** \brief Set the VRAM base of the framebuffer. @@ -197,7 +202,8 @@ void vid_set_start(uint32 base); This function sets the displayed framebuffer to the specified buffer and sets the vram_s and vram_l pointers to point at the next framebuffer, to - allow for tearing-free framebuffer-direct drawing. + allow for tearing-free framebuffer-direct drawing. The specified buffer + is masked against (vid_mode->fb_count - 1) in order to loop around. \param fb The framebuffer to display (or -1 for the next one). */ @@ -232,13 +238,13 @@ void vid_clear(int r, int g, int b); This function is essentially a memset() for the whole of VRAM that will clear it all to 0 bytes. */ -void vid_empty(); +void vid_empty(void); /** \brief Wait for VBlank. This function busy loops until the vertical blanking period starts. */ -void vid_waitvbl(); +void vid_waitvbl(void); /** \brief Set the video mode. @@ -277,7 +283,7 @@ void vid_init(int disp_mode, int pixel_mode); This function reinitializes the video system to what dcload and friends expect it to be. */ -void vid_shutdown(); +void vid_shutdown(void); /** \brief Take a screenshot. diff --git a/kernel/arch/dreamcast/util/fb_console.c b/kernel/arch/dreamcast/util/fb_console.c index 745ddf2..16da8da 100644 --- a/kernel/arch/dreamcast/util/fb_console.c +++ b/kernel/arch/dreamcast/util/fb_console.c @@ -33,16 +33,11 @@ static int fb_detected() { static int fb_init() { bfont_set_encoding(BFONT_CODE_ISO8859_1); - /* Assume we're using 640x480x16bpp */ - fb = NULL; - fb_w = 640; - fb_h = 480; - min_x = 32; - min_y = 32; - max_x = 608; - max_y = 448; - cur_x = 32; - cur_y = 32; + /* Init based on current video mode, defaulting to 640x480x16bpp. */ + if (vid_mode == 0) + dbgio_fb_set_target(NULL, 640, 480, 32, 32); + else + dbgio_fb_set_target(NULL, vid_mode->width, vid_mode->height, 32, 32); return 0; } diff --git a/kernel/arch/dreamcast/util/fb_console_naomi.c b/kernel/arch/dreamcast/util/fb_console_naomi.c index 75b33b8..0bece35 100644 --- a/kernel/arch/dreamcast/util/fb_console_naomi.c +++ b/kernel/arch/dreamcast/util/fb_console_naomi.c @@ -35,16 +35,11 @@ static int fb_detected() { } static int fb_init() { - /* Assume we're using 640x480x16bpp */ - fb = NULL; - fb_w = 640; - fb_h = 480; - min_x = 32; - min_y = 32; - max_x = 608; - max_y = 448; - cur_x = 32; - cur_y = 32; + /* Init based on current video mode, defaulting to 640x480x16bpp. */ + if (vid_mode == 0) + dbgio_fb_set_target(NULL, 640, 480, 32, 32); + else + dbgio_fb_set_target(NULL, vid_mode->width, vid_mode->height, 32, 32); return 0; } hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: ljsebald <ljs...@us...> - 2023-04-28 01:36:03
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, master has been updated via b82f0b383dd1fb6a88f81e2a3bb2c9e65201c855 (commit) via 4a0414d22a595547d4b73ef88dc295128ea85c44 (commit) via 4a107b0bd1a2db629fb6ce93f82e9a9d8e80fd45 (commit) via 48ec4b6f9c418a81a101e9b71c7fea3984b5046f (commit) from e9a81adfea4093706b273fab71b46cbe85ae500e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit b82f0b383dd1fb6a88f81e2a3bb2c9e65201c855 Merge: 4a0414d 4a107b0 Author: Lawrence Sebald <ljs...@us...> Date: Thu Apr 27 21:34:42 2023 -0400 Merge pull request #155 from cepawiel/dc-chain-sources-from-git Add ability to specify git repos for dc-chain sources commit 4a0414d22a595547d4b73ef88dc295128ea85c44 Author: Falco Girgis <gyr...@gm...> Date: Thu Apr 27 21:33:25 2023 -0400 RTC cleanup, documentation, setting date/time (#167) commit 4a107b0bd1a2db629fb6ce93f82e9a9d8e80fd45 Author: Colton Pawielski <cep...@mt...> Date: Wed Apr 26 11:49:07 2023 -0500 Make download_type default with fallback to tarball_type commit 48ec4b6f9c418a81a101e9b71c7fea3984b5046f Author: Colton Pawielski <cep...@mt...> Date: Sat Apr 8 17:33:24 2023 -0500 Add ability to specify git repos for dc-chain sources ----------------------------------------------------------------------- Summary of changes: doc/CHANGELOG | 1 + kernel/arch/dreamcast/include/arch/rtc.h | 121 +++++++++++++++++++++++++++---- kernel/arch/dreamcast/kernel/rtc.c | 72 +++++++++++++++--- utils/dc-chain/README.md | 16 +++- utils/dc-chain/cleanup.sh | 54 ++++---------- utils/dc-chain/config.mk.legacy.sample | 26 +++---- utils/dc-chain/config.mk.stable.sample | 26 +++---- utils/dc-chain/config.mk.testing.sample | 26 +++---- utils/dc-chain/download.sh | 99 ++++++++++++++----------- utils/dc-chain/scripts/common.sh | 114 ++++++++++++++++------------- utils/dc-chain/unpack.sh | 106 ++++++++++++--------------- 11 files changed, 404 insertions(+), 257 deletions(-) diff --git a/doc/CHANGELOG b/doc/CHANGELOG index 890bbb4..ea86f75 100644 --- a/doc/CHANGELOG +++ b/doc/CHANGELOG @@ -163,6 +163,7 @@ KallistiOS version 2.1.0 ----------------------------------------------- - *** Add support for compiling with LTO [Paul Cercueil == PC] - DC Fixed calling newlib's exit after returning from main so functions registered with atexit() are called [Colton Pawielski == CP] +- *** Cleaned up + documented RTC driver, added support for setting time [FG] KallistiOS version 2.0.0 ----------------------------------------------- - DC Broadband Adapter driver fixes [Megan Potter == MP] diff --git a/kernel/arch/dreamcast/include/arch/rtc.h b/kernel/arch/dreamcast/include/arch/rtc.h index 3b42134..30f3f83 100644 --- a/kernel/arch/dreamcast/include/arch/rtc.h +++ b/kernel/arch/dreamcast/include/arch/rtc.h @@ -1,18 +1,22 @@ /* KallistiOS ##version## arch/dreamcast/include/rtc.h - (c)2000-2001 Megan Potter + Copyright (C) 2000-2001 Megan Potter + Copyright (C) 2023 Falco Girgis */ -/** \file arch/rtc.h - \brief Low-level real time clock functionality. +/** \file arch/rtc.h + \brief Low-level real-time clock functionality. + \ingroup rtc - This file contains functions for interacting with the real time clock in the + This file contains functions for interacting with the real-time clock in the Dreamcast. Generally, you should prefer interacting with the higher level - standard C functions, like time(), rather than these. + standard C functions, like time(), rather than these when simply needing + to fetch the current system time. \author Megan Potter + \author Falco Girgis */ #ifndef __ARCH_RTC_H @@ -23,29 +27,120 @@ __BEGIN_DECLS #include <time.h> -/** \brief Get the current date/time. +/** \defgroup rtc Real-Time Clock + \brief Real-Time Clock (RTC) Management + + Provides an API for fetching and managing the date/time using + the Dreamcast's real-time clock. All timestamps are in standard + Unix format, with an epoch of January 1, 1970. Due to the fact + that there is no time zone data on the RTC, all times are expected + to be in the local time zone. + + \note + The RTC that is used by the DC is located on the AICA rather than SH4, + presumably for power-efficiency reasons. Because of this, accessing + it requires a trip over the G2 BUS, which is notoriously slow. + + \note + For reading the current date/time, you should favor the standard C, + C++, or POSIX functions, as they are platform-indpendent and are + calculating current time based on a cached boot time plus a delta + that is maintained by the timer subsystem, rather than actually + having to requery the RTC over the G2 BUS, so they are faster. + + \warning + Internally, the RTC's date/time is maintained using a 32-bit counter + with an epoch of January 1, 1950 00:00. Because of this, the Dreamcast's + Y2K and the last timestamp it can represent before rolling over is + February 06 2086 06:28:15. +*/ + +/** \defgroup rtc_regs Registers + \brief RTC registers + \ingroup rtc + + All registers are located on the G2 BUS and must be read and + written to as full 32-byte values. +@{*/ + +/** \brief High 16-bit timestamp value + + 32-bit register containing the upper 16-bits of + the 32-bit timestamp in seconds. Only the lower 16-bits + are valid. + + \note Writing to this register will lock the timestamp registers. + */ +#define RTC_TIMESTAMP_HIGH_ADDR 0xa0710000 + +/** \brief Low 16-bit timestamp value + + 32-bit register containing the lower 16-bits of + the 32-bit timestamp in seconds. Only the lower 16-bits + are valid. + */ +#define RTC_TIMESTAMP_LOW_ADDR 0xa0710004 + +/** \brief Timestamp control register + + All fields are reserved except for #RTC_CTRL_WRITE_EN, + which is write-only. + */ +#define RTC_CTRL_ADDR 0xa0710008 +/** +@} */ + +/** \brief Timestamp write enable + + #RTC_CTRL_ADDR value to be written in order to unlock + writing to the timestamp registers. +*/ +#define RTC_CTRL_WRITE_EN (1 << 0) + +/** \brief Get the current date/time. + \ingroup rtc This function retrieves the current RTC value as a standard UNIX timestamp (with an epoch of January 1, 1970 00:00). This is assumed to be in the timezone of the user (as the RTC does not support timezones). \return The current UNIX-style timestamp (local time). + + \sa rtc_set_unix_secs(), rtc_boot_time() +*/ +time_t rtc_unix_secs(void); + +/** \brief Get the current date/time. + \ingroup rtc + + This function sets the current RTC value as a standard UNIX timestamp + (with an epoch of January 1, 1970 00:00). This is assumed to be in the + timezone of the user (as the RTC does not support timezones). + + \param time Unix timestamp to set the current time to + + \return 0 for success or -1 for failure + + \sa rtc_unix_secs() */ -time_t rtc_unix_secs(); +int rtc_set_unix_secs(time_t time); -/** \brief Get the time that the sytem was booted. +/** \brief Get the time since the sytem was booted. + \ingroup rtc - This function retrieves the RTC value from when KallistiOS was started. As + This function retrieves the cached RTC value from when KallistiOS was started. As with rtc_unix_secs(), this is a UNIX-style timestamp in local time. \return The boot time as a UNIX-style timestamp. + + \sa rtc_unix_secs() */ -time_t rtc_boot_time(); +time_t rtc_boot_time(void); /* \cond */ -/* Init / Shutdown */ -int rtc_init(); -void rtc_shutdown(); +/* Internally called Init / Shutdown */ +int rtc_init(void); +void rtc_shutdown(void); /* \endcond */ __END_DECLS diff --git a/kernel/arch/dreamcast/kernel/rtc.c b/kernel/arch/dreamcast/kernel/rtc.c index c7eae7c..75bd6e0 100644 --- a/kernel/arch/dreamcast/kernel/rtc.c +++ b/kernel/arch/dreamcast/kernel/rtc.c @@ -1,10 +1,13 @@ /* KallistiOS ##version## rtc.c - (c)2001 Megan Potter + Copyright (C) 2001 Megan Potter + Copyright (C) 2023 Falco Girgis + Copyright (C) 2023 Ruslan Rostovtsev + Copyright (C) 2023 Megavolt85 */ -/* Real Time Clock support +/* Real-Time Clock (RTC) support The functions in here return various info about the real-world time and date stored in the machine. The general process here is to retrieve @@ -22,13 +25,17 @@ */ #include <arch/rtc.h> +#include <arch/timer.h> #include <dc/g2bus.h> +#define RTC_UNIX_EPOCH_DELTA 631152000 /* Twenty years in seconds */ +#define RTC_RETRY_COUNT 3 /* # of times to repeat on bad access */ + /* The boot time; we'll save this in rtc_init() */ static time_t boot_time = 0; /* Returns the date/time value as a UNIX epoch time stamp */ -time_t rtc_unix_secs() { +time_t rtc_unix_secs(void) { uint32 rtcold, rtcnew; int i; @@ -38,37 +45,80 @@ time_t rtc_unix_secs() { rtcold = 0; for(;;) { - for(i = 0; i < 3; i++) { - rtcnew = ((g2_read_32(0xa0710000) & 0xffff) << 16) | (g2_read_32(0xa0710004) & 0xffff); + for(i = 0; i < RTC_RETRY_COUNT; i++) { + rtcnew = ((g2_read_32(RTC_TIMESTAMP_HIGH_ADDR) & 0xffff) << 16) | + (g2_read_32(RTC_TIMESTAMP_LOW_ADDR) & 0xffff); if(rtcnew != rtcold) break; } - if(i < 3) + if(i < RTC_RETRY_COUNT) rtcold = rtcnew; else break; } /* Subtract out 20 years */ - rtcnew = rtcnew - 631152000; + rtcnew = rtcnew - RTC_UNIX_EPOCH_DELTA; return rtcnew; } +/* Sets the date/time value from a UNIX epoch time stamp, + returning 0 for success or -1 for failure. */ +int rtc_set_unix_secs(time_t secs) { + int result = 0; + uint32_t rtcnew; + int i; + + /* Adjust by 20 years to get to the expected RTC time. */ + const uint32_t adjusted = secs + RTC_UNIX_EPOCH_DELTA; + + /* Enable writing by setting LSB of control */ + g2_write_32(RTC_CTRL_ADDR, RTC_CTRL_WRITE_EN); + + /* Try 3 times to ensure we didn't write a value then have + the clock increment itself before the next. */ + for(i = 0; i < RTC_RETRY_COUNT; i++) { + /* Write the least-significant 16-bits first, because + writing to the high 16-bits will lock RTC writes. */ + g2_write_32(RTC_TIMESTAMP_LOW_ADDR, (adjusted) & 0xffff); + g2_write_32(RTC_TIMESTAMP_HIGH_ADDR, (adjusted >> 16) & 0xffff); + + /* Read the time back again, to ensure it was written properly. */ + rtcnew = rtc_unix_secs() + RTC_UNIX_EPOCH_DELTA; + + if(rtcnew == adjusted) + break; + } + + /* Signify failure if the fetched time never matched the + time we attempted to set. */ + if(i == RTC_RETRY_COUNT) + result = -1; + + /* We have to update the boot time now as well, subtracting + the amount of time that has elapsed since boot from the + new time we've just set. */ + uint32 s, ms; + timer_ms_gettime(&s, &ms); + boot_time = rtcnew - RTC_UNIX_EPOCH_DELTA - s; + + return result; +} /* Returns the date/time that the system was booted as a UNIX epoch time stamp. Adding this to the value from timer_ms_gettime() will - produce a current timestamp. */ -time_t rtc_boot_time() { + produce a current timestamp without needing the trip over the G2 BUS. */ +time_t rtc_boot_time(void) { return boot_time; } -int rtc_init() { +int rtc_init(void) { boot_time = rtc_unix_secs(); return 0; } -void rtc_shutdown() { +void rtc_shutdown(void) { } diff --git a/utils/dc-chain/README.md b/utils/dc-chain/README.md index b2a073f..db9f27b 100644 --- a/utils/dc-chain/README.md +++ b/utils/dc-chain/README.md @@ -135,10 +135,18 @@ Doing so will use your custom versions of **GMP**, **MPC**, **MPFR** and if you have trouble using the `contrib/download_prerequisites` script provided with GCC. -Please note that you have the possibility to specify the `tarball_type` -extensions you want to download too; this may be useful if a package -changes its extension on the servers. For example, for GCC `4.7.4`, there is no -`xz` tarball file, so you may change this to `gz`. +Please note that you have the possibility to specify the tarball extensions +you want to download using `download_type`; this may be useful if a +package changes its extension on the servers. For example, for GCC `4.7.4`, +there is no `xz` tarball file, so you may change this to `gz`. In the case that +`download_type` is not specified, `tarball_type` will be checked as a fallback to +support legacy `config.mk` files. + +Git repositories can also be used to obtain source files. The git download method +can be selected by specifying `git` as the `download_type`. This enables +the use of `git_repo` and `git_branch` variables to specify the repository +and branch respectively. If `git_branch` is omitted, the default for the +repository will be used. **Note:** All download URL are computed in the `scripts/common.sh` file, but you shouldn't update/change this. diff --git a/utils/dc-chain/cleanup.sh b/utils/dc-chain/cleanup.sh index ffccc1d..cc885c0 100755 --- a/utils/dc-chain/cleanup.sh +++ b/utils/dc-chain/cleanup.sh @@ -25,52 +25,30 @@ done function cleanup_dependency() { local type="$1" - local dep_name="$2" - local dep_ver="$3" - local dep_type="$4" + local dep_name="$2" + local dep_ver=$3_VER + local dep_type=$3_TARBALL_TYPE - local dep="${dep_name}-${dep_ver}" + local dep="${dep_name}-${!dep_ver}" - if [ -n "$dep_ver" ]; then + if [ -n "${!dep_ver}" ]; then if [ "$type" == "package" ]; then - rm -f "${dep}.tar.${dep_type}" - else - rm -rf "${dep}" + rm -f "${dep}.tar.${!dep_type}" + else + rm -rf "${dep}" fi fi } function cleanup_dependencies() { - local arch=$1 local type=$2 - local gmp_ver=$SH_GMP_VER - local mpfr_ver=$SH_MPFR_VER - local mpc_ver=$SH_MPC_VER - local isl_ver=$SH_ISL_VER - local gmp_tarball_type=$SH_GMP_TARBALL_TYPE - local mpfr_tarball_type=$SH_MPFR_TARBALL_TYPE - local mpc_tarball_type=$SH_MPC_TARBALL_TYPE - local isl_tarball_type=$SH_ISL_TARBALL_TYPE - - if [ "$arch" == "arm" ]; then - gcc_ver=$ARM_GCC_VER - gmp_ver=$ARM_GMP_VER - mpfr_ver=$ARM_MPFR_VER - mpc_ver=$ARM_MPC_VER - isl_ver=$ARM_ISL_VER - gmp_tarball_type=$ARM_GMP_TARBALL_TYPE - mpfr_tarball_type=$ARM_MPFR_TARBALL_TYPE - mpc_tarball_type=$ARM_MPC_TARBALL_TYPE - isl_tarball_type=$ARM_ISL_TARBALL_TYPE - fi - if [ "$USE_CUSTOM_DEPENDENCIES" == "1" ]; then - cleanup_dependency "$type" "GMP" "$gmp_ver" "$gmp_tarball_type" - cleanup_dependency "$type" "MPFR" "$mpfr_ver" "$mpfr_tarball_type" - cleanup_dependency "$type" "MPC" "$mpc_ver" "$mpc_tarball_type" - cleanup_dependency "$type" "ISL" "$isl_ver" "$isl_tarball_type" + cleanup_dependency "$type" "GMP" "$1_GMP" + cleanup_dependency "$type" "MPFR" "$1_MPFR" + cleanup_dependency "$type" "MPC" "$1_MPC" + cleanup_dependency "$type" "ISL" "$1_ISL" fi } @@ -85,8 +63,8 @@ if [ -z $KEEP_DOWNLOADS ]; then newlib-$NEWLIB_VER.tar.$NEWLIB_TARBALL_TYPE if [ "$USE_CUSTOM_DEPENDENCIES" == "1" ]; then - cleanup_dependencies "sh" "package" - cleanup_dependencies "arm" "package" + cleanup_dependencies "SH" "package" + cleanup_dependencies "ARM" "package" fi if [ -f "gdb-$GDB_VER.tar.$GDB_TARBALL_TYPE" ]; then @@ -109,8 +87,8 @@ rm -rf binutils-$SH_BINUTILS_VER binutils-$ARM_BINUTILS_VER \ *.stamp if [ "$USE_CUSTOM_DEPENDENCIES" == "1" ]; then - cleanup_dependencies "sh" "dir" - cleanup_dependencies "arm" "dir" + cleanup_dependencies "SH" "dir" + cleanup_dependencies "ARM" "dir" fi if [ -d "gdb-$GDB_VER" ]; then diff --git a/utils/dc-chain/config.mk.legacy.sample b/utils/dc-chain/config.mk.legacy.sample index 8b099ed..e097c3c 100644 --- a/utils/dc-chain/config.mk.legacy.sample +++ b/utils/dc-chain/config.mk.legacy.sample @@ -25,9 +25,9 @@ gdb_ver=9.2 insight_ver=6.8-1 # Tarball extensions to download for SH -sh_binutils_tarball_type=xz -sh_gcc_tarball_type=bz2 -newlib_tarball_type=gz +sh_binutils_download_type=xz +sh_gcc_download_type=bz2 +newlib_download_type=gz gdb_tarball_type=xz insight_tarball_type=bz2 @@ -38,8 +38,8 @@ arm_binutils_ver=2.34 arm_gcc_ver=4.7.4 # Tarball extensions to download for ARM -arm_binutils_tarball_type=xz -arm_gcc_tarball_type=bz2 +arm_binutils_download_type=xz +arm_gcc_download_type=bz2 # GCC custom dependencies # Specify here if you want to use custom GMP, MPFR and MPC libraries as they are @@ -61,10 +61,10 @@ sh_mpc_ver=0.8.1 #sh_isl_ver=0.18 # Tarball extensions to download for GCC dependencies for SH -sh_gmp_tarball_type=bz2 -sh_mpfr_tarball_type=bz2 -sh_mpc_tarball_type=gz -sh_isl_tarball_type=bz2 +sh_gmp_download_type=bz2 +sh_mpfr_download_type=bz2 +sh_mpc_download_type=gz +sh_isl_download_type=bz2 # GCC dependencies for ARM arm_gmp_ver=4.3.2 @@ -73,10 +73,10 @@ arm_mpc_ver=0.8.1 #arm_isl_ver=0.18 # Tarball extensions to download for GCC dependencies for ARM -arm_gmp_tarball_type=bz2 -arm_mpfr_tarball_type=bz2 -arm_mpc_tarball_type=gz -arm_isl_tarball_type=bz2 +arm_gmp_download_type=bz2 +arm_mpfr_download_type=bz2 +arm_mpc_download_type=gz +arm_isl_download_type=bz2 # Toolchains base # Indicate the root directory where toolchains will be installed diff --git a/utils/dc-chain/config.mk.stable.sample b/utils/dc-chain/config.mk.stable.sample index d7c9e57..deb7466 100644 --- a/utils/dc-chain/config.mk.stable.sample +++ b/utils/dc-chain/config.mk.stable.sample @@ -25,9 +25,9 @@ gdb_ver=9.2 insight_ver=6.8-1 # Tarball extensions to download for SH -sh_binutils_tarball_type=xz -sh_gcc_tarball_type=xz -newlib_tarball_type=gz +sh_binutils_download_type=xz +sh_gcc_download_type=xz +newlib_download_type=gz gdb_tarball_type=xz insight_tarball_type=bz2 @@ -38,8 +38,8 @@ arm_binutils_ver=2.34 arm_gcc_ver=8.4.0 # Tarball extensions to download for ARM -arm_binutils_tarball_type=xz ...<truncated>... hooks/post-receive -- A pseudo Operating System for the Dreamcast. |
From: falcovorbis <fal...@us...> - 2023-04-27 02:25:04
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "A pseudo Operating System for the Dreamcast.". The branch, cpp20_toolchain_verification has been created at f15ce19e790067f684c998a2646d8afab575d468 (commit) - Log ----------------------------------------------------------------- commit f15ce19e790067f684c998a2646d8afab575d468 Author: falco <gyr...@gm...> Date: Sun Mar 12 03:45:41 2023 -0400 Initial C++20/23 GCC12 toolchain verification ----------------------------------------------------------------------- hooks/post-receive -- A pseudo Operating System for the Dreamcast. |