Use arm11 entry define for screen.c, fix isFirmlaunch not being always defined
This commit is contained in:
parent
57900e91ba
commit
de0f1dc156
@ -26,7 +26,6 @@
|
|||||||
|
|
||||||
void launchFirm(Firm *firm, int argc, char **argv)
|
void launchFirm(Firm *firm, int argc, char **argv)
|
||||||
{
|
{
|
||||||
|
|
||||||
//Copy FIRM sections to respective memory locations
|
//Copy FIRM sections to respective memory locations
|
||||||
for(u32 sectionNum = 0; sectionNum < 4 && firm->section[sectionNum].size != 0; sectionNum++)
|
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);
|
memcpy(firm->section[sectionNum].address, (u8 *)firm + firm->section[sectionNum].offset, firm->section[sectionNum].size);
|
||||||
|
@ -30,7 +30,7 @@ void main(int argc __attribute__((unused)), char **argv)
|
|||||||
char absPath[24 + 255];
|
char absPath[24 + 255];
|
||||||
|
|
||||||
u32 i;
|
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] = argv[0][i];
|
||||||
absPath[i] = 0;
|
absPath[i] = 0;
|
||||||
|
|
||||||
|
@ -379,7 +379,7 @@ void launchFirm(FirmwareType firmType, bool loadFromStorage)
|
|||||||
if(!isFirmlaunch) deinitScreens();
|
if(!isFirmlaunch) deinitScreens();
|
||||||
|
|
||||||
//Set ARM11 kernel entrypoint
|
//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
|
//Ensure that all memory transfers have completed and that the caches have been flushed
|
||||||
flushEntireDCache();
|
flushEntireDCache();
|
||||||
|
@ -38,7 +38,7 @@ extern CfgData configData;
|
|||||||
extern ConfigurationStatus needConfig;
|
extern ConfigurationStatus needConfig;
|
||||||
extern FirmwareSource firmSource;
|
extern FirmwareSource firmSource;
|
||||||
|
|
||||||
bool isFirmlaunch,
|
bool isFirmlaunch = false,
|
||||||
isSdMode;
|
isSdMode;
|
||||||
u16 launchedPath[41];
|
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
|
for(i = 0; i < 40 && argv[0][i] != 0; i++) //Copy and convert the path to utf16
|
||||||
launchedPath[i] = argv[0][i];
|
launchedPath[i] = argv[0][i];
|
||||||
launchedPath[i] = 0;
|
launchedPath[i] = 0;
|
||||||
|
|
||||||
isFirmlaunch = false;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
#include "i2c.h"
|
#include "i2c.h"
|
||||||
#include "utils.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};
|
static const u32 brightness[4] = {0x5F, 0x4C, 0x39, 0x26};
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ typedef volatile s64 vs64;
|
|||||||
|
|
||||||
#include "3dsheaders.h"
|
#include "3dsheaders.h"
|
||||||
|
|
||||||
#define ARM11_CORE0_MAILBOX_ENTRYPOINT *(vu32 *)0x1FFFFFFC
|
#define ARM11_CORE0_MAILBOX_ENTRYPOINT ((vu32 *)0x1FFFFFFC)
|
||||||
|
|
||||||
#define CFG_BOOTENV (*(vu32 *)0x10010000)
|
#define CFG_BOOTENV (*(vu32 *)0x10010000)
|
||||||
#define CFG_UNITINFO (*(vu8 *)0x10010010)
|
#define CFG_UNITINFO (*(vu8 *)0x10010010)
|
||||||
|
Reference in New Issue
Block a user