Rename Schunix to SchOS; the kernel becomes SchIFT
Removes the "-unix" element and with it any trademark exposure to The
Open Group.
The split follows the ecosystem layout: SchOS is the system, and the
kernel has its own name. Kernel-identity strings are the only places
that take SchIFT -- uname(2) sysname, /proc/version, and the two licence
sentences that say "kernel" outright. That is what every Unix does here:
`uname -s` on Linux reports the kernel, not the distribution. Everything
a user reads as the product -- panic screen, boot menu, error prefixes,
docs, LICENSE, NOTICE -- is SchOS.
schunix.img is schos.img, the logo assets and the musl TLS patch are
renamed, and __SCHUNIX__ is __SCHOS__ (the define and the patch that
consumes it moved together).
Two things the rename broke, both found by the bootcheck suite:
- shmtest wrote "SCHUNIX-MMAP-OK" with a hardcoded length of 15 and
compared it back by hand-counted offsets (m[3]=='U', m[14]=='K').
The shorter marker left the write running two bytes past the literal
and the compare reading past the data, failing a file-backed mmap
that was working correctly. Now written and compared through one
constant with sizeof.
- bootcheck asserted a 31-byte file after appending to
"hello-from-schunix"; the shorter string makes it 29.
Both are the same mistake: a string literal whose length is written out
somewhere else. Full suite green -- base, Tty, Ps, Sock, Fb, Usb, Evdev.
This commit is contained in:
parent
d0f7acf9eb
commit
e04ca28812
83 changed files with 520 additions and 601 deletions
|
|
@ -1,8 +1,8 @@
|
|||
// Error numbers, matching the Linux x86_64 ABI values so that musl-linked
|
||||
// programs interpret syscall failures correctly. Kernel code returns these
|
||||
// negated (e.g. `return -ENOSYS;`), exactly like Linux does internally.
|
||||
#ifndef SCHUNIX_ERRNO_H
|
||||
#define SCHUNIX_ERRNO_H
|
||||
#ifndef SCHOS_ERRNO_H
|
||||
#define SCHOS_ERRNO_H
|
||||
|
||||
#define EPERM 1 // Operation not permitted
|
||||
#define ENOENT 2 // No such file or directory
|
||||
|
|
@ -57,4 +57,4 @@
|
|||
#define ENOTCONN 107 // Transport endpoint is not connected
|
||||
#define ECONNREFUSED 111 // Connection refused
|
||||
|
||||
#endif // SCHUNIX_ERRNO_H
|
||||
#endif // SCHOS_ERRNO_H
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
// Framebuffer device ABI -- /dev/fb0.
|
||||
//
|
||||
// These are Linux's fbdev request numbers and structure layouts, not ours.
|
||||
// Schunix invented this device, so nothing forced the choice; matching Linux
|
||||
// SchOS invented this device, so nothing forced the choice; matching Linux
|
||||
// was still the right one. A framebuffer is the first thing a graphics
|
||||
// program looks for, and every such program already knows how to ask
|
||||
// FBIOGET_VSCREENINFO. Inventing a private struct would have meant patching
|
||||
|
|
@ -76,7 +76,7 @@ struct fb_var_screeninfo {
|
|||
};
|
||||
|
||||
struct fb_fix_screeninfo {
|
||||
char id[16]; // "schunixfb"
|
||||
char id[16]; // "schosfb"
|
||||
unsigned long smem_start; // physical address of the framebuffer
|
||||
unsigned int smem_len; // its length in bytes
|
||||
unsigned int type;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
// the userland is built against a libc that sends Linux flag values, and the
|
||||
// kernel reads them with these constants. They disagreed for a long time, with
|
||||
// results that looked like filesystem corruption rather than like a mistake --
|
||||
// Linux O_APPEND (0x400) landed on Schunix's O_TRUNC, so `cmd >> file`
|
||||
// Linux O_APPEND (0x400) landed on SchOS's O_TRUNC, so `cmd >> file`
|
||||
// truncated the file it was meant to extend, and Linux O_TRUNC (0x200) landed
|
||||
// on O_CREATE, so `cmd > file` left whatever was past the new end in place.
|
||||
// Neither failure pointed anywhere near a header.
|
||||
|
|
@ -29,7 +29,7 @@
|
|||
#define O_NOFOLLOW 0x020000 /* Linux O_NOFOLLOW (0400000) */
|
||||
#define O_CLOEXEC 0x080000 /* Linux O_CLOEXEC (02000000) */
|
||||
|
||||
// Schunix-only, placed above every flag Linux defines so it can never be
|
||||
// SchOS-only, placed above every flag Linux defines so it can never be
|
||||
// mistaken for one. 0x40000 was used before and collides with Linux O_NOATIME.
|
||||
#define O_EXTENT 0x8000000 /* sparse-extent hint */
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Schunix OS System Font - 8x16, 256 glyphs.
|
||||
/* SchOS OS System Font - 8x16, 256 glyphs.
|
||||
*
|
||||
* The upper half is CP437, the IBM PC character set: 0x82 is 'e' with an
|
||||
* acute, 0xE9 is a capital theta, 0xB0-0xDF are shading and box-drawing.
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ struct input_event {
|
|||
// EVIOCGRAB -- take/release exclusive access to a device.
|
||||
//
|
||||
// Linux's _IOW('E', 0x90, int). Spelled as the resulting constant rather than
|
||||
// built from an _IOW macro because Schunix has no ioctl-encoding macros and
|
||||
// built from an _IOW macro because SchOS has no ioctl-encoding macros and
|
||||
// inventing a set just for this would be a bigger change than the feature.
|
||||
// A non-zero argument grabs, zero releases; the argument is passed by value.
|
||||
#define EVIOCGRAB 0x40044590
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
// GENERATED by tools/mklogo.py -- do not edit. Run `make logo`.
|
||||
// source: Assets/Schunix Small Logo.png
|
||||
// source: Assets/SchOS Small Logo.png
|
||||
//
|
||||
// An ink-coverage mask, not colour: 0 is background and full scale is
|
||||
// solid logo. Whoever draws it picks the colour, so the palette stays in
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
// PCI bus enumeration and driver binding.
|
||||
//
|
||||
// Until this existed, every driver in Schunix found its hardware by knowing
|
||||
// Until this existed, every driver in SchOS found its hardware by knowing
|
||||
// where it was: IDE at 0x1F0 because IDE has always been at 0x1F0, the
|
||||
// framebuffer wherever the BIOS's VBE call said. That works for exactly the
|
||||
// devices that predate PCI and for nothing else. A NIC, an AHCI controller,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// SPDX-License-Identifier: Apache-2.0
|
||||
// Schunix — POSIX-compatibility types used by kernel syscall handlers.
|
||||
// SchOS — POSIX-compatibility types used by kernel syscall handlers.
|
||||
#pragma once
|
||||
#include "types.h"
|
||||
#include "date.h"
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
// Schunix visual identity — one palette, shared by everything that draws.
|
||||
// SchOS visual identity — one palette, shared by everything that draws.
|
||||
//
|
||||
// This header exists because there were three unrelated designs and the seams
|
||||
// showed. The bootloader splash was deep purple with gold text, deliberately
|
||||
|
|
|
|||
|
|
@ -11,13 +11,13 @@
|
|||
// unrelated physical page at the next 4K boundary. Any multi-byte
|
||||
// access through it must stay within a single page.
|
||||
//
|
||||
// These helpers encapsulate both rules. Because Schunix (like old x86
|
||||
// These helpers encapsulate both rules. Because SchOS (like old x86
|
||||
// without SMAP) keeps the user page table active in kernel mode, a raw
|
||||
// user virtual address is directly dereferenceable once the whole range
|
||||
// has been validated — that is what user_ptr() hands back, and why the
|
||||
// result is safe across page boundaries where a uva2ka() pointer is not.
|
||||
#ifndef SCHUNIX_UACCESS_H
|
||||
#define SCHUNIX_UACCESS_H
|
||||
#ifndef SCHOS_UACCESS_H
|
||||
#define SCHOS_UACCESS_H
|
||||
|
||||
#include "types.h"
|
||||
|
||||
|
|
@ -46,4 +46,4 @@ int copy_to_user(addr_t uaddr, const void *src, uint64 n);
|
|||
// or exceeds USER_STR_MAX.
|
||||
long strlen_user(addr_t uaddr);
|
||||
|
||||
#endif // SCHUNIX_UACCESS_H
|
||||
#endif // SCHOS_UACCESS_H
|
||||
|
|
|
|||
Loading…
Reference in a new issue