IRC channel logs
2022-11-22.log
back to list of logs
<stikonas>oriansj: any thoughts on what we should do with FILE structure for UEFI? <stikonas>so in UEFI files are accessed via struct efi_file_protocol* pointer that has methods like open, close, etc... <stikonas>but at the same time we want to keep struct __IO_FILE <stikonas>should we store struct efi_file_protocol* pointer as int fd; <stikonas>we can probably reuse 0 1 and 2 for stdin, stdout and stderr and hope that UEFI does not assign 0x1 and 0x2 address in memory to file handles <bauen1>muurkha: appologies, I didn't realize that the wifi was that bad <fossy>rickmasters, how exactly is the invalid byte manifesting itself? especially in gnu build systems, an "invalid byte" can be a myriad of misleading things (at one point, i recall something that looked like a corruption, but it was an incompatbility with musl!) <fossy>^ perhaps someone could relay this if rickmasters comes back when i'm not around? he appears to appear in the early hours of the morning for me, haha <oriansj>well fd doesn't really exist in UEFI right, so it seems reasonable to use struct efi_file_protocol* but we also can probably just open up stdin/stdout/stderr and ensure they are 0-2 <rickmasters>fossy: the invalid byte appears in the file scan-tmp.c while building flex-1.5.11 <rickmasters>scan-tmp.c was renamed from lex.yy.c and was produced by the command 'lex scan.lex.l' <rickmasters>So there are various possible causes for corruption like this and it may take a long time to track it down. <rickmasters>I'm pursuing a theory that the fiwix kernel is providing non-zeroed memory to the process in a situation where linux provides zeroed memory. <rickmasters>But I'm just getting started. The lex parser is generated by yacc which complicates debugging. <rickmasters>I had to solve some issues: How can I examine the ram drive after failure? Answer: use pmemsave from the qemu console. Also, hack fiwix to sync the fs before halting. <stikonas[m]>Yeah, i hit sone of non zeroed memory issues in stage0-uefi too <rickmasters>Also, why is the parser.c file missing from the lex directory? Answer: it's an "intermediate file" so make "helpfully" deletes it on cleanup. <rickmasters>stikonas: yes I had to zero memory for brk system call in builder-hex0 to make some programs work right, don't remember which one. <stikonas[m]>Everything after that might be fine as they use calloc() <stikonas[m]>in principle it might be better to do zeroing in these applications rather than in syscall <stikonas[m]>as writing hex2, and even more so M0 and cc_x86 is easier than hex0 code <stikonas[m]>but I guess it makes little sense to undo what is working now