mirror of
https://github.com/clearlinux/graphene.git
synced 2026-09-06 13:51:28 +00:00
Build fixes.
This commit is contained in:
@@ -4,7 +4,7 @@ CFLAGS += -I. -Iinclude -I../.. -I../../../include -I../../../lib -I../../../ipc
|
||||
-I../../../linux-kernel/graphene
|
||||
ASFLAGS += -I. -Iinclude -I../.. -I../../../include
|
||||
|
||||
host_target = libpal-FreeBSD.a ../../pal-gdb
|
||||
host_target = libpal-FreeBSD.a pal-gdb
|
||||
|
||||
defs = -DIN_PAL -DPAL_DIR="$(PAL_DIR)"
|
||||
objs = $(addprefix db_,files devices pipes sockets streams memory threading \
|
||||
|
||||
@@ -63,7 +63,7 @@ int _DkCreatePhysicalMemoryChannel (PAL_HANDLE * handle, uint64_t * key)
|
||||
}
|
||||
|
||||
int _DkPhysicalMemoryCommit (PAL_HANDLE channel, int entries,
|
||||
PAL_PTR * addrs, PAL_NUM * sizes, int flags)
|
||||
PAL_PTR * addrs, PAL_NUM * sizes)
|
||||
{
|
||||
return -PAL_ERROR_NOTIMPLEMENTED;
|
||||
}
|
||||
|
||||
@@ -220,7 +220,7 @@ void pal_bsd_main (void * args)
|
||||
bsd_state.pid = INLINE_SYSCALL(getpid, 0);
|
||||
bsd_state.uid = uid;
|
||||
bsd_state.gid = gid;
|
||||
|
||||
|
||||
if (!bsd_state.parent_pid)
|
||||
bsd_state.parent_pid = bsd_state.pid;
|
||||
|
||||
@@ -360,14 +360,14 @@ void _DkGetCPUInfo (PAL_CPU_INFO * ci)
|
||||
ci->cpu_model = BIT_EXTRACT_LE(words[PAL_CPUID_WORD_EAX], 4, 8);
|
||||
ci->cpu_stepping = BIT_EXTRACT_LE(words[PAL_CPUID_WORD_EAX], 0, 4);
|
||||
|
||||
/* According to SDM: EBX[15:0] is to enumerate processor topology
|
||||
/* According to SDM: EBX[15:0] is to enumerate processor topology
|
||||
* of the system. However this value is intended for display/diagnostic
|
||||
* purposes. The actual number of logical processors available to
|
||||
* BIOS/OS/App may be different. We use this leaf for now as it's the
|
||||
* BIOS/OS/App may be different. We use this leaf for now as it's the
|
||||
* best option we have so far to get the cpu number */
|
||||
|
||||
cpuid(0xb, 1, words, 0);
|
||||
ci->cpu_num = BIT_EXTRACT_LE(words[WORD_EBX], 0, 16);
|
||||
ci->cpu_num = BIT_EXTRACT_LE(words[PAL_CPUID_WORD_EBX], 0, 16);
|
||||
|
||||
int flen = 0, fmax = 80;
|
||||
char * flags = malloc(fmax);
|
||||
|
||||
@@ -110,7 +110,7 @@ static int _DkObjectWaitOne (PAL_HANDLE handle, int timeout)
|
||||
|
||||
/* _DkObjectsWaitAny for internal use. The function wait for any of the handle
|
||||
in the handle array. timeout can be set for the wait. */
|
||||
int _DkObjectsWaitAny (int count, PAL_HANDLE * handleArray, uint64_t timeout,
|
||||
int _DkObjectsWaitAny (int count, PAL_HANDLE * handleArray, int64_t timeout,
|
||||
PAL_HANDLE * polled)
|
||||
{
|
||||
if (count <= 0)
|
||||
|
||||
@@ -54,16 +54,12 @@ int _DkThreadCreate (PAL_HANDLE * handle, int (*callback) (void *),
|
||||
PAL_PROT_READ|PAL_PROT_WRITE) < 0)
|
||||
return -PAL_ERROR_NOMEM;
|
||||
|
||||
// move child_stack to the top of stack.
|
||||
// move child_stack to the top of stack.
|
||||
child_stack += THREAD_STACK_SIZE;
|
||||
|
||||
// align child_stack to 16
|
||||
// align child_stack to 16
|
||||
child_stack = ALIGN_DOWN_PTR(child_stack, 16);
|
||||
|
||||
flags &= PAL_THREAD_MASK;
|
||||
|
||||
assert(!flags); //FreeBSD does not support any more flags for rfork!
|
||||
|
||||
int ret = rfork_thread(
|
||||
RFPROC|RFNOWAIT|RFSIGSHARE|RFMEM,
|
||||
child_stack,
|
||||
|
||||
Reference in New Issue
Block a user