License/consistency/whitespace cleanup

This commit is contained in:
dhewg 2009-04-13 22:13:45 +02:00 committed by bushing
parent 1d03b15fce
commit 52de4a6655
43 changed files with 172 additions and 45 deletions

View File

@ -5,6 +5,7 @@
Copyright (C) 2008, 2009 Hector Martin "marcan" <marcan@marcansoft.com> Copyright (C) 2008, 2009 Hector Martin "marcan" <marcan@marcansoft.com>
Copyright (C) 2008, 2009 Sven Peter <svenpeter@gmail.com> Copyright (C) 2008, 2009 Sven Peter <svenpeter@gmail.com>
Copyright (C) 2009 Andre Heider "dhewg" <dhewg@wiibrew.org>
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -392,3 +393,4 @@ u32 boot2_ipc(volatile ipc_request *req)
return vector; return vector;
} }

View File

@ -30,3 +30,4 @@ void boot2_init();
u32 boot2_ipc(volatile ipc_request *req); u32 boot2_ipc(volatile ipc_request *req);
#endif #endif

View File

@ -1,3 +1,24 @@
/*
mini - a Free Software replacement for the Nintendo/BroadOn IOS.
BSD types
Copyright (C) 2008, 2009 Sven Peter <svenpeter@gmail.com>
This program 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, version 2.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __BSDTYPES_H__ #ifndef __BSDTYPES_H__
#define __BSDTYPES_H__ #define __BSDTYPES_H__
@ -26,4 +47,6 @@ struct device {
#define ISSET(var, mask) (((var) & (mask)) ? 1 : 0) #define ISSET(var, mask) (((var) & (mask)) ? 1 : 0)
#define SET(var, mask) ((var) |= (mask)) #define SET(var, mask) ((var) |= (mask))
#endif #endif

View File

@ -62,7 +62,6 @@ void crypto_initialize()
void crypto_ipc(volatile ipc_request *req) void crypto_ipc(volatile ipc_request *req)
{ {
switch (req->req) { switch (req->req) {
case IPC_KEYS_GETOTP: case IPC_KEYS_GETOTP:
memcpy((void *)req->args[0], &otp, sizeof(otp)); memcpy((void *)req->args[0], &otp, sizeof(otp));
@ -176,3 +175,4 @@ void aes_ipc(volatile ipc_request *req)
} }
ipc_post(req->code, req->tag, 0); ipc_post(req->code, req->tag, 0);
} }

View File

@ -3,7 +3,7 @@
crypto support crypto support
Copyright (C) 2008, 2009 Haxx Enterprises Copyright (C) 2008, 2009 Haxx Enterprises <bushing@gmail.com>
Copyright (C) 2008, 2009 Sven Peter <svenpeter@gmail.com> Copyright (C) 2008, 2009 Sven Peter <svenpeter@gmail.com>
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
@ -21,7 +21,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifndef __CRYPTO_H__ #ifndef __CRYPTO_H__
#define __CRYPTO_H__ 1 #define __CRYPTO_H__
#include "types.h" #include "types.h"
#include "ipc.h" #include "ipc.h"
@ -88,3 +88,4 @@ void aes_decrypt(u8 *src, u8 *dst, u32 blocks, u8 keep_iv);
void aes_ipc(volatile ipc_request *req); void aes_ipc(volatile ipc_request *req);
#endif #endif

1
diskio.c Executable file → Normal file
View File

@ -96,3 +96,4 @@ DRESULT disk_ioctl (BYTE drv, BYTE ctrl, void *buff) {
return RES_PARERR; return RES_PARERR;
} }
#endif /* _USE_IOCTL */ #endif /* _USE_IOCTL */

0
diskio.h Executable file → Normal file
View File

View File

@ -1,6 +1,3 @@
/* $OpenBSD: errno.h,v 1.20 2007/09/03 14:37:52 millert Exp $ */
/* $NetBSD: errno.h,v 1.10 1996/01/20 01:33:53 jtc Exp $ */
/* /*
* Copyright (c) 1982, 1986, 1989, 1993 * Copyright (c) 1982, 1986, 1989, 1993
* The Regents of the University of California. All rights reserved. * The Regents of the University of California. All rights reserved.

View File

@ -121,3 +121,4 @@ void exc_handler(u32 type, u32 spsr, u32 *regs)
} }
panic2(0, PANIC_EXCEPTION); panic2(0, PANIC_EXCEPTION);
} }

View File

@ -4,7 +4,7 @@
exception handling exception handling
Copyright (C) 2008, 2009 Hector Martin "marcan" <marcan@marcansoft.com> Copyright (C) 2008, 2009 Hector Martin "marcan" <marcan@marcansoft.com>
Copyright (C) 2008, 2009 Haxx Enterprises Copyright (C) 2008, 2009 Haxx Enterprises <bushing@gmail.com>
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by

View File

@ -5,6 +5,7 @@
Copyright (C) 2008, 2009 Hector Martin "marcan" <marcan@marcansoft.com> Copyright (C) 2008, 2009 Hector Martin "marcan" <marcan@marcansoft.com>
Copyright (C) 2008, 2009 Sven Peter <svenpeter@gmail.com> Copyright (C) 2008, 2009 Sven Peter <svenpeter@gmail.com>
Copyright (C) 2009 Andre Heider "dhewg" <dhewg@wiibrew.org>
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -292,7 +293,6 @@ void gecko_timer(void) {
// sorry pal, that memory is mine now // sorry pal, that memory is mine now
powerpc_hang(); powerpc_hang();
gecko_printf("MINI/GECKO: PPC halted, receiving data...\n");
} }
return; return;

View File

@ -5,6 +5,7 @@
Copyright (C) 2008, 2009 Hector Martin "marcan" <marcan@marcansoft.com> Copyright (C) 2008, 2009 Hector Martin "marcan" <marcan@marcansoft.com>
Copyright (C) 2008, 2009 Sven Peter <svenpeter@gmail.com> Copyright (C) 2008, 2009 Sven Peter <svenpeter@gmail.com>
Copyright (C) 2009 Andre Heider "dhewg" <dhewg@wiibrew.org>
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -32,3 +33,4 @@ void gecko_timer_initialize(void);
void gecko_timer(void); void gecko_timer(void);
#endif #endif

1
gpio.h
View File

@ -66,3 +66,4 @@ enum {
#define GP_PPC_DEFAULT_ON (GP_DEFAULT_ON & GP_OWNER_PPC) #define GP_PPC_DEFAULT_ON (GP_DEFAULT_ON & GP_OWNER_PPC)
#endif #endif

View File

@ -3,7 +3,7 @@
Hollywood register definitions Hollywood register definitions
Copyright (C) 2008, 2009 Haxx Enterprises Copyright (C) 2008, 2009 Haxx Enterprises <bushing@gmail.com>
Copyright (C) 2008, 2009 Sven Peter <svenpeter@gmail.com> Copyright (C) 2008, 2009 Sven Peter <svenpeter@gmail.com>
Copyright (C) 2008, 2009 Hector Martin "marcan" <marcan@marcansoft.com> Copyright (C) 2008, 2009 Hector Martin "marcan" <marcan@marcansoft.com>
@ -195,3 +195,4 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#define MEM_FLUSHACK (MEM_REG_BASE+0x22a) #define MEM_FLUSHACK (MEM_REG_BASE+0x22a)
#endif #endif

1
ipc.c
View File

@ -6,6 +6,7 @@
Copyright (C) 2008, 2009 Hector Martin "marcan" <marcan@marcansoft.com> Copyright (C) 2008, 2009 Hector Martin "marcan" <marcan@marcansoft.com>
Copyright (C) 2008, 2009 Haxx Enterprises <bushing@gmail.com> Copyright (C) 2008, 2009 Haxx Enterprises <bushing@gmail.com>
Copyright (C) 2008, 2009 Sven Peter <svenpeter@gmail.com> Copyright (C) 2008, 2009 Sven Peter <svenpeter@gmail.com>
Copyright (C) 2009 Andre Heider "dhewg" <dhewg@wiibrew.org>
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by

4
ipc.h
View File

@ -4,8 +4,9 @@
inter-processor communications inter-processor communications
Copyright (C) 2008, 2009 Hector Martin "marcan" <marcan@marcansoft.com> Copyright (C) 2008, 2009 Hector Martin "marcan" <marcan@marcansoft.com>
Copyright (C) 2008, 2009 Haxx Enterprises <bushing@gmail.com Copyright (C) 2008, 2009 Haxx Enterprises <bushing@gmail.com>
Copyright (C) 2008, 2009 Sven Peter <svenpeter@gmail.com> Copyright (C) 2008, 2009 Sven Peter <svenpeter@gmail.com>
Copyright (C) 2009 Andre Heider "dhewg" <dhewg@wiibrew.org>
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -151,3 +152,4 @@ u32 ipc_process_slow(void);
void ipc_add_slow(volatile ipc_request *req); void ipc_add_slow(volatile ipc_request *req);
#endif #endif

1
irq.c
View File

@ -4,6 +4,7 @@
IRQ support IRQ support
Copyright (C) 2008, 2009 Hector Martin "marcan" <marcan@marcansoft.com> Copyright (C) 2008, 2009 Hector Martin "marcan" <marcan@marcansoft.com>
Copyright (C) 2009 Andre Heider "dhewg" <dhewg@wiibrew.org>
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by

1
irq.h
View File

@ -80,3 +80,4 @@ void irq_set_alarm(u32 ms, u8 enable);
#endif #endif
#endif #endif

View File

@ -1,3 +1,24 @@
/*
mini - a Free Software replacement for the Nintendo/BroadOn IOS.
exception handling
Copyright (C) 2008, 2009 Hector Martin "marcan" <marcan@marcansoft.com>
This program 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, version 2.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "hollywood.h" #include "hollywood.h"
#include "irq.h" #include "irq.h"
@ -41,3 +62,4 @@ irq_restore:
orr r1, r1, r0 orr r1, r1, r0
msr cpsr_c, r1 msr cpsr_c, r1
bx lr bx lr

View File

@ -1,4 +1,23 @@
/* This makes LD avoid including the exception unwinder for long long division support */ /*
mini - a Free Software replacement for the Nintendo/BroadOn IOS.
Copyright (C) 2008, 2009 Hector Martin "marcan" <marcan@marcansoft.com>
This program 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, version 2.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
// This makes LD avoid including the exception unwinder for long long division support
char __aeabi_unwind_cpp_pr0[0]; char __aeabi_unwind_cpp_pr0[0];

6
main.c
View File

@ -1,10 +1,10 @@
/* /*
mini - a Free Software replacement for the Nintendo/BroadOn IOS. mini - a Free Software replacement for the Nintendo/BroadOn IOS.
Copyright (C) 2008, 2009 Haxx Enterprises <bushing@gmail.com Copyright (C) 2008, 2009 Haxx Enterprises <bushing@gmail.com>
Copyright (C) 2008, 2009 Sven Peter <svenpeter@gmail.com> Copyright (C) 2008, 2009 Sven Peter <svenpeter@gmail.com>
Copyright (C) 2008, 2009 Hector Martin "marcan" <marcan@marcansoft.com> Copyright (C) 2008, 2009 Hector Martin "marcan" <marcan@marcansoft.com>
TODO add yourself here, kthx Copyright (C) 2009 Andre Heider "dhewg" <dhewg@wiibrew.org>
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -83,7 +83,6 @@ u32 _main(void *base)
gecko_printf("Initializing SDHC...\n"); gecko_printf("Initializing SDHC...\n");
sdhc_init(); sdhc_init();
// sd_initialize();
gecko_printf("Mounting SD...\n"); gecko_printf("Mounting SD...\n");
fres = f_mount(0, &fatfs); fres = f_mount(0, &fatfs);
@ -122,3 +121,4 @@ shutdown:
gecko_printf("Vectoring to 0x%08x...\n", vector); gecko_printf("Vectoring to 0x%08x...\n", vector);
return vector; return vector;
} }

View File

@ -378,3 +378,4 @@ void mem_shutdown(void)
_tlb_inval(); _tlb_inval();
irq_restore(cookie); irq_restore(cookie);
} }

View File

@ -119,3 +119,4 @@ static inline void dc_flush_block_fast(void *block)
} }
#endif #endif

View File

@ -69,3 +69,4 @@ _tlb_inval:
mov r0, #0 mov r0, #0
mcr p15, 0, r0, c8, c7 mcr p15, 0, r0, c8, c7
bx lr bx lr

19
mini.ld
View File

@ -1,3 +1,22 @@
/*
mini - a Free Software replacement for the Nintendo/BroadOn IOS.
Copyright (C) 2008, 2009 Hector Martin "marcan" <marcan@marcansoft.com>
This program 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, version 2.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
OUTPUT_FORMAT("elf32-bigarm") OUTPUT_FORMAT("elf32-bigarm")
OUTPUT_ARCH(arm) OUTPUT_ARCH(arm)
EXTERN(_start) EXTERN(_start)

1
nand.c
View File

@ -353,3 +353,4 @@ void nand_ipc(volatile ipc_request *req)
} }
} }

1
nand.h
View File

@ -56,3 +56,4 @@ void nand_initialize();
void nand_ipc(volatile ipc_request *req); void nand_ipc(volatile ipc_request *req);
#endif #endif

View File

@ -58,3 +58,4 @@ void panic2(int mode, ...)
udelay(PANIC_INTER); udelay(PANIC_INTER);
} }
} }

View File

@ -29,3 +29,4 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
void panic2(int mode, ...) __attribute__ ((noreturn)); void panic2(int mode, ...) __attribute__ ((noreturn));
#endif #endif

View File

@ -4,6 +4,7 @@
PowerPC support code PowerPC support code
Copyright (C) 2008, 2009 Sven Peter <svenpeter@gmail.com> Copyright (C) 2008, 2009 Sven Peter <svenpeter@gmail.com>
Copyright (C) 2009 Andre Heider "dhewg" <dhewg@wiibrew.org>
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by

View File

@ -4,6 +4,7 @@
PowerPC support code PowerPC support code
Copyright (C) 2008, 2009 Sven Peter <svenpeter@gmail.com> Copyright (C) 2008, 2009 Sven Peter <svenpeter@gmail.com>
Copyright (C) 2009 Andre Heider "dhewg" <dhewg@wiibrew.org>
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -20,7 +21,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifndef __POWERPC_H__ #ifndef __POWERPC_H__
#define __POWERPC_H__ 1 #define __POWERPC_H__
#include "ipc.h" #include "ipc.h"

View File

@ -4,6 +4,7 @@
PowerPC ELF file loading PowerPC ELF file loading
Copyright (C) 2008, 2009 Hector Martin "marcan" <marcan@marcansoft.com> Copyright (C) 2008, 2009 Hector Martin "marcan" <marcan@marcansoft.com>
Copyright (C) 2009 Andre Heider "dhewg" <dhewg@wiibrew.org>
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by

View File

@ -4,6 +4,7 @@
PowerPC ELF file loading PowerPC ELF file loading
Copyright (C) 2008, 2009 Hector Martin "marcan" <marcan@marcansoft.com> Copyright (C) 2008, 2009 Hector Martin "marcan" <marcan@marcansoft.com>
Copyright (C) 2009 Andre Heider "dhewg" <dhewg@wiibrew.org>
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
@ -20,9 +21,10 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifndef __POWERPC_ELF_H__ #ifndef __POWERPC_ELF_H__
#define __POWERPC_ELF_H__ 1 #define __POWERPC_ELF_H__
int powerpc_boot_file(const char *path); int powerpc_boot_file(const char *path);
int powerpc_boot_mem(const u8 *addr, u32 len); int powerpc_boot_mem(const u8 *addr, u32 len);
#endif #endif

View File

@ -20,7 +20,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifndef __SDMMC_H__ #ifndef __SDMMC_H__
#define __SDMMC_H__ 1 #define __SDMMC_H__
#include "bsdtypes.h" #include "bsdtypes.h"
#include "sdmmcchip.h" #include "sdmmcchip.h"
@ -45,4 +45,6 @@ int sdmmc_check_card(struct device *dev);
void sdmmc_ack_card(struct device *dev); void sdmmc_ack_card(struct device *dev);
int sdmmc_read(struct device *dev, u32 blk_start, u32 blk_count, void *data); int sdmmc_read(struct device *dev, u32 blk_start, u32 blk_count, void *data);
void sdmmc_ipc(volatile ipc_request *req); void sdmmc_ipc(volatile ipc_request *req);
#endif #endif

View File

@ -83,3 +83,4 @@ int seeprom_read(void *dst, int offset, int size)
return size; return size;
} }

View File

@ -20,8 +20,9 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifndef __SEEPROM_H__ #ifndef __SEEPROM_H__
#define __SEEPROM_H__ 1 #define __SEEPROM_H__
int seeprom_read(void *dst, int offset, int size); int seeprom_read(void *dst, int offset, int size);
#endif #endif

View File

@ -136,3 +136,4 @@ debug_output:
bx lr bx lr
.pool .pool

View File

@ -27,3 +27,4 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
void debug_output(u8 byte); void debug_output(u8 byte);
#endif #endif

View File

@ -3,7 +3,6 @@
* *
* Copyright (C) 1991, 1992 Linus Torvalds * Copyright (C) 1991, 1992 Linus Torvalds
*/ */
#include "string.h" #include "string.h"
size_t strnlen(const char *s, size_t count) size_t strnlen(const char *s, size_t count)
@ -112,3 +111,4 @@ char *strchr(const char *s, int c)
} while(*s++ != 0); } while(*s++ != 0);
return NULL; return NULL;
} }

View File

@ -1,5 +1,10 @@
#ifndef _STRING_H_ /*
#define _STRING_H_ * linux/lib/string.c
*
* Copyright (C) 1991, 1992 Linus Torvalds
*/
#ifndef __STRING_H__
#define __STRING_H__
#include "types.h" #include "types.h"
@ -15,3 +20,4 @@ void *memcpy(void *, const void *, size_t);
int memcmp(const void *s1, const void *s2, size_t n); int memcmp(const void *s1, const void *s2, size_t n);
#endif #endif

View File

@ -17,8 +17,8 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
*/#ifndef __TYPES_H__ #ifndef __TYPES_H__
#define __TYPES_H__ #define __TYPES_H__
typedef unsigned char u8; typedef unsigned char u8;
@ -68,3 +68,4 @@ typedef s32 size_t;
#define ULLONG_MAX ((unsigned long long)0xffffffffffffffff) #define ULLONG_MAX ((unsigned long long)0xffffffffffffffff)
#endif #endif

View File

@ -717,3 +717,4 @@ int vsprintf(char *buf, const char *fmt, va_list args)
{ {
return vsnprintf(buf, INT_MAX, fmt, args); return vsnprintf(buf, INT_MAX, fmt, args);
} }

View File

@ -1,4 +1,10 @@
#ifndef __VSPRINTF_H__
#define __VSPRINTF_H__
#include <stdarg.h> #include <stdarg.h>
int vsprintf(char *buf, const char *fmt, va_list args); int vsprintf(char *buf, const char *fmt, va_list args);
int vsnprintf(char *buf, size_t size, const char *fmt, va_list args); int vsnprintf(char *buf, size_t size, const char *fmt, va_list args);
#endif