@@ -34,9 +34,9 @@ pub enum MadtError {
34
34
#[ repr( C , packed) ]
35
35
#[ derive( Debug , Clone , Copy ) ]
36
36
pub struct Madt {
37
- header : SdtHeader ,
38
- local_apic_address : u32 ,
39
- flags : u32 ,
37
+ pub header : SdtHeader ,
38
+ pub local_apic_address : u32 ,
39
+ pub flags : u32 ,
40
40
}
41
41
42
42
/// ### Safety: Implementation properly represents a valid MADT.
@@ -415,86 +415,86 @@ impl<'a> Iterator for MadtEntryIter<'a> {
415
415
#[ derive( Clone , Copy , Debug ) ]
416
416
#[ repr( C , packed) ]
417
417
pub struct EntryHeader {
418
- entry_type : u8 ,
419
- length : u8 ,
418
+ pub entry_type : u8 ,
419
+ pub length : u8 ,
420
420
}
421
421
422
422
#[ derive( Clone , Copy , Debug ) ]
423
423
#[ repr( C , packed) ]
424
424
pub struct LocalApicEntry {
425
- header : EntryHeader ,
426
- processor_id : u8 ,
427
- apic_id : u8 ,
428
- flags : u32 ,
425
+ pub header : EntryHeader ,
426
+ pub processor_id : u8 ,
427
+ pub apic_id : u8 ,
428
+ pub flags : u32 ,
429
429
}
430
430
431
431
#[ derive( Clone , Copy , Debug ) ]
432
432
#[ repr( C , packed) ]
433
433
pub struct IoApicEntry {
434
- header : EntryHeader ,
435
- io_apic_id : u8 ,
434
+ pub header : EntryHeader ,
435
+ pub io_apic_id : u8 ,
436
436
_reserved : u8 ,
437
- io_apic_address : u32 ,
438
- global_system_interrupt_base : u32 ,
437
+ pub io_apic_address : u32 ,
438
+ pub global_system_interrupt_base : u32 ,
439
439
}
440
440
441
441
#[ derive( Clone , Copy , Debug ) ]
442
442
#[ repr( C , packed) ]
443
443
pub struct InterruptSourceOverrideEntry {
444
- header : EntryHeader ,
445
- bus : u8 , // 0 - ISA bus
446
- irq : u8 , // This is bus-relative
447
- global_system_interrupt : u32 ,
448
- flags : u16 ,
444
+ pub header : EntryHeader ,
445
+ pub bus : u8 , // 0 - ISA bus
446
+ pub irq : u8 , // This is bus-relative
447
+ pub global_system_interrupt : u32 ,
448
+ pub flags : u16 ,
449
449
}
450
450
451
451
#[ derive( Clone , Copy , Debug ) ]
452
452
#[ repr( C , packed) ]
453
453
pub struct NmiSourceEntry {
454
- header : EntryHeader ,
455
- flags : u16 ,
456
- global_system_interrupt : u32 ,
454
+ pub header : EntryHeader ,
455
+ pub flags : u16 ,
456
+ pub global_system_interrupt : u32 ,
457
457
}
458
458
459
459
#[ derive( Clone , Copy , Debug ) ]
460
460
#[ repr( C , packed) ]
461
461
pub struct LocalApicNmiEntry {
462
- header : EntryHeader ,
463
- processor_id : u8 ,
464
- flags : u16 ,
465
- nmi_line : u8 , // Describes which LINTn is the NMI connected to
462
+ pub header : EntryHeader ,
463
+ pub processor_id : u8 ,
464
+ pub flags : u16 ,
465
+ pub nmi_line : u8 , // Describes which LINTn is the NMI connected to
466
466
}
467
467
468
468
#[ derive( Clone , Copy , Debug ) ]
469
469
#[ repr( C , packed) ]
470
470
pub struct LocalApicAddressOverrideEntry {
471
- header : EntryHeader ,
471
+ pub header : EntryHeader ,
472
472
_reserved : u16 ,
473
- local_apic_address : u64 ,
473
+ pub local_apic_address : u64 ,
474
474
}
475
475
476
476
/// If this entry is present, the system has an I/O SAPIC, which must be used instead of the I/O
477
477
/// APIC.
478
478
#[ derive( Clone , Copy , Debug ) ]
479
479
#[ repr( C , packed) ]
480
480
pub struct IoSapicEntry {
481
- header : EntryHeader ,
482
- io_apic_id : u8 ,
481
+ pub header : EntryHeader ,
482
+ pub io_apic_id : u8 ,
483
483
_reserved : u8 ,
484
- global_system_interrupt_base : u32 ,
485
- io_sapic_address : u64 ,
484
+ pub global_system_interrupt_base : u32 ,
485
+ pub io_sapic_address : u64 ,
486
486
}
487
487
488
488
#[ derive( Clone , Copy , Debug ) ]
489
489
#[ repr( C , packed) ]
490
490
pub struct LocalSapicEntry {
491
- header : EntryHeader ,
492
- processor_id : u8 ,
493
- local_sapic_id : u8 ,
494
- local_sapic_eid : u8 ,
491
+ pub header : EntryHeader ,
492
+ pub processor_id : u8 ,
493
+ pub local_sapic_id : u8 ,
494
+ pub local_sapic_eid : u8 ,
495
495
_reserved : [ u8 ; 3 ] ,
496
- flags : u32 ,
497
- processor_uid : u32 ,
496
+ pub flags : u32 ,
497
+ pub processor_uid : u32 ,
498
498
499
499
/// This string can be used to associate this local SAPIC to a processor defined in the
500
500
/// namespace when the `_UID` object is a string. It is a null-terminated ASCII string, and so
@@ -506,33 +506,33 @@ pub struct LocalSapicEntry {
506
506
#[ derive( Clone , Copy , Debug ) ]
507
507
#[ repr( C , packed) ]
508
508
pub struct PlatformInterruptSourceEntry {
509
- header : EntryHeader ,
510
- flags : u16 ,
511
- interrupt_type : u8 ,
512
- processor_id : u8 ,
513
- processor_eid : u8 ,
514
- io_sapic_vector : u8 ,
515
- global_system_interrupt : u32 ,
516
- platform_interrupt_source_flags : u32 ,
509
+ pub header : EntryHeader ,
510
+ pub flags : u16 ,
511
+ pub interrupt_type : u8 ,
512
+ pub processor_id : u8 ,
513
+ pub processor_eid : u8 ,
514
+ pub io_sapic_vector : u8 ,
515
+ pub global_system_interrupt : u32 ,
516
+ pub platform_interrupt_source_flags : u32 ,
517
517
}
518
518
519
519
#[ derive( Clone , Copy , Debug ) ]
520
520
#[ repr( C , packed) ]
521
521
pub struct LocalX2ApicEntry {
522
- header : EntryHeader ,
522
+ pub header : EntryHeader ,
523
523
_reserved : u16 ,
524
- x2apic_id : u32 ,
525
- flags : u32 ,
526
- processor_uid : u32 ,
524
+ pub x2apic_id : u32 ,
525
+ pub flags : u32 ,
526
+ pub processor_uid : u32 ,
527
527
}
528
528
529
529
#[ derive( Clone , Copy , Debug ) ]
530
530
#[ repr( C , packed) ]
531
531
pub struct X2ApicNmiEntry {
532
- header : EntryHeader ,
533
- flags : u16 ,
534
- processor_uid : u32 ,
535
- nmi_line : u8 ,
532
+ pub header : EntryHeader ,
533
+ pub flags : u16 ,
534
+ pub processor_uid : u32 ,
535
+ pub nmi_line : u8 ,
536
536
_reserved : [ u8 ; 3 ] ,
537
537
}
538
538
@@ -542,38 +542,38 @@ pub struct X2ApicNmiEntry {
542
542
#[ derive( Clone , Copy , Debug ) ]
543
543
#[ repr( C , packed) ]
544
544
pub struct GiccEntry {
545
- header : EntryHeader ,
545
+ pub header : EntryHeader ,
546
546
_reserved1 : u16 ,
547
- cpu_interface_number : u32 ,
548
- processor_uid : u32 ,
549
- flags : u32 ,
550
- parking_protocol_version : u32 ,
551
- performance_interrupt_gsiv : u32 ,
552
- parked_address : u64 ,
553
- gic_registers_address : u64 ,
554
- gic_virtual_registers_address : u64 ,
555
- gic_hypervisor_registers_address : u64 ,
556
- vgic_maintenance_interrupt : u32 ,
557
- gicr_base_address : u64 ,
558
- mpidr : u64 ,
559
- processor_power_efficiency_class : u8 ,
547
+ pub cpu_interface_number : u32 ,
548
+ pub processor_uid : u32 ,
549
+ pub flags : u32 ,
550
+ pub parking_protocol_version : u32 ,
551
+ pub performance_interrupt_gsiv : u32 ,
552
+ pub parked_address : u64 ,
553
+ pub gic_registers_address : u64 ,
554
+ pub gic_virtual_registers_address : u64 ,
555
+ pub gic_hypervisor_registers_address : u64 ,
556
+ pub vgic_maintenance_interrupt : u32 ,
557
+ pub gicr_base_address : u64 ,
558
+ pub mpidr : u64 ,
559
+ pub processor_power_efficiency_class : u8 ,
560
560
_reserved2 : u8 ,
561
561
/// SPE overflow Interrupt.
562
562
///
563
563
/// ACPI 6.3 defined this field. It is zero in prior versions or
564
564
/// if this processor does not support SPE.
565
- spe_overflow_interrupt : u16 ,
566
- trbe_interrupt : ExtendedField < u16 , 6 > ,
565
+ pub spe_overflow_interrupt : u16 ,
566
+ pub trbe_interrupt : ExtendedField < u16 , 6 > ,
567
567
}
568
568
569
569
#[ derive( Clone , Copy , Debug ) ]
570
570
#[ repr( C , packed) ]
571
571
pub struct GicdEntry {
572
- header : EntryHeader ,
572
+ pub header : EntryHeader ,
573
573
_reserved1 : u16 ,
574
- gic_id : u32 ,
575
- physical_base_address : u64 ,
576
- system_vector_base : u32 ,
574
+ pub gic_id : u32 ,
575
+ pub physical_base_address : u64 ,
576
+ pub system_vector_base : u32 ,
577
577
578
578
/// The GIC version
579
579
/// 0x00: Fall back to hardware discovery
@@ -582,48 +582,48 @@ pub struct GicdEntry {
582
582
/// 0x03: GICv3
583
583
/// 0x04: GICv4
584
584
/// 0x05-0xff: Reserved for future use
585
- gic_version : u8 ,
585
+ pub gic_version : u8 ,
586
586
_reserved2 : [ u8 ; 3 ] ,
587
587
}
588
588
589
589
#[ derive( Clone , Copy , Debug ) ]
590
590
#[ repr( C , packed) ]
591
591
pub struct GicMsiFrameEntry {
592
- header : EntryHeader ,
592
+ pub header : EntryHeader ,
593
593
_reserved : u16 ,
594
- frame_id : u32 ,
595
- physical_base_address : u64 ,
596
- flags : u32 ,
597
- spi_count : u16 ,
598
- spi_base : u16 ,
594
+ pub frame_id : u32 ,
595
+ pub physical_base_address : u64 ,
596
+ pub flags : u32 ,
597
+ pub spi_count : u16 ,
598
+ pub spi_base : u16 ,
599
599
}
600
600
601
601
#[ derive( Clone , Copy , Debug ) ]
602
602
#[ repr( C , packed) ]
603
603
pub struct GicRedistributorEntry {
604
- header : EntryHeader ,
604
+ pub header : EntryHeader ,
605
605
_reserved : u16 ,
606
- discovery_range_base_address : u64 ,
607
- discovery_range_length : u32 ,
606
+ pub discovery_range_base_address : u64 ,
607
+ pub discovery_range_length : u32 ,
608
608
}
609
609
610
610
#[ derive( Clone , Copy , Debug ) ]
611
611
#[ repr( C , packed) ]
612
612
pub struct GicInterruptTranslationServiceEntry {
613
- header : EntryHeader ,
613
+ pub header : EntryHeader ,
614
614
_reserved1 : u16 ,
615
- id : u32 ,
616
- physical_base_address : u64 ,
615
+ pub id : u32 ,
616
+ pub physical_base_address : u64 ,
617
617
_reserved2 : u32 ,
618
618
}
619
619
620
620
#[ derive( Clone , Copy , Debug ) ]
621
621
#[ repr( C , packed) ]
622
622
pub struct MultiprocessorWakeupEntry {
623
- header : EntryHeader ,
624
- mailbox_version : u16 ,
623
+ pub header : EntryHeader ,
624
+ pub mailbox_version : u16 ,
625
625
_reserved : u32 ,
626
- mailbox_address : u64 ,
626
+ pub mailbox_address : u64 ,
627
627
}
628
628
629
629
#[ cfg( feature = "allocator_api" ) ]
0 commit comments