mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-15 03:27:49 +01:00
sept-s: splash! (thanks @CtCaer, @balika011)
This commit is contained in:
parent
d20cd73523
commit
37eb3315b6
@ -26,6 +26,7 @@
|
||||
#include "timers.h"
|
||||
#include "fs_utils.h"
|
||||
#include "stage2.h"
|
||||
#include "splash.h"
|
||||
#include "chainloader.h"
|
||||
#include "sdmmc/sdmmc.h"
|
||||
#include "lib/fatfs/ff.h"
|
||||
@ -119,6 +120,14 @@ static void setup_env(void) {
|
||||
/* to avoid flickering. */
|
||||
display_backlight(true);
|
||||
|
||||
/* Set display background color. */
|
||||
for (size_t i = 0; i < 1280 * 768 * 4; i += 4) {
|
||||
MAKE_REG32((uintptr_t)g_framebuffer + i) = 0xFF37394C;
|
||||
}
|
||||
|
||||
/* Draw splash. */
|
||||
draw_splash((volatile uint32_t *)g_framebuffer);
|
||||
|
||||
/* Set up the exception handlers. */
|
||||
setup_exception_handlers();
|
||||
|
||||
@ -143,7 +152,7 @@ int main(void) {
|
||||
const char *stage2_path;
|
||||
stage2_args_t *stage2_args;
|
||||
uint32_t stage2_version = 0;
|
||||
ScreenLogLevel log_level = SCREEN_LOG_LEVEL_MANDATORY;
|
||||
ScreenLogLevel log_level = SCREEN_LOG_LEVEL_NONE;
|
||||
|
||||
/* Extract keys from the security engine, which TSEC FW locked down. */
|
||||
exfiltrate_keys_and_reboot_if_needed();
|
||||
@ -154,9 +163,6 @@ int main(void) {
|
||||
/* Initialize the display, console, etc. */
|
||||
setup_env();
|
||||
|
||||
/* Say hello. */
|
||||
print(SCREEN_LOG_LEVEL_MANDATORY, "Welcome to Atmosph\xe8re sept-secondary!\n");
|
||||
|
||||
/* Derive keys. */
|
||||
derive_7x_keys(g_tsec_key, g_tsec_root_key);
|
||||
|
||||
@ -173,6 +179,7 @@ int main(void) {
|
||||
load_stage2();
|
||||
|
||||
/* Setup argument data. */
|
||||
log_level = SCREEN_LOG_LEVEL_MANDATORY;
|
||||
stage2_path = stage2_get_program_path();
|
||||
strcpy(g_chainloader_arg_data, stage2_path);
|
||||
stage2_args = (stage2_args_t *)(g_chainloader_arg_data + strlen(stage2_path) + 1); /* May be unaligned. */
|
||||
|
48
sept/sept-secondary/src/splash.c
Normal file
48
sept/sept-secondary/src/splash.c
Normal file
File diff suppressed because one or more lines are too long
23
sept/sept-secondary/src/splash.h
Normal file
23
sept/sept-secondary/src/splash.h
Normal file
@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Copyright (c) 2018 naehrwert
|
||||
* Copyright (c) 2018 Atmosphère-NX
|
||||
*
|
||||
* 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
|
||||
* 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, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef SEPT_SPLASH_H
|
||||
#define SEPT_SPLASH_H
|
||||
|
||||
void draw_splash(volatile uint32_t *fb);
|
||||
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user