mirror of
https://github.com/fail0verflow/mini.git
synced 2024-11-16 16:39:25 +01:00
new ipc call IPC_PPC_BOOT_FILE. patch by trap15
This commit is contained in:
parent
67b273e735
commit
291d9f53d1
7
ipc.h
7
ipc.h
@ -79,7 +79,7 @@ Copyright (C) 2009 John Kelley <wiidev@kelley.ca>
|
||||
// etc.
|
||||
|
||||
#define IPC_SDHC_DISCOVER 0x0000
|
||||
#define IPC_SDHC_EXIT 0x0001
|
||||
#define IPC_SDHC_EXIT 0x0001
|
||||
|
||||
#define IPC_SDMMC_ACK 0x0000
|
||||
#define IPC_SDMMC_READ 0x0001
|
||||
@ -92,13 +92,14 @@ Copyright (C) 2009 John Kelley <wiidev@kelley.ca>
|
||||
|
||||
#define IPC_AES_RESET 0x0000
|
||||
#define IPC_AES_SETIV 0x0001
|
||||
#define IPC_AES_SETKEY 0x0002
|
||||
#define IPC_AES_DECRYPT 0x0003
|
||||
#define IPC_AES_SETKEY 0x0002
|
||||
#define IPC_AES_DECRYPT 0x0003
|
||||
|
||||
#define IPC_BOOT2_RUN 0x0000
|
||||
#define IPC_BOOT2_TMD 0x0001
|
||||
|
||||
#define IPC_PPC_BOOT 0x0000
|
||||
#define IPC_PPC_BOOT_FILE 0x0001
|
||||
|
||||
#define IPC_CODE (f,d,r) (((f)<<24)|((d)<<16)|(r))
|
||||
|
||||
|
17
powerpc.c
17
powerpc.c
@ -4,6 +4,7 @@
|
||||
|
||||
Copyright (C) 2008, 2009 Sven Peter <svenpeter@gmail.com>
|
||||
Copyright (C) 2009 Andre Heider "dhewg" <dhewg@wiibrew.org>
|
||||
Copyright (C) 2010 Alex Marshall <trap15@raidenii.net>
|
||||
|
||||
# This code is licensed to you under the terms of the GNU GPL, version 2;
|
||||
# see file COPYING or http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
|
||||
@ -15,6 +16,7 @@ Copyright (C) 2009 Andre Heider "dhewg" <dhewg@wiibrew.org>
|
||||
#include "powerpc_elf.h"
|
||||
#include "hollywood.h"
|
||||
#include "utils.h"
|
||||
#include "string.h"
|
||||
#include "start.h"
|
||||
#include "gecko.h"
|
||||
|
||||
@ -83,6 +85,21 @@ void powerpc_ipc(volatile ipc_request *req)
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case IPC_PPC_BOOT_FILE:
|
||||
if (req->args[0]) {
|
||||
// Enqueued from ARM side, do not invalidate mem nor ipc_post
|
||||
powerpc_boot_file((char *) req->args[1]);
|
||||
} else {
|
||||
dc_invalidaterange((void *) req->args[1],
|
||||
strnlen((char *) req->args[1], 256));
|
||||
int res = powerpc_boot_file((char *) req->args[1]);
|
||||
if (res)
|
||||
ipc_post(req->code, req->tag, 1, res);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
gecko_printf("IPC: unknown SLOW PPC request %04X\n", req->req);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user