@@ -20,7 +20,6 @@ static uint64_t* os_cycles_hlt = nullptr;
2020static uint64_t * os_cycles_total = nullptr ;
2121
2222extern " C" void * get_cpu_esp ();
23- extern " C" void kernel_sanity_checks ();
2423extern uintptr_t heap_begin;
2524extern uintptr_t heap_end;
2625extern uintptr_t _start;
@@ -144,30 +143,6 @@ void OS::start(char* _cmdline, uintptr_t mem_size)
144143 MYINFO (" Booted at monotonic_ns=%lld walltime_ns=%lld" ,
145144 solo5_clock_monotonic (), solo5_clock_wall ());
146145
147- MYINFO (" Initializing RNG" );
148- PROFILE (" RNG init" );
149- RNG::init ();
150-
151- // Seed rand with 32 bits from RNG
152- srand (rng_extract_uint32 ());
153-
154- // Custom initialization functions
155- MYINFO (" Initializing plugins" );
156- // the boot sequence is over when we get to plugins/Service::start
157- OS::boot_sequence_passed_ = true ;
158-
159- PROFILE (" Plugins init" );
160- for (auto plugin : plugins_) {
161- INFO2 (" * Initializing %s" , plugin.name_ );
162- try {
163- plugin.func_ ();
164- } catch (std::exception& e){
165- MYINFO (" Exception thrown when initializing plugin: %s" , e.what ());
166- } catch (...){
167- MYINFO (" Unknown exception when initializing plugin" );
168- }
169- }
170-
171146 Solo5_manager::init ();
172147
173148 // We don't need a start or stop function in solo5.
@@ -182,26 +157,10 @@ void OS::start(char* _cmdline, uintptr_t mem_size)
182157 Timers::oneshot (std::chrono::hours (1000000 ), [] (auto ) {});
183158
184159 Timers::ready ();
185-
186- PROFILE (" Service::start" );
187- // begin service start
188- FILLINE (' =' );
189- printf (" IncludeOS %s (%s / %i-bit)\n " ,
190- version ().c_str (), arch ().c_str (),
191- static_cast <int >(sizeof (uintptr_t )) * 8 );
192- printf (" +--> Running [ %s ]\n " , Service::name ().c_str ());
193- FILLINE (' ~' );
194-
195- Service::start ();
196- // NOTE: this is a feature for service writers, don't move!
197- kernel_sanity_checks ();
198160}
199161
200162void OS::event_loop ()
201163{
202- // uint8_t *data = (uint8_t *) malloc(1520);
203- // assert(data);
204-
205164 while (power_) {
206165 int rc;
207166
@@ -217,10 +176,6 @@ void OS::event_loop()
217176 rc = solo5_poll (solo5_clock_monotonic () + 500000ULL ); // now + 0.5 ms
218177 Timers::timers_handler ();
219178 if (rc) {
220-
221- // int len = 1520;
222- // memset(data, 0, 1520);
223-
224179 for (auto & nic : hw::Devices::devices<hw::Nic>()) {
225180 nic->poll ();
226181 break ;
0 commit comments