-
jbk
aha! the console font is at that address (not sure yet what that means)
-
gitomat
[illumos-gate] 18119 nvme_print_identify_ctrl_list() needs to verify id count -- Robert Mustacchi <rm⊙fo>
-
gitomat
[illumos-gate] 18121 Plumb Micron 7600 nvme log pages -- Robert Mustacchi <rm⊙fo>
-
gitomat
[illumos-gate] 18122 add support for OCP Hardware Component log -- Robert Mustacchi <rm⊙fo>
-
jbk
tsoome: is there an explicit point where we stop using the boot fb?
-
jbk
i couldn't find it looking yesterday (but it was late)
-
tsoome
jbk basically with gfxp_map_kernel_space()
-
tsoome
thats in gfx_private
-
jbk
ok.. do you know offhand if that happens before or after clear_boot_mappings() is called? (I can check here in a bit, but as an experient, I'm trying to have clear_boot_mappings() skip over the mappings for the font boot module
-
tsoome
I'm not sure, would need to verify.
-
jbk
hrm.. there's a bit of indirection going on, but it looks like it's not until the driver is attached (as in DDI_ATTACH)
-
jbk
i guess more generally, (today) any boot modules are loaded into < 4GB physical (and virtual by virtue of unity mapping) addresses, right?
-
jbk
are we doing something special for the ramdisk that maybe we're not for other modules (i.e. the console font module) to allow it to live after we clear all the VM mappings under _userlimit ?
-
tsoome
we make a copy of console fonts and leit the module get freed
-
jbk
i saw that in some ddi setup function, but are we updating things to use the copy? it looked like at least some of the fb-related boot variables were still referencing the original addresses by the time clear_boot_mappings() was called
-
tsoome
hm
-
jbk
unfortunately another meeting coming up, but I can see if i can find the spots where I noticed it last night again once it's over
-
jbk
(given that there's been at least one _very_ similar report booting openindiana on physical hardware, i'm thinking it's not something hyper-v specific, but maybe something about the VM in win2025 that makes it much easier to trigger)
-
tsoome
that is good point.
-
jbk
also, i know our boot archive/ramdisks have gotten larger over time
-
jbk
and since it looks like the font boot module is stored right after the archive module in memory
-
jbk
i'm wondering if there's some implicit assumption we're violating about how memory < 4GB looks
-
tsoome
how big is your ramdisk btw?
-
jbk
631MiB
-
jbk
(661,921,792 bytes)
-
tsoome
uncompressed?
-
jbk
no, I think that's the size on disk
-
jbk
(that's what dboot reports the boot module size)
-
tsoome
that should be uncompressed, we uncompress it while loading into memory
-
jbk
-
jbk
(when clear_boot_mappings() hits vaddr==0x2c04e00 in it's loop, that's where it hangs when x86pte_inval() writes 0 to the pte)
-
tsoome
[0x0000000001394df8 0]: 661921792 (0x0000000027742000)
-
tsoome
yep, thats the uncompressed size.
-
tsoome
when console is fully set up, then font data is only used by tem and tems::print ts_font does display the same data as in fonts->stqh_first | ::print struct fontlist font_data | :print bitmap_data_t font | ::print struct font (huh, thats long chain:D)
-
tsoome
but, I guess, the question is, if we get something printed by code in i86pc/boot/ after the mapping has changed....
-
jbk
so skipping the font module does allow things to proceed at least a bit, though we end up hanging again a bit later
-
tsoome
I think, you did see boot_fb_font.
-
jbk
one other thing is gen1 vms seem to be fine
-
jbk
(except your boot device has to be IDE, and our IDE driver is so terrible that it's effectively unusable for much beyond 'look i can boot')
-
jbk
terrible in the sense that its _insanely_ slow due to the lack of DMA support
-
jbk
like 'a carrier transporting a flash drive could be competitive in performance' slow :)
-
tsoome
pio modes for win;)
-
jbk
yeah, which 99% isn't a problem (because no one these days runs physical hardware w/ that anymore)
-
jbk
(I'm not even sure you can get 64-bit hardware w/ IDE -- it's probably all SATA)
-
jbk
i do notice that we start (in gen1) loading things at somewhat higher virtual addresses
-
jbk
2850_0000 instead of 2c04_0000
-
jbk
as a result the kernel ends up at higher physical addresses in the gen1 vm
-
jbk
(i thought there's a way to upload a file as a gist via the git command, if i can figure it out, I'll stick the gen1 vs gen2 boots out there)
-
tsoome
what does gen1 memory map tell?
-
tsoome
loading at higher address implies unusable chunks in memory map
-
jbk
err i got that backwards.. (too much task switching :P)
-
jbk
the gen1 is lower than gen2
-
tsoome
as we load at (0xc00000 - sizeof elf header) + size of unix + MBI + modules and next free address will become first address to be used for allocations. then we allocate space for kernel and copy it, + some for memory maps. but if there are unusable areas in between, those will add up.
-
tsoome
therefore start address is always the same but physical location of kernel depends on module sizes and memory map.
-
jbk
-
jbk
the size and specs of the two vms are otherwise identical
-
jbk
(aside from gen1 vs gen2)
-
jbk
(as a side note, I wouldn't mind tweaking some of that debugging output since it often requires you to be able to do math in hex to make sense of things)
-
tsoome
well, in gen1 the rootfs is 0xe81000, end 0x285c3000 and in gen2 its 0x490b000, end 0x2c04d000, in gen2 case there must be something occupying ~58MB between loader loaded kernel and rootfs.
-
tsoome
do you have gen2 loader memmap output handy?
-
jbk
i can get it -- if i'm not mistaken, it does look like in gen1, the address for module 0, 1, 2 are all increased (i.e. addr1 < addr2 < addr3) while gen2, module 1 is at a _lower_ address than module 0
-
jbk
i updated the gist with it
-
jbk
and gh helpfully put it in the middle of the two files :)
-
tsoome
so your bad clear was 2c04e000 - which is the start of console-font module. you did disable memory map clear for it and the issue did move to next address?
-
jbk
yeah.. if we skip the entries for the font, we get further, though it appears we lock up again when we clear some larger addresses, thuough I haven't narrowed down the exact range yet
-
jbk
where do the console font files come from (in the boot module)?
-
jbk
size a620 vs 1d178
-
jbk
the environment is 869 vs 8d3 which seems reasonable given BIOS vs UEFI
-
tsoome
console font size depends on selected font (based on resolution).
-
tsoome
fonts are in /boot/fonts
-
jbk
ah.. i wonder if hv defaults to a larger size for gen1 vs gen2
-
tsoome
the font and screen sizes are listed in loader env.
-
tsoome
btw, did you try to disable clear_boot_mappings() like in that AMD Ryzen case?
-
jbk
not yet, though I can try that..
-
tsoome
well, I guess its just about "yes, it is happy now" but does not really tell us more:D
-
jbk
i mean.. why would zeroing out that page table entry cause things to hang? the only thing I can think of is we're somehow still trying to use that VA (despite it being below _userlimit) when clear_boot_mappings() is called
-
jbk
we are (unfortunately) multi-threaded at that point, though still single-CPU
-
jbk
that PTE is in the middle of a page of entries, and otherwise doesn't seem special
-
tsoome
-
tsoome
thats the tail of the list of tables... I wonder if "next" bad case was also falling there - which could hint about some sort of range limit.
-
jbk
virtual fffffd002cd67270 mapped to physical 2cd67270
-
jbk
that's the specific pte
-
jbk
so that all looks fine
-
jbk
so skipping that gets us all the way to sched() in main() if we skip clear_boot_mappings
-
jbk
hrm.. actually it gets all the way into userland if we skip that
-
tsoome
I guess thats not a surprise.
-
richlowe
jbk: to be clear because of my worries about i86mmu.c, have you confirmed (manually, don't trust ::report_map), that those mappings are correct?
-
richlowe
if you do (random number here) `fffffd002cd67270/512K` and `2cd67270\512K`
-
richlowe
confirm they're truly the same
-
richlowe
you might be able to do that with ::dump and intelligence, but I never have
-
jbk
hopefully once i have a new build that lets me easily play with bits I can check again...
-
jbk
there's a sparate hyper-v specific issue because microsoft apparently can't settle on a consistent ACPI id for the vmbus
-
richlowe
the bzero of htable bits you filed I'd wondered about, and then wondered if somehow it was a hot path
-
richlowe
and then forgot
-
jbk
presumably if done in a kmem cache constructor, shouldn't that let it usually happen outside of a hot path
-
jbk
and when it doesn't, it's probably already in a sitaution where it's going to be taking longer already
-
richlowe
not sure, see "somehow" and "forgot"
-
jbk
?
-
jbk
i just wanted to note that in case someone else sees it and freaks out a bit because they can't remember which pattern is used for which (redzone, uninit, etc) :)
-
richlowe
yeah, I did the same thing
-
richlowe
and then tried to remember how the sharing really works out
-
richlowe
prior to kpti, a lot of the deep magic there was all about ism/dism
-
richlowe
and pretty boring unless you're a database
-
jbk
oh yeah.. all the bending over backwards for oracle
-
jbk
so all the various processes can share the same memory, and use as few page tables
-
jbk
which is kinda funny all the effort that's gone into making oracle (RDMS) go fast on solaris, and then they royally botched it with I think solaris 11.3
-
jbk
(eventually fixed it, but initially VM2 made what at least externally feels like 'did no one tell you how one of your most critical apps runs on your OS?'
-
jbk
IIRC, using sysv shared memory would live lock the system -- not a question of if, but how many hours or days after boot