hocclk bpmp: communication
This commit is contained in:
1 parent
b20d20edff
commit
1990b1b66c
14 files changed
+189
-4
No files matched your search
@@ -30,7 +30,10 @@
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdbool.h>
|
||||
#ifdef __SWITCH__ // Wont be defined in BPMP-FW
|
||||
#include <switch/types.h>
|
||||
#endif
|
||||
|
||||
typedef enum
|
||||
{
|
||||
HocClkSocType_Erista = 0, // T210, found in Icosa and Copper
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright (c) Souldbminer, Lightos_ and Horizon OC Contributors
|
||||
*
|
||||
* 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/>.
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include "board.h"
|
||||
|
||||
#define HOCCLK_BPMP_MAGIC 0x42504D50 // 'BPMP'
|
||||
|
||||
/*
|
||||
* Shared with BPMP-FW
|
||||
* Any 64 bit data type is not permitted.
|
||||
*/
|
||||
typedef struct {
|
||||
u32 magic; // should be HOCCLK_BPMP_MAGIC once bpmpfw is running
|
||||
u32 status; // Reserved for error codes and such
|
||||
u32 reserved[6];
|
||||
} HocClkBpmpSharedInfo;
|
||||
|
||||
static_assert(sizeof(HocClkBpmpSharedInfo) == 0x20);
|
||||
@@ -29,6 +29,7 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#include "board.h"
|
||||
#include "bpmp.h"
|
||||
|
||||
typedef struct {
|
||||
|
||||
@@ -84,6 +85,9 @@ typedef struct {
|
||||
bool rebootRequired;
|
||||
bool isFirstLoad;
|
||||
|
||||
// Populated from bpmpfw's work-RAM via SmcCopyFromIram (see HocClkBpmpSharedInfo above).
|
||||
HocClkBpmpSharedInfo bpmpInfo;
|
||||
|
||||
// Reserved for future use
|
||||
u8 reserved[0x358];
|
||||
} HocClkContext;
|
||||
@@ -100,4 +104,4 @@ typedef struct
|
||||
|
||||
#define HOCCLK_GLOBAL_PROFILE_TID 0xA111111111111111
|
||||
|
||||
static_assert(sizeof(HocClkContext) == 0x500);
|
||||
static_assert(sizeof(HocClkContext) == 0x520);
|
||||
Reference in new issue
Block a user