Skip to content

Commit

Permalink
Merge pull request #2098 from ghaerr/df7
Browse files Browse the repository at this point in the history
[directfd] Disable track/cylinder cache on 32-bit CPUs
  • Loading branch information
ghaerr authored Nov 9, 2024
2 parents 511d03b + 065e555 commit 64e065a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion elks/arch/i86/boot/setup.S
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
! 4 = 80188
! 5 = 80186
! 6 = 80286
! 7 = 80386
! 7 = 32-bit CPU (80386+)
! 8 = 80486 UNUSED
! 9 = Pentium UNUSED
! 10 = Pentium PRO UNUSED
Expand Down
3 changes: 2 additions & 1 deletion elks/arch/i86/drivers/block/directfd.c
Original file line number Diff line number Diff line change
Expand Up @@ -1203,7 +1203,8 @@ static void DFPROC redo_fd_request(void)
startsector = sector;
numsectors = req->rq_nr_sectors;
#ifdef CONFIG_TRACK_CACHE
use_cache = (command == FD_READ) && (req->rq_errors < 4);
use_cache = (command == FD_READ) && (req->rq_errors < 4)
&& (SETUP_CPU_TYPE != 7 || running_qemu); /* disable cache on 32-bit systems */
if (use_cache) {
/* full track caching only if cache large enough */
if (CACHE_FULL_TRACK && floppy->sect < CACHE_SIZE)
Expand Down

0 comments on commit 64e065a

Please sign in to comment.