freenode/#mezzano - IRC Chatlog
Search
13:40:03
ebrasca
froggey: For me perform-target-lap-generation , https://www.cs.uaf.edu/2011/fall/cs301/lecture/11_21_PowerPC.html and http://openpowerfoundation.org/wp-content/uploads/resources/leabi/content/dbdoclet.50655240_82182.html are someting similar. I am not sure why.
13:50:04
ebrasca
froggey: Does last emit in perform-target-lap-generation set all to nil in stack frame?
13:51:39
froggey
after the stack pointer is adjusted all the stack slots that will be used to contain lisp values are initialized to nil
13:52:40
froggey
this prevents the GC from seeing stale values in those slots once the compiler starts using them
13:59:47
ebrasca
To make my stack frame , can it be someting like `(lap:mflr :gpr30) `(lap:std :gpr30 16 (:gpr29)) `(lap:stdu :gpr29 -32 (:gpr29)) ?
14:04:07
froggey
you have to match what x86 and arm do. push the return address (lr); push the frame pointer register; set fp to sp; subtract stack-size from sp; initialize stack slots
14:07:27
froggey
it also needs the appropriate gc metadata so the gc can stop the system on any of those instructions & correctly examine the stack
14:32:13
fittestbits
For file system work in a VM, I attached another disk that had a partition table that I wanted.
14:33:05
fittestbits
For a dual boot system, I created a mezzano partition and a file system partition using standard partition editors.
14:57:25
ebrasca
froggey: https://upload.wikimedia.org/wikipedia/commons/3/30/IO_stack_of_the_Linux_kernel.svg
15:09:40
froggey
ebrasca: partition.lisp contains code for reading partition tables and presenting the partitions as disks. not for creating or modifying them, that's something that should be done outside the supervisor
15:10:23
froggey
disk.lisp contains the generic api for directly accessing disks & disk-like things (such as partitions)
15:11:16
froggey
fs.lisp is somewhat like linux's vfs layer, it dispatches CL filesystem operations to the appropriate host
15:23:46
froggey
naming disks sensibly is difficult. assigning them an arbitrary name based on their detection order doesn't seem any better than (nth x (all-disks))
15:27:32
ebrasca
I like to have someting like maybe (partition disk-n partiton-n) or (partition-by-uuid uuid) and others
15:31:41
ebrasca
Some people in #lisp suggested me to make my fat32 portable between CL implementations.
15:32:55
froggey
disk partitions already have ids associated with them. to check if a disk is a partition, look at the disk's disk-device slot. this'll contain a partition object if it's a partition, then you can get the partition's number using partition-id
15:33:44
froggey
abstract the access to the disk, replacing calls to disk-read/-write to some generic functions
15:34:18
froggey
I'm not sure how you'd make access to the filesystem itself portable. afaik other implementations don't have anything like open-using-host
17:58:52
p_l
froggey: make a generic piece of code to instantiate a FS given a certain protocol to access disks directly?
17:59:14
p_l
Then one could implement the block device access using CFFI or similar on Linux for testing
18:52:28
froggey
I don't really follow, would this be for accessing the disk (or other underlying storage) or hooking the filesystem into the CL implementation?
19:03:41
froggey
seems pretty reasonable, it could support disk images too (backed by CL streams?), not just block devices/direct disk access
19:05:09
froggey
the fat32 code could be split into two parts: a portable library which presents it's own api for dealing with the filesystem & uses this generic disk layer, and a glue layer that connects the mezzano vfs to the library