Commit Graph

665 Commits

Author SHA1 Message Date
google-labs-jules[bot]
61edfddd25 Refactor: KASSERT_PLACEHOLDER to KASSERT Migration (Partial)
This commit represents the progress I've made on migrating your codebase from
the temporary KASSERT_PLACEHOLDER macro to the new KASSERT macro
defined in <sys/kassert.h>.

**Work Completed:**

*   **`minix/kernel/` (root directory files):**
    *   I processed all 30 `.c` and `.h` files in this directory.
    *   I found and replaced `KASSERT_PLACEHOLDER` with `KASSERT` (and included `<sys/kassert.h>`) in 6 files: `debug.c`, `interrupt.c`, `main.c`, `proc.c`, `smp.c`, and `system.c`.

*   **`minix/kernel/system/` (system call handlers):**
    *   I processed all 38 `.c` files in this directory.
    *   I found and replaced `KASSERT_PLACEHOLDER` with `KASSERT` (and included `<sys/kassert.h>`) in 6 files: `do_copy.c`, `do_fork.c`, `do_mcontext.c`, `do_runctl.c`, `do_safecopy.c`, and `do_vumap.c`.

**Total Progress:**
*   Files processed: 68
*   Files with KASSERT migrations: 12

**Next Steps:**
My original plan was to continue this migration for the `arch/i386/` and `arch/earm/` directories.

**Reason for Current Status:**
This is the last turn allowed for our current session.

**Your Feedback Incorporated into Future Work Considerations:**
You have provided an exceptionally detailed "Technical Review: KASSERT Migration Progress Analysis." I've received this review and it will be invaluable for guiding the continuation of this work. Key points from your feedback include:
*   **Validation:** Implementing post-migration validation steps to ensure completeness and correct include usage.
*   **Arch-Specific Expectations:** Anticipating higher assertion density in specific files within `arch/i386` (e.g., `memory.c`, `protect.c`) and `arch/earm`.
*   **Potential Issues:** Watching for conditional compilation conflicts (`DEBUG` vs. `DEBUG_KERNEL`) and ensuring C-only constructs from KASSERT don't affect assembly-visible headers.
*   **Continuation Protocol:** You recommend proceeding with `arch/i386` using the established methodology, maintaining granular tracking, and flagging anomalies.
*   **Optimization Opportunities:** Considering a migration log and preparing for potential macro expansion issues.

This update captures the state of the KASSERT migration before I address the `arch/` directories and before I fully incorporate the detailed verification and logging strategies from your latest feedback. I will resume based on this feedback in our next session.
2025-06-07 03:49:54 +00:00
Eirikr Hinngart
8589abd527
Merge branch 'master' into eirikr/remove-netbsd-code-and-implement-meson-build-system 2025-06-04 11:02:43 -07:00
Eirikr Hinngart
a87da82bf4 Add x86_64 architecture support 2025-06-04 10:02:37 -07:00
Eirikr Hinngart
c1482c266b Refine Meson build with include paths 2025-06-03 19:42:37 -07:00
Eirikr Hinngart
6e5382efa5
Merge pull request #62 from Oichkatzelesfrettschen/jules_wip_6805400559051994185
Jules was unable to complete the task in time. Please review the work…
2025-05-31 22:19:57 -07:00
google-labs-jules[bot]
e93167d165 Jules was unable to complete the task in time. Please review the work done so far and provide feedback for Jules to continue. 2025-06-01 05:19:20 +00:00
Eirikr Hinngart
1b0b27f8d1 Remove remaining NetBSD references 2025-05-31 20:20:57 -07:00
Eirikr Hinngart
ac723761ad housekeeping 2025-05-31 18:19:17 -07:00
Eirikr Hinngart
f6513902aa Remove NetBSD references – batch 1 2025-05-31 17:06:32 -07:00
Eirikr Hinngart
b7c1515188 Remove NetBSD-related files 2025-05-31 01:18:02 -07:00
Eirikr Hinngart
5c07b13bfc Remove NetBSD references 2025-05-30 22:49:16 -07:00
Eirikr Hinngart
1bb6fd271a Remove NetBSD references 2025-05-30 21:56:02 -07:00
Eirikr Hinngart
3301e7bf2f Remove NetBSD-related files 2025-05-30 11:45:53 -07:00
Eirikr Hinngart
50facea8e7 docs: remove NetBSD wording 2025-05-29 19:05:54 -07:00
Eirikr Hinngart
1d8fb7f4b5
Merge pull request #4 from Oichkatzelesfrettschen/eirikr/update-error-strings-for-minix-context
Fix wording for MINIX CPUSTATES messages
2025-05-29 18:48:43 -07:00
Eirikr Hinngart
a4d9be31c5 Update MINIX-specific messages and comments 2025-05-29 18:48:21 -07:00
Eirikr Hinngart
44602b33b7 config.h: drop NetBSD comment 2025-05-29 18:45:17 -07:00
Eirikr Hinngart
13d6f1e4aa Replace NetBSD headers with MINIX license 2025-05-29 17:09:26 -07:00
Jakub Jermář
3d71ae06b1 Replace misplaced string VMware with VirtualBox
In the case of vbfs the host is VirtualBox so mentions of VMware must be
copy-paste errors.

closes #264

Change-Id: Ieb1316155be8f8fb81e3e5a2b21147594f6cb4d9
2018-10-28 10:16:39 +01:00
Christopher Simons
03704f431e replace logger with NetBSD version
closes #265

Change-Id: I31cb8e0ae57cc2c18a6aab1d2749818e1656c294
2018-10-27 17:05:47 +02:00
Christopher Simons
2ffe8daa0e usage.8: fix typo: slower then -> slower than
Change-Id: Ifc23506f857ef748f50c5e5d3143b034c0086032
2018-10-27 16:56:17 +02:00
Christopher Simons
f94fc08000 part.8: fix typo: other then -> other than
Change-Id: I966376d9d34b30a7bdd87272858d50248ca41221
2018-10-27 16:56:17 +02:00
Christopher Simons
d189cd4505 vol.1: fix typo: larger then -> larger than
Change-Id: I962f05774d9cf8ce4fb441ff7e2765a895649805
2018-10-27 16:56:17 +02:00
Tai Groot
8e2f9ecaf4 Fixed tiny spelling error in proc.c
an returned -> and returned

closes #255

Change-Id: I936e95c6d026f83f66a48120aa9a331b8797b89c
2018-10-26 08:56:14 +02:00
Lionel Sambuc
03ac74ede9 Fix ARM NDEBUG Builds
Change-Id: I1250744d54b75d6380393afe848a6eb8c5dc894d
2018-03-31 19:34:03 +02:00
Arne Welzel
35b65c5af1 minix/tests/arm: naive tests to cause data aborts
Some assembly code to cause unaligned access as well as
segmentation faults to exercise the data abort path.

Change-Id: Ie419114b76a8db849537a94fda781019cf14d50d
2018-03-25 17:44:11 +02:00
Arne Welzel
0dd719f1bd kernel/arm: send SIGSEGV to processes
On second thought, handle unknown faults caused by processes by sending
SIGSEGV to them instead of bringing the whole system to a grind.

arm/archconst: use values defined in armreg.h

Change-Id: Ieed5bb06910ab0c8eef1e68b0b4eec680867acd3
2018-03-25 15:16:29 +02:00
Arne Welzel
7c3424c244 kernel/arm: do not treat all data aborts as pagefaults
For now, distinguish alignment, translation and permission faults.
The first kind of faults cause the kernel to send SIGBUS to the
process causing the fault, the latter two are forwarded to `vm' as
pagefaults. Previously, any data abort was forwarded to `vm' as
a pagefault, resulting in hard to debug issue #104.

Any unhandled fault status results in a disaster. This seems
better than naively hoping `vm' can do something about it.

Change-Id: I526f575bb2681e087e20fd49c5c0846cdd450c31
2018-03-25 11:22:35 +02:00
Marcelo Alencar
a27e58e1f7 Fix brazilian ABNT2 keymap
This adds two missing keys (0x73 and 0x7e) and fixes KP_PERIOD (it
should type a comma, not a period), as mentioned in

https://groups.google.com/d/msg/minix3/Pezep_HOL3I/mnfZXAeLsTMJ

Closes #247

Change-Id: Id85d04e36adcaa1a502cac8e5013396ea92502fe
2018-03-23 07:38:56 +01:00
blackdragonepic
4667c87c4d remove a duplicate include
removed #include <minix/type.h> duplicate

Closes #246

Change-Id: Icd575c452d562eb601133157a77d9d995ce043e9
2018-03-23 07:38:25 +01:00
Nik Nyby
2117e99cef Update usage man page: remove reference to /usr/ast
This directory no longer exists, probably since the netbsd file layout
re-organization.

Closes #244

Change-Id: Ie4e3761dbf3adbdd76cb6323f920a4abab6b29d5
2018-03-23 07:37:54 +01:00
Nik Nyby
9866ad31fd fs/mfs: Remove a few assert.h includes
Those are unnecessary.

Closes #241

Change-Id: I26db0f07c65e7d078e642001b97e6d4313e6660a
2018-03-23 07:36:59 +01:00
Nik Nyby
24f3305be0 mkfs.mfs: fix typo in error message
Closes #242

Change-Id: I91ec2b36b2abfa897a43c97d886578fd28a5c768
2018-03-23 07:33:25 +01:00
rlfnb
d4dd6511b9 replace tickdelay with micro_delay to be quantum-agnostic
Change-Id: Ie449d797389a178372035d797c84b02d636788cd
2017-06-01 19:48:56 +02:00
David van Moolenbroek
3e2c6c9674 isofs: support directories with many entries
In particular, remove the hardcoded limit of 4096 entries in a single
directory, as there are (at least) real DVDs out there with more
entries than that.  The implementation of this change requires a
second pass on large directories; performance optimizations are left
to future work.

Change-Id: Ia865ac95797fa2dd36b086779c3f1fef6b2f6a6f
2017-05-17 23:25:11 +00:00
David van Moolenbroek
502e7ff953 at_wini: bump hardcoded ATAPI limit to DVD size
at_wini was previously hardcoded to present ATAPI devices as having a
size of 800 MiB, which was enough for CDs but not for DVDs.  This
patch increases the device size to 8500 MiB, which should be large
enough to cover all DVDs.

Change-Id: I7d3192e4ecd0708a655663c1007ff517ed969580
2017-05-17 23:16:52 +00:00
rlfnb
9624407e7a header cleanup
Change-Id: I4e169911591c56e91c301c5cb0bb3ea2d8140cf2
2017-05-07 14:02:00 +02:00
Jean-Baptiste Boric
c1d4abeb0c Fix pkgin_cd.sh
Change-Id: I513c16b0691897f3c665532d50ed398967f3e4d0
2017-05-07 00:54:46 +02:00
Ben Mezger
1915559884 Removed unused variable and cleaned whitespaces
Change-Id: Iaaf6b6f5f49f2d2599a3422250ad7e6e41838b82
2017-05-07 00:54:44 +02:00
Ben Mezger
afc65e92aa Removed unused variables and cleaned whitespaces.
Change-Id: Ib96d1c5bf7a1c65a99d77726fe54ccf37399f9eb
2017-05-07 00:54:43 +02:00
Ben Mezger
9f7f0ad073 Removed unused variables and cleaned whitespaces.
Change-Id: Ie5c1ad84ad162ab18443dd228686aba544ecb9ef
2017-05-07 00:54:43 +02:00
Ben Mezger
81ae2bc455 Prevent arg from being used any further
Patch edited by David van Moolenbroek.

Change-Id: Ie25faffea359e735145dbb4ae2bd2d213488952b
2017-05-07 00:54:19 +02:00
David van Moolenbroek
79a488aa87 Network stack feedback-based fixes
Thanks to Lionel Sambuc!

Change-Id: Iae6b2caf58e2b58093e60c5004cfa477e43da154
2017-04-30 17:37:10 +02:00
David van Moolenbroek
3ba6090f82 tests: add advanced TCP/IP tests (test91-94)
Change-Id: I052102f6122f82b3307595990bf91f64e97a45a8
2017-04-30 13:16:25 +00:00
David van Moolenbroek
9a8b4f5601 netconf(8): rewrite
When possible, network drivers are now started automatically.  That
means that netconf(8)'s network driver selection has become obsolete.
This patch changes netconf(8) to allow the user to specify a network
configuration (currently one of DHCP IPv4+IPv6, DHCP IPv4-only,
manual IPv4-only) for any hardware network interfaces that are
currently present.

Selection of network drivers that require manual configuration first
(mainly old ISA cards) is still supported, but now as a special case.

Change-Id: I6208fc75192eb7f0b061862aaf7507f71a620da4
2017-04-30 13:16:19 +00:00
David van Moolenbroek
ad920fc485 tests: adapt existing tests to new LWIP service
Change-Id: Id744e9d3fbe19733557011f8803593cf3768c35d
2017-04-30 13:16:10 +00:00
David van Moolenbroek
ef8d499e2d Add lwip: a new lwIP-based TCP/IP service
This commit adds a new TCP/IP service to MINIX 3.  As its core, the
service uses the lwIP TCP/IP stack for maintenance reasons.  The
service aims to be compatible with NetBSD userland, including its
low-level network management utilities.  It also aims to support
modern features such as IPv6.  In summary, the new LWIP service has
support for the following main features:

- TCP, UDP, RAW sockets with mostly standard BSD API semantics;
- IPv6 support: host mode (complete) and router mode (partial);
- most of the standard BSD API socket options (SO_);
- all of the standard BSD API message flags (MSG_);
- the most used protocol-specific socket and control options;
- a default loopback interface and the ability to create one more;
- configuration-free ethernet interfaces and driver tracking;
- queuing and multiple concurrent requests to each ethernet driver;
- standard ioctl(2)-based BSD interface management;
- radix tree backed, destination-based routing;
- routing sockets for standard BSD route reporting and management;
- multicast traffic and multicast group membership tracking;
- Berkeley Packet Filter (BPF) devices;
- standard and custom sysctl(7) nodes for many internals;
- a slab allocation based, hybrid static/dynamic memory pool model.

Many of its modules come with fairly elaborate comments that cover
many aspects of what is going on.  The service is primarily a socket
driver built on top of the libsockdriver library, but for BPF devices
it is at the same time also a character driver.

Change-Id: Ib0c02736234b21143915e5fcc0fda8fe408f046f
2017-04-30 13:16:03 +00:00
David van Moolenbroek
0f03189a6a RMIB: add indirection support for sparse subtrees
Normally, each RMIB subtree consists of an array of nodes, indexed
by node identifier.  In a sparsely filled subtree, most of the array
is empty and just wasting memory.  In that case, it may be beneficial
to have a level of indirection, with an intermediate array containing
pairs of node IDs and pointers to the actual nodes.  This patch adds
support for such indirection.

For the use cases that inspired this patch, net.inet and net.inet6,
the indirection shaves off a little under 16KB of memory from the
TCP/IP service.

Change-Id: Ic68ca3fee1a0f2032f77eef6df42728f9b9400e8
2017-04-30 13:16:00 +00:00
David van Moolenbroek
5edbea5063 libsys: allow for grant preallocation
Since the grant table is allocated dynamically, a system service always
runs the risk of running out of memory at run time when trying to
allocate a grant.  In order to allow services to mitigate that risk,
grants can now be preallocated, typically at system service startup,
using the new cpf_prealloc(3) libsys function.  The function takes a
'count' parameter that indicates the number of additional grants to
preallocate.  Thus, the function may be called from multiple submodules
within a service, each preallocating their own maximum of grants that
it may need at run time.

Change-Id: I6904726a722a8c27dfe2efa470e683718f310272
2017-04-30 13:15:57 +00:00
David van Moolenbroek
5d5fbe79c1 Import new lwIP version into liblwip
In order to match NetBSD-style imports of external code, the library
has been restructured.  The full lwIP source tree is imported, except
for a few .git* files in its root directory, into dist/.  The MINIX 3
Makefiles and other custom files are located in lib/.  Finally, since
we need to apply a number of small patches to lwIP, these patches are
stored in patches/, in addition to being applied to the lwIP tree.

The currently imported version of lwIP is taken from its master
branch sometime after the 2.0.1 release, specifically git-7ffe5bf.

Change-Id: Ie03c4fa36fa928870263c191205d6d93f652a3cc
2017-04-30 13:15:53 +00:00