[eros-cvs] cvs commit: eros/src/base/sys/libkey lk_pgwrite.c
shap@eros.cs.jhu.edu
shap@eros.cs.jhu.edu
Wed, 8 Aug 2001 17:17:46 -0400
shap 01/08/08 17:17:46
Modified: src/base/sys/eros PageKey.h
src/base/sys/key mk_TimePage.cxx pk_PageKey.cxx
Removed: src/base/sys/libkey lk_pgwrite.c
Log:
Remove stale page key operations and stubs
Revision Changes Path
1.16 +0 -2 eros/src/base/sys/eros/PageKey.h
Index: PageKey.h
===================================================================
RCS file: /cvs/eros/src/base/sys/eros/PageKey.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- PageKey.h 1999/10/14 00:20:11 1.15
+++ PageKey.h 2001/08/08 21:17:46 1.16
@@ -34,8 +34,6 @@
#define OC_Page_MakeReadOnly 1
#define OC_Page_Zero 2
#define OC_Page_Clone 3
-#define OC_Page_Write(offset) (65536 + (offset))
-#define OC_Page_Read(offset) (131072 + (offset))
#ifndef ASSEMBLER
uint32_t page_clone(uint32_t krPage, uint32_t krFromPage);
1.18 +2 -15 eros/src/base/sys/key/mk_TimePage.cxx
Index: mk_TimePage.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/key/mk_TimePage.cxx,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- mk_TimePage.cxx 2001/06/10 19:41:52 1.17
+++ mk_TimePage.cxx 2001/08/08 21:17:46 1.18
@@ -56,21 +56,8 @@
return;
default:
- if (inv.entry.code >= OC_Page_Write(0) &&
- inv.entry.code < OC_Page_Write(EROS_PAGE_SIZE)) {
-
- if (inv.entry.len > EROS_PAGE_SIZE) {
- inv.exit.code = RC_RequestError;
- return;
- }
-
- inv.exit.code = RC_NoAccess;
- return;
- }
- break;
+ inv.exit.code = RC_UnknownRequest;
+ return;
}
-
- inv.exit.code = RC_UnknownRequest;
- return;
}
1.4 +1 -81 eros/src/base/sys/key/pk_PageKey.cxx
Index: pk_PageKey.cxx
===================================================================
RCS file: /cvs/eros/src/base/sys/key/pk_PageKey.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- pk_PageKey.cxx 2001/06/10 19:41:52 1.3
+++ pk_PageKey.cxx 2001/08/08 21:17:46 1.4
@@ -40,88 +40,8 @@
/* There are too many page write OC's to put them all in the switch
* statment. Consistency, remember, is the hobgoblin of little minds.
*/
- if (inv.entry.code >= OC_Page_Write(0) &&
- inv.entry.code < OC_Page_Write(EROS_PAGE_SIZE)) {
- if (inv.key->IsReadOnly()) {
- /* Nice try! */
- COMMIT_POINT();
- inv.exit.code = RC_NoAccess;
- return;
- }
-
- if (inv.entry.len > EROS_PAGE_SIZE) {
- COMMIT_POINT();
- inv.exit.code = RC_RequestError;
- return;
- }
-
-#ifndef OPTION_PURE_ENTRY_STRINGS
- Thread::CurContext()->SetupEntryString(inv);
-#endif
-
- /* Mark the object dirty. */
- inv.key->GetObjectPtr()->MakeObjectDirty();
-
- COMMIT_POINT();
-
- /* Wrapping is a pain in the ass. */
-
- if (inv.entry.len) {
- uint32_t offset = inv.entry.code - OC_Page_Write(0);
- kva_t sndBuf = (kva_t) inv.entry.data;
- uint32_t count = inv.entry.len;
-
- if (offset + count > EROS_PAGE_SIZE) {
- uint32_t cnt = EROS_PAGE_SIZE - offset;
-
- bcopy((const void*)sndBuf, (void*) (pageAddress + offset), cnt);
- count -= cnt;
- sndBuf += cnt;
- offset = 0u;
- }
-
- if (count)
- bcopy((const void *)sndBuf, (void *)(pageAddress + offset), count);
- }
-
- inv.exit.code = RC_OK;
- return;
- } else if (inv.entry.code >= OC_Page_Read(0)
- && inv.entry.code < OC_Page_Read(EROS_PAGE_SIZE)) {
-
-#ifndef OPTION_PURE_EXIT_STRINGS
- inv.invokee->SetupExitString(inv, inv.validLen);
-#endif
-
- COMMIT_POINT();
-
- if (inv.validLen) {
- /* Wrapping is a pain in the ass. */
-
- uint32_t offset = inv.entry.code - OC_Page_Read(0);
- kva_t sndBuf = (kva_t) inv.exit.data;
- uint32_t count = inv.validLen;
-
- if (offset + count > EROS_PAGE_SIZE) {
- uint32_t cnt = EROS_PAGE_SIZE - offset;
-
- bcopy((const void*) (pageAddress + offset), (void*)sndBuf, cnt);
- count -= cnt;
- sndBuf += cnt;
- offset = 0;
- }
-
- if (count)
- bcopy((const void*) (pageAddress + offset), (void*)sndBuf, count);
-
- inv.exit.len = inv.validLen;
- }
-
- inv.exit.code = RC_OK;
- return;
- }
- else switch(inv.entry.code) {
+ switch(inv.entry.code) {
case OC_KeyType:
COMMIT_POINT();