@@ -128,7 +128,7 @@ HalpParseApicTables(
128128 if (AcpiHeader -> Length != sizeof (* LocalApic ))
129129 {
130130 DPRINT01 ("Type/Length mismatch: %p, %u\n" , AcpiHeader , AcpiHeader -> Length );
131- return ;
131+ break ;
132132 }
133133
134134 DPRINT00 (" Local Apic, Processor %lu: ProcessorId %u, Id %u, LapicFlags %08X\n" ,
@@ -164,7 +164,7 @@ HalpParseApicTables(
164164 if (AcpiHeader -> Length != sizeof (* IoApic ))
165165 {
166166 DPRINT01 ("Type/Length mismatch: %p, %u\n" , AcpiHeader , AcpiHeader -> Length );
167- return ;
167+ break ;
168168 }
169169
170170 DPRINT00 (" Io Apic: Id %u, Address %08X, GlobalIrqBase %08X\n" ,
@@ -173,8 +173,9 @@ HalpParseApicTables(
173173 // Ensure HalpApicInfoTable.IOAPICCount consistency.
174174 if (HalpApicInfoTable .IoApicPA [IoApic -> Id ] != 0 )
175175 {
176+ /* Skip the duplicate but keep parsing the rest of the MADT */
176177 DPRINT01 ("Id duplication: %p, %u\n" , IoApic , IoApic -> Id );
177- return ;
178+ break ;
178179 }
179180
180181 // Note: Address and GlobalIrqBase are not validated in any way (yet).
@@ -193,7 +194,7 @@ HalpParseApicTables(
193194 if (AcpiHeader -> Length != sizeof (* InterruptOverride ))
194195 {
195196 DPRINT01 ("Type/Length mismatch: %p, %u\n" , AcpiHeader , AcpiHeader -> Length );
196- return ;
197+ break ;
197198 }
198199
199200 DPRINT00 (" Interrupt Override: Bus %u, SourceIrq %u, GlobalIrq %08X, IntiFlags %04X / UNIMPLEMENTED\n" ,
@@ -203,7 +204,7 @@ HalpParseApicTables(
203204 if (InterruptOverride -> Bus != 0 ) // 0 = ISA
204205 {
205206 DPRINT01 ("Invalid Bus: %p, %u\n" , InterruptOverride , InterruptOverride -> Bus );
206- return ;
207+ break ;
207208 }
208209
209210#if 1
@@ -225,9 +226,13 @@ HalpParseApicTables(
225226 }
226227 default :
227228 {
229+ /* Skip subtable types we don't handle and keep going - aborting
230+ * the whole parse here would drop later entries (e.g. I/O APICs
231+ * that follow an unhandled entry), which breaks interrupt
232+ * routing on firmware that emits such entries early. */
228233 DPRINT01 (" UNIMPLEMENTED: Type %u, Length %u\n" ,
229234 AcpiHeader -> Type , AcpiHeader -> Length );
230- return ;
235+ break ;
231236 }
232237 }
233238
0 commit comments