Download boot/ppc/stage1.c from Snapkitty/phaser-ags: direct link, hf CLI and curl.
- Browser
- Download file 697 Bytes
-
https://huggingface.co/Snapkitty/phaser-ags/resolve/main/boot/ppc/stage1.c
- Command line
-
hf download hf://Snapkitty/phaser-ags/boot/ppc/stage1.c
-
curl -L -o stage1.c https://huggingface.co/Snapkitty/phaser-ags/resolve/main/boot/ppc/stage1.c
697 Bytes
| /* PowerPC Universal Bootloader Stage 1 */ | |
| __attribute__((section(".reset"))) void reset_entry(void) { | |
| asm volatile("lis r0, 0x0000; mtmsr r0"); | |
| asm volatile("lis r1, STACK_BASE@h; ori r1, r1, STACK_BASE@l"); | |
| cache_init(); | |
| memory_init(); | |
| ppc_clock_init(); | |
| uart_init(115200); | |
| uart_puts("Stage 1 Bootloader PowerPC\r\n"); | |
| goto_stage2(); | |
| } | |
| void cache_init(void) { asm volatile("isync; li r0,0; mtmsr r0; isync"); } | |
| void memory_init(void) { } | |
| void ppc_clock_init(void) { } | |
| void goto_stage2(void) { void (*stage2)(void) = (void*)0x30010000; stage2(); } | |