generated from Sister20/kit-OS-2023
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feedback #1
Open
github-classroom
wants to merge
59
commits into
feedback
Choose a base branch
from
main
base: feedback
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Feedback #1
Changes from 1 commit
Commits
Show all changes
59 commits
Select commit
Hold shift + click to select a range
1dc2c26
Setting up GitHub Classroom Feedback
github-classroom[bot] 1af43d6
Update README.md
NerbFox 8064989
add linker
ef9ad57
3.7
f64e2b0
add gdt entry attributes
286c149
dummy
fe28a26
semoga bnr
f1347b4
update position
NerbFox ed44b69
enter protected mode
580432b
Merge branch 'main' of https://github.com/Sister20/if2230-2023-osyikkk
NerbFox 025955c
replace cursor and memory framebuffer with macro
bf9eece
Update milestone 2
NerbFox 2a334a8
implement idt, interrupt, and organizing repo files
b9738ec
Add keyboard implementation
aa8f85f
update hanif
RMA1403 3d2a7db
Update FAT32
6a4d34a
fix makefile
razzanYoni 6d88189
fix : makefile
razzanYoni f9ed853
balikin disk ke uint_16
razzanYoni 164a2f7
fix : biar bisa ke-load
razzanYoni c0cf831
Update read and read_directory implementation
1f3aecd
update CRUD
7b9c010
Update README.md
razzanYoni 2e02feb
Update README.md
razzanYoni 9bccff1
CRUD finished
1814c4a
Merge branch 'main' of github.com:Sister20/if2230-2023-osyikkk into main
98f898c
update cmos, todo
457db49
update makefile
44953f0
Update cmos (not yet finished)
6ba6645
Fix scrolling keyboard, delete todo
011a52d
Update Milestone 3
NerbFox 21d00e7
Create kernel_loader.s
NerbFox 2ea4415
Update 3.1 and 3.2
7bb8c31
implement 3.2
razzanYoni f896c73
fix: 3.1 alhamdulillah aman
7d1fe63
feat: implement 3.2.1 (not finished)
700d192
fix: inserter 3.1
da1e433
feat: implement 3.2
433e90c
feat: implement 3.3.1
hanifmz07 47b7168
fix: comment puts (not yet implemented)
hanifmz07 c8b9fc2
feat: implement several common syscall
hanifmz07 c177381
Merge branch 'main' into fix/revert-3.2
razzanYoni 2082648
Merge pull request #2 from Sister20/fix/revert-3.2
razzanYoni c33573e
feat: implement cd and ls (not finished)
hanifmz07 dab930e
feat: update mkdir, ls, rm, cp
hanifmz07 bdb2976
feat: update cat, rm, whereis
hanifmz07 5ab5e50
feat: update rm, whereis
hanifmz07 8d09deb
feat: whereis
RMA1403 48ce9dc
feat: update number of arguments validation
hanifmz07 96ef693
Merge branch 'main' into feat/whereis
RMA1403 56fc9de
Merge pull request #3 from Sister20/feat/whereis
RMA1403 bd50559
add gitignore
hanifmz07 cba923e
fix: duplicate command
hanifmz07 0f6cacf
feat: handle 2 path arguments
hanifmz07 a830957
feat: update mv
hanifmz07 53859ed
feat: finalize all commands :)
hanifmz07 7dd8a4b
bonus cp rekursif tapi telat 11 menit :(((((
RMA1403 5ce186c
update readme
NerbFox 3bcde73
Merge branch 'main' of https://github.com/Sister20/if2230-2023-osyikkk
NerbFox File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/test | ||
*.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#include "../lib-header/disk.h" | ||
#include "../lib-header/portio.h" | ||
|
||
static void ATA_busy_wait() { | ||
while (in(0x1F7) & ATA_STATUS_BSY); | ||
} | ||
|
||
static void ATA_DRQ_wait() { | ||
while (!(in(0x1F7) & ATA_STATUS_RDY)); | ||
} | ||
|
||
void read_blocks(void *ptr, uint32_t logical_block_address, uint8_t block_count) { | ||
ATA_busy_wait(); | ||
out(0x1F6, 0xE0 | ((logical_block_address >> 24) & 0xF)); | ||
out(0x1F2, block_count); | ||
out(0x1F3, (uint8_t) logical_block_address); | ||
out(0x1F4, (uint8_t) (logical_block_address >> 8)); | ||
out(0x1F5, (uint8_t) (logical_block_address >> 16)); | ||
out(0x1F7, 0x20); | ||
|
||
uint16_t *target = (uint16_t*) ptr; | ||
|
||
for (uint32_t i = 0; i < block_count; i++) { | ||
ATA_busy_wait(); | ||
ATA_DRQ_wait(); | ||
for (uint32_t j = 0; j < HALF_BLOCK_SIZE; j++) | ||
target[j] = in16(0x1F0); | ||
// Note : uint16_t => 2 bytes, HALF_BLOCK_SIZE*2 = BLOCK_SIZE with pointer arithmetic | ||
target += HALF_BLOCK_SIZE; | ||
} | ||
} | ||
|
||
void write_blocks(const void *ptr, uint32_t logical_block_address, uint8_t block_count) { | ||
ATA_busy_wait(); | ||
out(0x1F6, 0xE0 | ((logical_block_address >> 24) & 0xF)); | ||
out(0x1F2, block_count); | ||
out(0x1F3, (uint8_t) logical_block_address); | ||
out(0x1F4, (uint8_t) (logical_block_address >> 8)); | ||
out(0x1F5, (uint8_t) (logical_block_address >> 16)); | ||
out(0x1F7, 0x30); | ||
|
||
for (uint32_t i = 0; i < block_count; i++) { | ||
ATA_busy_wait(); | ||
ATA_DRQ_wait(); | ||
/* Note : uint16_t => 2 bytes, i is current block number to write | ||
HALF_BLOCK_SIZE*i = block_offset with pointer arithmetic | ||
*/ | ||
for (uint32_t j = 0; j < HALF_BLOCK_SIZE; j++) | ||
out16(0x1F0, ((uint16_t*) ptr)[HALF_BLOCK_SIZE*i + j]); | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On extra sidenote: Untuk tugas besar ini lebih straightforward lagi Cluster to LBA-nya, no offset, no anything, cluster 0 berada di block 0, cluster 1 di block 4, and so on