Commit graph

315 commits

Author SHA1 Message Date
Edward Dean
5e4d95c6f9
Merge pull request #275 from ZystemOS/feature/fat32-read
Added read functionality for FAT32
2020-12-12 22:39:20 +00:00
DrDeano
45f37dc3c1
Added read functionality to FAT32
Create test FAT32 image on build
Moved test files to test_files directory
Removed global array for test fat32
Part of #216
Removed hard coded test files


Use @embedFile for large file test
2020-12-12 22:31:42 +00:00
Sam Tebbs
9700ad4d82
Merge pull request #274 from ZystemOS/feature/clean-mock-files
Remove unneeded mocking files
2020-12-08 18:28:54 +00:00
Sam Tebbs
b8ebc5f341 Remove unneeded mocking files 2020-12-07 23:15:35 +00:00
Edward Dean
285b8d9579
Merge pull request #271 from ZystemOS/feature/vfs-close-dir
Added the ability to close a directory node
2020-12-07 22:49:41 +00:00
DrDeano
0497beb5c6
Added the ability to close a directory node
Updated docs
Closes #270


Update doc comment


Moved close to closeFile and closeDir in VFS


Moved back to @ptrCast()


Always forget to format


Added TODO comment
2020-12-07 22:45:28 +00:00
Edward Dean
e2e105a1f9
Merge pull request #272 from ZystemOS/feature/fat32-open
Feature/fat32 open
2020-12-07 18:34:30 +00:00
DrDeano
d5de173fd3
Add a quick format option for mkfat32
Added open implementation

Needed to return a pointer to the file system as `@fieldParentPtr(Fat32Self, "instance", fs.instance)` doesn't work as the the pointer to `instance` is on the stack, then goes out of scope when the init is returned. So will be using free stack space.
Part of #216

Spelling, doc comments and extra test for open file


init -> create, deinit -> destroy
2020-12-07 18:29:16 +00:00
Edward Dean
48e0779d84
Merge pull request #269 from ZystemOS/feature/fat32-cluster-and-dir-entry-iterators
Added cluster and entry iterators
2020-12-01 10:06:32 +00:00
DrDeano
583b9ff43e
Added cluster and entry iterators
This adds iterators to loop over the FAT cluster chain and loop over entries in the directory structure of FAT32.
The tests use hand crafted buffers for a FAT32 filesystem. These are too small for real FAT32 but will still demonstrate the same functionality as if there were real FAT32 buffers.

Added tests for EntryIterator init

Fixed memory leaks
2020-12-01 09:54:45 +00:00
Sam Tebbs
9233b2dafa
Merge pull request #267 from ZystemOS/feature/syscall-errors
Add error handling for syscalls
2020-11-29 13:56:08 +00:00
Sam Tebbs
c0a0c164c3 Add error handling for syscalls 2020-11-29 13:47:23 +00:00
Sam Tebbs
3e5d2bec38
Merge pull request #268 from iamgweej/feature/zig-update
Feature/zig update
2020-11-29 13:11:27 +00:00
iamgweej
e90d861554 Changed to Int in std.meta 2020-11-29 13:05:51 +00:00
Sam Tebbs
eb1f02bb47
Merge pull request #261 from ZystemOS/feature/elf
Load ELF files
2020-11-22 22:43:26 +00:00
Sam Tebbs
0a45b733eb Add ELF loader 2020-11-22 22:38:51 +00:00
Edward Dean
1e834edd15
Merge pull request #264 from ZystemOS/feature/initial-fat32
Feature/initial fat32
2020-11-22 21:42:25 +00:00
DrDeano
fab372a6cf
Initial FAT32 interface
Include code page 437

This is now moved to a better location

Fixed initrd doc for allocator


Added test files

 Plus minor extras

Created initial FAT32 filesystem

This initial FAT32 filesystem will parse a stream, which could be a HDD or a in memory filesystem and produce a FAT32 filesystem. This will check if the raw bytes is a valid FAT32 filesystem as descibed in the spec.

This is only a skeleton with no open, read or write functionality.

Part of #216

logger -> log


Fmt


Removed 'zero_' from struct fields


number_free_cluster -> number_free_clusters


Return non allocated FAT32FS


prefix test_


Added doc comment for boot sector arrays


Moved code_page.zig


info -> debug for init FAT32


Abstracted getting code page table
2020-11-22 21:37:39 +00:00
Sam Tebbs
7b2599c964
Merge pull request #266 from ZystemOS/feature/vmm-copy-data-from
Rework copyDataToVMM to work in both directions
2020-11-22 20:45:07 +00:00
Sam Tebbs
6bbdadfa94 Rework copyDataToVMM to work in both directions 2020-11-20 17:44:01 +00:00
Edward Dean
a0c2bf758b
Merge pull request #262 from ZystemOS/feature/rename-log-to-logger
Rename the logger to log to make is all consistent
2020-11-13 19:20:30 +00:00
DrDeano
788bef5029
Rename the logger to log to make is all consistent
Move to `log`


Fixed kmain log
2020-11-13 19:16:25 +00:00
Edward Dean
ea6a0b7a9f
Merge pull request #263 from ZystemOS/feature/mkfat32-any-stream
mkFAT32 use a anytype stream
2020-11-11 16:58:59 +00:00
DrDeano
4f47409af6
mkFAT32 use a anytype stream
This allows mkFAT32 to work on a File or a fixedBufferStream or any streram that allows for reader(), writer() or seekableStream() interfaces.
2020-11-09 19:06:31 +00:00
Sam Tebbs
d9e776e898
Merge pull request #228 from ZystemOS/feature/user-mode
Add user mode
2020-11-07 09:04:08 +00:00
Sam Tebbs
307ea7a52e Add user mode 2020-11-07 09:00:10 +00:00
Sam Tebbs
fee4b27f14
Merge pull request #258 from ZystemOS/feature/use-testing-allocator
Check for memory leaks in all tests that allocate memory
2020-11-05 18:54:27 +00:00
Sam Tebbs
238e050c8c Check for memory leaks in all tests that allocate memory 2020-11-05 18:50:55 +00:00
Sam Tebbs
374e95f322
Merge pull request #257 from ZystemOS/vfs-symlinks
Add symlink support
2020-11-05 18:26:25 +00:00
Sam Tebbs
1453540bae Add symlink support 2020-11-05 18:21:13 +00:00
Sam Tebbs
6d65e6f0b3
Merge pull request #260 from ZystemOS/feature/zig-update
Update to zig master
2020-11-02 19:10:46 +00:00
Sam Tebbs
08cd95d592 Update to zig master 2020-11-02 18:21:15 +00:00
Sam Tebbs
182f96f628
Merge pull request #254 from iamgweej/feature/vfs-redesign
Feature/vfs redesign
2020-10-26 17:45:25 +00:00
iamgweej
e96c3165a2 Converted Read and Write from silce returning to slice accepting 2020-10-26 17:38:54 +00:00
Edward Dean
f71ad1d32d
Merge pull request #253 from ZystemOS/feature/gitignore-refactor
Improved gitignore
2020-10-19 09:14:48 +01:00
DrDeano
8f0961bb3f
imported gitignore
Added binaries
2020-10-19 09:09:03 +01:00
Sam Tebbs
035ae21c42
Merge pull request #256 from ZystemOS/feature/zig-update
Update to zig master
2020-10-18 22:43:09 +01:00
Sam Tebbs
9005cce68b Update to zig master 2020-10-18 18:59:20 +01:00
Edward Dean
39b857df5c
Merge pull request #249 from ZystemOS/feature/pci
Initial PCI interface
2020-10-12 11:53:42 +01:00
DrDeano
abc712233b
Initial PCI interface
Closes #244

Move PCI to arch

Plus spelling

Added new out and in functions


Added new out and in to mocking


Return pci devices as a list


Improved comment


Removed mask for the return


Removed type for OUT


Added new types
2020-10-10 00:35:20 +01:00
Edward Dean
dacba0ca03
Merge pull request #251 from ZystemOS/feature/generate-mocking-types
Generate the mocking framework (a bit)
2020-10-10 00:29:29 +01:00
DrDeano
7cafcec49e
Generate the mocking framework (a bit)
Instead of adding new types in 5 different places, this adds a generation tool that you add the type once and it will be populated in the framework for you.
This is defo one of those over engineered projects, but I had fun making it.

Replaces empty spaces with const


Refactor spaces
2020-10-10 00:25:09 +01:00
Edward Dean
ccef3e2eb4
Merge pull request #238 from ZystemOS/feature/fat32_image_builder
Create a blank FAT32 image
2020-10-03 12:22:57 +01:00
DrDeano
c9a9be8182
Create a blank FAT32 image
This will be used for testing the FAT32 driver for the kernel and will be integrated into the OS as a mkfs.fat32 program.
Plus typos

Fixed dependencies


Removed `fat32_` in options

Plus fixed doc comment

Removed the DefaultOrValue

Also reordered some stuff

Removed the serial time for more parameters


Moved writer() and seekableStream() to variables


Refactored mkFAT32
2020-09-27 20:58:18 +01:00
Edward Dean
403fb1668f
Merge pull request #239 from ZystemOS/feature/tidy-mocking-framework
Tidy up the mocking framwork
2020-09-24 21:30:22 +01:00
DrDeano
c60efc5239
Tidy up the mocking framwork
Closes #69
Lol 69, I am a child
2020-09-23 15:58:47 +01:00
Sam Tebbs
0e0c6bf29b
Merge pull request #233 from ZystemOS/feature/zig-update
Update to zig master
2020-09-13 09:50:53 +01:00
Sam Tebbs
1616ec19a4 Update to zig master 2020-09-07 17:06:12 +01:00
Sam Tebbs
ddfc983bdb
Merge pull request #232 from iamgweej/feature/tests-bugfix
Minor change: reorder destroy() and deinit()
2020-08-31 09:54:01 +01:00
iamgweej
24a5e7c135 Minor change: reorder destroy() and deinit() 2020-08-29 18:33:45 +03:00