[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
hurd-l4 physmem/Makefile.am physmem/physmem.c w...
From: |
Marcus Brinkmann |
Subject: |
hurd-l4 physmem/Makefile.am physmem/physmem.c w... |
Date: |
Tue, 16 Sep 2003 21:16:54 -0400 |
CVSROOT: /cvsroot/hurd
Module name: hurd-l4
Branch:
Changes by: Marcus Brinkmann <address@hidden> 03/09/16 21:16:53
Modified files:
physmem : Makefile.am physmem.c
wortel : sigma0.c wortel.c
Added files:
physmem : getpagesize.c zalloc.c zalloc.h
Log message:
Add more bootstrap code, and Neal's zalloc.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/hurd/hurd-l4/physmem/getpagesize.c?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/hurd/hurd-l4/physmem/zalloc.c?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/hurd/hurd-l4/physmem/zalloc.h?rev=1.1
http://savannah.gnu.org/cgi-bin/viewcvs/hurd/hurd-l4/physmem/Makefile.am.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/hurd/hurd-l4/physmem/physmem.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/hurd/hurd-l4/wortel/sigma0.c.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/hurd/hurd-l4/wortel/wortel.c.diff?tr1=1.10&tr2=1.11&r1=text&r2=text
Patches:
Index: hurd-l4/physmem/Makefile.am
diff -u hurd-l4/physmem/Makefile.am:1.2 hurd-l4/physmem/Makefile.am:1.3
--- hurd-l4/physmem/Makefile.am:1.2 Fri Sep 12 14:45:56 2003
+++ hurd-l4/physmem/Makefile.am Tue Sep 16 21:16:53 2003
@@ -28,6 +28,8 @@
physmem_SOURCES = $(ARCH_SOURCES) \
output.h output.c \
+ getpagesize.c \
+ zalloc.h zalloc.c \
physmem.h physmem.c
/* FIXME: Make linkbase configurable. */
Index: hurd-l4/physmem/physmem.c
diff -u hurd-l4/physmem/physmem.c:1.2 hurd-l4/physmem/physmem.c:1.3
--- hurd-l4/physmem/physmem.c:1.2 Mon Sep 15 20:42:17 2003
+++ hurd-l4/physmem/physmem.c Tue Sep 16 21:16:53 2003
@@ -1,5 +1,7 @@
/* Main function for physical memory server.
Copyright (C) 2003 Free Software Foundation, Inc.
+ Written by Marcus Brinkmann.
+
This file is part of the GNU Hurd.
The GNU Hurd is free software; you can redistribute it and/or
@@ -66,8 +68,11 @@
fpage = grant_item.send_fpage;
if (fpage.raw != l4_nilpage.raw)
- debug ("%s: Got fpage 0x%x/%u\n", program_name,
- l4_address (fpage), l4_size_log2 (fpage));
+ {
+ debug ("%s: Got fpage 0x%x/%u\n", program_name,
+ l4_address (fpage), l4_size_log2 (fpage));
+ zfree (l4_address (fpage), l4_size (fpage));
+ }
}
while (fpage.raw != l4_nilpage.raw);
}
Index: hurd-l4/wortel/sigma0.c
diff -u hurd-l4/wortel/sigma0.c:1.1 hurd-l4/wortel/sigma0.c:1.2
--- hurd-l4/wortel/sigma0.c:1.1 Tue Sep 16 15:24:05 2003
+++ hurd-l4/wortel/sigma0.c Tue Sep 16 21:16:53 2003
@@ -111,6 +111,9 @@
l4_msg_get_map_item (&msg, 0, &map_item);
if (l4_is_nil_fpage (map_item.send_fpage))
panic ("%s: sigma0 rejected mapping", __func__);
+ if (l4_address (fpage) != l4_address (map_item.send_fpage))
+ panic ("%s: sigma0 returned wrong address 0x%x (expected 0x%x)",
+ __func__, l4_address (map_item.send_fpage), l4_address (fpage));
}
Index: hurd-l4/wortel/wortel.c
diff -u hurd-l4/wortel/wortel.c:1.10 hurd-l4/wortel/wortel.c:1.11
--- hurd-l4/wortel/wortel.c:1.10 Tue Sep 16 15:24:05 2003
+++ hurd-l4/wortel/wortel.c Tue Sep 16 21:16:53 2003
@@ -370,6 +370,10 @@
memory is available. */
unsigned int get_mem_size = sizeof (l4_word_t) * 8 - 1;
+ /* Allocate a single page at address 0, because we don't want to
+ bother anybody with that silly page. */
+ sigma0_get_fpage (l4_fpage (0, getpagesize ()));
+
while (get_mem_size >= 10
&& ! ((1 << get_mem_size) & l4_page_size_mask ()))
get_mem_size--;
@@ -405,7 +409,7 @@
/* No reply needed. */
continue;
}
- else if (WORTEL_MSG_GET_MEM)
+ else if (label == WORTEL_MSG_GET_MEM)
{
l4_fpage_t fpage;
l4_grant_item_t grant_item;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- hurd-l4 physmem/Makefile.am physmem/physmem.c w...,
Marcus Brinkmann <=