Fixed a typing bug.

More explicit type conversion from virual to physical bytes.
Bracket negative #defines for extra paranoia.
Added a forgotten 'void' to a function.
This commit is contained in:
Kees van Reeuwijk 2010-01-06 08:23:14 +00:00
parent 49ec221a92
commit d8f3af3672
5 changed files with 9 additions and 9 deletions

View file

@ -98,7 +98,7 @@
/* /*
* to make APIC work if SMP is not configured, we need to set the maximal number * 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 CONFIG_MAX_CPUS 1
#define cpu_is_bsp(x) 1 #define cpu_is_bsp(x) 1
@ -483,7 +483,7 @@ PRIVATE struct gate_table_s gate_table_common[] = {
}; };
#ifdef CONFIG_APIC_DEBUG #ifdef CONFIG_APIC_DEBUG
PRIVATE lapic_set_dummy_handlers(void) PRIVATE void lapic_set_dummy_handlers(void)
{ {
char * handler; char * handler;
int vect = 32; int vect = 32;

View file

@ -144,8 +144,8 @@
#define IF_MASK 0x00000200 #define IF_MASK 0x00000200
#define IOPL_MASK 0x003000 #define IOPL_MASK 0x003000
#define vir2phys(vir) (kinfo.data_base + (vir_bytes) (vir)) #define vir2phys(vir) ((phys_bytes)((kinfo.data_base + (vir_bytes) (vir))))
#define phys2vir(ph) ((vir_bytes) (ph) - kinfo.data_base) #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_EBX 0x756e6547 /* ASCII value of "Genu" */
#define INTEL_CPUID_GEN_EDX 0x49656e69 /* ASCII value of "ineI" */ #define INTEL_CPUID_GEN_EDX 0x49656e69 /* ASCII value of "ineI" */

View file

@ -30,7 +30,7 @@ PRIVATE int psok = 0;
u8_t *vm_pagedirs = NULL; u8_t *vm_pagedirs = NULL;
#define NOPDE -1 #define NOPDE (-1)
#define PDEMASK(n) (1L << (n)) #define PDEMASK(n) (1L << (n))
PUBLIC u32_t dirtypde; PUBLIC u32_t dirtypde;
#define WANT_FREEPDES (sizeof(dirtypde)*8-5) #define WANT_FREEPDES (sizeof(dirtypde)*8-5)

View file

@ -107,7 +107,7 @@ EXTERN struct priv *ppriv_addr[NR_SYS_PROCS]; /* direct slot pointers */
#define USER_PRIV_ID static_priv_id(ROOT_USR_PROC_NR) #define USER_PRIV_ID static_priv_id(ROOT_USR_PROC_NR)
/* Specifies a null privilege id. /* 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 /* Make sure the system can boot. The following sanity check verifies that
* the system privileges table is large enough for the number of processes * the system privileges table is large enough for the number of processes

View file

@ -3,9 +3,9 @@
#define _VM_H 1 #define _VM_H 1
/* Pseudo error codes */ /* Pseudo error codes */
#define VMSUSPEND -996 #define VMSUSPEND (-996)
#define EFAULT_SRC -995 #define EFAULT_SRC (-995)
#define EFAULT_DST -994 #define EFAULT_DST (-994)
#define FIXLINMSG(prp) { prp->p_delivermsg_lin = umap_local(prp, D, prp->p_delivermsg_vir, sizeof(message)); } #define FIXLINMSG(prp) { prp->p_delivermsg_lin = umap_local(prp, D, prp->p_delivermsg_vir, sizeof(message)); }