More explicit type conversion from virual to physical bytes.
Bracket negative #defines for extra paranoia.
Added a forgotten 'void' to a function.
/*
* to make APIC work if SMP is not configured, we need to set the maximal number
- * fo CPUS to 1, cpuid to return 0 and the current cpu is always BSP
+ * of CPUS to 1, cpuid to return 0 and the current cpu is always BSP
*/
#define CONFIG_MAX_CPUS 1
#define cpu_is_bsp(x) 1
};
#ifdef CONFIG_APIC_DEBUG
-PRIVATE lapic_set_dummy_handlers(void)
+PRIVATE void lapic_set_dummy_handlers(void)
{
char * handler;
int vect = 32;
#define IF_MASK 0x00000200
#define IOPL_MASK 0x003000
-#define vir2phys(vir) (kinfo.data_base + (vir_bytes) (vir))
-#define phys2vir(ph) ((vir_bytes) (ph) - kinfo.data_base)
+#define vir2phys(vir) ((phys_bytes)((kinfo.data_base + (vir_bytes) (vir))))
+#define phys2vir(ph) (((vir_bytes)(((vir_bytes) (ph) - kinfo.data_base)))
#define INTEL_CPUID_GEN_EBX 0x756e6547 /* ASCII value of "Genu" */
#define INTEL_CPUID_GEN_EDX 0x49656e69 /* ASCII value of "ineI" */
u8_t *vm_pagedirs = NULL;
-#define NOPDE -1
+#define NOPDE (-1)
#define PDEMASK(n) (1L << (n))
PUBLIC u32_t dirtypde;
#define WANT_FREEPDES (sizeof(dirtypde)*8-5)
#define USER_PRIV_ID static_priv_id(ROOT_USR_PROC_NR)
/* Specifies a null privilege id.
*/
-#define NULL_PRIV_ID -1
+#define NULL_PRIV_ID (-1)
/* Make sure the system can boot. The following sanity check verifies that
* the system privileges table is large enough for the number of processes
#define _VM_H 1
/* Pseudo error codes */
-#define VMSUSPEND -996
-#define EFAULT_SRC -995
-#define EFAULT_DST -994
+#define VMSUSPEND (-996)
+#define EFAULT_SRC (-995)
+#define EFAULT_DST (-994)
#define FIXLINMSG(prp) { prp->p_delivermsg_lin = umap_local(prp, D, prp->p_delivermsg_vir, sizeof(message)); }