|
KallistiOS git master
Independent SDK for the Sega Dreamcast
|
Dreamcast architecture specific options. More...
#include <kos/cdefs.h>#include <stdbool.h>#include <arch/types.h>#include <kos/elf.h>#include <kos/init.h>Go to the source code of this file.
Macros | |
| #define | _arch_mem_top ((uint32) 0x8d000000) |
| Top of memory available, depending on memory size. | |
| #define | PAGESIZE 4096 |
| Page size (for MMU) | |
| #define | PAGESIZE_BITS 12 |
| Bits for page size. | |
| #define | PAGEMASK (PAGESIZE - 1) |
| Mask for page offset. | |
| #define | page_count ((_arch_mem_top - page_phys_base) / PAGESIZE) |
| Page count "variable". | |
| #define | page_phys_base 0x8c010000 |
| Base address of available physical pages. | |
| #define | THD_SCHED_HZ 100 |
| Scheduler interrupt frequency. | |
| #define | ELF_SYM_PREFIX "_" |
| Global symbol prefix in ELF files. | |
| #define | ELF_SYM_PREFIX_LEN 1 |
| Length of global symbol prefix in ELF files. | |
| #define | ARCH_NAME "Dreamcast" |
| Standard name for this arch. | |
| #define | ARCH_ELFCLASS ELFCLASS32 |
| ELF class for this architecture. | |
| #define | ARCH_ELFDATA ELFDATA2LSB |
| ELF data encoding for this architecture. | |
| #define | ARCH_CODE EM_SH |
| ELF machine type code for this architecture. | |
| #define | ARCH_EXIT_RETURN 1 |
| Return to loader. | |
| #define | ARCH_EXIT_MENU 2 |
| Return to system menu. | |
| #define | ARCH_EXIT_REBOOT 3 |
| Reboot the machine. | |
| #define | HW_MEM_16 16777216 |
| 16M retail Dreamcast | |
| #define | HW_MEM_32 33554432 |
| 32M NAOMI/modded Dreamcast | |
| #define | HW_MEMSIZE (_arch_mem_top - 0x8c000000) |
| Determine how much memory is installed in current machine. | |
| #define | DBL_MEM (_arch_mem_top - 0x8d000000) |
| Use this macro to easily determine if system has 32MB of RAM. | |
| #define | HW_TYPE_RETAIL 0x0 |
| A retail Dreamcast. | |
| #define | HW_TYPE_SET5 0x9 |
| A Set5.xx devkit. | |
| #define | HW_TYPE_NAOMI 0xa |
| A NAOMI arcade. | |
| #define | HW_REGION_UNKNOWN 0x0 |
| Unknown region. | |
| #define | HW_REGION_ASIA 0x1 |
| Japan/Asia (NTSC) | |
| #define | HW_REGION_US 0x4 |
| North America. | |
| #define | HW_REGION_EUROPE 0xC |
| Europe (PAL) | |
Functions | |
| static const unsigned | HZ ("Please use the new THD_SCHED_HZ macro.") |
| Legacy symbol for scheduler frequency. | |
| void | arch_panic (const char *str) __noreturn |
| Panic function. | |
| void | arch_main (void) __noreturn |
| Kernel C-level entry point. | |
| void | arch_set_exit_path (int path) |
| Set the exit path. | |
| void | arch_exit (void) __noreturn |
| Generic kernel "exit" point. | |
| void | arch_return (int ret_code) __noreturn |
| Kernel "return" point. | |
| void | arch_abort (void) __noreturn |
| Kernel "abort" point. | |
| void | arch_reboot (void) __noreturn |
| Kernel "reboot" call. | |
| void | arch_menu (void) __noreturn |
| Kernel "exit to menu" call. | |
| int | mm_init (void) |
| Initialize the memory management system. | |
| void * | mm_sbrk (unsigned long increment) |
| Request more core memory from the system. | |
| int | hardware_sys_init (void) |
| Initialize bare-bones hardware systems. | |
| int | hardware_periph_init (void) |
| Initialize some peripheral systems. | |
| void | hardware_shutdown (void) |
| Shut down hardware that was initted. | |
| int | hardware_sys_mode (int *region) |
| Retrieve the system mode of the console in use. | |
| static void | arch_sleep (void) |
| Dreamcast specific sleep mode function. | |
| static bool | arch_valid_address (uintptr_t ptr) |
| Returns true if the passed address is likely to be valid. | |
| static bool | arch_valid_text_address (uintptr_t ptr) |
| Returns true if the passed address is in the text section of your program. | |
| const char *__pure2 | kos_get_banner (void) |
| const char *__pure2 | kos_get_license (void) |
| const char *__pure2 | kos_get_authors (void) |
Variables | |
| char | _executable_start |
| Start and End address for .text portion of program. | |
| char | _etext |
Dreamcast architecture specific options.
This file has various architecture specific options defined in it.
| const char *__pure2 kos_get_authors | ( | void | ) |
| const char *__pure2 kos_get_banner | ( | void | ) |
| const char *__pure2 kos_get_license | ( | void | ) |