-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Started writing support for guests on several cores
- Loading branch information
1 parent
f703eea
commit c94631c
Showing
8 changed files
with
157 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
* Boot code for slave guests starting on different ARMv7a cores | ||
* | ||
*/ | ||
|
||
.global impl_slave_reset | ||
|
||
.extern arm_move_guest_blob | ||
.extern start_ | ||
.extern impl_undef | ||
.extern impl_swi | ||
.extern impl_pabort | ||
.extern impl_dabort | ||
.extern impl_irq | ||
.extern impl_fiq | ||
|
||
.code 32 | ||
.align 0 | ||
.section .vector,"ax" | ||
|
||
#include "arm_common.h" | ||
|
||
.align 4 | ||
.section .startup, "ax" | ||
|
||
impl_slave_reset: | ||
/* Start in supervisor mode, disable interrupts. */ | ||
msr CPSR_c, #ARM_MODE_SUPERVISOR | ARM_INTERRUPT_MASK | ||
/* Stack pointer starts at the physical address of the hyper stack top. */ | ||
/* ldr sp, =(__hyper_stack_top__ + HAL_OFFSET)*/ /* Switch to another hyper stack, which you create in the linker */ | ||
|
||
/* Clean BSS. | ||
bl arm_clear_bss */ | ||
|
||
/* Setup pages and switch to virtual memory. */ | ||
bl arm_setup_initial_slave_pt | ||
|
||
/* Switch to master page table */ | ||
bl arm_reset_initial_pt | ||
|
||
/* From here on (more precisely, from a point at the end of above function), | ||
* you are in virtual memory! */ | ||
|
||
/* Setup real stacks now, run core init and reclaim the initial stacks. */ | ||
bl arm_setup_initial_stack | ||
|
||
/* Init rest of hypervisor in C. */ | ||
/* start_ can be found in core/hypervisor/init.c */ | ||
bl start_ | ||
|
||
/* Should not be reached! */ | ||
bl _hang |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#include <hw.h> | ||
#include "hyper.h" | ||
#include "guest_blob.h" | ||
#include "mmu.h" | ||
#include "hw_core_mem.h" | ||
#include "dmmu.h" | ||
//TODO: Note: Added these to avoid warnings. | ||
extern void dmmu_init(); | ||
extern uint32_t dmmu_map_L1_section(addr_t va, addr_t sec_base_add, uint32_t attrs); | ||
extern void debug_inf(void); //TODO. Remove after debugging | ||
|
||
//Add what you need here in terms of external functions and imports to be able | ||
//to do what you want. | ||
|
||
void slave_start_(){ | ||
//TODO: Which of these needs to be done? | ||
//cpu_init(); | ||
|
||
/* Set up pagetable rules. */ | ||
//memory_init(); | ||
|
||
/* Initialize hardware. */ | ||
//soc_init(); | ||
//board_init(); | ||
|
||
/* Set up exception handlers and starting timer. */ | ||
//setup_handlers(); | ||
|
||
/* DMMU initialization. */ | ||
//dmmu_init(); | ||
|
||
/* Initialize hypervisor guest modes and data structures | ||
* according to config file in guest*/ | ||
//guests_init(); | ||
|
||
//Move along, main core... | ||
//start_guest(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters