Subversion Repositories HelenOS

Rev

Rev 3236 | Rev 3908 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3236 Rev 3880
Line 73... Line 73...
73
 * mapped devices and cannot be used.
73
 * mapped devices and cannot be used.
74
 *
74
 *
75
 */
75
 */
76
static bool frame_available(pfn_t frame)
76
static bool frame_available(pfn_t frame)
77
{
77
{
78
#if MACHINE == msim
78
#ifdef msim
79
    /* MSIM device (dprinter) */
79
    /* MSIM device (dprinter) */
80
    if (frame == (KA2PA(MSIM_VIDEORAM) >> ZERO_PAGE_WIDTH))
80
    if (frame == (KA2PA(MSIM_VIDEORAM) >> ZERO_PAGE_WIDTH))
81
        return false;
81
        return false;
82
   
82
   
83
    /* MSIM device (dkeyboard) */
83
    /* MSIM device (dkeyboard) */
84
    if (frame == (KA2PA(MSIM_KBD_ADDRESS) >> ZERO_PAGE_WIDTH))
84
    if (frame == (KA2PA(MSIM_KBD_ADDRESS) >> ZERO_PAGE_WIDTH))
85
        return false;
85
        return false;
86
#endif
86
#endif
87
 
87
 
88
#if MACHINE == simics
88
#ifdef simics
89
    /* Simics device (serial line) */
89
    /* Simics device (serial line) */
90
    if (frame == (KA2PA(SERIAL_ADDRESS) >> ZERO_PAGE_WIDTH))
90
    if (frame == (KA2PA(SERIAL_ADDRESS) >> ZERO_PAGE_WIDTH))
91
        return false;
91
        return false;
92
#endif
92
#endif
93
 
93
 
94
#if (MACHINE == lgxemul) || (MACHINE == bgxemul)
94
#if defined(lgxemul) || defined(bgxemul)
95
    /* gxemul devices */
95
    /* gxemul devices */
96
    if (overlaps(frame << ZERO_PAGE_WIDTH, ZERO_PAGE_SIZE,
96
    if (overlaps(frame << ZERO_PAGE_WIDTH, ZERO_PAGE_SIZE,
97
        0x10000000, MB2SIZE(256)))
97
        0x10000000, MB2SIZE(256)))
98
        return false;
98
        return false;
99
#endif
99
#endif
Line 216... Line 216...
216
                    avail = false;
216
                    avail = false;
217
                else {
217
                else {
218
                    ZERO_PAGE_VALUE = 0xdeadbeef;
218
                    ZERO_PAGE_VALUE = 0xdeadbeef;
219
                    if (ZERO_PAGE_VALUE != 0xdeadbeef)
219
                    if (ZERO_PAGE_VALUE != 0xdeadbeef)
220
                        avail = false;
220
                        avail = false;
221
#if (MACHINE == lgxemul) || (MACHINE == bgxemul)
221
#if defined(lgxemul) || defined(bgxemul)
222
                    else {
222
                    else {
223
                        ZERO_PAGE_VALUE_KSEG1(frame) = 0xaabbccdd;
223
                        ZERO_PAGE_VALUE_KSEG1(frame) = 0xaabbccdd;
224
                        if (ZERO_PAGE_VALUE_KSEG1(frame) != 0xaabbccdd)
224
                        if (ZERO_PAGE_VALUE_KSEG1(frame) != 0xaabbccdd)
225
                            avail = false;
225
                            avail = false;
226
                    }
226
                    }