-
jclulow
Ugh, it looks like hotmail.com is dropping our mail
-
jclulow
I've lodged a support request with Microsoft
-
richlowe
lists our, or other our?
-
richlowe
if it's other our, is it because the people who spam the bug tracker then get that turned into (small amounts of) email?
-
richlowe
we're a small-scale flappy bird amplifier
-
jclulow
Just bug tracker, I assume. I can't really see detail about the lists
-
jclulow
forth... is not a good language lol
-
richlowe
it's exciting
-
jclulow
That is a word I would not have chosen
-
jclulow
But I guess it is at least printable
-
jclulow
so that's an advantage
-
richlowe
I always think of forth as at a level where you're asm but also need a language real quick
-
richlowe
and then kind of that, but in spirit
-
richlowe
where lua is now
-
jclulow
To be honest, I think I would rather read the assembly
-
richlowe
once it starts changing at runtime, I don't know what I'd rather do
-
jclulow
I guess that's fair
-
jclulow
I certainly do not enjoy that the parts that don't change at runtime are themselves written in forth
-
iprog4u
Truly not trying to trigger anyone but rather educate myself. What parts of Illumos are written in forth or is it something else that causes the pain?
-
jbk
the bootloader uses it for scripting... and it was also used by the firmware for sparc systems (technically never a part of illumos or solaris before it, but arguably closely linked)
-
iprog4u
Wow! I would have had no idea otherwise, thank you. The last exposure I had to Forth was taking a class at a community college during high school. SPARC stuff seems very cool from what I remember about reading of the architecture. I am impressed at the low-level understanding you all have.
-
iprog4u
Why forth though? Thank you all for your work on Illumos. I feel like I am just catching up to decades ago but somehow also looking at the future at the same time.
-
jbk
it's incredibly simple and has a very small footprint is my guess
-
jbk
(well simple to implement)
-
iprog4u
Fascinating. I suppose that is what the Oxide folks set out to correct.
-
tsoome
every language has its ups and downs. In it, it is languages what you are working with, if you can not handle one, you need to look into the mirror.
-
tsoome
in IT*
-
iprog4u
Itrospection is a good thing as well as being open to languages one is not used to.
-
tsoome
the cost of forth interpreter versus cost of lua in terms of bytes is 57344 versus 122880 bytes in fbsd BIOS loader version (loader_lua - loader_simp and loader_4th - loader_simp sizes in this test system).
-
tsoome
so everything we do has price tag of some sort attached.
-
iprog4u
*Introspection. I can spell when not tired. There is a Lua bootloader too? I imagine that at such a low level as bootloader that Forth makes much more sense from the size perspective. I should not have been so perjorative about it.
-
tsoome
also lua is using more stack space.
-
iprog4u
The tradeoff for speed and limited space over higher level readability makes sense there.
-
tsoome
well, yes, there is lua too, and the suggestion was that writing lua is more intuitive than forth. At the end, it did turn out that you still need to know the language well to actually write in it.....
-
tsoome
or even read, for that matter.
-
iprog4u
Ha. Probably a good idea to know the language well, yes. It must be an interesting space to work in.
-
iprog4u
I know Forth is often used in HPC clusters and financial apps but was not aware of its presence in the bootloader.
-
tsoome
It really depends;) How interesting you may find a piece of software which is running about 30 seconds (depending on what is your timeout counter value to allow you to interrupt automated boot;)
-
jclulow
tsoome: "if you can not handle one, you need to look in the mirror" is just victim blaming
-
jclulow
-
iximeow
being subjected to forth does make one feel like a bit of a victim, that's true
-
iximeow
(i joke)
-
jclulow
iximeow: victim is actually the guild-recognised title for a forth programmer
-
andyf
For the few people that spend time in the loader forth code, I didn't see the real benefit of all the work that went on to rewrite that in lua. Maybe I'm wrong. Perhaps the number of loader developers tripled.
-
jclulow
andyf: "the few people that spend time in the loader" is absolutely self reinforcing
-
iximeow
i will say having tripped over the bootloader a few months ago i had a fairly hard time learning enough forth to make sense of what i was seeing
-
iximeow
heh
-
jclulow
I have two degrees, I could write a forth from scratch if I wanted to, and I am investigating to fix a critical defect in the loader -- and yet, it's a truly massive impediment that is making me rethink my life choices
-
iprog4u
Seems an appropriate guild title. That is not the easiest code to make sense of.
-
iprog4u
May I ask what is the defect and how you came across it?
-
jclulow
illumos.org/issues/17293 -- when I updated my software and the console was gone
-
fenix
→
BUG 17293: console configuration is ignored on some systems (New)
-
tsoome
well, it is rather obvious there are some better know languages around, but the fact is, the same few people who were writing boot loader scripts in fbsd, they are still writing those scripts.
-
tsoome
gone how? your console to serial redirection was not configured to 9600?
-
jclulow
Setting aside the passive aggressiveness
-
jclulow
I had configured it in /boot/conf.d/console and when I rebooted it was trying to use a different device
-
tsoome
cut your crap, can you answer even single question without insults?
-
jclulow
What exactly do you think your constant stream of snark and negativity is?
-
iprog4u
oof, that sounds like a tough one. Didn't mean to set anyone off heheh.
-
jclulow
iprog4u: You have done nothing wrong!
-
iprog4u
Oh good. Figured you two were just having some work fun but I am quite new here and didn't want to assume.
-
tsoome
so, what was in config and what was actually used?
-
jclulow
I don't recall right now, I'm going to have to dig up my notes and figure out what machine it was.
-
jclulow
In the meantime I am adding a tracing facility to the environment store so that I can debug it
-
jclulow
-
tsoome
was it uefi or bios boot?
-
jclulow
I expect probably BIOS
-
tsoome
yes, its bios boot, it has the bug about 'N'
-
jclulow
Right. It also has the bug that it ignored what was in the file
-
tsoome
that is debatable, but its not important right now on this machine. The better question is, where from it got "9600,8,n,1,-"
-
jclulow
It's definitely not debatable. I specified what I wanted, and that used to work, and on new bits it stopped working
-
tsoome
you did not read my comment, right?
-
jclulow
Which one
-
tsoome
there are systems around which hung your machine, if you change the serial port speed. Your host has "good" SPCR, value is "115200,8,N,1,-", so even with your custom value it should be just fine, yet we land in kernel with 9600, which clearly is not neither your intent nor something which is configured by firmware.
-
tsoome
so the immediate question would be, where from 9600 is appearing.
-
tsoome
conf.d files are processed almost at the end, after bootenv.rc, defaults/loader.conf and loader.conf
-
jclulow
A quick glance at i386/libi386/comconsole.c suggests: comc_ini() attempted to read the speed via comc_getspeed(), which either read 9600 or failed to read and defaulted to COMSPEED (9600). Then, because there was an SPCR table, we set ttya-mode-spcr to the value with "N" in it, then when my config file tried to set "ttya-mode" correctly to my chosen value, the comc_mode_set() hook saw
-
jclulow
ttya-spcr-mode was set already and ignored my instructions
-
jclulow
The fact that ttya-spcr-mode ends up as an invalid value is definitely a bug, but the fact that expressly ignore user directives in comc_mode_set() -- and maybe other places, I haven't done an extensive review yet -- is most of what 17293 is about
-
tsoome
-
fenix
→ CODE REVIEW 3327: 16330 loader: SPCR needs better handling (NEW) |
illumos.org/issues/16330
-
jclulow
As in, they don't understand the uppercase "N" ?
-
jclulow
oh, as in, we set them both in the SPCR code with the uppercase N
-
tsoome
yep, but, the fact that we do not explicitly set 9600 in comconsole, does suggest we actually do get 9600 with comc_getspeed(port->ioaddr); and this is very disturbing.
-
tsoome
what we could do there (in comc_ini()), is to parse ttyX-mode (or spcr mode, altho they must be the same because we do set them same in biosacpi.c), and only set speed if the comc_getspeed() differs from what SPCR is telling us.
-
tsoome
again, the reason I am avoiding, well, very much suggesting to avoid setting the port speed, is the risk of getting hung system. bhyve with BHYVE_CSM firmware actually does hung on any serial input, BHYVE.fd hungs when we do change the port speed.
-
tsoome
and bhyve is not only one doing so.
-
tsoome
anyhow, if you get to the console of this machine, please check if you can get boot: prompt - that is, press space (anything but enter;) as a very first thing, and you should get functional boot: prompt. We can not really check the port attributes from it, but at least we can confirm if it is usable
-
tsoome
Second interesting fact would be to see if fixing 'N' would fix the port speed problem. On my supermicro and X6-2 I did not observe such issue but this does not really mean anything other that those machines are behaving as expected:(
-
jbk
sadly, even with uefi, it seems sometimes more like a suggestion than a standard... for legacy bios it's probably even worse...
-
jbk
like the uefi standard has the (unfortunately named) concept of SysPrep applications
-
jbk
where like your boot order, you can define UEFI applications to run prior to running the boot application to prepare the system
-
jbk
supermicro's bios say they support them, but they don't actually
-
jbk
they also do some non-standard stuff with the bootorder
-
richlowe
that sounds so much fun
-
jbk
buckets full
-
twobitsahead
How come ${X_GATE}/usr/src/cmd/zoneadmd/mcap.c is present in illumos-gate but not illumos-joyent nor illumos-omnios?
-
tsoome
I do not see it in illumos-gate
-
tsoome
are you sure its not leftover from somewhere else?
-
twobitsahead
Apparently so... I don't see it in the fresh gate either
-
tsoome
git whatchanged did not list it either
-
twobitsahead
I am looking through old commits and maybe I mistakenly copied something
-
andyf
It was removed in OmniOS in commit 3f77773bdad3d0bfbd6cd39cf45434a46b6369d5 which looks like it came over from SmartOS
-
andyf
Which means it was probably introduced to OmniOS in the same way
-
tsoome
jbk have you worked with libzpool in user space? I get 630 threads from it and it makes gdb to crawl:(
-
richlowe
yes, it looks like it was never in illumos
-
richlowe
Jerry added it, Jerry removed it
-
richlowe
added with OS-11 removed with OS-6355
-
twobitsahead
@andyf Was there a replacement elsewhere for the functionality of mcap.c?
-
richlowe
fenix: OS-6355
-
fenix
OS-6355: in-kernel zone page invalidation (Resolved)
-
fenix
-
richlowe
which points to joyent rfd 38, which I don't know how to look at
-
richlowe
danmcd?
-
richlowe
but it sounds like they did the same thing, better and more accurately.
-
tsoome
-
twobitsahead
@tsoome This is what I was looking for. Thanks for that
-
tsoome
yw
-
jbk
tsoome: i have not
-
tsoome
ok.
-
danmcd
You can look at any of the RFDs in the aforementioned github repository, @richlowe .. Thanks @tsoome for beating me to the punch.
-
tsoome
I have those moments between stepping gdb;)
-
Smithx10
I was trying to compile some cgo, ran into missing Ftm_gmtoff and Ftm_zone are undefined. Do we have these?
gitlab.com/cznic/libc/-/blob/master…llumos_amd64.go?ref_type=heads#L190
-
Smithx10
-
Smithx10
Doesn't look like it :(
-
jclulow
Smithx10: If you already have a "struct tm", you can use "tm_isdst" to determine if DST is in effect or not. If DST, the "altzone" global contains the tm_gmtoff value, and if not DST the "timezone" global contains the value
-
jclulow
The "tzname" global seems to contain the names of the effective timezones as well
-
jclulow