serenity: Unable to boot on bare metal (Intel ICH7 chipset, 2009 era machine)

The log from serial port:

[#0 init_stage2(2:2)]: UHCI: Allocated framelist at physical address P0x00e06000
[#0 init_stage2(2:2)]: UHCI: Framelist is at virtual address V0xc115d000
[#0 init_stage2(2:2)]: UHCI: QH(0xc115f000) @ 14708736: link_ptr=14708770, element_link_ptr=1
[#0 init_stage2(2:2)]: UHCI: QH(0xc115f020) @ 14708768: link_ptr=14708802, element_link_ptr=1
[#0 init_stage2(2:2)]: UHCI: QH(0xc115f040) @ 14708800: link_ptr=14708834, element_link_ptr=1
[#0 init_stage2(2:2)]: UHCI: QH(0xc115f060) @ 14708832: link_ptr=14708866, element_link_ptr=1
[#0 init_stage2(2:2)]: UHCI: QH(0xc115f080) @ 14708864: link_ptr=14721025, element_link_ptr=1
[#0 init_stage2(2:2)]: UHCI: Reset completed
[#0 init_stage2(2:2)]: UHCI: Started
[#0 init_stage2(2:2)]: DMIExpose: SMBIOS 32bit Entry point @ P0x000f0ce0
[#0 init_stage2(2:2)]: DMIExpose: Data table @ P0x000f0100
[#0 init_stage2(2:2)]: IDEChannel: Primary master ATA device found: Name=WDC WD20EZAZ-00GGJB0, Capacity=137438952960, C/H/Spt=16383/16/63, Capabilities=0x2f00
[#0 init_stage2(2:2)]: Trying to unregister unused handler (?)
[#0 init_stage2(2:2)]: KUBSAN: multiplication overflow, 'int' (32-bit)
[#0 init_stage2(2:2)]: KUBSAN: at ../Kernel/Storage/IDEChannel.cpp, line 392, column: 50
[#0 init_stage2(2:2)]: 0xc04caa4b (next: 0xc11398d0)
[#0 init_stage2(2:2)]: 0xc05ef3e3 (next: 0xc1139a20)
[#0 init_stage2(2:2)]: 0xc05f1353 (next: 0xc1139a80)
[#0 init_stage2(2:2)]: 0xc05f14e9 (next: 0xc1139ae0)
[#0 init_stage2(2:2)]: 0xc05eda9e (next: 0xc1139b60)
[#0 init_stage2(2:2)]: 0xc05edff0 (next: 0xc1139bb0)
[#0 init_stage2(2:2)]: 0xc01bad09 (next: 0xc1139c30)
[#0 init_stage2(2:2)]: 0xc034e531 (next: 0xc1139c80)
[#0 init_stage2(2:2)]: 0xc034d009 (next: 0xc1139d00)
[#0 init_stage2(2:2)]: 0xc034d06b (next: 0xc1139d20)
[#0 init_stage2(2:2)]: 0xc05f4038 (next: 0xc1139da0)
[#0 init_stage2(2:2)]: 0xc05f6c05 (next: 0xc1139df0)
[#0 init_stage2(2:2)]: 0xc05f6df3 (next: 0xc1139e40)
[#0 init_stage2(2:2)]: 0xc053825c (next: 0xc1139f00)
[#0 init_stage2(2:2)]: 0xc0121ef8 (next: 0x00000000)
[init_stage2(2:2)]: KERNEL PANIC! :^(
[init_stage2(2:2)]: UB is configured to be deadly.
[init_stage2(2:2)]: at ../Kernel/UBSanitizer.cpp:48 in void print_location(const Kernel::UBSanitizer::SourceLocation&)
[#0 init_stage2(2:2)]: 0xc0355d44 (next: 0xc1139820)
[#0 init_stage2(2:2)]: 0xc04caada (next: 0xc11398d0)
[#0 init_stage2(2:2)]: 0xc05ef3e3 (next: 0xc1139a20)
[#0 init_stage2(2:2)]: 0xc05f1353 (next: 0xc1139a80)
[#0 init_stage2(2:2)]: 0xc05f14e9 (next: 0xc1139ae0)
[#0 init_stage2(2:2)]: 0xc05eda9e (next: 0xc1139b60)
[#0 init_stage2(2:2)]: 0xc05edff0 (next: 0xc1139bb0)
[#0 init_stage2(2:2)]: 0xc01bad09 (next: 0xc1139c30)
[#0 init_stage2(2:2)]: 0xc034e531 (next: 0xc1139c80)
[#0 init_stage2(2:2)]: 0xc034d009 (next: 0xc1139d00)
[#0 init_stage2(2:2)]: 0xc034d06b (next: 0xc1139d20)
[#0 init_stage2(2:2)]: 0xc05f4038 (next: 0xc1139da0)
[#0 init_stage2(2:2)]: 0xc05f6c05 (next: 0xc1139df0)
[#0 init_stage2(2:2)]: 0xc05f6df3 (next: 0xc1139e40)
[#0 init_stage2(2:2)]: 0xc053825c (next: 0xc1139f00)
[#0 init_stage2(2:2)]: 0xc0121ef8 (next: 0x00000000)

When I have time, I’ll try to fix this UB bug. Also, it seems like there’s a bug in the capacity size, becasue the log indicates 128GB of capacity, although this drive has a capacity of 2TB. Details about the machine:

  • Chipset: Intel ICH7
  • Has a new Western Digital 2TB harddrive
  • Network card: Qualcomm Atheros AR8131

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 17 (15 by maintainers)

Most upvoted comments

What bugs me though is that KUBSAN screams that there is a multiplication overflow of 32-bit integers, although there should be a 64 bit integer used:

https://github.com/SerenityOS/serenity/blob/0deb0c689108089b8fdda27121a8c33305394128/Kernel/Storage/IDEChannel.cpp#L386-L392

Does this error still occurr? I didnt find it in the last log

E: the maximum integer that would be possible has 57 bits (16+16+16+9 || (2**16-1)**3 * 512)

It quite makes sense to me, because according to the tests I did, when the code tries to scan the second ATA channel, it gets garbage data and it seems that the code doesn’t handle such situation very well.