Kernel: Add some sanity assertions/functions
This commit is contained in:
		
							parent
							
								
									c11e84b248
								
							
						
					
					
						commit
						603fc200e6
					
				|  | @ -19,6 +19,7 @@ namespace Kernel::PCI | |||
| 	class BarRegion | ||||
| 	{ | ||||
| 		BAN_NON_COPYABLE(BarRegion); | ||||
| 		BAN_NON_MOVABLE(BarRegion); | ||||
| 
 | ||||
| 	public: | ||||
| 		static BAN::ErrorOr<BAN::UniqPtr<BarRegion>> create(PCI::Device&, uint8_t bar_num); | ||||
|  |  | |||
|  | @ -119,6 +119,7 @@ namespace Kernel | |||
| 	BAN::ErrorOr<BAN::UniqPtr<VirtualRange>> VirtualRange::clone(PageTable& page_table) | ||||
| 	{ | ||||
| 		ASSERT(&PageTable::current() == &m_page_table); | ||||
| 		ASSERT(&m_page_table != &page_table); | ||||
| 
 | ||||
| 		auto result = TRY(create_to_vaddr(page_table, vaddr(), size(), flags(), m_preallocated)); | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue