Commit Graph

8 Commits

Author SHA1 Message Date
Giacomo Tesio c6de6b66e9 kernel: introduce devself
Devself provides to each process access to its own structures.

So far it contains four files:

- pid
- ppid
- pipes	used to implement pipe(2)
- segments used to implement segattach, segdetach and segfree
2016-12-11 01:26:08 +01:00
Giacomo Tesio f52a185030 decouple Jehanne from 9P2000 (as much as needed)
Jehanne is going to use a new file protocol, but Plan 9 is really
coupled with 9P2000.

Renamed fcall.h as 9P2000.h and introduced specific constants such
as NP_OREAD, NP_OWRITE and so on, so that we can use different values
in the kernel and new protocol.

Renamed devmnt to devninep, since it's actually a device serving 9P2000
file systems.

Also, fixed 9P2000 support in Jehanne, that was broken with the introduction
of OSTAT.
2016-12-06 23:01:45 +01:00
Giacomo Tesio bbb375a585 kernel: return long from file related syscalls 2016-11-30 20:18:45 +01:00
Giacomo Tesio a9745e02c5 kernel: in Proc defined syscallerr to hold the return value of failing syscalls 2016-11-30 01:07:45 +01:00
Giacomo Tesio 488106eaac cmd/ms: read #P/ps2mouse in a char (not in an int)
After the removal of dumb push in crt0 (commit 929014ebca5c738d3854758326de7abfb77c1ef1)
the first byte of the c integer is not zeroed anymore (which is correct).

But since ms.c reads and bit-match a single byte in c, when it's an int some test success/fail
due to the state of the unused bytes.

This makes the mouse turn crazy.

So we turn it into a char, so that bitmasks and tests work as expected.
2016-11-29 20:42:24 +01:00
Giacomo Tesio 52777e21ab kernel: devdraw: use sys->ticks instead of m->ticks in drawactive() 2016-11-29 20:41:55 +01:00
Giacomo Tesio 38aca7a581 first usable version of kernel and commands
After an year of hard work, this is a first "usable" version of Jehanne.
2016-11-26 03:49:29 +01:00
Giacomo Tesio 3925b61fa6 libc: initial import from Harvey
Note that libc is what distinguish "native" software from "non-native"
in Jehanne: further C libraries can be ported to Jehanne, but this libc
will remain the main building block of the system.

Also note that a few files have not been ported from Harvey:

	- 9sys/pushtls.c
	- port/rijndael.c
	- port/rijndael.tbl
	- port/sha2.c

Pushtls.c depends on libmp and libsec so libc is not the appropriate place
for it. The other three will be moved to libsec.
2015-12-22 11:55:44 +00:00