Displaying 3 results from an estimated 3 matches for "getcachesector".
2009 Mar 31
1
[PATCH 1/1] CORE/cache: add cache priority parameter
...ndex 5975557..b8eda9f 100644
--- a/core/cache.inc
+++ b/core/cache.inc
@@ -43,6 +43,8 @@ initcache:
; and if it is already there, return a pointer in GS:SI
; otherwise load it and return said pointer.
;
+; DX Cache priority; 0 -> store as least recently used
+;
; Assumes CS == DS.
;
getcachesector:
@@ -82,6 +84,10 @@ getcachesector:
; Update LRU, then compute buffer address
TRACER 'H'
+ ; Skip LRU update if DX == 0
+ and dx,dx ; Set ZF
+ jz .hit_no_lru
+
; Remove from current position in the list
mov bx,[si+cptr.prev]
mov di,[si+cptr.next]
@@ -95,6 +101,8 @@ getcac...
2009 Feb 08
1
[PATCH 1/1] COMBOOT API: Add calls for directory functions; Implement for FAT; Try 2
...si
+ push es
+ push fs ; Using fs to store the current es (from COMBOOT)
+ push gs
+ mov bp,es
+ mov fs,bp
+ cmp si,0
+ jz .fail
+.load_handle:
+ mov eax,[ds:si+file_sector] ; Current sector
+ mov ebx,[ds:si+file_bytesleft] ; Current offset
+ cmp eax,0
+ jz .fail
+.fetch_cache:
+ call getcachesector
+.move_current:
+ add si,bx ; Resume last position in sector
+ mov ecx,SECTOR_SIZE ; 0 out high part
+ sub cx,bx
+ shr cx,5 ; Number of entries left
+.scanentry:
+ cmp byte [gs:si],0
+ jz .fail
+ cmp word [gs:si+11],0Fh ; Long filename
+ jne .short_entry
+
+.vfat_entry:
+ push eax
+ push...
2008 Dec 04
2
[PATCH 1/1] COMBOOT API: Add calls for directory functions; Implement for FAT
...directory handle's data is incremented to reflect a name read.
+;
+readdir:
+ push ecx
+ push si
+ push gs
+ cmp si,0
+ jz .fail
+.load_handle:
+ mov eax,[ds:si+file_sector] ; Current sector
+ mov ebx,[ds:si+file_bytesleft] ; Current offset
+ cmp eax,0
+ jz .fail
+.fetch_cache:
+ call getcachesector
+.move_current:
+ add si,bx ; Resume last position in sector
+ mov ecx,SECTOR_SIZE ; 0 out high part
+ sub cx,bx
+ shr cx,5 ; Number of entries left
+.scanentry:
+ cmp byte [gs:si],0
+ jz .fail
+ cmp word [gs:si+11],0Fh ; Long filename
+ jne .short_entry
+
+.vfat_entry:
+ push eax
+ push...