Minor stuff

This commit is contained in:
Aurora
2016-09-15 19:53:51 +02:00
parent 14152b3072
commit 2f915401dd
6 changed files with 43 additions and 53 deletions

View File

@@ -34,8 +34,8 @@
bool loadSplash(void)
{
const char *topSplashPath = "/luma/splash.bin",
*bottomSplashPath = "/luma/splashbottom.bin";
const char topSplashPath[] = "/luma/splash.bin",
bottomSplashPath[] = "/luma/splashbottom.bin";
bool isTopSplashValid = getFileSize(topSplashPath) == SCREEN_TOP_FBSIZE,
isBottomSplashValid = getFileSize(bottomSplashPath) == SCREEN_BOTTOM_FBSIZE;

View File

@@ -339,7 +339,6 @@ static inline u32 loadFirm(FirmwareType *firmType, FirmwareSource firmSource)
if(!fileRead(firm, "/luma/firmware.bin", 0x400000) || section[2].address != (u8 *)0x8006800)
error("An old unsupported FIRM has been detected.\nCopy a valid firmware.bin in /luma to boot");
//No assumption regarding FIRM version
firmVersion = 0xFFFFFFFF;
}
}
@@ -595,7 +594,8 @@ static inline void launchFirm(FirmwareType firmType)
//Set ARM11 kernel entrypoint
*arm11 = (u32)firm->arm11Entry;
flushEntireDCache(); //Ensure that all memory transfers have completed and that the data cache has been flushed
//Ensure that all memory transfers have completed and that the caches have been flushed
flushEntireDCache();
flushEntireICache();
//Final jump to ARM9 kernel

View File

@@ -132,7 +132,7 @@ bool verifyPin(void)
u8 cnt = 0;
u32 charDrawPos = 16 * SPACING_X;
const char *messagePath = "/luma/pinmessage.txt";
const char messagePath[] = "/luma/pinmessage.txt";
u32 messageSize = getFileSize(messagePath);
if(messageSize > 0 && messageSize <= 800)

View File

@@ -58,7 +58,8 @@ void mcuReboot(void)
{
if(!isFirmlaunch && PDN_GPU_CNT != 1) clearScreens(true, true);
flushEntireDCache(); //Ensure that all memory transfers have completed and that the data cache has been flushed
//Ensure that all memory transfers have completed and that the data cache has been flushed
flushEntireDCache();
i2cWriteRegister(I2C_DEV_MCU, 0x20, 1 << 2);
while(true);
@@ -68,17 +69,15 @@ void mcuPowerOff(void)
{
if(!isFirmlaunch && PDN_GPU_CNT != 1) clearScreens(true, true);
flushEntireDCache(); //Ensure that all memory transfers have completed and that the data cache has been flushed
//Ensure that all memory transfers have completed and that the data cache has been flushed
flushEntireDCache();
i2cWriteRegister(I2C_DEV_MCU, 0x20, 1 << 0);
while(true);
}
//TODO: add support for TIMER IRQ
static inline void startChrono(u64 initialTicks)
{
//Based on a NATIVE_FIRM disassembly
REG_TIMER_CNT(0) = 0; //67MHz
for(u32 i = 1; i < 4; i++) REG_TIMER_CNT(i) = 4; //Count-up