Use arm11 entry define for screen.c, fix isFirmlaunch not being always defined

This commit is contained in:
Aurora Wright 2017-05-20 13:46:12 +02:00
parent 57900e91ba
commit de0f1dc156
6 changed files with 5 additions and 8 deletions

View File

@ -26,7 +26,6 @@
void launchFirm(Firm *firm, int argc, char **argv)
{
//Copy FIRM sections to respective memory locations
for(u32 sectionNum = 0; sectionNum < 4 && firm->section[sectionNum].size != 0; sectionNum++)
memcpy(firm->section[sectionNum].address, (u8 *)firm + firm->section[sectionNum].offset, firm->section[sectionNum].size);

View File

@ -30,7 +30,7 @@ void main(int argc __attribute__((unused)), char **argv)
char absPath[24 + 255];
u32 i;
for(i = 0; i < 23 + 255 && argv[0][i] != 0; i++)
for(i = 0; i < sizeof(absPath) - 1 && argv[0][i] != 0; i++)
absPath[i] = argv[0][i];
absPath[i] = 0;

View File

@ -379,7 +379,7 @@ void launchFirm(FirmwareType firmType, bool loadFromStorage)
if(!isFirmlaunch) deinitScreens();
//Set ARM11 kernel entrypoint
ARM11_CORE0_MAILBOX_ENTRYPOINT = (u32)firm->arm11Entry;
*ARM11_CORE0_MAILBOX_ENTRYPOINT = (u32)firm->arm11Entry;
//Ensure that all memory transfers have completed and that the caches have been flushed
flushEntireDCache();

View File

@ -38,7 +38,7 @@ extern CfgData configData;
extern ConfigurationStatus needConfig;
extern FirmwareSource firmSource;
bool isFirmlaunch,
bool isFirmlaunch = false,
isSdMode;
u16 launchedPath[41];
@ -63,8 +63,6 @@ void main(int argc, char **argv)
for(i = 0; i < 40 && argv[0][i] != 0; i++) //Copy and convert the path to utf16
launchedPath[i] = argv[0][i];
launchedPath[i] = 0;
isFirmlaunch = false;
break;
}

View File

@ -42,7 +42,7 @@
#include "i2c.h"
#include "utils.h"
static vu32 *arm11Entry = (vu32 *)0x1FFFFFFC;
static vu32 *arm11Entry = ARM11_CORE0_MAILBOX_ENTRYPOINT;
static const u32 brightness[4] = {0x5F, 0x4C, 0x39, 0x26};

View File

@ -47,7 +47,7 @@ typedef volatile s64 vs64;
#include "3dsheaders.h"
#define ARM11_CORE0_MAILBOX_ENTRYPOINT *(vu32 *)0x1FFFFFFC
#define ARM11_CORE0_MAILBOX_ENTRYPOINT ((vu32 *)0x1FFFFFFC)
#define CFG_BOOTENV (*(vu32 *)0x10010000)
#define CFG_UNITINFO (*(vu8 *)0x10010010)