#include <xtf/types.h>
#include <arch/page.h>
+#include <arch/traps.h>
#include <xen/xen.h>
#if defined(CONFIG_PV)
#define m2p ((unsigned long *)MACH2PHYS_VIRT_START)
-extern start_info_t *start_info;
static inline void *mfn_to_virt(unsigned long mfn)
{
static inline unsigned long pfn_to_mfn(unsigned long pfn)
{
- unsigned long *p2m = _p(start_info->mfn_list);
+ unsigned long *p2m = _p(pv_start_info->mfn_list);
return p2m[pfn];
}
extern uint8_t boot_stack[3 * PAGE_SIZE];
extern uint8_t user_stack[PAGE_SIZE];
-extern start_info_t *start_info;
+extern xen_pv_start_info_t *pv_start_info;
extern shared_info_t shared_info;
#endif /* XTF_X86_TRAPS_H */
/* PV entry point. */
GLOBAL(_start)
- /* Stash start_info_t pointer from domain build. */
- mov %_ASM_SI, start_info
+ /* Stash the pv_start_info pointer from domain builder. */
+ mov %_ASM_SI, pv_start_info
/* Move onto own stack. */
mov $boot_stack + PAGE_SIZE, %esp
#include <arch/pagetable.h>
#include <arch/symbolic-const.h>
+/* Filled in by pv/head.S */
+xen_pv_start_info_t *pv_start_info = NULL;
+
/* Real entry points */
void entry_DE(void);
void entry_DB(void);
* If we have got this far, SMEP/SMAP are not leaking into guest
* context. Proceed with remapping all mappings as _PAGE_USER.
*/
- uint64_t *l3 = _p(start_info->pt_base);
+ uint64_t *l3 = _p(pv_start_info->pt_base);
unsigned long linear = 0;
while ( linear < __HYPERVISOR_VIRT_START_PAE )
const char environment_description[] = ENVIRONMENT_DESCRIPTION;
-#ifdef CONFIG_PV
-/* Filled in by head_pv.S */
-start_info_t *start_info = NULL;
-#endif
-
shared_info_t shared_info __page_aligned_bss;
static void collect_cpuid(cpuid_count_fn_t cpuid_fn)
if ( IS_DEFINED(CONFIG_PV) )
{
- cons_ring = mfn_to_virt(start_info->console.domU.mfn);
- cons_evtchn = start_info->console.domU.evtchn;
+ cons_ring = mfn_to_virt(pv_start_info->console.domU.mfn);
+ cons_evtchn = pv_start_info->console.domU.evtchn;
}
else /* HVM */
{
if ( IS_DEFINED(CONFIG_PV) )
{
- xb_ring = mfn_to_virt(start_info->store_mfn);
- xb_port = start_info->store_evtchn;
+ xb_ring = mfn_to_virt(pv_start_info->store_mfn);
+ xb_port = pv_start_info->store_evtchn;
}
else /* HVM */
{
}
else /* PV */
rc = hypercall_update_va_mapping(
- _u(&shared_info), start_info->shared_info | PF_SYM(RW, P),
+ _u(&shared_info), pv_start_info->shared_info | PF_SYM(RW, P),
UVMF_INVLPG);
if ( rc )
};
typedef struct shared_info shared_info_t;
-struct start_info {
+struct xen_pv_start_info {
/* THE FOLLOWING ARE FILLED IN BOTH ON INITIAL BOOT AND ON RESUME. */
char magic[32]; /* "xen-<version>-<platform>". */
unsigned long nr_pages; /* Total pages allocated to this domain. */
unsigned long first_p2m_pfn;/* 1st pfn forming initial P->M table. */
unsigned long nr_p2m_frames;/* # of pfns forming initial P->M table. */
};
-typedef struct start_info start_info_t;
+typedef struct xen_pv_start_info xen_pv_start_info_t;
#endif
/* MMU UPDATE operations */
* @todo Implement better command line infrastructure, but this will do
* for now.
*/
- if ( !strcmp((char *)start_info->cmd_line, "hypercall") )
+ if ( !strcmp((char *)pv_start_info->cmd_line, "hypercall") )
{
printk("Test: PHYSDEVOP_set_iopl\n");
test = &hypercall;
}
- else if ( !strcmp((char *)start_info->cmd_line, "vmassist") )
+ else if ( !strcmp((char *)pv_start_info->cmd_line, "vmassist") )
{
if ( hypercall_vm_assist(VMASST_CMD_enable,
VMASST_TYPE_architectural_iopl) )
gnttab_v1[8].flags = GTF_permit_access;
/* Opencoded pagewalk to KB(4) */
- intpte_t *l4t = _p(start_info->pt_base);
+ intpte_t *l4t = _p(pv_start_info->pt_base);
intpte_t *l3t = maddr_to_virt(pte_to_paddr(l4t[0]));
intpte_t *l2t = maddr_to_virt(pte_to_paddr(l3t[0]));
intpte_t *l1t = maddr_to_virt(pte_to_paddr(l2t[0]));