mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-06-06 01:21:18 -04:00
Rewrite the memory map-related code...
...other style fixes, etc.
This commit is contained in:
parent
bda9dcbe73
commit
c7d83c6eb6
26 changed files with 603 additions and 442 deletions
|
@ -8,23 +8,27 @@
|
|||
#include "memory_map.h"
|
||||
|
||||
/* Physaddr 0x40002EF8 */
|
||||
#define MAILBOX_NX_BOOTLOADER_BASE (mmio_get_device_address(MMIO_DEVID_NXBOOTLOADER_MAILBOX))
|
||||
static inline uintptr_t get_nx_bootloader_mailbox_base(void) {
|
||||
return MMIO_GET_DEVICE_ADDRESS(MMIO_DEVID_NXBOOTLOADER_MAILBOX);
|
||||
}
|
||||
|
||||
#define MAILBOX_NX_BOOTLOADER_SETUP_STATE (*((volatile uint32_t *)(MAILBOX_NX_BOOTLOADER_BASE + 0xEF8ULL)))
|
||||
#define MAILBOX_NX_BOOTLOADER_BASE (get_nx_bootloader_mailbox_base())
|
||||
|
||||
#define MAILBOX_NX_BOOTLOADER_SETUP_STATE (*((volatile uint32_t *)(MAILBOX_NX_BOOTLOADER_BASE + 0xEF8ull)))
|
||||
|
||||
#define NX_BOOTLOADER_STATE_INIT 0
|
||||
#define NX_BOOTLOADER_STATE_MOVED_BOOTCONFIG 1
|
||||
#define NX_BOOTLOADER_STATE_LOADED_PACKAGE2 2
|
||||
#define NX_BOOTLOADER_STATE_FINISHED 3
|
||||
#define NX_BOOTLOADER_STATE_FINISHED 3
|
||||
|
||||
/* Physaddr 0x40002EFC */
|
||||
#define MAILBOX_NX_BOOTLOADER_IS_SECMON_AWAKE (*((volatile uint32_t *)(MAILBOX_NX_BOOTLOADER_BASE + 0xEFCULL)))
|
||||
|
||||
#define NX_BOOTLOADER_BOOTCONFIG_POINTER ((void *)(0x4003D000ULL))
|
||||
#define NX_BOOTLOADER_BOOTCONFIG_POINTER ((void *)(0x4003D000ull))
|
||||
|
||||
#define NX_BOOTLOADER_PACKAGE2_LOAD_ADDRESS ((void *)(0xA9800000ULL))
|
||||
#define NX_BOOTLOADER_PACKAGE2_LOAD_ADDRESS ((void *)(0xA9800000ull))
|
||||
|
||||
#define DRAM_BASE_PHYSICAL (0x80000000ULL)
|
||||
#define DRAM_BASE_PHYSICAL (0x80000000ull)
|
||||
|
||||
#define MAGIC_PK21 (0x31324B50)
|
||||
#define PACKAGE2_SIZE_MAX 0x7FC000
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue