Annotation of nono/vm/bus.h, revision 1.1.1.3

1.1       root        1: //
                      2: // nono
1.1.1.3 ! root        3: // Copyright (C) 2020 nono project
        !             4: // Licensed under nono-license.txt
1.1       root        5: //
                      6: 
                      7: #pragma once
                      8: 
                      9: #include "device.h"
                     10: 
1.1.1.2   root       11: extern uint64 vm_phys_read_8(uint32 addr);
                     12: extern uint64 vm_phys_read_16(uint32 addr);
                     13: extern uint64 vm_phys_read_32(uint32 addr);
                     14: extern uint64 vm_phys_write_8(uint32 addr, uint32 data);
                     15: extern uint64 vm_phys_write_16(uint32 addr, uint32 data);
                     16: extern uint64 vm_phys_write_32(uint32 addr, uint32 data);
                     17: extern uint64 vm_phys_peek_8(uint32 addr);
                     18: 
1.1.1.3 ! root       19: static inline uint64 vm_phys_peek_32(uint32 addr)
1.1.1.2   root       20: {
1.1.1.3 ! root       21:        uint64 data;
1.1.1.2   root       22: 
                     23:        data  = vm_phys_peek_8(addr + 0) << 24;
                     24:        data |= vm_phys_peek_8(addr + 1) << 16;
                     25:        data |= vm_phys_peek_8(addr + 2) <<  8;
                     26:        data |= vm_phys_peek_8(addr + 3);
                     27:        return data;
                     28: }
1.1       root       29: 
                     30: extern IODevice *devtable[256];

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.