format binary as "kex"
use32
org 0
db 'MENUET01'
dd 1
dd START
dd I_END
dd MEM
dd STACKTOP
dd 0
dd 0
START:
; IF WE UNCOMMENT THESE FOUR LINES
; THEN WORKS GOOD
; SO WE CAN MAKE CONCLUSION
; THAT BUG OCCURS WHEN
; WE PASS 70.2 A MEMORY REGION WHICH
; CONTAINS UNMAPPED VIRTUAL PAGES
;mov eax, 64
;mov ebx, 1
;mov ecx, MEM + 100500
;int 0x40
mov eax, 70
mov ebx, fs_info_block
int 0x40
mov eax, -1
int 0x40
; data
fs_info_block:
dd 2
dd 0
dd 0
dd MEM + 100500 ; data size
dd 0 ; buf addr
db '/tmp0/1/0.raw', 0
I_END:
rb 4096
align 16
STACKTOP:
MEM:
Current FS code works like this: lock (a mutex guarding access to) a partition, read/write data, unlock the partition.
When a thread crashes while reading/writing, the partition is left locked. Therefore other programs can't acquire the lock and access that partition anymore.
To illustrate this logic you can run board to save its log to e.g. /hd0/1/, and then run your test program. This way /tmp0/1/ will be locked but board will be still working with /hd0/1/.
In theory, kernel could release acquired locks when threads crash. In practice, kernel has no idea what locks have been acquired by a given thread.
It is possilble to modify FS code to fill an array of acquired locks. In fact, this is very similar to an array of file descriptors.
So, resolution of this issue could be a side effect of file descriptors when they are implemented.
Sorry, but I'm not ready to start this work. I have many things started that are waiting to be finished.
If somebody wants to work on the issue, I can share my knowledge of FS code.
In revision #8680 there seems to be a regression with file working.
Reproduces with acpi app from this comment viewtopic.php?f=1&t=1195&hilit=devices. ... 105#p37822 => devices.dat and log files are 0 bytes and there is an error "sysfunc70 addr error" in the Board.
I already notified the commit author rgimad and he will check the issue.
I temporarily disabled safety checks in sysfn70 , so acpi driver works now. But in future we need to add filesystem functions to kernel exports and make drivers use them. Drivers must not use sysfns via int 0x40, they are not userspace programs.
У меня на ПК не доступен мой главный диск D: тот что Work.
Ни в режиме ACHI ни IDE (список одинаков для обоих режимов), так что тут ядро, а не драйвер.
Список дисков в Колибри выглядит странно.
Смотрите скрины.
GetFileInfo (sf70.5) called here returned an error code sometimes,
the return value wasn't checked,
the buffer had uninitialized data,
which led to strange disk size.
The longer story of _why_ it happened.
A partition size that is reported by sf70.5 is read by FS-specific code. E.g. if /hd0/1 is FAT, then fat_GetFileInfo is called to get its size.
Yes, partition size doesn't depend on a particular FS on it: you can format the same partition as FAT, then EXT. But the code is written so that FS-specific code reports the size of the underlying partition.
So if FS isn't supported, then there is no FS-specific code associated with the partition to report its size.
Yes, there is a default/fallback stub for the case when no real FS was detected on a partition. But that stub returned the _not_implemented_ error unconditionally.
I implemented sf70.5 for that stub to report a partition size in #9043. This should resolve the issue with wrong partition sizes.
The issue with NTFS is a separate one. I'm not familiar with NTFS and therefore I have no idea of what's going on there.
But a dump of the partition's superblock is a common place to start. So, please, run one more command and attach resulting superblock file.
(Offtopic) Вопрос не относящийся к Kolibrios, но близок к теме топика.
У меня, при использовании Xenial Puppy LiveCD видятся все внешние диски на интерфейсе USB (подключен SSD)
а при загрузке Bionic (Fossa) Puppy LiveCD один из дисков не виден в системе.
Этому есть какое то объяснение?
P.S. И ещё попутно заметил, что DosBox не отображает директорию диска примонтированного внешнего диска с USB.
KPG wrote:(Offtopic) Вопрос не относящийся к Kolibrios, но близок к теме топика.
У меня, при использовании Xenial Puppy LiveCD видятся все внешние диски на интерфейсе USB (подключен SSD)
а при загрузке Bionic (Fossa) Puppy LiveCD один из дисков не виден в системе.
Этому есть какое то объяснение?
Что ты имеешь в виду под "не виден"? В lsblk (или blkid) он есть? Речь именно про диск или про раздел и ФС на нём?