FUZIX.git
8 years agoflat_mem: more tidying up
Alan Cox [Sat, 13 Feb 2016 20:47:54 +0000 (20:47 +0000)]
flat_mem: more tidying up

8 years agowaitpid: add more job control bits
Alan Cox [Sat, 13 Feb 2016 20:34:15 +0000 (20:34 +0000)]
waitpid: add more job control bits

Our SIGSTOP handling still isn't quite right for the case we get a stop while
already sleeping.

8 years agoflat_mem: bring into line with prototypes
Alan Cox [Sat, 13 Feb 2016 20:08:54 +0000 (20:08 +0000)]
flat_mem: bring into line with prototypes

8 years agomemory: bring more files into line with new prototypes
Alan Cox [Sat, 13 Feb 2016 20:08:35 +0000 (20:08 +0000)]
memory: bring more files into line with new prototypes

8 years agomemory: fix some of the types for 32bit address spacing
Alan Cox [Sat, 13 Feb 2016 20:08:02 +0000 (20:08 +0000)]
memory: fix some of the types for 32bit address spacing

8 years agousermem: add MISALIGNED
Alan Cox [Thu, 11 Feb 2016 20:00:26 +0000 (20:00 +0000)]
usermem: add MISALIGNED

Word sized misaligned user space memory accesses can now be faulted if
desired by the platform

8 years agonet_ip: note an oversight
Alan Cox [Thu, 11 Feb 2016 20:00:06 +0000 (20:00 +0000)]
net_ip: note an oversight

8 years agoflat: fix stupid bug I noticed
Alan Cox [Thu, 11 Feb 2016 19:59:40 +0000 (19:59 +0000)]
flat: fix stupid bug I noticed

May well kick this code out shortly anyway

8 years agoflat_mem: import the code based upon MAPUX
Alan Cox [Thu, 11 Feb 2016 19:56:40 +0000 (19:56 +0000)]
flat_mem: import the code based upon MAPUX

Why invent when you can recycle 8)

This hopefully forms the basis of the bits we need for supporting devices
with a flat memory space, while handling fork and memory compaction and other
horrors a little bit.

It's a starting point. There are lots of things that would improve the
performance, and it can't handle multiple memory ranges yet.

8 years agoMerge pull request #316 from beretta42/section
EtchedPixels [Thu, 4 Feb 2016 19:59:07 +0000 (19:59 +0000)]
Merge pull request #316 from beretta42/section

coco3: coco3.s: fix code sections as per Issue: #310.

8 years agococo3: coco3.s: fix code sections as per Issue: #310.
Brett Gordon [Thu, 4 Feb 2016 19:16:51 +0000 (14:16 -0500)]
coco3: coco3.s: fix code sections as per Issue: #310.

8 years agoinit: add reload support
Alan Cox [Mon, 1 Feb 2016 15:11:52 +0000 (15:11 +0000)]
init: add reload support

8 years agosyscalls: assume the shared header will be placed in include/sys
Alan Cox [Mon, 1 Feb 2016 15:09:15 +0000 (15:09 +0000)]
syscalls: assume the shared header will be placed in include/sys

8 years agoMerge pull request #313 from davidgiven/alignement1
EtchedPixels [Mon, 25 Jan 2016 20:29:37 +0000 (20:29 +0000)]
Merge pull request #313 from davidgiven/alignement1

Fix alignment and sizing issues

8 years agoFix typo.
David Given [Mon, 25 Jan 2016 20:14:53 +0000 (21:14 +0100)]
Fix typo.

8 years agoMerge pull request #315 from davidgiven/priorities
EtchedPixels [Sun, 24 Jan 2016 15:39:46 +0000 (15:39 +0000)]
Merge pull request #315 from davidgiven/priorities

Data corruption in waitpid()

8 years agoFix data corruption issue.
David Given [Sat, 23 Jan 2016 23:51:29 +0000 (00:51 +0100)]
Fix data corruption issue.

8 years agoMove struct _uzistat into its own structure, shared between the kernel and
David Given [Thu, 21 Jan 2016 20:37:35 +0000 (21:37 +0100)]
Move struct _uzistat into its own structure, shared between the kernel and
userspace. stcpy() now copies this safely (avoiding compiler packing gotchas).

8 years agoUndo binary-breaking struct _uzistat rearrangement.
David Given [Thu, 21 Jan 2016 19:42:31 +0000 (20:42 +0100)]
Undo binary-breaking struct _uzistat rearrangement.

8 years agoMerge branch 'master' of https://github.com/EtchedPixels/FUZIX
Alan Cox [Thu, 21 Jan 2016 11:55:13 +0000 (11:55 +0000)]
Merge branch 'master' of https://github.com/EtchedPixels/FUZIX

8 years agosyscall_proc: document that dofork might do two things
Alan Cox [Thu, 21 Jan 2016 11:53:52 +0000 (11:53 +0000)]
syscall_proc: document that dofork might do two things

On banked platforms it'll probably return twice for now anyway. On some others
the child will return to user space directly on a different kernel stack.

8 years agoMerge pull request #314 from davidgiven/malloc
EtchedPixels [Thu, 21 Jan 2016 11:41:15 +0000 (11:41 +0000)]
Merge pull request #314 from davidgiven/malloc

Rewrite of kernel memory allocator

8 years agoints aren't necessarily two bytes long!
David Given [Tue, 19 Jan 2016 22:45:54 +0000 (23:45 +0100)]
ints aren't necessarily two bytes long!

8 years agoFix alignment issues primarily with the malloc() alignment payload.
David Given [Wed, 20 Jan 2016 22:32:12 +0000 (23:32 +0100)]
Fix alignment issues primarily with the malloc() alignment payload.

8 years agoFix 32-bit alignment issues.
David Given [Tue, 19 Jan 2016 20:46:44 +0000 (21:46 +0100)]
Fix 32-bit alignment issues.

8 years agoDon't use the 16-bit definitions if the compiler's provided 32-bit ones.
David Given [Wed, 20 Jan 2016 22:25:39 +0000 (23:25 +0100)]
Don't use the 16-bit definitions if the compiler's provided 32-bit ones.

8 years agonet: knock out some remaining bugs and print the AT command properly
Alan Cox [Sat, 16 Jan 2016 19:35:50 +0000 (19:35 +0000)]
net: knock out some remaining bugs and print the AT command properly

We now pass the "sufficiently rigged demo" test case.

8 years agosyscall_net: hooks for reading from a socket
Alan Cox [Sat, 16 Jan 2016 15:27:50 +0000 (15:27 +0000)]
syscall_net: hooks for reading from a socket

This needs some rethinking for native sockets but we'll get there when we
deal with those.

8 years agogrp.h: setgroups is a syscall it shouldn't be here
Alan Cox [Sat, 16 Jan 2016 15:26:16 +0000 (15:26 +0000)]
grp.h: setgroups is a syscall it shouldn't be here

Fixes the Dragon NX build failure. Reported by Tony Jewell

8 years agocpu-z80: add ntohl
Alan Cox [Wed, 13 Jan 2016 18:39:55 +0000 (18:39 +0000)]
cpu-z80: add ntohl

8 years agonet_at: Loopback doesn't work on this interface
Alan Cox [Wed, 13 Jan 2016 18:38:54 +0000 (18:38 +0000)]
net_at: Loopback doesn't work on this interface

8 years agosyscall_net: fix write, local addressing
Alan Cox [Wed, 13 Jan 2016 18:37:54 +0000 (18:37 +0000)]
syscall_net: fix write, local addressing

At this point our socket syscall side can step through everything setting up
our socket and writing to it. Read needs reworking.

8 years agonet: add ECONNRESET
Alan Cox [Wed, 13 Jan 2016 18:37:38 +0000 (18:37 +0000)]
net: add ECONNRESET

8 years agonet_at: knock out a few more bugs and missing bits
Alan Cox [Tue, 12 Jan 2016 23:56:32 +0000 (23:56 +0000)]
net_at: knock out a few more bugs and missing bits

We can now make a connection, and close it again. Error handling doesn't seem
quite right but not sure of the root cause yet.

8 years agonet: fix more bugs
Alan Cox [Tue, 12 Jan 2016 23:38:12 +0000 (23:38 +0000)]
net: fix more bugs

close() now works
connect() correctly calls into the net implementation but net_at hangs

8 years agosyscall: getsockaddrs is a 3 argument function
Alan Cox [Tue, 12 Jan 2016 23:21:21 +0000 (23:21 +0000)]
syscall: getsockaddrs is a 3 argument function

8 years agolibc: syscall Makefile
Alan Cox [Tue, 12 Jan 2016 23:20:41 +0000 (23:20 +0000)]
libc: syscall Makefile

8 years agosyscall_net: Fix bugs in socket() call
Alan Cox [Tue, 12 Jan 2016 23:19:51 +0000 (23:19 +0000)]
syscall_net: Fix bugs in socket() call

At this point we can actually create and close sockets. Not yet tried doing
anything with them!

8 years agolibc: add syscall bindings for network layer
Alan Cox [Tue, 12 Jan 2016 23:19:19 +0000 (23:19 +0000)]
libc: add syscall bindings for network layer

8 years agonet: socket types are zero based
Alan Cox [Tue, 12 Jan 2016 23:18:36 +0000 (23:18 +0000)]
net: socket types are zero based

8 years agokernel: Finish updating syscall names and fix a wrong error define
Alan Cox [Tue, 12 Jan 2016 23:18:12 +0000 (23:18 +0000)]
kernel: Finish updating syscall names and fix a wrong error define

8 years agonet: Must move the socket into unconnected
Alan Cox [Tue, 12 Jan 2016 23:17:56 +0000 (23:17 +0000)]
net: Must move the socket into unconnected

8 years agoliberror: fix missed entry
Alan Cox [Tue, 12 Jan 2016 00:00:02 +0000 (00:00 +0000)]
liberror: fix missed entry

8 years agolibc: synchronize error codes with the kernel
Alan Cox [Mon, 11 Jan 2016 19:23:08 +0000 (19:23 +0000)]
libc: synchronize error codes with the kernel

8 years agonet_at: fix stupid bug
Alan Cox [Mon, 11 Jan 2016 19:09:31 +0000 (19:09 +0000)]
net_at: fix stupid bug

8 years agonet_at: header for silly stack
Alan Cox [Mon, 11 Jan 2016 19:07:12 +0000 (19:07 +0000)]
net_at: header for silly stack

8 years agoz80pack: add this lot to the build
Alan Cox [Mon, 11 Jan 2016 19:06:40 +0000 (19:06 +0000)]
z80pack: add this lot to the build

8 years agoz80pack: add a network socket simulation helper
Alan Cox [Mon, 11 Jan 2016 19:05:48 +0000 (19:05 +0000)]
z80pack: add a network socket simulation helper

This just uses the 3rd network virtual serial. There's a small tweak to the
cpmsim source also needed to report bit 2 as "carrier"

8 years agonet_at: silly test stack
Alan Cox [Mon, 11 Jan 2016 19:04:08 +0000 (19:04 +0000)]
net_at: silly test stack

The first bits of a "network" stack which implements a single offload socket
driven via AT commands. It's easier to debug this and then tackle stuff like
the WizNet5200 offloads and perhaps Drivewire for offload stacks.

8 years agonet: shuffle things around and add syscall to protocol stack bindings
Alan Cox [Mon, 11 Jan 2016 19:03:40 +0000 (19:03 +0000)]
net: shuffle things around and add syscall to protocol stack bindings

8 years agokernel: a couple of error numbers we'll need for networking
Alan Cox [Mon, 11 Jan 2016 19:01:55 +0000 (19:01 +0000)]
kernel: a couple of error numbers we'll need for networking

8 years agocpu: add a standardised BIG_ENDIAN define
Alan Cox [Mon, 11 Jan 2016 19:01:41 +0000 (19:01 +0000)]
cpu: add a standardised BIG_ENDIAN define

8 years agoRewrote from scratch, as the old version had show-stopping bugs (it never
David Given [Sun, 10 Jan 2016 18:18:54 +0000 (19:18 +0100)]
Rewrote from scratch, as the old version had show-stopping bugs (it never
correctly added the initial memory pool!) and I couldn't understand the
code.

8 years agonet: hook together all the networking kernel bits into z80pack
Alan Cox [Sun, 10 Jan 2016 16:23:58 +0000 (16:23 +0000)]
net: hook together all the networking kernel bits into z80pack

This doesn't give us anything remotely useful yet but means it's possible
to start testing out the syscall paths a bit and seeing what is needed
to finish the job off

8 years agomakeversion: pass the level 2 flag via uname
Alan Cox [Sun, 10 Jan 2016 12:34:22 +0000 (12:34 +0000)]
makeversion: pass the level 2 flag via uname

8 years agops: adaptions for level 2 handling
Alan Cox [Sun, 10 Jan 2016 12:33:31 +0000 (12:33 +0000)]
ps: adaptions for level 2 handling

Actually more generally fix it to be far less fragile about struct sizes

8 years agoz80fixedbank: remove old debug
Alan Cox [Sat, 9 Jan 2016 21:18:23 +0000 (21:18 +0000)]
z80fixedbank: remove old debug

8 years agoz80pack: fix wakeup on console 2 and console 3
Alan Cox [Sat, 9 Jan 2016 21:15:22 +0000 (21:15 +0000)]
z80pack: fix wakeup on console 2 and console 3

Fixes the "must telnet before starting fuzix" bug

8 years agotty: Fix O_NOCTTY handling
Alan Cox [Sat, 9 Jan 2016 21:00:32 +0000 (21:00 +0000)]
tty: Fix O_NOCTTY handling

Finally we get the right process groups in the right places and init does
what we expect

8 years agoinit: don't acquire a controlling tty
Alan Cox [Sat, 9 Jan 2016 20:45:01 +0000 (20:45 +0000)]
init: don't acquire a controlling tty

We want getty to be controlling /dev/tty1 so it that the shell can do job
control on it once that all works.

8 years agolevel2: update headers to match job control changes
Alan Cox [Sat, 9 Jan 2016 20:44:46 +0000 (20:44 +0000)]
level2: update headers to match job control changes

8 years agoprocess: update signal handling
Alan Cox [Sat, 9 Jan 2016 20:44:29 +0000 (20:44 +0000)]
process: update signal handling

SIGTTIN/TTOU are not default fatal

8 years agotty: job control needs minor passing
Alan Cox [Sat, 9 Jan 2016 20:44:14 +0000 (20:44 +0000)]
tty: job control needs minor passing

8 years agolevel2: clear the tty on a setsid
Alan Cox [Sat, 9 Jan 2016 20:43:33 +0000 (20:43 +0000)]
level2: clear the tty on a setsid

8 years agostart: Make sure we don't acquire a controlling tty before running init
Alan Cox [Sat, 9 Jan 2016 20:43:08 +0000 (20:43 +0000)]
start: Make sure we don't acquire a controlling tty before running init

8 years agolevel2: fix various job control logics
Alan Cox [Sat, 9 Jan 2016 20:42:41 +0000 (20:42 +0000)]
level2: fix various job control logics

8 years agoz80pack: bring the tty layer into compliance with current code
Alan Cox [Sat, 9 Jan 2016 20:41:24 +0000 (20:41 +0000)]
z80pack: bring the tty layer into compliance with current code

8 years agolevel2: fix first couple of bits
Alan Cox [Sat, 9 Jan 2016 19:38:31 +0000 (19:38 +0000)]
level2: fix first couple of bits

8 years agolibs: link in opendir_r/closedir_r on Z80
Alan Cox [Sat, 9 Jan 2016 18:30:48 +0000 (18:30 +0000)]
libs: link in opendir_r/closedir_r on Z80

8 years agoMakefile: hook in the various level 2 files
Alan Cox [Sat, 9 Jan 2016 16:46:40 +0000 (16:46 +0000)]
Makefile: hook in the various level 2 files

8 years agoz80pack: make this a level2 platform so we can begin test/debug
Alan Cox [Sat, 9 Jan 2016 16:46:00 +0000 (16:46 +0000)]
z80pack: make this a level2 platform so we can begin test/debug

8 years agolevel2: update the remaining bits to get a level2 library
Alan Cox [Sat, 9 Jan 2016 16:45:24 +0000 (16:45 +0000)]
level2: update the remaining bits to get a level2 library

8 years agosyscall_name: use the right count
Alan Cox [Sat, 9 Jan 2016 16:44:11 +0000 (16:44 +0000)]
syscall_name: use the right count

With this the new syscall tool can build and the libc with the level 2 feature
set

8 years agolevel2: plumb together all the level2 work and make it actually build
Alan Cox [Sat, 9 Jan 2016 15:27:13 +0000 (15:27 +0000)]
level2: plumb together all the level2 work and make it actually build

8 years agolevel2: add hooks to allow level 2 platforms to provide their own path buffers
Alan Cox [Tue, 29 Dec 2015 23:30:23 +0000 (23:30 +0000)]
level2: add hooks to allow level 2 platforms to provide their own path buffers

(If you go over 512 bytes the standard tmpbuf/brelse solution won't work, so
 for bigger systems malloc may be preferred)

8 years agoprocess: fix dumb error in last commit
Alan Cox [Tue, 29 Dec 2015 23:24:44 +0000 (23:24 +0000)]
process: fix dumb error in last commit

8 years agoprocess: add initial SIGCHLD handling
Alan Cox [Tue, 29 Dec 2015 23:18:26 +0000 (23:18 +0000)]
process: add initial SIGCHLD handling

8 years agotty: bring comments up to date
Alan Cox [Tue, 29 Dec 2015 22:53:54 +0000 (22:53 +0000)]
tty: bring comments up to date

8 years agokill: allow for special rules for SIGCONT with job control
Alan Cox [Tue, 29 Dec 2015 22:50:47 +0000 (22:50 +0000)]
kill: allow for special rules for SIGCONT with job control

8 years agosignals: SIGCONT should be sent after a SIGHUP
Alan Cox [Tue, 29 Dec 2015 22:43:14 +0000 (22:43 +0000)]
signals: SIGCONT should be sent after a SIGHUP

8 years agolevel2: update header to match
Alan Cox [Tue, 29 Dec 2015 22:43:02 +0000 (22:43 +0000)]
level2: update header to match

8 years agokernel: update some header bits for level2 work
Alan Cox [Tue, 29 Dec 2015 22:42:48 +0000 (22:42 +0000)]
kernel: update some header bits for level2 work

8 years agoopendir_r: shuffle structures about, implement and use opendir_r
Alan Cox [Tue, 29 Dec 2015 20:11:50 +0000 (20:11 +0000)]
opendir_r: shuffle structures about, implement and use opendir_r

8 years agosyscall_proc: use setsid() to implement setpgrp() on level 2
Alan Cox [Tue, 29 Dec 2015 19:16:47 +0000 (19:16 +0000)]
syscall_proc: use setsid() to implement setpgrp() on level 2

8 years agokernel: add p_session for level 2 job control
Alan Cox [Sun, 27 Dec 2015 14:04:14 +0000 (14:04 +0000)]
kernel: add p_session for level 2 job control

8 years agotty: further chunks of work on the tty job control interfaces
Alan Cox [Sun, 27 Dec 2015 14:02:23 +0000 (14:02 +0000)]
tty: further chunks of work on the tty job control interfaces

There is a fair bit left to do, in particular all the silly signal handling
funnies BSD job control does and the signal handling special cases it causes.

8 years agokernel: first pieces of job control logic
Alan Cox [Sun, 27 Dec 2015 13:06:49 +0000 (13:06 +0000)]
kernel: first pieces of job control logic

8 years agotty: make TIOC[GS]WINSZ available
Alan Cox [Sun, 27 Dec 2015 12:50:41 +0000 (12:50 +0000)]
tty: make TIOC[GS]WINSZ available

8 years agotty: update for TIOCGWINSZ/SWINSZ
Alan Cox [Sun, 27 Dec 2015 12:50:21 +0000 (12:50 +0000)]
tty: update for TIOCGWINSZ/SWINSZ

8 years agofilesys: fix build error with level 2
Alan Cox [Sun, 27 Dec 2015 12:47:48 +0000 (12:47 +0000)]
filesys: fix build error with level 2

8 years agokernel: hook in level2 include and udata changes
Alan Cox [Sun, 27 Dec 2015 12:47:37 +0000 (12:47 +0000)]
kernel: hook in level2 include and udata changes

8 years agokernel: start adding functions and files for "level 2" functionality
Alan Cox [Sun, 27 Dec 2015 12:46:54 +0000 (12:46 +0000)]
kernel: start adding functions and files for "level 2" functionality

This is the bigger stuff that won't fit well on a small 8bit box but which
isn't by any means essential.

8 years agofilesys: add the needed hook point for BSD groups
Alan Cox [Sat, 26 Dec 2015 23:47:05 +0000 (23:47 +0000)]
filesys: add the needed hook point for BSD groups

8 years agotty: first cut at SIGWINCH and friends
Alan Cox [Sat, 26 Dec 2015 23:34:35 +0000 (23:34 +0000)]
tty: first cut at SIGWINCH and friends

Actually looks small enough that this would make sense for level 1.

8 years agoutils: update library and ps for repurposing of P_XSLEEP
Alan Cox [Sat, 26 Dec 2015 23:18:01 +0000 (23:18 +0000)]
utils: update library and ps for repurposing of P_XSLEEP

8 years agokernel: rename XSLEEP (unused) into STOPPED
Alan Cox [Sat, 26 Dec 2015 23:15:12 +0000 (23:15 +0000)]
kernel: rename XSLEEP (unused) into STOPPED

8 years agoprocess: first cut at SIGCONT/SIGSTOP handling done properly
Alan Cox [Sat, 26 Dec 2015 23:14:48 +0000 (23:14 +0000)]
process: first cut at SIGCONT/SIGSTOP handling done properly

8 years ago6809: add asm define for gcc bug workaround
Alan Cox [Sat, 26 Dec 2015 23:02:12 +0000 (23:02 +0000)]
6809: add asm define for gcc bug workaround

8 years agokernel.h: add defines for new length checking
Alan Cox [Sat, 26 Dec 2015 23:01:53 +0000 (23:01 +0000)]
kernel.h: add defines for new length checking

8 years agoinode.c: gcc 6809 workaround
Alan Cox [Sat, 26 Dec 2015 23:01:29 +0000 (23:01 +0000)]
inode.c: gcc 6809 workaround