FUZIX.git
8 years agoBUGS: update
Alan Cox [Thu, 25 Feb 2016 22:41:30 +0000 (22:41 +0000)]
BUGS: update

8 years agodevio: fix sign on IDUMP
Alan Cox [Thu, 25 Feb 2016 22:41:19 +0000 (22:41 +0000)]
devio: fix sign on IDUMP

8 years agoprocess: hack for P_STOPPED until we sort out the stop behaviour properly
Alan Cox [Thu, 25 Feb 2016 21:58:11 +0000 (21:58 +0000)]
process: hack for P_STOPPED until we sort out the stop behaviour properly

BSD picks such inelegant behaviours

8 years agotty: update TODO list
Alan Cox [Thu, 25 Feb 2016 21:54:11 +0000 (21:54 +0000)]
tty: update TODO list

8 years agoz80pack: switch to using the test net code
Alan Cox [Thu, 25 Feb 2016 21:53:57 +0000 (21:53 +0000)]
z80pack: switch to using the test net code

8 years agokernel: more error numbers needed
Alan Cox [Thu, 25 Feb 2016 21:53:35 +0000 (21:53 +0000)]
kernel: more error numbers needed

8 years agonet_z80pack: test "smart" network interface with some Z80Pack changes
Alan Cox [Thu, 25 Feb 2016 21:52:28 +0000 (21:52 +0000)]
net_z80pack: test "smart" network interface with some Z80Pack changes

This uses the host socket API as a convenient way of debugging and getting
all the logic right before tackling the WizNet and other real hardware
TCP stack interfaces.

It'll also let me get the userspace sorted out

8 years agosyscall_net: various improvements and fixes
Alan Cox [Thu, 25 Feb 2016 21:51:53 +0000 (21:51 +0000)]
syscall_net: various improvements and fixes

8 years agonetdev: re-order states to make tests more logical
Alan Cox [Thu, 25 Feb 2016 21:51:37 +0000 (21:51 +0000)]
netdev: re-order states to make tests more logical

8 years agoBUGS: update for a couple of remaining problems
Alan Cox [Thu, 25 Feb 2016 21:51:01 +0000 (21:51 +0000)]
BUGS: update for a couple of remaining problems

8 years agosocktest: this won't live here forever
Alan Cox [Thu, 25 Feb 2016 21:50:35 +0000 (21:50 +0000)]
socktest: this won't live here forever

Some initial socket testing code

8 years agoutils: build with fcc so we find the headers properly
Alan Cox [Thu, 25 Feb 2016 21:49:56 +0000 (21:49 +0000)]
utils: build with fcc so we find the headers properly

Otherwise sed fails to build

8 years agoMerge branch 'master' of https://github.com/EtchedPixels/FUZIX
Alan Cox [Tue, 23 Feb 2016 20:49:27 +0000 (20:49 +0000)]
Merge branch 'master' of https://github.com/EtchedPixels/FUZIX

8 years agoMerge pull request #319 from beretta42/kill
EtchedPixels [Tue, 23 Feb 2016 20:49:14 +0000 (20:49 +0000)]
Merge pull request #319 from beretta42/kill

kill.c: bugfix: inverted test of strcmp

8 years agokill.c: inverted test of strcmp
Brett Gordon [Tue, 23 Feb 2016 18:41:28 +0000 (13:41 -0500)]
kill.c: inverted test of strcmp

8 years agosyscall_fs: getmode change I missed
Alan Cox [Mon, 22 Feb 2016 23:45:01 +0000 (23:45 +0000)]
syscall_fs: getmode change I missed

8 years agogetmode: make getmode 8bit
Alan Cox [Mon, 22 Feb 2016 21:46:10 +0000 (21:46 +0000)]
getmode: make getmode 8bit

We do a lot of compares and switches with getmode and the switches in particular
get expensive on an 8 bit processor. Instead shift stuff and force it all into
8bit space.

This saves us a couple of hundred bytes even though SDCC still writes very
poor code for 8bit switches

Alan

8 years agoTODO: fix the fact BSD groups were done for level 2
Alan Cox [Mon, 22 Feb 2016 21:45:34 +0000 (21:45 +0000)]
TODO: fix the fact BSD groups were done for level 2

8 years agolevel2: shave another 40 bytes off
Alan Cox [Sun, 21 Feb 2016 20:31:33 +0000 (20:31 +0000)]
level2: shave another 40 bytes off

8 years agonet_native: diet time
Alan Cox [Sun, 21 Feb 2016 20:27:11 +0000 (20:27 +0000)]
net_native: diet time

Shave 768 bytes out of net_native with a mix of duplicate code removal and
judicious use of static variables to help SDCC and the Z80 in general.

8 years agonet: add a sock_init()
Alan Cox [Sun, 21 Feb 2016 20:26:33 +0000 (20:26 +0000)]
net: add a sock_init()

We need to intialize both core and driver layer stuff so have a standard call
which calls into the driver init

8 years agols: fix error return code
Alan Cox [Sun, 21 Feb 2016 20:02:50 +0000 (20:02 +0000)]
ls: fix error return code

8 years agowait.h: make clearer
Alan Cox [Sun, 21 Feb 2016 19:51:30 +0000 (19:51 +0000)]
wait.h: make clearer

8 years agoexit: update syscall_exec16 to the new core dump change
Alan Cox [Sun, 21 Feb 2016 19:50:49 +0000 (19:50 +0000)]
exit: update syscall_exec16 to the new core dump change

We need the core dumper itself to tell us whether a core was dumped

8 years agokernel: Fix breakages in revised exit handling
Alan Cox [Sun, 21 Feb 2016 19:50:12 +0000 (19:50 +0000)]
kernel: Fix breakages in revised exit handling

This messed up the left and right halves of the return codes.

8 years agonet: tidy up types and get rid of lots of needless maths
Alan Cox [Sun, 21 Feb 2016 15:09:05 +0000 (15:09 +0000)]
net: tidy up types and get rid of lots of needless maths

8 years agosyscall_net: note another area to look at later
Alan Cox [Sat, 20 Feb 2016 20:59:33 +0000 (20:59 +0000)]
syscall_net: note another area to look at later

8 years agoz80pack: switch over to net_native so we can begin debugging it
Alan Cox [Sat, 20 Feb 2016 20:33:15 +0000 (20:33 +0000)]
z80pack: switch over to net_native so we can begin debugging it

8 years agonet_native: note a future bug risk
Alan Cox [Sat, 20 Feb 2016 20:23:34 +0000 (20:23 +0000)]
net_native: note a future bug risk

8 years agodevsys: Make the devsys code identing consistent
Alan Cox [Sat, 20 Feb 2016 19:34:54 +0000 (19:34 +0000)]
devsys: Make the devsys code identing consistent

8 years agodevsys: wire up the network hooks
Alan Cox [Sat, 20 Feb 2016 19:34:25 +0000 (19:34 +0000)]
devsys: wire up the network hooks

8 years agoinode: remove dead socket checks
Alan Cox [Sat, 20 Feb 2016 19:33:41 +0000 (19:33 +0000)]
inode: remove dead socket checks

8 years agonet: Further tidying up
Alan Cox [Sat, 20 Feb 2016 19:33:04 +0000 (19:33 +0000)]
net: Further tidying up

Remove various obsolete bogisities as well

8 years agonet: tidy up stuff we don't want in kernel
Alan Cox [Sat, 20 Feb 2016 18:45:20 +0000 (18:45 +0000)]
net: tidy up stuff we don't want in kernel

8 years agonet_native: put header in the right spot
Alan Cox [Sat, 20 Feb 2016 18:44:47 +0000 (18:44 +0000)]
net_native: put header in the right spot

8 years agops: update to reflect kernel state removals
Alan Cox [Sat, 20 Feb 2016 18:41:37 +0000 (18:41 +0000)]
ps: update to reflect kernel state removals

8 years agoMerge pull request #318 from retrodeluxe/fuzix-msx2
EtchedPixels [Sat, 20 Feb 2016 18:09:12 +0000 (18:09 +0000)]
Merge pull request #318 from retrodeluxe/fuzix-msx2

msx2: fix build dependency

8 years agomsx2: fix build dependency
geijoenr [Sat, 20 Feb 2016 17:20:02 +0000 (17:20 +0000)]
msx2: fix build dependency

bootrom.bin is generated along with fuzix.ihx

8 years agonetworking: first cut at the native TCP/IP stack interface
Alan Cox [Fri, 19 Feb 2016 23:02:01 +0000 (23:02 +0000)]
networking: first cut at the native TCP/IP stack interface

This is far from finished or even building yet, but now has the right sort
of form. For the user space side the current plan is to plug it into
something like uIP, LwIP or Harry Kalogirou's ktcp for ELKS.

In theory the API is such that beyond "what fits" it shouldn't matter whether
we bind a teeny/tiny stack like A J Kroll's microcontroller TCP/IP or something
a bit more refined.

8 years agoTODO: update
Alan Cox [Fri, 19 Feb 2016 23:01:35 +0000 (23:01 +0000)]
TODO: update

8 years agoexec: add core dump support
Alan Cox [Wed, 17 Feb 2016 21:47:47 +0000 (21:47 +0000)]
exec: add core dump support

This adds some minimalistic core dump support to the 16bit code base.

8 years agodoexit: tidy up types
Alan Cox [Wed, 17 Feb 2016 18:13:28 +0000 (18:13 +0000)]
doexit: tidy up types

8 years agoprocess: clean up signal handling logic and finish off SIGSTOP/CONT
Alan Cox [Wed, 17 Feb 2016 18:08:21 +0000 (18:08 +0000)]
process: clean up signal handling logic and finish off SIGSTOP/CONT

8 years agoREADME.md: small update
Alan Cox [Wed, 17 Feb 2016 17:33:11 +0000 (17:33 +0000)]
README.md: small update

8 years agoREADME: update kernel README a bit
Alan Cox [Wed, 17 Feb 2016 17:32:34 +0000 (17:32 +0000)]
README: update kernel README a bit

8 years agonet: add the missing handling for conflicting addresses and for lookups
Alan Cox [Sat, 13 Feb 2016 21:36:39 +0000 (21:36 +0000)]
net: add the missing handling for conflicting addresses and for lookups

8 years agodevsys: low protection makes no sense so remove
Alan Cox [Sat, 13 Feb 2016 21:21:57 +0000 (21:21 +0000)]
devsys: low protection makes no sense so remove

8 years agoflat_mem: start adjusting atarist as a prototype user of flat_mem
Alan Cox [Sat, 13 Feb 2016 21:17:40 +0000 (21:17 +0000)]
flat_mem: start adjusting atarist as a prototype user of flat_mem

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