diff --git a/fusee/fusee-primary/src/sdmmc/sdmmc_core.c b/fusee/fusee-primary/src/sdmmc/sdmmc_core.c index 6e20939..aa79fc5 100644 --- a/fusee/fusee-primary/src/sdmmc/sdmmc_core.c +++ b/fusee/fusee-primary/src/sdmmc/sdmmc_core.c @@ -668,7 +668,7 @@ /* Clock failed to stabilize. */ if (is_timeout) { - sdmmc_error(sdmmc, "clock never stabilized!"); + sdmmc_error(sdmmc, "Clock never stabilized!"); return 0; } @@ -1353,8 +1353,11 @@ { /* Invalid block count or size. */ if (!req->blksz || !req->num_blocks) + { + sdmmc_error(sdmmc, "Empty DMA request!"); return 0; - + } + uint32_t blkcnt = req->num_blocks; /* Truncate block count. Length can't be over 65536 bytes. */ @@ -1366,8 +1369,11 @@ /* DMA buffer address must be aligned to 4 bytes. */ if ((4 - (dma_base_addr & 0x03)) & 0x03) + { + sdmmc_error(sdmmc, "Invalid DMA request data buffer: 0x%08X", dma_base_addr); return 0; - + } + /* Write our address to the registers. */ if (sdmmc->use_adma) { diff --git a/fusee/fusee-secondary/src/sdmmc/sdmmc_core.c b/fusee/fusee-secondary/src/sdmmc/sdmmc_core.c index 6e20939..aa79fc5 100644 --- a/fusee/fusee-secondary/src/sdmmc/sdmmc_core.c +++ b/fusee/fusee-secondary/src/sdmmc/sdmmc_core.c @@ -668,7 +668,7 @@ /* Clock failed to stabilize. */ if (is_timeout) { - sdmmc_error(sdmmc, "clock never stabilized!"); + sdmmc_error(sdmmc, "Clock never stabilized!"); return 0; } @@ -1353,8 +1353,11 @@ { /* Invalid block count or size. */ if (!req->blksz || !req->num_blocks) + { + sdmmc_error(sdmmc, "Empty DMA request!"); return 0; - + } + uint32_t blkcnt = req->num_blocks; /* Truncate block count. Length can't be over 65536 bytes. */ @@ -1366,8 +1369,11 @@ /* DMA buffer address must be aligned to 4 bytes. */ if ((4 - (dma_base_addr & 0x03)) & 0x03) + { + sdmmc_error(sdmmc, "Invalid DMA request data buffer: 0x%08X", dma_base_addr); return 0; - + } + /* Write our address to the registers. */ if (sdmmc->use_adma) { diff --git a/sept/sept-secondary/src/sdmmc/sdmmc_core.c b/sept/sept-secondary/src/sdmmc/sdmmc_core.c index 6e20939..aa79fc5 100644 --- a/sept/sept-secondary/src/sdmmc/sdmmc_core.c +++ b/sept/sept-secondary/src/sdmmc/sdmmc_core.c @@ -668,7 +668,7 @@ /* Clock failed to stabilize. */ if (is_timeout) { - sdmmc_error(sdmmc, "clock never stabilized!"); + sdmmc_error(sdmmc, "Clock never stabilized!"); return 0; } @@ -1353,8 +1353,11 @@ { /* Invalid block count or size. */ if (!req->blksz || !req->num_blocks) + { + sdmmc_error(sdmmc, "Empty DMA request!"); return 0; - + } + uint32_t blkcnt = req->num_blocks; /* Truncate block count. Length can't be over 65536 bytes. */ @@ -1366,8 +1369,11 @@ /* DMA buffer address must be aligned to 4 bytes. */ if ((4 - (dma_base_addr & 0x03)) & 0x03) + { + sdmmc_error(sdmmc, "Invalid DMA request data buffer: 0x%08X", dma_base_addr); return 0; - + } + /* Write our address to the registers. */ if (sdmmc->use_adma) { diff --git a/stratosphere/boot/source/i2c_driver/i2c_api.cpp b/stratosphere/boot/source/i2c_driver/i2c_api.cpp index c923be2..89226f0 100644 --- a/stratosphere/boot/source/i2c_driver/i2c_api.cpp +++ b/stratosphere/boot/source/i2c_driver/i2c_api.cpp @@ -1,16 +1,12 @@ /* * Copyright (c) 2018-2019 Atmosphère-NX * - * This program is free software{ - -} you can redistribute it and/or modify it + * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT - * ANY WARRANTY{ - -} without even the implied warranty of MERCHANTABILITY or + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * diff --git a/stratosphere/boot/source/i2c_driver/i2c_command_list.cpp b/stratosphere/boot/source/i2c_driver/i2c_command_list.cpp index 0e11f4e..4491502 100644 --- a/stratosphere/boot/source/i2c_driver/i2c_command_list.cpp +++ b/stratosphere/boot/source/i2c_driver/i2c_command_list.cpp @@ -1,16 +1,12 @@ /* * Copyright (c) 2018-2019 Atmosphère-NX * - * This program is free software{ - -} you can redistribute it and/or modify it + * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT - * ANY WARRANTY{ - -} without even the implied warranty of MERCHANTABILITY or + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * diff --git a/stratosphere/boot/source/i2c_driver/i2c_driver_session.cpp b/stratosphere/boot/source/i2c_driver/i2c_driver_session.cpp index 7f909b8..47e4305 100644 --- a/stratosphere/boot/source/i2c_driver/i2c_driver_session.cpp +++ b/stratosphere/boot/source/i2c_driver/i2c_driver_session.cpp @@ -1,16 +1,12 @@ /* * Copyright (c) 2018-2019 Atmosphère-NX * - * This program is free software{ - -} you can redistribute it and/or modify it + * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT - * ANY WARRANTY{ - -} without even the implied warranty of MERCHANTABILITY or + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * diff --git a/stratosphere/boot/source/i2c_driver/i2c_resource_manager.cpp b/stratosphere/boot/source/i2c_driver/i2c_resource_manager.cpp index 2ae9b22..ad3f412 100644 --- a/stratosphere/boot/source/i2c_driver/i2c_resource_manager.cpp +++ b/stratosphere/boot/source/i2c_driver/i2c_resource_manager.cpp @@ -1,16 +1,12 @@ /* * Copyright (c) 2018-2019 Atmosphère-NX * - * This program is free software{ - -} you can redistribute it and/or modify it + * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT - * ANY WARRANTY{ - -} without even the implied warranty of MERCHANTABILITY or + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * diff --git a/stratosphere/boot/source/updater/updater_api.cpp b/stratosphere/boot/source/updater/updater_api.cpp index 8c46494..ec31d34 100644 --- a/stratosphere/boot/source/updater/updater_api.cpp +++ b/stratosphere/boot/source/updater/updater_api.cpp @@ -1,16 +1,12 @@ /* * Copyright (c) 2018-2019 Atmosphère-NX * - * This program is free software{ - -} you can redistribute it and/or modify it + * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT - * ANY WARRANTY{ - -} without even the implied warranty of MERCHANTABILITY or + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * diff --git a/stratosphere/boot/source/updater/updater_bis_management.cpp b/stratosphere/boot/source/updater/updater_bis_management.cpp index b655281..388ef77 100644 --- a/stratosphere/boot/source/updater/updater_bis_management.cpp +++ b/stratosphere/boot/source/updater/updater_bis_management.cpp @@ -1,16 +1,12 @@ /* * Copyright (c) 2018-2019 Atmosphère-NX * - * This program is free software{ - -} you can redistribute it and/or modify it + * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT - * ANY WARRANTY{ - -} without even the implied warranty of MERCHANTABILITY or + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * diff --git a/stratosphere/boot/source/updater/updater_bis_save.cpp b/stratosphere/boot/source/updater/updater_bis_save.cpp index 6910e6f..2258b17 100644 --- a/stratosphere/boot/source/updater/updater_bis_save.cpp +++ b/stratosphere/boot/source/updater/updater_bis_save.cpp @@ -1,16 +1,12 @@ /* * Copyright (c) 2018-2019 Atmosphère-NX * - * This program is free software{ - -} you can redistribute it and/or modify it + * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT - * ANY WARRANTY{ - -} without even the implied warranty of MERCHANTABILITY or + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * diff --git a/stratosphere/boot/source/updater/updater_files.cpp b/stratosphere/boot/source/updater/updater_files.cpp index 234f4e4..7c05a00 100644 --- a/stratosphere/boot/source/updater/updater_files.cpp +++ b/stratosphere/boot/source/updater/updater_files.cpp @@ -1,16 +1,12 @@ /* * Copyright (c) 2018-2019 Atmosphère-NX * - * This program is free software{ - -} you can redistribute it and/or modify it + * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT - * ANY WARRANTY{ - -} without even the implied warranty of MERCHANTABILITY or + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * diff --git a/stratosphere/boot/source/updater/updater_paths.cpp b/stratosphere/boot/source/updater/updater_paths.cpp index 215b810..7a83cd2 100644 --- a/stratosphere/boot/source/updater/updater_paths.cpp +++ b/stratosphere/boot/source/updater/updater_paths.cpp @@ -1,16 +1,12 @@ /* * Copyright (c) 2018-2019 Atmosphère-NX * - * This program is free software{ - -} you can redistribute it and/or modify it + * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, * version 2, as published by the Free Software Foundation. * * This program is distributed in the hope it will be useful, but WITHOUT - * ANY WARRANTY{ - -} without even the implied warranty of MERCHANTABILITY or + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. *